function currencyFormat(n){var t=n.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,");return t.indexOf("-")>-1&&(t="("+t.substring(1)+")"),"$"+t}function popUpWindow(n,t,i,r,u){popUpWin&&(popUpWin.closed||popUpWin.close());popUpWin=open(n,"popUpWin","toolbar=no,location=no,directories=no,status=yes,menub ar=no,scrollbars=1,resizable=yes,copyhistory=yes,width="+r+",height="+u+",left="+t+", top="+i+",screenX="+t+",screenY="+i+"")}function ParsePhoneField(n){var r,t,i,u;for(n=n.trim(),r=!0,t=n.length,t>9&&(t=9),i=0;i<t;i++)if(u=n.charAt(i),"0123456789".indexOf(u)==-1){r=!1;break}return r&&(n.length>2&&(n=n.substring(0,3)+"-"+n.substring(3,n.length)),n.length>7&&(n=n.substring(0,7)+"-"+n.substring(7,n.length)),n.length>12&&n.charAt(12)!=" "&&(n=n.substring(0,12)+" "+n.substring(12,n.length))),n}function updateDateRange(n,t,i){var r=$(i).val().split(" - ");$(n).val(r[0]);$(t).val(r[1])}function updateVenueSelection(){$("#venueSelectValues").val($("#venueSelect").val())}Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(n){for(var i=Date.CultureInfo.monthNames,u=Date.CultureInfo.abbreviatedMonthNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.getDayNumberFromName=function(n){for(var i=Date.CultureInfo.dayNames,u=Date.CultureInfo.abbreviatedDayNames,f=Date.CultureInfo.shortestDayNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0};Date.getDaysInMonth=function(n,t){return[31,Date.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]};Date.getTimezoneOffset=function(n,t){return t||!1?Date.CultureInfo.abbreviatedTimeZoneDST[n.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[n.toUpperCase()]};Date.getTimezoneAbbreviation=function(n,t){var i=t||!1?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;for(var r in i)if(i[r]===n)return r;return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(n){if(isNaN(this))throw new Error(this);if(n instanceof Date&&!isNaN(n))return this>n?1:this<n?-1:0;throw new TypeError(n);};Date.prototype.equals=function(n){return this.compareTo(n)===0};Date.prototype.between=function(n,t){var i=this.getTime();return i>=n.getTime()&&i<=t.getTime()};Date.prototype.addMilliseconds=function(n){return this.setMilliseconds(this.getMilliseconds()+n),this};Date.prototype.addSeconds=function(n){return this.addMilliseconds(n*1e3)};Date.prototype.addMinutes=function(n){return this.addMilliseconds(n*6e4)};Date.prototype.addHours=function(n){return this.addMilliseconds(n*36e5)};Date.prototype.addDays=function(n){return this.addMilliseconds(n*864e5)};Date.prototype.addWeeks=function(n){return this.addMilliseconds(n*6048e5)};Date.prototype.addMonths=function(n){var t=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+n),this.setDate(Math.min(t,this.getDaysInMonth())),this};Date.prototype.addYears=function(n){return this.addMonths(n*12)};Date.prototype.add=function(n){if(typeof n=="number")return this._orient=n,this;var t=n;return(t.millisecond||t.milliseconds)&&this.addMilliseconds(t.millisecond||t.milliseconds),(t.second||t.seconds)&&this.addSeconds(t.second||t.seconds),(t.minute||t.minutes)&&this.addMinutes(t.minute||t.minutes),(t.hour||t.hours)&&this.addHours(t.hour||t.hours),(t.month||t.months)&&this.addMonths(t.month||t.months),(t.year||t.years)&&this.addYears(t.year||t.years),(t.day||t.days)&&this.addDays(t.day||t.days),this};Date._validate=function(n,t,i,r){if(typeof n!="number")throw new TypeError(n+" is not a Number.");else if(n<t||n>i)throw new RangeError(n+" is not a valid value for "+r+".");return!0};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds")};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds")};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes")};Date.validateHour=function(n){return Date._validate(n,0,23,"hours")};Date.validateDay=function(n,t,i){return Date._validate(n,1,Date.getDaysInMonth(t,i),"days")};Date.validateMonth=function(n){return Date._validate(n,0,11,"months")};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds")};Date.prototype.set=function(n){var t=n;return t.millisecond||t.millisecond===0||(t.millisecond=-1),t.second||t.second===0||(t.second=-1),t.minute||t.minute===0||(t.minute=-1),t.hour||t.hour===0||(t.hour=-1),t.day||t.day===0||(t.day=-1),t.month||t.month===0||(t.month=-1),t.year||t.year===0||(t.year=-1),t.millisecond!=-1&&Date.validateMillisecond(t.millisecond)&&this.addMilliseconds(t.millisecond-this.getMilliseconds()),t.second!=-1&&Date.validateSecond(t.second)&&this.addSeconds(t.second-this.getSeconds()),t.minute!=-1&&Date.validateMinute(t.minute)&&this.addMinutes(t.minute-this.getMinutes()),t.hour!=-1&&Date.validateHour(t.hour)&&this.addHours(t.hour-this.getHours()),t.month!==-1&&Date.validateMonth(t.month)&&this.addMonths(t.month-this.getMonth()),t.year!=-1&&Date.validateYear(t.year)&&this.addYears(t.year-this.getFullYear()),t.day!=-1&&Date.validateDay(t.day,this.getFullYear(),this.getMonth())&&this.addDays(t.day-this.getDate()),t.timezone&&this.setTimezone(t.timezone),t.timezoneOffset&&this.setTimezoneOffset(t.timezoneOffset),this};Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.isLeapYear=function(){var n=this.getFullYear();return n%4==0&&n%100!=0||n%400==0};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(n,t){var i=(n-this.getDay()+7*(t||1))%7;return this.addDays(i===0?i+=7*(t||1):i)};Date.prototype.moveToMonth=function(n,t){var i=(n-this.getMonth()+12*(t||1))%12;return this.addMonths(i===0?i+=12*(t||1):i)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864e5)};Date.prototype.getWeekOfYear=function(n){var t=this.getFullYear(),e=this.getMonth(),o=this.getDate(),s=n||Date.CultureInfo.firstDayOfWeek,r=8-new Date(t,0,1).getDay(),f,i,u;return r==8&&(r=1),f=(Date.UTC(t,e,o,0,0,0)-Date.UTC(t,0,1,0,0,0))/864e5+1,i=Math.floor((f-r+7)/7),i===s&&(t--,u=8-new Date(t,0,1).getDay(),i=u==2||u==8?53:52),i};Date.prototype.isDST=function(){return console.log("isDST"),this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(n){var t=this.getTimezoneOffset(),i=Number(n)*-6/10;return this.addMinutes(i-t),this};Date.prototype.setTimezone=function(n){return this.setTimezoneOffset(Date.getTimezoneOffset(n))};Date.prototype.getUTCOffset=function(){var t=this.getTimezoneOffset()*-10/6,n;return t<0?(n=(t-1e4).toString(),n[0]+n.substr(2)):(n=(t+1e4).toString(),"+"+n.substr(1))};Date.prototype.getDayName=function(n){return n?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(n){return n?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(n){var t=this,i=function(n){return n.toString().length==1?"0"+n:n};return n?n.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(n){switch(n){case"hh":return i(t.getHours()<13?t.getHours():t.getHours()-12);case"h":return t.getHours()<13?t.getHours():t.getHours()-12;case"HH":return i(t.getHours());case"H":return t.getHours();case"mm":return i(t.getMinutes());case"m":return t.getMinutes();case"ss":return i(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return t.getFullYear();case"yy":return t.getFullYear().toString().substring(2,4);case"dddd":return t.getDayName();case"ddd":return t.getDayName(!0);case"dd":return i(t.getDate());case"d":return t.getDate().toString();case"MMMM":return t.getMonthName();case"MMM":return t.getMonthName(!0);case"MM":return i(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return t.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return t.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()};Date.now=function(){return new Date};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=1;Date.prototype.next=function(){return this._orient=1,this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){return this._orient=-1,this};Date.prototype._is=!1;Date.prototype.is=function(){return this._is=!0,this};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var n={};return n[this._dateElement]=this,Date.now().add(n)};Number.prototype.ago=function(){var n={};return n[this._dateElement]=this*-1,Date.now().add(n)},function(){for(var h,i,c,l,u,n=Date.prototype,s=Number.prototype,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),e="january february march april may june july august september october november december".split(/\s/),o="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),t,a=function(n){return function(){return this._is?(this._is=!1,this.getDay()==n):this.moveToDayOfWeek(n,this._orient)}},r=0;r<f.length;r++)n[f[r]]=n[f[r].substring(0,3)]=a(r);for(h=function(n){return function(){return this._is?(this._is=!1,this.getMonth()===n):this.moveToMonth(n,this._orient)}},i=0;i<e.length;i++)n[e[i]]=n[e[i].substring(0,3)]=h(i);for(c=function(n){return function(){return n.substring(n.length-1)!="s"&&(n+="s"),this["add"+n](this._orient)}},l=function(n){return function(){return this._dateElement=n,this}},u=0;u<o.length;u++)t=o[u].toLowerCase(),n[t]=n[t+"s"]=c(o[u]),s[t]=s[t+"s"]=l(t)}();Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};Date.prototype.getOrdinal=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"}},function(){var i,o,f,u;Date.Parsing={Exception:function(n){this.message="Parse error at '"+n.substring(0,10)+" ...'"}};var t=Date.Parsing,n=t.Operators={rtoken:function(n){return function(i){var r=i.match(n);if(r)return[r[0],i.substring(r[0].length)];throw new t.Exception(i);}},token:function(){return function(t){return n.rtoken(new RegExp("^s*"+t+"s*"))(t)}},stoken:function(t){return n.rtoken(new RegExp("^"+t))},until:function(n){return function(t){for(var r=[],i=null;t.length;){try{i=n.call(this,t)}catch(u){r.push(i[0]);t=i[1];continue}break}return[r,t]}},many:function(n){return function(t){for(var i=[],r=null;t.length;){try{r=n.call(this,t)}catch(u){return[i,t]}i.push(r[0]);t=r[1]}return[i,t]}},optional:function(n){return function(t){var i=null;try{i=n.call(this,t)}catch(r){return[null,t]}return[i[0],i[1]]}},not:function(n){return function(i){try{n.call(this,i)}catch(r){return[null,i]}throw new t.Exception(i);}},ignore:function(n){return n?function(t){var i=null;return i=n.call(this,t),[null,i[1]]}:null},product:function(){for(var i=arguments[0],u=Array.prototype.slice.call(arguments,1),r=[],t=0;t<i.length;t++)r.push(n.each(i[t],u));return r},cache:function(n){var r={},i=null;return function(u){try{i=r[u]=r[u]||n.call(this,u)}catch(f){i=r[u]=f}if(i instanceof t.Exception)throw i;else return i}},any:function(){var n=arguments;return function(i){for(var r=null,u=0;u<n.length;u++)if(n[u]!=null){try{r=n[u].call(this,i)}catch(f){r=null}if(r)return r}throw new t.Exception(i);}},each:function(){var n=arguments;return function(i){for(var f=[],u=null,r=0;r<n.length;r++)if(n[r]!=null){try{u=n[r].call(this,i)}catch(e){throw new t.Exception(i);}f.push(u[0]);i=u[1]}return[f,i]}},all:function(){var t=arguments,n=n;return n.each(n.optional(t))},sequence:function(i,r,u){return(r=r||n.rtoken(/^\s*/),u=u||null,i.length==1)?i[0]:function(n){for(var f=null,e=null,s=[],o=0;o<i.length;o++){try{f=i[o].call(this,n)}catch(h){break}s.push(f[0]);try{e=r.call(this,f[1])}catch(c){e=null;break}n=e[1]}if(!f)throw new t.Exception(n);if(e)throw new t.Exception(e[1]);if(u)try{f=u.call(this,f[1])}catch(l){throw new t.Exception(f[1]);}return[s,f?f[1]:n]}},between:function(t,i,u){u=u||t;var f=n.each(n.ignore(t),i,n.ignore(u));return function(n){var t=f.call(this,n);return[[t[0][0],r[0][2]],t[1]]}},list:function(t,i,r){return i=i||n.rtoken(/^\s*/),r=r||null,t instanceof Array?n.each(n.product(t.slice(0,-1),n.ignore(i)),t.slice(-1),n.ignore(r)):n.each(n.many(n.each(t,n.ignore(i))),px,n.ignore(r))},set:function(i,r,u){return r=r||n.rtoken(/^\s*/),u=u||null,function(f){for(var y,a,s=null,l=null,h=null,c=null,e=[[],f],o=!1,v=0;v<i.length;v++){h=null;l=null;s=null;o=i.length==1;try{s=i[v].call(this,f)}catch(p){continue}if(c=[[s[0]],s[1]],s[1].length>0&&!o)try{h=r.call(this,s[1])}catch(w){o=!0}else o=!0;if(o||h[1].length!==0||(o=!0),!o){for(y=[],a=0;a<i.length;a++)v!=a&&y.push(i[a]);l=n.set(y,r).call(this,h[1]);l[0].length>0&&(c[0]=c[0].concat(l[0]),c[1]=l[1])}if(c[1].length<e[1].length&&(e=c),e[1].length===0)break}if(e[0].length===0)return e;if(u){try{h=u.call(this,e[1])}catch(b){throw new t.Exception(e[1]);}e[1]=h[1]}return e}},forward:function(n,t){return function(i){return n[t].call(this,i)}},replace:function(n,t){return function(i){var r=n.call(this,i);return[t,r[1]]}},process:function(n,t){return function(i){var r=n.call(this,i);return[t.call(this,r[0]),r[1]]}},min:function(n,i){return function(r){var u=i.call(this,r);if(u[0].length<n)throw new t.Exception(r);return u}}},s=function(n){return function(){var t=null,u=[],i,r;if(arguments.length>1?t=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(t=arguments[0]),t)for(i=0,r=t.shift();i<r.length;i++)return t.unshift(r[i]),u.push(n.apply(null,t)),t.shift(),u;else return n.apply(null,arguments)}},e="optional not ignore cache".split(/\s/);for(i=0;i<e.length;i++)n[e[i]]=s(n[e[i]]);for(o=function(n){return function(){return arguments[0]instanceof Array?n.apply(null,arguments[0]):n.apply(null,arguments)}},f="each any all".split(/\s/),u=0;u<f.length;u++)n[f[u]]=o(n[f[u]])}(),function(){var o=function(n){for(var i=[],t=0;t<n.length;t++)n[t]instanceof Array?i=i.concat(o(n[t])):n[t]&&i.push(n[t]);return i},u,f,e;Date.Grammar={};Date.Translator={hour:function(n){return function(){this.hour=Number(n)}},minute:function(n){return function(){this.minute=Number(n)}},second:function(n){return function(){this.second=Number(n)}},meridian:function(n){return function(){this.meridian=n.slice(0,1).toLowerCase()}},timezone:function(n){return function(){var t=n.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=n.toLowerCase()}},day:function(n){var t=n[0];return function(){this.day=Number(t.match(/\d+/)[0])}},month:function(n){return function(){this.month=n.length==3?Date.getMonthNumberFromName(n):Number(n)-1}},year:function(n){return function(){var t=Number(n);this.year=n.length>2?t:t+(t+2e3<Date.CultureInfo.twoDigitYearMax?2e3:1900)}},rday:function(n){return function(){switch(n){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=!0}}},finishExact:function(n){var r,t,i;for(n=n instanceof Array?n:[n],r=new Date,this.year=r.getFullYear(),this.month=r.getMonth(),this.day=1,this.hour=0,this.minute=0,this.second=0,t=0;t<n.length;t++)n[t]&&n[t].call(this);if(this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour,this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return i=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second),this.timezone?i.set({timezone:this.timezone}):this.timezoneOffset&&i.set({timezoneOffset:this.timezoneOffset}),i},finish:function(n){var f,r,t,u;if(n=n instanceof Array?o(n):[n],n.length===0)return null;for(f=0;f<n.length;f++)typeof n[f]=="function"&&n[f].call(this);if(this.now)return new Date;var i=Date.today(),e=!!(this.days!=null||this.orient||this.operator);return e?(u=this.orient=="past"||this.operator=="subtract"?-1:1,this.weekday&&(this.unit="day",r=Date.getDayNumberFromName(this.weekday)-i.getDay(),t=7,this.days=r?(r+u*t)%t:u*t),this.month&&(this.unit="month",r=this.month-i.getMonth(),t=12,this.months=r?(r+u*t)%t:u*t,this.month=null),this.unit||(this.unit="day"),(this[this.unit+"s"]==null||this.operator!=null)&&(this.value||(this.value=1),this.unit=="week"&&(this.unit="day",this.value=this.value*7),this[this.unit+"s"]=this.value*u),i.add(this)):(this.meridian&&this.hour&&(this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour),this.weekday&&!this.day&&(this.day=i.addDays(Date.getDayNumberFromName(this.weekday)-i.getDay()).getDate()),this.month&&!this.day&&(this.day=1),i.set(this))}};var t=Date.Parsing.Operators,n=Date.Grammar,i=Date.Translator,r;n.datePartDelimiter=t.rtoken(/^([\s\-\.\,\/\x27]+)/);n.timePartDelimiter=t.stoken(":");n.whiteSpace=t.rtoken(/^\s*/);n.generalDelimiter=t.rtoken(/^(([\s\,]|at|on)+)/);u={};n.ctoken=function(n){var r=u[n],i;if(!r){var o=Date.CultureInfo.regexPatterns,f=n.split(/\s+/),e=[];for(i=0;i<f.length;i++)e.push(t.replace(t.rtoken(o[f[i]]),f[i]));r=u[n]=t.any.apply(null,e)}return r};n.ctoken2=function(n){return t.rtoken(Date.CultureInfo.regexPatterns[n])};n.h=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),i.hour));n.hh=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2])/),i.hour));n.H=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),i.hour));n.HH=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3])/),i.hour));n.m=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.minute));n.mm=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.minute));n.s=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.second));n.ss=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.second));n.hms=t.cache(t.sequence([n.H,n.mm,n.ss],n.timePartDelimiter));n.t=t.cache(t.process(n.ctoken2("shortMeridian"),i.meridian));n.tt=t.cache(t.process(n.ctoken2("longMeridian"),i.meridian));n.z=t.cache(t.process(t.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),i.timezone));n.zz=t.cache(t.process(t.rtoken(/^(\+|\-)\s*\d\d\d\d/),i.timezone));n.zzz=t.cache(t.process(n.ctoken2("timezone"),i.timezone));n.timeSuffix=t.each(t.ignore(n.whiteSpace),t.set([n.tt,n.zzz]));n.time=t.each(t.optional(t.ignore(t.stoken("T"))),n.hms,n.timeSuffix);n.d=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1]|\d)/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.dd=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1])/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.ddd=n.dddd=t.cache(t.process(n.ctoken("sun mon tue wed thu fri sat"),function(n){return function(){this.weekday=n}}));n.M=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d|\d)/),i.month));n.MM=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d)/),i.month));n.MMM=n.MMMM=t.cache(t.process(n.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),i.month));n.y=t.cache(t.process(t.rtoken(/^(\d\d?)/),i.year));n.yy=t.cache(t.process(t.rtoken(/^(\d\d)/),i.year));n.yyy=t.cache(t.process(t.rtoken(/^(\d\d?\d?\d?)/),i.year));n.yyyy=t.cache(t.process(t.rtoken(/^(\d\d\d\d)/),i.year));r=function(){return t.each(t.any.apply(null,arguments),t.not(n.ctoken2("timeContext")))};n.day=r(n.d,n.dd);n.month=r(n.M,n.MMM);n.year=r(n.yyyy,n.yy);n.orientation=t.process(n.ctoken("past future"),function(n){return function(){this.orient=n}});n.operator=t.process(n.ctoken("add subtract"),function(n){return function(){this.operator=n}});n.rday=t.process(n.ctoken("yesterday tomorrow today now"),i.rday);n.unit=t.process(n.ctoken("minute hour day week month year"),function(n){return function(){this.unit=n}});n.value=t.process(t.rtoken(/^\d\d?(st|nd|rd|th)?/),function(n){return function(){this.value=n.replace(/\D/g,"")}});n.expression=t.set([n.rday,n.operator,n.value,n.unit,n.orientation,n.ddd,n.MMM]);r=function(){return t.set(arguments,n.datePartDelimiter)};n.mdy=r(n.ddd,n.month,n.day,n.year);n.ymd=r(n.ddd,n.year,n.month,n.day);n.dmy=r(n.ddd,n.day,n.month,n.year);n.date=function(t){return(n[Date.CultureInfo.dateElementOrder]||n.mdy).call(this,t)};n.format=t.process(t.many(t.any(t.process(t.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(t){if(n[t])return n[t];throw Date.Parsing.Exception(t);}),t.process(t.rtoken(/^[^dMyhHmstz]+/),function(n){return t.ignore(t.stoken(n))}))),function(n){return t.process(t.each.apply(null,n),i.finishExact)});f={};e=function(t){return f[t]=f[t]||n.format(t)[0]};n.formats=function(n){var r,i;if(n instanceof Array){for(r=[],i=0;i<n.length;i++)r.push(e(n[i]));return t.any.apply(null,r)}return e(n)};n._formats=n.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);n._start=t.process(t.set([n.date,n.time,n.expression],n.generalDelimiter,n.whiteSpace),i.finish);n.start=function(t){try{var i=n._formats.call({},t);if(i[1].length===0)return i}catch(r){}return n._start.call({},t)}}();Date._parse=Date.parse;Date.parse=function(n){var t=null;if(!n)return null;try{t=Date.Grammar.start.call({},n)}catch(i){return null}return t[1].length===0?t[0]:null};Date.getParseFunction=function(n){var t=Date.Grammar.formats(n);return function(n){var i=null;try{i=t.call({},n)}catch(r){return null}return i[1].length===0?i[0]:null}};Date.parseExact=function(n,t){return Date.getParseFunction(t)(n)};var popUpWin=0;(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.moment=t()})(this,function(){"use strict";function t(){return df.apply(null,arguments)}function rh(n){df=n}function nt(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function gt(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function s(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function fu(n){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(n).length===0;for(var t in n)if(s(n,t))return!1;return!0}function w(n){return n===void 0}function ct(n){return typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]"}function vi(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function gf(n,t){for(var r=[],u=n.length,i=0;i<u;++i)r.push(t(n[i],i));return r}function bt(n,t){for(var i in t)s(t,i)&&(n[i]=t[i]);return s(t,"toString")&&(n.toString=t.toString),s(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ut(n,t,i,r){return vo(n,t,i,r,!0).utc()}function uh(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function u(n){return n._pf==null&&(n._pf=uh()),n._pf}function eu(n){var t=null,r=!1,i=n._d&&!isNaN(n._d.getTime());return(i&&(t=u(n),r=ne.call(t.parsedDateParts,function(n){return n!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),n._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined)),Object.isFrozen!=null&&Object.isFrozen(n))?i:(n._isValid=i,n._isValid)}function ir(n){var t=ut(NaN);return n!=null?bt(u(t),n):u(t).userInvalidated=!0,t}function su(n,t){var i,r,f,e=ou.length;if(w(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),w(t._i)||(n._i=t._i),w(t._f)||(n._f=t._f),w(t._l)||(n._l=t._l),w(t._strict)||(n._strict=t._strict),w(t._tzm)||(n._tzm=t._tzm),w(t._isUTC)||(n._isUTC=t._isUTC),w(t._offset)||(n._offset=t._offset),w(t._pf)||(n._pf=u(t)),w(t._locale)||(n._locale=t._locale),e>0)for(i=0;i<e;i++)r=ou[i],f=t[r],w(f)||(n[r]=f);return n}function yi(n){su(this,n);this._d=new Date(n._d!=null?n._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));rr===!1&&(rr=!0,t.updateOffset(this),rr=!1)}function tt(n){return n instanceof yi||n!=null&&n._isAMomentObject!=null}function te(n){t.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+n)}function k(n,i){var r=!0;return bt(function(){if(t.deprecationHandler!=null&&t.deprecationHandler(null,n),r){for(var o=[],u,e,h=arguments.length,f=0;f<h;f++){if(u="",typeof arguments[f]=="object"){u+="\n["+f+"] ";for(e in arguments[0])s(arguments[0],e)&&(u+=e+": "+arguments[0][e]+", ");u=u.slice(0,-2)}else u=arguments[f];o.push(u)}te(n+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack);r=!1}return i.apply(this,arguments)},i)}function ie(n,i){t.deprecationHandler!=null&&t.deprecationHandler(n,i);hu[n]||(te(i),hu[n]=!0)}function ft(n){return typeof Function!="undefined"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function fh(n){var t;for(var i in n)s(n,i)&&(t=n[i],ft(t)?this[i]=t:this["_"+i]=t);this._config=n;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function cu(n,t){var r=bt({},n);for(var i in t)s(t,i)&&(gt(n[i])&&gt(t[i])?(r[i]={},bt(r[i],n[i]),bt(r[i],t[i])):t[i]!=null?r[i]=t[i]:delete r[i]);for(i in n)s(n,i)&&!s(t,i)&&gt(n[i])&&(r[i]=bt({},r[i]));return r}function lu(n){n!=null&&this.set(n)}function eh(n,t,i){var r=this._calendar[n]||this._calendar.sameElse;return ft(r)?r.call(t,i):r}function et(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u=r;typeof r=="string"&&(u=function(){return this[r]()});n&&(ui[n]=u);t&&(ui[t[0]]=function(){return et(u.apply(this,arguments),t[1],t[2])});i&&(ui[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function oh(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function sh(n){for(var t=n.match(au),i=0,r=t.length;i<r;i++)t[i]=ui[t[i]]?ui[t[i]]:oh(t[i]);return function(i){for(var f="",u=0;u<r;u++)f+=ft(t[u])?t[u].call(i,n):t[u];return f}}function fr(n,t){return n.isValid()?(t=fe(t,n.localeData()),vu[t]=vu[t]||sh(t),vu[t](n)):n.localeData().invalidDate()}function fe(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(ur.lastIndex=0;i>=0&&ur.test(n);)n=n.replace(ur,r),ur.lastIndex=0,i-=1;return n}function hh(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.match(au).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[n])}function ch(){return this._invalidDate}function lh(n){return this._ordinal.replace("%d",n)}function ah(n,t,i,r){var u=this._relativeTime[i];return ft(u)?u(n,t,i,r):u.replace(/%d/i,n)}function vh(n,t){var i=this._relativeTime[n>0?"future":"past"];return ft(i)?i(t):i.replace(/%s/i,t)}function d(n){return typeof n=="string"?yu[n]||yu[n.toLowerCase()]:undefined}function pu(n){var r={},t;for(var i in n)s(n,i)&&(t=d(i),t&&(r[t]=n[i]));return r}function yh(n){var t=[];for(var i in n)s(n,i)&&t.push({unit:i,priority:le[i]});return t.sort(function(n,t){return n.priority-t.priority}),t}function i(n,t,i){lr[n]=ft(t)?t:function(n){return n&&i?i:t}}function wh(n,t){return s(lr,n)?lr[n](t._strict,t._locale):new RegExp(bh(n))}function bh(n){return lt(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}))}function lt(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function g(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function f(n){var t=+n,i=0;return t!==0&&isFinite(t)&&(i=g(t)),i}function h(n,t){var i,r=t,u;for(typeof n=="string"&&(n=[n]),ct(t)&&(r=function(n,i){i[t]=f(n)}),u=n.length,i=0;i<u;i++)ar[n[i]]=r}function wi(n,t){h(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function kh(n,t,i){t!=null&&s(ar,n)&&ar[n](t,i._a,i,n)}function vr(n){return n%4==0&&n%100!=0||n%400==0}function bi(n){return vr(n)?366:365}function nc(){return vr(this.year())}function oi(n,i){return function(r){return r!=null?(we(this,n,r),t.updateOffset(this,i),this):ki(this,n)}}function ki(n,t){if(!n.isValid())return NaN;var i=n._d,r=n._isUTC;switch(t){case"Milliseconds":return r?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return r?i.getUTCSeconds():i.getSeconds();case"Minutes":return r?i.getUTCMinutes():i.getMinutes();case"Hours":return r?i.getUTCHours():i.getHours();case"Date":return r?i.getUTCDate():i.getDate();case"Day":return r?i.getUTCDay():i.getDay();case"Month":return r?i.getUTCMonth():i.getMonth();case"FullYear":return r?i.getUTCFullYear():i.getFullYear();default:return NaN}}function we(n,t,i){var r,u,e,o,f;if(n.isValid()&&!isNaN(i)){r=n._d;u=n._isUTC;switch(t){case"Milliseconds":return void(u?r.setUTCMilliseconds(i):r.setMilliseconds(i));case"Seconds":return void(u?r.setUTCSeconds(i):r.setSeconds(i));case"Minutes":return void(u?r.setUTCMinutes(i):r.setMinutes(i));case"Hours":return void(u?r.setUTCHours(i):r.setHours(i));case"Date":return void(u?r.setUTCDate(i):r.setDate(i));case"FullYear":break;default:return}e=i;o=n.month();f=n.date();f=f===29&&o===1&&!vr(e)?28:f;void(u?r.setUTCFullYear(e,o,f):r.setFullYear(e,o,f))}}function tc(n){return(n=d(n),ft(this[n]))?this[n]():this}function ic(n,t){if(typeof n=="object"){n=pu(n);for(var r=yh(n),u=r.length,i=0;i<u;i++)this[r[i].unit](n[r[i].unit])}else if(n=d(n),ft(this[n]))return this[n](t);return this}function rc(n,t){return(n%t+t)%t}function gu(n,t){if(isNaN(n)||isNaN(t))return NaN;var i=rc(t,12);return n+=(t-i)/12,i===1?vr(n)?29:28:31-i%7%2}function oc(n,t){return n?nt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||ke).test(t)?"format":"standalone"][n.month()]:nt(this._months)?this._months:this._months.standalone}function sc(n,t){return n?nt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[ke.test(t)?"format":"standalone"][n.month()]:nt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function hc(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)e=ut([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?t==="MMM"?(r=v.call(this._shortMonthsParse,f),r!==-1?r:null):(r=v.call(this._longMonthsParse,f),r!==-1?r:null):t==="MMM"?(r=v.call(this._shortMonthsParse,f),r!==-1)?r:(r=v.call(this._longMonthsParse,f),r!==-1?r:null):(r=v.call(this._longMonthsParse,f),r!==-1)?r:(r=v.call(this._shortMonthsParse,f),r!==-1?r:null)}function cc(n,t,i){var r,u,f;if(this._monthsParseExact)return hc.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=ut([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="MMMM"&&this._longMonthsParse[r].test(n))||i&&t==="MMM"&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function de(n,t){if(!n.isValid())return n;if(typeof t=="string")if(/^\d+$/.test(t))t=f(t);else if(t=n.localeData().monthsParse(t),!ct(t))return n;var r=t,i=n.date();return i=i<29?i:Math.min(i,gu(n.year(),r)),void(n._isUTC?n._d.setUTCMonth(r,i):n._d.setMonth(r,i)),n}function ge(n){return n!=null?(de(this,n),t.updateOffset(this,!0),this):ki(this,"Month")}function lc(){return gu(this.year(),this.month())}function ac(n){return this._monthsParseExact?(s(this,"_monthsRegex")||no.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=fc),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function vc(n){return this._monthsParseExact?(s(this,"_monthsRegex")||no.call(this),n?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ec),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function no(){function i(n,t){return t.length-n.length}for(var r=[],u=[],n=[],f,e,o,t=0;t<12;t++)f=ut([2e3,t]),e=lt(this.monthsShort(f,"")),o=lt(this.months(f,"")),r.push(e),u.push(o),n.push(o),n.push(e);r.sort(i);u.sort(i);n.sort(i);this._monthsRegex=new RegExp("^("+n.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+u.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function yc(n,t,i,r,u,f,e){var o;return n<100&&n>=0?(o=new Date(n+400,t,i,r,u,f,e),isFinite(o.getFullYear())&&o.setFullYear(n)):o=new Date(n,t,i,r,u,f,e),o}function di(n){var t,i;return n<100&&n>=0?(i=Array.prototype.slice.call(arguments),i[0]=n+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n)):t=new Date(Date.UTC.apply(null,arguments)),t}function yr(n,t,i){var r=7+t-i,u=(7+di(n,0,r).getUTCDay()-t)%7;return-u+r-1}function to(n,t,i,r,u){var s=(7+i-r)%7,h=yr(n,r,u),f=1+7*(t-1)+s+h,e,o;return f<=0?(e=n-1,o=bi(e)+f):f>bi(n)?(e=n+1,o=f-bi(n)):(e=n,o=f),{year:e,dayOfYear:o}}function gi(n,t,i){var e=yr(n.year(),t,i),r=Math.floor((n.dayOfYear()-e-1)/7)+1,f,u;return r<1?(u=n.year()-1,f=r+yt(u,t,i)):r>yt(n.year(),t,i)?(f=r-yt(n.year(),t,i),u=n.year()+1):(u=n.year(),f=r),{week:f,year:u}}function yt(n,t,i){var r=yr(n,t,i),u=yr(n+1,t,i);return(bi(n)-r+u)/7}function pc(n){return gi(n,this._week.dow,this._week.doy).week}function wc(){return this._week.dow}function bc(){return this._week.doy}function kc(n){var t=this.localeData().week(this);return n==null?t:this.add((n-t)*7,"d")}function dc(n){var t=gi(this,1,4).week;return n==null?t:this.add((n-t)*7,"d")}function gc(n,t){return typeof n!="string"?n:isNaN(n)?(n=t.weekdaysParse(n),typeof n=="number")?n:null:parseInt(n,10)}function nl(n,t){return typeof n=="string"?t.weekdaysParse(n)%7||7:isNaN(n)?null:n}function nf(n,t){return n.slice(t,7).concat(n.slice(0,t))}function el(n,t){var i=nt(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return n===!0?nf(i,this._week.dow):n?i[n.day()]:i}function ol(n){return n===!0?nf(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function sl(n){return n===!0?nf(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function hl(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)e=ut([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?t==="dddd"?(r=v.call(this._weekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=v.call(this._shortWeekdaysParse,u),r!==-1?r:null):(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="dddd"?(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=v.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):(r=v.call(this._minWeekdaysParse,u),r!==-1)?r:(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._shortWeekdaysParse,u),r!==-1?r:null)}function cl(n,t,i){var r,u,f;if(this._weekdaysParseExact)return hl.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if((u=ut([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="dddd"&&this._fullWeekdaysParse[r].test(n))||i&&t==="ddd"&&this._shortWeekdaysParse[r].test(n)||i&&t==="dd"&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r}function ll(n){if(!this.isValid())return n!=null?this:NaN;var t=ki(this,"Day");return n!=null?(n=gc(n,this.localeData()),this.add(n-t,"d")):t}function al(n){if(!this.isValid())return n!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return n==null?t:this.add(n-t,"d")}function vl(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var t=nl(n,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function yl(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||tf.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=rl),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function pl(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||tf.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ul),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function wl(n){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||tf.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fl),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function tf(){function t(n,t){return t.length-n.length}for(var u=[],f=[],e=[],n=[],r,o,s,h,i=0;i<7;i++)r=ut([2e3,1]).day(i),o=lt(this.weekdaysMin(r,"")),s=lt(this.weekdaysShort(r,"")),h=lt(this.weekdays(r,"")),u.push(o),f.push(s),e.push(h),n.push(o),n.push(s),n.push(h);u.sort(t);f.sort(t);e.sort(t);n.sort(t);this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+e.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+f.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function rf(){return this.hours()%12||12}function bl(){return this.hours()||24}function uo(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function fo(n,t){return t._meridiemParse}function kl(n){return(n+"").toLowerCase().charAt(0)==="p"}function dl(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function gl(n,t){for(var r=Math.min(n.length,t.length),i=0;i<r;i+=1)if(n[i]!==t[i])return i;return r}function ho(n){return n?n.toLowerCase().replace("_","-"):n}function na(n){for(var r=0,i,t,f,u;r<n.length;){for(u=ho(n[r]).split("-"),i=u.length,t=ho(n[r+1]),t=t?t.split("-"):null;i>0;){if(f=pr(u.slice(0,i).join("-")),f)return f;if(t&&t.length>=i&&gl(u,t)>=i-1)break;i--}r++}return tr}function ta(n){return!!(n&&n.match("^[^/\\\\]*$"))}function pr(n){var t=null,i;if(a[n]===undefined&&typeof module!="undefined"&&module&&module.exports&&ta(n))try{t=tr._abbr;i=require;i("./locale/"+n);kt(t)}catch(r){a[n]=null}return a[n]}function kt(n,t){var i;return n&&(i=w(t)?pt(n):uf(n,t),i?tr=i:typeof console!="undefined"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),tr._abbr}function uf(n,t){if(t!==null){var r,i=so;if(t.abbr=n,a[n]!=null)ie("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=a[n]._config;else if(t.parentLocale!=null)if(a[t.parentLocale]!=null)i=a[t.parentLocale]._config;else if(r=pr(t.parentLocale),r!=null)i=r._config;else return nr[t.parentLocale]||(nr[t.parentLocale]=[]),nr[t.parentLocale].push({name:n,config:t}),null;return a[n]=new lu(cu(i,t)),nr[n]&&nr[n].forEach(function(n){uf(n.name,n.config)}),kt(n),a[n]}return delete a[n],null}function ia(n,t){if(t!=null){var r,i,u=so;a[n]!=null&&a[n].parentLocale!=null?a[n].set(cu(a[n]._config,t)):(i=pr(n),i!=null&&(u=i._config),t=cu(u,t),i==null&&(t.abbr=n),r=new lu(t),r.parentLocale=a[n],a[n]=r);kt(n)}else a[n]!=null&&(a[n].parentLocale!=null?(a[n]=a[n].parentLocale,n===kt()&&kt(n)):a[n]!=null&&delete a[n]);return a[n]}function pt(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return tr;if(!nt(n)){if(t=pr(n),t)return t;n=[n]}return na(n)}function ra(){return re(a)}function ff(n){var i,t=n._a;return t&&u(n).overflow===-2&&(i=t[at]<0||t[at]>11?at:t[ot]<1||t[ot]>gu(t[p],t[at])?ot:t[y]<0||t[y]>24||t[y]===24&&(t[it]!==0||t[vt]!==0||t[ni]!==0)?y:t[it]<0||t[it]>59?it:t[vt]<0||t[vt]>59?vt:t[ni]<0||t[ni]>999?ni:-1,u(n)._overflowDayOfYear&&(i<p||i>ot)&&(i=ot),u(n)._overflowWeeks&&i===-1&&(i=dh),u(n)._overflowWeekday&&i===-1&&(i=gh),u(n).overflow=i),n}function co(n){var t,r,o=n._i,i=ua.exec(o)||fa.exec(o),s,e,f,h,c=wr.length,l=ef.length;if(i){for(u(n).iso=!0,t=0,r=c;t<r;t++)if(wr[t][1].exec(i[1])){e=wr[t][0];s=wr[t][2]!==!1;break}if(e==null){n._isValid=!1;return}if(i[3]){for(t=0,r=l;t<r;t++)if(ef[t][1].exec(i[3])){f=(i[2]||" ")+ef[t][0];break}if(f==null){n._isValid=!1;return}}if(!s&&f!=null){n._isValid=!1;return}if(i[4])if(ea.exec(i[4]))h="Z";else{n._isValid=!1;return}n._f=e+(f||"")+(h||"");sf(n)}else n._isValid=!1}function ca(n,t,i,r,u,f){var e=[la(n),be.indexOf(t),parseInt(i,10),parseInt(r,10),parseInt(u,10),];return f&&e.push(parseInt(f,10)),e}function la(n){var t=parseInt(n,10);return t<=49?2e3+t:t<=999?1900+t:t}function aa(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function va(n,t,i){if(n){var r=ro.indexOf(n),f=new Date(t[0],t[1],t[2]).getDay();if(r!==f)return u(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function ya(n,t,i){if(n)return ha[n];if(t)return 0;var r=parseInt(i,10),u=r%100,f=(r-u)/100;return f*60+u}function lo(n){var t=sa.exec(aa(n._i)),i;if(t){if(i=ca(t[4],t[3],t[2],t[5],t[6],t[7]),!va(t[1],i,n))return;n._a=i;n._tzm=ya(t[8],t[9],t[10]);n._d=di.apply(null,n._a);n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);u(n).rfc2822=!0}else n._isValid=!1}function pa(n){var i=oa.exec(n._i);if(i!==null){n._d=new Date(+i[1]);return}if(co(n),n._isValid===!1)delete n._isValid;else return;if(lo(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:t.createFromInputFallback(n)}function si(n,t,i){return n!=null?n:t!=null?t:i}function wa(n){var i=new Date(t.now());return n._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),]:[i.getFullYear(),i.getMonth(),i.getDate()]}function of(n){var t,i,r=[],f,o,e;if(!n._d){for(f=wa(n),n._w&&n._a[ot]==null&&n._a[at]==null&&ba(n),n._dayOfYear!=null&&(e=si(n._a[p],f[p]),(n._dayOfYear>bi(e)||n._dayOfYear===0)&&(u(n)._overflowDayOfYear=!0),i=di(e,0,n._dayOfYear),n._a[at]=i.getUTCMonth(),n._a[ot]=i.getUTCDate()),t=0;t<3&&n._a[t]==null;++t)n._a[t]=r[t]=f[t];for(;t<7;t++)n._a[t]=r[t]=n._a[t]==null?t===2?1:0:n._a[t];n._a[y]===24&&n._a[it]===0&&n._a[vt]===0&&n._a[ni]===0&&(n._nextDay=!0,n._a[y]=0);n._d=(n._useUTC?di:yc).apply(null,r);o=n._useUTC?n._d.getUTCDay():n._d.getDay();n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[y]=24);n._w&&typeof n._w.d!="undefined"&&n._w.d!==o&&(u(n).weekdayMismatch=!0)}}function ba(n){var t,o,f,i,r,e,h,s,c;t=n._w;t.GG!=null||t.W!=null||t.E!=null?(r=1,e=4,o=si(t.GG,n._a[p],gi(l(),1,4).year),f=si(t.W,1),i=si(t.E,1),(i<1||i>7)&&(s=!0)):(r=n._locale._week.dow,e=n._locale._week.doy,c=gi(l(),r,e),o=si(t.gg,n._a[p],c.year),f=si(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(s=!0)):t.e!=null?(i=t.e+r,(t.e<0||t.e>6)&&(s=!0)):i=r);f<1||f>yt(o,r,e)?u(n)._overflowWeeks=!0:s!=null?u(n)._overflowWeekday=!0:(h=to(o,f,i,r,e),n._a[p]=h.year,n._dayOfYear=h.dayOfYear)}function sf(n){if(n._f===t.ISO_8601){co(n);return}if(n._f===t.RFC_2822){lo(n);return}n._a=[];u(n).empty=!0;var i=""+n._i,e,r,o,f,s,a=i.length,c=0,h,l;for(o=fe(n._f,n._locale).match(au)||[],l=o.length,e=0;e<l;e++)f=o[e],r=(i.match(wh(f,n))||[])[0],r&&(s=i.substr(0,i.indexOf(r)),s.length>0&&u(n).unusedInput.push(s),i=i.slice(i.indexOf(r)+r.length),c+=r.length),ui[f]?(r?u(n).empty=!1:u(n).unusedTokens.push(f),kh(f,r,n)):n._strict&&!r&&u(n).unusedTokens.push(f);u(n).charsLeftOver=a-c;i.length>0&&u(n).unusedInput.push(i);n._a[y]<=12&&u(n).bigHour===!0&&n._a[y]>0&&(u(n).bigHour=undefined);u(n).parsedDateParts=n._a.slice(0);u(n).meridiem=n._meridiem;n._a[y]=ka(n._locale,n._a[y],n._meridiem);h=u(n).era;h!==null&&(n._a[p]=n._locale.erasConvertYear(h,n._a[p]));of(n);ff(n)}function ka(n,t,i){var r;return i==null?t:n.meridiemHour!=null?n.meridiemHour(t,i):n.isPM!=null?(r=n.isPM(i),r&&t<12&&(t+=12),r||t!==12||(t=0),t):t}function da(n){var t,o,r,f,i,e,s=!1,h=n._f.length;if(h===0){u(n).invalidFormat=!0;n._d=new Date(NaN);return}for(f=0;f<h;f++)i=0,e=!1,t=su({},n),n._useUTC!=null&&(t._useUTC=n._useUTC),t._f=n._f[f],sf(t),eu(t)&&(e=!0),i+=u(t).charsLeftOver,i+=u(t).unusedTokens.length*10,u(t).score=i,s?i<r&&(r=i,o=t):(r==null||i<r||e)&&(r=i,o=t,e&&(s=!0));bt(n,o||t)}function ga(n){if(!n._d){var t=pu(n._i),i=t.day===undefined?t.date:t.day;n._a=gf([t.year,t.month,i,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)});of(n)}}function nv(n){var t=new yi(ff(ao(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=undefined),t}function ao(n){var t=n._i,i=n._f;return(n._locale=n._locale||pt(n._l),t===null||i===undefined&&t==="")?ir({nullInput:!0}):(typeof t=="string"&&(n._i=t=n._locale.preparse(t)),tt(t))?new yi(ff(t)):(vi(t)?n._d=t:nt(i)?da(n):i?sf(n):tv(n),eu(n)||(n._d=null),n)}function tv(n){var i=n._i;w(i)?n._d=new Date(t.now()):vi(i)?n._d=new Date(i.valueOf()):typeof i=="string"?pa(n):nt(i)?(n._a=gf(i.slice(0),function(n){return parseInt(n,10)}),of(n)):gt(i)?ga(n):ct(i)?n._d=new Date(i):t.createFromInputFallback(n)}function vo(n,t,i,r,u){var f={};return(t===!0||t===!1)&&(r=t,t=undefined),(i===!0||i===!1)&&(r=i,i=undefined),(gt(n)&&fu(n)||nt(n)&&n.length===0)&&(n=undefined),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,nv(f)}function l(n,t,i,r){return vo(n,t,i,r,!1)}function wo(n,t){var r,i;if(t.length===1&&nt(t[0])&&(t=t[0]),!t.length)return l();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function iv(){var n=[].slice.call(arguments,0);return wo("isBefore",n)}function rv(){var n=[].slice.call(arguments,0);return wo("isAfter",n)}function uv(n){var i,r=!1,t,u=hi.length;for(i in n)if(s(n,i)&&!(v.call(hi,i)!==-1&&(n[i]==null||!isNaN(n[i]))))return!1;for(t=0;t<u;++t)if(n[hi[t]]){if(r)return!1;parseFloat(n[hi[t]])!==f(n[hi[t]])&&(r=!0)}return!0}function fv(){return this._isValid}function ev(){return rt(NaN)}function br(n){var t=pu(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||t.isoWeek||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._isValid=uv(t);this._milliseconds=+c+h*1e3+s*6e4+o*36e5;this._days=+e+f*7;this._months=+u+r*3+i*12;this._data={};this._locale=pt();this._bubble()}function kr(n){return n instanceof br}function hf(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function ov(n,t,i){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),u=0,r=0;r<e;r++)(i&&n[r]!==t[r]||!i&&f(n[r])!==f(t[r]))&&u++;return u+o}function ko(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+et(~~(n/60),2)+t+et(~~n%60,2)})}function cf(n,t){var u=(t||"").match(n),e,i,r;return u===null?null:(e=u[u.length-1]||[],i=(e+"").match(go)||["-",0,0],r=+(i[1]*60)+f(i[2]),r===0?0:i[0]==="+"?r:-r)}function lf(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(tt(n)||vi(n)?n.valueOf():l(n).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+u),t.updateOffset(r,!1),r):l(n).local()}function af(n){return-Math.round(n._d.getTimezoneOffset())}function sv(n,i,r){var u=this._offset||0,f;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=cf(cr,n),n===null)return this}else Math.abs(n)<16&&!r&&(n=n*60);return!this._isUTC&&i&&(f=af(this)),this._offset=n,this._isUTC=!0,f!=null&&this.add(f,"m"),u!==n&&(!i||this._changeInProgress?fs(this,rt(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?u:af(this)}function hv(n,t){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function cv(n){return this.utcOffset(0,n)}function lv(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(af(this),"m")),this}function av(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=cf(ph,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function vv(n){return this.isValid()?(n=n?l(n).utcOffset():0,(this.utcOffset()-n)%60==0):!1}function yv(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function pv(){if(!w(this._isDSTShifted))return this._isDSTShifted;var n={},t;return su(n,this),n=ao(n),n._a?(t=n._isUTC?ut(n._a):l(n._a),this._isDSTShifted=this.isValid()&&ov(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function wv(){return this.isValid()?!this._isUTC:!1}function bv(){return this.isValid()?this._isUTC:!1}function ns(){return this.isValid()?this._isUTC&&this._offset===0:!1}function rt(n,t){var i=n,r=null,u,e,o;return kr(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:ct(n)||!isNaN(+n)?(i={},t?i[t]=+n:i.milliseconds=+n):(r=ts.exec(n))?(u=r[1]==="-"?-1:1,i={y:0,d:f(r[ot])*u,h:f(r[y])*u,m:f(r[it])*u,s:f(r[vt])*u,ms:f(hf(r[ni]*1e3))*u}):(r=is.exec(n))?(u=r[1]==="-"?-1:1,i={y:ti(r[2],u),M:ti(r[3],u),w:ti(r[4],u),d:ti(r[5],u),h:ti(r[6],u),m:ti(r[7],u),s:ti(r[8],u)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(o=kv(l(i.from),l(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),e=new br(i),kr(n)&&s(n,"_locale")&&(e._locale=n._locale),kr(n)&&s(n,"_isValid")&&(e._isValid=n._isValid),e}function ti(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function rs(n,t){var i={};return i.months=t.month()-n.month()+(t.year()-n.year())*12,n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function kv(n,t){var i;return(n.isValid()&&t.isValid())?(t=lf(t,n),n.isBefore(t)?i=rs(n,t):(i=rs(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function us(n,t){return function(i,r){var u,f;return r===null||isNaN(+r)||(ie(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=i,i=r,r=f),u=rt(i,r),fs(this,u,n),this}}function fs(n,i,r,u){var o=i._milliseconds,f=hf(i._days),e=hf(i._months);n.isValid()&&(u=u==null?!0:u,e&&de(n,ki(n,"Month")+e*r),f&&we(n,"Date",ki(n,"Date")+f*r),o&&n._d.setTime(n._d.valueOf()+o*r),u&&t.updateOffset(n,f||e))}function ss(n){return typeof n=="string"||n instanceof String}function dv(n){return tt(n)||vi(n)||ss(n)||ct(n)||ny(n)||gv(n)||n===null||n===undefined}function gv(n){for(var f=gt(n)&&!fu(n),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms",],u,e=r.length,t=0;t<e;t+=1)u=r[t],i=i||s(n,u);return f&&i}function ny(n){var t=nt(n),i=!1;return t&&(i=n.filter(function(t){return!ct(t)&&ss(n)}).length===0),t&&i}function ty(n){for(var f=gt(n)&&!fu(n),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse",],u,t=0;t<r.length;t+=1)u=r[t],i=i||s(n,u);return f&&i}function iy(n,t){var i=n.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function ry(n,i){arguments.length===1&&(arguments[0]?dv(arguments[0])?(n=arguments[0],i=undefined):ty(arguments[0])&&(i=arguments[0],n=undefined):(n=undefined,i=undefined));var u=n||l(),f=lf(u,this).startOf("day"),r=t.calendarFormat(this,f)||"sameElse",e=i&&(ft(i[r])?i[r].call(this,u):i[r]);return this.format(e||this.localeData().calendar(r,this,l(u)))}function uy(){return new yi(this)}function fy(n,t){var i=tt(n)?n:l(n);return(this.isValid()&&i.isValid())?(t=d(t)||"millisecond",t==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf()):!1}function ey(n,t){var i=tt(n)?n:l(n);return(this.isValid()&&i.isValid())?(t=d(t)||"millisecond",t==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf()):!1}function oy(n,t,i,r){var u=tt(n)?n:l(n),f=tt(t)?t:l(t);return(this.isValid()&&u.isValid()&&f.isValid())?(r=r||"()",(r[0]==="("?this.isAfter(u,i):!this.isBefore(u,i))&&(r[1]===")"?this.isBefore(f,i):!this.isAfter(f,i))):!1}function sy(n,t){var i=tt(n)?n:l(n),r;return(this.isValid()&&i.isValid())?(t=d(t)||"millisecond",t==="millisecond"?this.valueOf()===i.valueOf():(r=i.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function hy(n,t){return this.isSame(n,t)||this.isAfter(n,t)}function cy(n,t){return this.isSame(n,t)||this.isBefore(n,t)}function ly(n,t,i){var r,f,u;if(!this.isValid())return NaN;if(r=lf(n,this),!r.isValid())return NaN;f=(r.utcOffset()-this.utcOffset())*6e4;t=d(t);switch(t){case"year":u=dr(this,r)/12;break;case"month":u=dr(this,r);break;case"quarter":u=dr(this,r)/3;break;case"second":u=(this-r)/1e3;break;case"minute":u=(this-r)/6e4;break;case"hour":u=(this-r)/36e5;break;case"day":u=(this-r-f)/864e5;break;case"week":u=(this-r-f)/6048e5;break;default:u=this-r}return i?u:g(u)}function dr(n,t){if(n.date()<t.date())return-dr(t,n);var r=(t.year()-n.year())*12+(t.month()-n.month()),i=n.clone().add(r,"months"),u,f;return t-i<0?(u=n.clone().add(r-1,"months"),f=(t-i)/(i-u)):(u=n.clone().add(r+1,"months"),f=(t-i)/(u-i)),-(r+f)||0}function ay(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function vy(n){if(!this.isValid())return null;var i=n!==!0,t=i?this.clone().utc():this;return t.year()<0||t.year()>9999?fr(t,i?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ft(Date.prototype.toISOString)?i?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*6e4).toISOString().replace("Z",fr(t,"Z")):fr(t,i?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function yy(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",t="",i,r,u,f;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),i="["+n+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",u="-MM-DD[T]HH:mm:ss.SSS",f=t+'[")]',this.format(i+r+u+f)}function py(n){n||(n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=fr(this,n);return this.localeData().postformat(i)}function wy(n,t){return this.isValid()&&(tt(n)&&n.isValid()||l(n).isValid())?rt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function by(n){return this.from(l(),n)}function ky(n,t){return this.isValid()&&(tt(n)&&n.isValid()||l(n).isValid())?rt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function dy(n){return this.to(l(),n)}function hs(n){var t;return n===undefined?this._locale._abbr:(t=pt(n),t!=null&&(this._locale=t),this)}function cs(){return this._locale}function li(n,t){return(n%t+t)%t}function as(n,t,i){return n<100&&n>=0?new Date(n+400,t,i)-ls:new Date(n,t,i).valueOf()}function vs(n,t,i){return n<100&&n>=0?Date.UTC(n+400,t,i)-ls:Date.UTC(n,t,i)}function gy(n){var i,r;if(n=d(n),n===undefined||n==="millisecond"||!this.isValid())return this;r=this._isUTC?vs:as;switch(n){case"year":i=r(this.year(),0,1);break;case"quarter":i=r(this.year(),this.month()-this.month()%3,1);break;case"month":i=r(this.year(),this.month(),1);break;case"week":i=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=r(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf()-li(i+(this._isUTC?0:this.utcOffset()*ci),nu);break;case"minute":i=this._d.valueOf()-li(i,ci);break;case"second":i=this._d.valueOf()-li(i,gr)}return this._d.setTime(i),t.updateOffset(this,!0),this}function np(n){var i,r;if(n=d(n),n===undefined||n==="millisecond"||!this.isValid())return this;r=this._isUTC?vs:as;switch(n){case"year":i=r(this.year()+1,0,1)-1;break;case"quarter":i=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=r(this.year(),this.month()+1,1)-1;break;case"week":i=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf()+(nu-li(i+(this._isUTC?0:this.utcOffset()*ci),nu)-1);break;case"minute":i=this._d.valueOf()+(ci-li(i,ci)-1);break;case"second":i=this._d.valueOf()+(gr-li(i,gr)-1)}return this._d.setTime(i),t.updateOffset(this,!0),this}function tp(){return this._d.valueOf()-(this._offset||0)*6e4}function ip(){return Math.floor(this.valueOf()/1e3)}function rp(){return new Date(this.valueOf())}function up(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond(),]}function fp(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function ep(){return this.isValid()?this.toISOString():null}function op(){return eu(this)}function sp(){return bt({},u(this))}function hp(){return u(this).overflow}function cp(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function lp(){for(var r,i=this._eras||pt("en")._eras,n=0,u=i.length;n<u;++n){switch(typeof i[n].since){case"string":r=t(i[n].since).startOf("day");i[n].since=r.valueOf()}switch(typeof i[n].until){case"undefined":i[n].until=+Infinity;break;case"string":r=t(i[n].until).startOf("day").valueOf();i[n].until=r.valueOf()}}return i}function ap(n,t,i){var r,s,u=this.eras(),f,e,o;for(n=n.toUpperCase(),r=0,s=u.length;r<s;++r)if(f=u[r].name.toUpperCase(),e=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(e===n)return u[r];break;case"NNNN":if(f===n)return u[r];break;case"NNNNN":if(o===n)return u[r]}else if([f,e,o].indexOf(n)>=0)return u[r]}function vp(n,i){var r=n.since<=n.until?1:-1;return i===undefined?t(n.since).year():t(n.since).year()+(i-n.offset)*r}function yp(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].name;return""}function pp(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].narrow;return""}function wp(){for(var i,t=this.localeData().eras(),n=0,r=t.length;n<r;++n)if((i=this.clone().startOf("day").valueOf(),t[n].since<=i&&i<=t[n].until)||t[n].until<=i&&i<=t[n].since)return t[n].abbr;return""}function bp(){for(var f,r,i=this.localeData().eras(),n=0,u=i.length;n<u;++n)if(f=i[n].since<=i[n].until?1:-1,r=this.clone().startOf("day").valueOf(),i[n].since<=r&&r<=i[n].until||i[n].until<=r&&r<=i[n].since)return(this.year()-t(i[n].since).year())*f+i[n].offset;return this.year()}function kp(n){return s(this,"_erasNameRegex")||pf.call(this),n?this._erasNameRegex:this._erasRegex}function dp(n){return s(this,"_erasAbbrRegex")||pf.call(this),n?this._erasAbbrRegex:this._erasRegex}function gp(n){return s(this,"_erasNarrowRegex")||pf.call(this),n?this._erasNarrowRegex:this._erasRegex}function yf(n,t){return t.erasAbbrRegex(n)}function nw(n,t){return t.erasNameRegex(n)}function tw(n,t){return t.erasNarrowRegex(n)}function iw(n,t){return t._eraYearOrdinalRegex||fi}function pf(){for(var e=[],o=[],s=[],t=[],r,u,f,i=this.eras(),n=0,h=i.length;n<h;++n)r=lt(i[n].name),u=lt(i[n].abbr),f=lt(i[n].narrow),o.push(r),e.push(u),s.push(f),t.push(r),t.push(u),t.push(f);this._erasRegex=new RegExp("^("+t.join("|")+")","i");this._erasNameRegex=new RegExp("^("+o.join("|")+")","i");this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i");this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function tu(n,t){r(0,[n,n.length],0,t)}function rw(n){return ys.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function uw(n){return ys.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function fw(){return yt(this.year(),1,4)}function ew(){return yt(this.isoWeekYear(),1,4)}function ow(){var n=this.localeData()._week;return yt(this.year(),n.dow,n.doy)}function sw(){var n=this.localeData()._week;return yt(this.weekYear(),n.dow,n.doy)}function ys(n,t,i,r,u){var f;return n==null?gi(this,r,u).year:(f=yt(n,r,u),t>f&&(t=f),hw.call(this,n,t,i,r,u))}function hw(n,t,i,r,u){var e=to(n,t,i,r,u),f=di(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}function cw(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}function lw(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?t:this.add(n-t,"d")}function aw(n,t){t[ni]=f(("0."+n)*1e3)}function vw(){return this._isUTC?"UTC":""}function yw(){return this._isUTC?"Coordinated Universal Time":""}function pw(n){return l(n*1e3)}function ww(){return l.apply(null,arguments).parseZone()}function ks(n){return n}function iu(n,t,i,r){var u=pt(),f=ut().set(r,t);return u[i](f,n)}function ds(n,t,i){if(ct(n)&&(t=n,n=undefined),n=n||"",t!=null)return iu(n,t,i,"month");for(var u=[],r=0;r<12;r++)u[r]=iu(n,r,i,"month");return u}function bf(n,t,i,r){typeof n=="boolean"?(ct(t)&&(i=t,t=undefined),t=t||""):(t=n,i=t,n=!1,ct(t)&&(i=t,t=undefined),t=t||"");var o=pt(),f=n?o._week.dow:0,u,e=[];if(i!=null)return iu(t,(i+f)%7,r,"day");for(u=0;u<7;u++)e[u]=iu(t,(u+f)%7,r,"day");return e}function bw(n,t){return ds(n,t,"months")}function kw(n,t){return ds(n,t,"monthsShort")}function dw(n,t,i){return bf(n,t,i,"weekdays")}function gw(n,t,i){return bf(n,t,i,"weekdaysShort")}function nb(n,t,i){return bf(n,t,i,"weekdaysMin")}function tb(){var n=this._data;return this._milliseconds=st(this._milliseconds),this._days=st(this._days),this._months=st(this._months),n.milliseconds=st(n.milliseconds),n.seconds=st(n.seconds),n.minutes=st(n.minutes),n.hours=st(n.hours),n.months=st(n.months),n.years=st(n.years),this}function gs(n,t,i,r){var u=rt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function ib(n,t){return gs(this,n,t,1)}function rb(n,t){return gs(this,n,t,-1)}function nh(n){return n<0?Math.floor(n):Math.ceil(n)}function ub(){var r=this._milliseconds,n=this._days,t=this._months,i=this._data,u,f,e,s,o;return r>=0&&n>=0&&t>=0||r<=0&&n<=0&&t<=0||(r+=nh(kf(t)+n)*864e5,n=0,t=0),i.milliseconds=r%1e3,u=g(r/1e3),i.seconds=u%60,f=g(u/60),i.minutes=f%60,e=g(f/60),i.hours=e%24,n+=g(e/24),o=g(th(n)),t+=o,n-=nh(kf(o)),s=g(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function th(n){return n*4800/146097}function kf(n){return n*146097/4800}function fb(n){if(!this.isValid())return NaN;var t,r,i=this._milliseconds;if(n=d(n),n==="month"||n==="quarter"||n==="year"){t=this._days+i/864e5;r=this._months+th(t);switch(n){case"month":return r;case"quarter":return r/3;case"year":return r/12}}else{t=this._days+Math.round(kf(this._months));switch(n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+n);}}}function wt(n){return function(){return this.as(n)}}function pb(){return rt(this)}function wb(n){return n=d(n),this.isValid()?this[n+"s"]():NaN}function ii(n){return function(){return this.isValid()?this._data[n]:NaN}}function rk(){return g(this.days()/7)}function uk(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function fk(n,t,i,r){var f=rt(n).abs(),e=ht(f.as("s")),o=ht(f.as("m")),s=ht(f.as("h")),h=ht(f.as("d")),c=ht(f.as("M")),l=ht(f.as("w")),a=ht(f.as("y")),u=e<=i.ss&&["s",e]||e<i.s&&["ss",e]||o<=1&&["m"]||o<i.m&&["mm",o]||s<=1&&["h"]||s<i.h&&["hh",s]||h<=1&&["d"]||h<i.d&&["dd",h];return i.w!=null&&(u=u||l<=1&&["w"]||l<i.w&&["ww",l]),u=u||c<=1&&["M"]||c<i.M&&["MM",c]||a<=1&&["y"]||["yy",a],u[2]=t,u[3]=+n>0,u[4]=r,uk.apply(null,u)}function ek(n){return n===undefined?ht:typeof n=="function"?(ht=n,!0):!1}function ok(n,t){return ri[n]===undefined?!1:t===undefined?ri[n]:(ri[n]=t,n==="s"&&(ri.ss=t-1),!0)}function sk(n,t){if(!this.isValid())return this.localeData().invalidDate();var u=!1,f=ri,i,r;return typeof n=="object"&&(t=n,n=!1),typeof n=="boolean"&&(u=n),typeof t=="object"&&(f=Object.assign({},ri,t),t.s!=null&&t.ss==null&&(f.ss=t.s-1)),i=this.localeData(),r=fk(this,!u,f,i),u&&(r=i.pastFuture(+this,r)),i.postformat(r)}function ai(n){return(n>0)-(n<0)||+n}function uu(){if(!this.isValid())return this.localeData().invalidDate();var n=ru(this._milliseconds)/1e3,s=ru(this._days),r=ru(this._months),t,u,e,h,i=this.asSeconds(),c,o,l,f;return i?(t=g(n/60),u=g(t/60),n%=60,t%=60,e=g(r/12),r%=12,h=n?n.toFixed(3).replace(/\.?0+$/,""):"",c=i<0?"-":"",o=ai(this._months)!==ai(i)?"-":"",l=ai(this._days)!==ai(i)?"-":"",f=ai(this._milliseconds)!==ai(i)?"-":"",c+"P"+(e?o+e+"Y":"")+(r?o+r+"M":"")+(s?l+s+"D":"")+(u||t||n?"T":"")+(u?f+u+"H":"")+(t?f+t+"M":"")+(n?f+h+"S":"")):"P0D"}var df,ne,ou,rr,hu,re,ue,ee,oe,se,he,ce,yu,le,ar,du,v,io,eo,oo,yo,po,bo,hi,go,ts,is,es,os,vf,wf,ps,ws,dt,bs,n,o,st,ht,ri,ru,e;ne=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;t<r;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};ou=t.momentProperties=[];rr=!1;hu={};t.suppressDeprecationWarnings=!1;t.deprecationHandler=null;re=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)s(n,t)&&i.push(t);return i};ue={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};var au=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ur=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,vu={},ui={};ee={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};oe="Invalid date";se="%d";he=/\d{1,2}/;ce={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};yu={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var ae=/\d/,b=/\d\d/,ve=/\d{3}/,wu=/\d{4}/,er=/[+-]?\d{6}/,c=/\d\d?/,ye=/\d\d\d\d?/,pe=/\d\d\d\d\d\d?/,or=/\d{1,3}/,bu=/\d{1,4}/,sr=/[+-]?\d{1,6}/,fi=/\d+/,hr=/[+-]?\d+/,ph=/Z|[+-]\d\d:?\d\d/gi,cr=/Z|[+-]\d\d(?::?\d\d)?/gi,pi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ei=/^[1-9]\d?/,ku=/^([1-9]\d|\d)/,lr;lr={};ar={};var p=0,at=1,ot=2,y=3,it=4,vt=5,ni=6,dh=7,gh=8;r("Y",0,0,function(){var n=this.year();return n<=9999?et(n,4):"+"+n});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");i("Y",hr);i("YY",c,b);i("YYYY",bu,wu);i("YYYYY",sr,er);i("YYYYYY",sr,er);h(["YYYYY","YYYYYY"],p);h("YYYY",function(n,i){i[p]=n.length===2?t.parseTwoDigitYear(n):f(n)});h("YY",function(n,i){i[p]=t.parseTwoDigitYear(n)});h("Y",function(n,t){t[p]=parseInt(n,10)});t.parseTwoDigitYear=function(n){return f(n)+(f(n)>68?1900:2e3)};du=oi("FullYear",!0);v=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});i("M",c,ei);i("MM",c,b);i("MMM",function(n,t){return t.monthsShortRegex(n)});i("MMMM",function(n,t){return t.monthsRegex(n)});h(["M","MM"],function(n,t){t[at]=f(n)-1});h(["MMM","MMMM"],function(n,t,i,r){var f=i._locale.monthsParse(n,r,i._strict);f!=null?t[at]=f:u(i).invalidMonth=n});var uc="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),be="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ke=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fc=pi,ec=pi;r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");i("w",c,ei);i("ww",c,b);i("W",c,ei);i("WW",c,b);wi(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=f(n)});io={dow:0,doy:6};r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");i("d",c);i("e",c);i("E",c);i("dd",function(n,t){return t.weekdaysMinRegex(n)});i("ddd",function(n,t){return t.weekdaysShortRegex(n)});i("dddd",function(n,t){return t.weekdaysRegex(n)});wi(["dd","ddd","dddd"],function(n,t,i,r){var f=i._locale.weekdaysParse(n,r,i._strict);f!=null?t.d=f:u(i).invalidWeekday=n});wi(["d","e","E"],function(n,t,i,r){t[r]=f(n)});var tl="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ro="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),il="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),rl=pi,ul=pi,fl=pi;r("H",["HH",2],0,"hour");r("h",["hh",2],0,rf);r("k",["kk",2],0,bl);r("hmm",0,0,function(){return""+rf.apply(this)+et(this.minutes(),2)});r("hmmss",0,0,function(){return""+rf.apply(this)+et(this.minutes(),2)+et(this.seconds(),2)});r("Hmm",0,0,function(){return""+this.hours()+et(this.minutes(),2)});r("Hmmss",0,0,function(){return""+this.hours()+et(this.minutes(),2)+et(this.seconds(),2)});uo("a",!0);uo("A",!1);i("a",fo);i("A",fo);i("H",c,ku);i("h",c,ei);i("k",c,ei);i("HH",c,b);i("hh",c,b);i("kk",c,b);i("hmm",ye);i("hmmss",pe);i("Hmm",ye);i("Hmmss",pe);h(["H","HH"],y);h(["k","kk"],function(n,t){var i=f(n);t[y]=i===24?0:i});h(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});h(["h","hh"],function(n,t,i){t[y]=f(n);u(i).bigHour=!0});h("hmm",function(n,t,i){var r=n.length-2;t[y]=f(n.substr(0,r));t[it]=f(n.substr(r));u(i).bigHour=!0});h("hmmss",function(n,t,i){var r=n.length-4,e=n.length-2;t[y]=f(n.substr(0,r));t[it]=f(n.substr(r,2));t[vt]=f(n.substr(e));u(i).bigHour=!0});h("Hmm",function(n,t){var i=n.length-2;t[y]=f(n.substr(0,i));t[it]=f(n.substr(i))});h("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[y]=f(n.substr(0,i));t[it]=f(n.substr(i,2));t[vt]=f(n.substr(r))});eo=/[ap]\.?m?\.?/i;oo=oi("Hours",!0);var so={calendar:ue,longDateFormat:ee,invalidDate:oe,ordinal:se,dayOfMonthOrdinalParse:he,relativeTime:ce,months:uc,monthsShort:be,week:io,weekdays:tl,weekdaysMin:il,weekdaysShort:ro,meridiemParse:eo},a={},nr={},tr;var ua=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ea=/Z|[+-]\d\d(?::?\d\d)?/,wr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1],],ef=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/],],oa=/^\/?Date\((-?\d+)/i,sa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ha={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};t.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});t.ISO_8601=function(){};t.RFC_2822=function(){};yo=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=l.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:ir()});po=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=l.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:ir()});bo=function(){return Date.now?Date.now():+new Date};hi=["year","quarter","month","week","day","hour","minute","second","millisecond",];ko("Z",":");ko("ZZ","");i("Z",cr);i("ZZ",cr);h(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=cf(cr,n)});go=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};ts=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/;is=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;rt.fn=br.prototype;rt.invalid=ev;es=us(1,"add");os=us(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";vf=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===undefined?this.localeData():this.locale(n)});var gr=1e3,ci=60*gr,nu=60*ci,ls=3506328*nu;for(r("N",0,0,"eraAbbr"),r("NN",0,0,"eraAbbr"),r("NNN",0,0,"eraAbbr"),r("NNNN",0,0,"eraName"),r("NNNNN",0,0,"eraNarrow"),r("y",["y",1],"yo","eraYear"),r("y",["yy",2],0,"eraYear"),r("y",["yyy",3],0,"eraYear"),r("y",["yyyy",4],0,"eraYear"),i("N",yf),i("NN",yf),i("NNN",yf),i("NNNN",nw),i("NNNNN",tw),h(["N","NN","NNN","NNNN","NNNNN"],function(n,t,i,r){var f=i._locale.erasParse(n,r,i._strict);f?u(i).era=f:u(i).invalidEra=n}),i("y",fi),i("yy",fi),i("yyy",fi),i("yyyy",fi),i("yo",iw),h(["y","yy","yyy","yyyy"],p),h(["yo"],function(n,t,i){var r;i._locale._eraYearOrdinalRegex&&(r=n.match(i._locale._eraYearOrdinalRegex));t[p]=i._locale.eraYearOrdinalParse?i._locale.eraYearOrdinalParse(n,r):parseInt(n,10)}),r(0,["gg",2],0,function(){return this.weekYear()%100}),r(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tu("gggg","weekYear"),tu("ggggg","weekYear"),tu("GGGG","isoWeekYear"),tu("GGGGG","isoWeekYear"),i("G",hr),i("g",hr),i("GG",c,b),i("gg",c,b),i("GGGG",bu,wu),i("gggg",bu,wu),i("GGGGG",sr,er),i("ggggg",sr,er),wi(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=f(n)}),wi(["gg","GG"],function(n,i,r,u){i[u]=t.parseTwoDigitYear(n)}),r("Q",0,"Qo","quarter"),i("Q",ae),h("Q",function(n,t){t[at]=(f(n)-1)*3}),r("D",["DD",2],"Do","date"),i("D",c,ei),i("DD",c,b),i("Do",function(n,t){return n?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),h(["D","DD"],ot),h("Do",function(n,t){t[ot]=f(n.match(c)[0])}),wf=oi("Date",!0),r("DDD",["DDDD",3],"DDDo","dayOfYear"),i("DDD",or),i("DDDD",ve),h(["DDD","DDDD"],function(n,t,i){i._dayOfYear=f(n)}),r("m",["mm",2],0,"minute"),i("m",c,ku),i("mm",c,b),h(["m","mm"],it),ps=oi("Minutes",!1),r("s",["ss",2],0,"second"),i("s",c,ku),i("ss",c,b),h(["s","ss"],vt),ws=oi("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return this.millisecond()*10}),r(0,["SSSSS",5],0,function(){return this.millisecond()*100}),r(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),r(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),r(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),r(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),i("S",or,ae),i("SS",or,b),i("SSS",or,ve),dt="SSSS";dt.length<=9;dt+="S")i(dt,fi);for(dt="S";dt.length<=9;dt+="S")h(dt,aw);bs=oi("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=yi.prototype;n.add=es;n.calendar=ry;n.clone=uy;n.diff=ly;n.endOf=np;n.format=py;n.from=wy;n.fromNow=by;n.to=ky;n.toNow=dy;n.get=tc;n.invalidAt=hp;n.isAfter=fy;n.isBefore=ey;n.isBetween=oy;n.isSame=sy;n.isSameOrAfter=hy;n.isSameOrBefore=cy;n.isValid=op;n.lang=vf;n.locale=hs;n.localeData=cs;n.max=po;n.min=yo;n.parsingFlags=sp;n.set=ic;n.startOf=gy;n.subtract=os;n.toArray=up;n.toObject=fp;n.toDate=rp;n.toISOString=vy;n.inspect=yy;typeof Symbol!="undefined"&&Symbol.for!=null&&(n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});n.toJSON=ep;n.toString=ay;n.unix=ip;n.valueOf=tp;n.creationData=cp;n.eraName=yp;n.eraNarrow=pp;n.eraAbbr=wp;n.eraYear=bp;n.year=du;n.isLeapYear=nc;n.weekYear=rw;n.isoWeekYear=uw;n.quarter=n.quarters=cw;n.month=ge;n.daysInMonth=lc;n.week=n.weeks=kc;n.isoWeek=n.isoWeeks=dc;n.weeksInYear=ow;n.weeksInWeekYear=sw;n.isoWeeksInYear=fw;n.isoWeeksInISOWeekYear=ew;n.date=wf;n.day=n.days=ll;n.weekday=al;n.isoWeekday=vl;n.dayOfYear=lw;n.hour=n.hours=oo;n.minute=n.minutes=ps;n.second=n.seconds=ws;n.millisecond=n.milliseconds=bs;n.utcOffset=sv;n.utc=cv;n.local=lv;n.parseZone=av;n.hasAlignedHourOffset=vv;n.isDST=yv;n.isLocal=wv;n.isUtcOffset=bv;n.isUtc=ns;n.isUTC=ns;n.zoneAbbr=vw;n.zoneName=yw;n.dates=k("dates accessor is deprecated. Use date instead.",wf);n.months=k("months accessor is deprecated. Use month instead",ge);n.years=k("years accessor is deprecated. Use year instead",du);n.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",hv);n.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",pv);o=lu.prototype;o.calendar=eh;o.longDateFormat=hh;o.invalidDate=ch;o.ordinal=lh;o.preparse=ks;o.postformat=ks;o.relativeTime=ah;o.pastFuture=vh;o.set=fh;o.eras=lp;o.erasParse=ap;o.erasConvertYear=vp;o.erasAbbrRegex=dp;o.erasNameRegex=kp;o.erasNarrowRegex=gp;o.months=oc;o.monthsShort=sc;o.monthsParse=cc;o.monthsRegex=vc;o.monthsShortRegex=ac;o.week=pc;o.firstDayOfYear=bc;o.firstDayOfWeek=wc;o.weekdays=el;o.weekdaysMin=sl;o.weekdaysShort=ol;o.weekdaysParse=cl;o.weekdaysRegex=yl;o.weekdaysShortRegex=pl;o.weekdaysMinRegex=wl;o.isPM=kl;o.meridiem=dl;kt("en",{eras:[{since:"0001-01-01",until:+Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"},],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=f(n%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i}});t.lang=k("moment.lang is deprecated. Use moment.locale instead.",kt);t.langData=k("moment.langData is deprecated. Use moment.localeData instead.",pt);st=Math.abs;var ih=wt("ms"),eb=wt("s"),ob=wt("m"),sb=wt("h"),hb=wt("d"),cb=wt("w"),lb=wt("M"),ab=wt("Q"),vb=wt("y"),yb=ih;var bb=ii("milliseconds"),kb=ii("seconds"),db=ii("minutes"),gb=ii("hours"),nk=ii("days"),tk=ii("months"),ik=ii("years");return ht=Math.round,ri={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},ru=Math.abs,e=br.prototype,e.isValid=fv,e.abs=tb,e.add=ib,e.subtract=rb,e.as=fb,e.asMilliseconds=ih,e.asSeconds=eb,e.asMinutes=ob,e.asHours=sb,e.asDays=hb,e.asWeeks=cb,e.asMonths=lb,e.asQuarters=ab,e.asYears=vb,e.valueOf=yb,e._bubble=ub,e.clone=pb,e.get=wb,e.milliseconds=bb,e.seconds=kb,e.minutes=db,e.hours=gb,e.days=nk,e.weeks=rk,e.months=tk,e.years=ik,e.humanize=sk,e.toISOString=uu,e.toString=uu,e.toJSON=uu,e.locale=hs,e.localeData=cs,e.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",uu),e.lang=vf,r("X",0,0,"unix"),r("x",0,0,"valueOf"),i("x",hr),i("X",/[+-]?\d+(\.\d{1,3})?/),h("X",function(n,t,i){i._d=new Date(parseFloat(n)*1e3)}),h("x",function(n,t,i){i._d=new Date(f(n))}),t.version="2.30.1",rh(l),t.fn=n,t.min=iv,t.max=rv,t.now=bo,t.utc=ut,t.unix=pw,t.months=bw,t.isDate=vi,t.locale=kt,t.invalid=ir,t.duration=rt,t.isMoment=tt,t.weekdays=dw,t.parseZone=ww,t.localeData=pt,t.isDuration=kr,t.monthsShort=kw,t.weekdaysMin=nb,t.defineLocale=uf,t.updateLocale=ia,t.locales=ra,t.weekdaysShort=gw,t.normalizeUnits=d,t.relativeTimeRounding=ek,t.relativeTimeThreshold=ok,t.calendarFormat=iy,t.prototype=n,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});$(document).ready(function(){$("#venueSelect").length&&$("#venueSelect").multiselect({includeSelectAllOption:!0,selectAllText:"All Venues",selectAllValue:"-1"});$("#venueSelectValues").val()==""&&$("#venueSelect").multiselect("selectAll",!1);$("#venueSelect").length&&$("#venueSelect").multiselect("updateButtonText");$('input[name="daterange"]').daterangepicker({minDate:moment("01/01/2000"),maxDate:moment("01/01/2100"),dateLimit:{months:12},locale:{format:$('input[name="daterange"]').attr("data-date-pattern")},ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract(1,"days"),moment().subtract(1,"days")],"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]}});$('input[name="date"]').daterangepicker({minDate:moment("1/1/2000"),maxDate:moment("1/1/2100"),singleDatePicker:!0,showDropdowns:!0,locale:{format:$('input[name="date"]').attr("data-date-pattern")}})}),function(n,t){var i,r;typeof define=="function"&&define.amd?define(["moment","jquery"],function(n,i){return i.fn||(i.fn={}),typeof n!="function"&&n.hasOwnProperty("default")&&(n=n["default"]),t(n,i)}):typeof module=="object"&&module.exports?(i=typeof window!="undefined"?window.jQuery:undefined,i||(i=require("jquery"),i.fn||(i.fn={})),r=typeof window!="undefined"&&typeof window.moment!="undefined"?window.moment:require("moment"),module.exports=t(r,i)):n.daterangepicker=t(n.moment,n.jQuery)}(typeof window!="undefined"?window:this,function(n,t){var i=function(i,r,u){var y,f,o,e,c,v,s,h,a,l;if(this.parentEl="body",this.element=t(i),this.startDate=n().startOf("day"),this.endDate=n().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=n().subtract(100,"year").format("YYYY"),this.maxYear=n().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:"ltr",format:n.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:n.weekdaysMin(),monthNames:n.monthsShort(),firstDay:n.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},(typeof r!="object"||r===null)&&(r={}),r=t.extend(this.element.data(),r),typeof r.template=="string"||r.template instanceof t||(r.template='<div class="daterangepicker"><div class="ranges"><\/div><div class="drp-calendar left"><div class="calendar-table"><\/div><div class="calendar-time"><\/div><\/div><div class="drp-calendar right"><div class="calendar-table"><\/div><div class="calendar-time"><\/div><\/div><div class="drp-buttons"><span class="drp-selected"><\/span><button class="cancelBtn" type="button"><\/button><button class="applyBtn" disabled="disabled" type="button"><\/button> <\/div><\/div>'),this.parentEl=r.parentEl&&t(r.parentEl).length?t(r.parentEl):t(this.parentEl),this.container=t(r.template).appendTo(this.parentEl),typeof r.locale=="object"&&(typeof r.locale.direction=="string"&&(this.locale.direction=r.locale.direction),typeof r.locale.format=="string"&&(this.locale.format=r.locale.format),typeof r.locale.separator=="string"&&(this.locale.separator=r.locale.separator),typeof r.locale.daysOfWeek=="object"&&(this.locale.daysOfWeek=r.locale.daysOfWeek.slice()),typeof r.locale.monthNames=="object"&&(this.locale.monthNames=r.locale.monthNames.slice()),typeof r.locale.firstDay=="number"&&(this.locale.firstDay=r.locale.firstDay),typeof r.locale.applyLabel=="string"&&(this.locale.applyLabel=r.locale.applyLabel),typeof r.locale.cancelLabel=="string"&&(this.locale.cancelLabel=r.locale.cancelLabel),typeof r.locale.weekLabel=="string"&&(this.locale.weekLabel=r.locale.weekLabel),typeof r.locale.customRangeLabel=="string"&&(h=document.createElement("textarea"),h.innerHTML=r.locale.customRangeLabel,a=h.value,this.locale.customRangeLabel=a)),this.container.addClass(this.locale.direction),typeof r.startDate=="string"&&(this.startDate=n(r.startDate,this.locale.format)),typeof r.endDate=="string"&&(this.endDate=n(r.endDate,this.locale.format)),typeof r.minDate=="string"&&(this.minDate=n(r.minDate,this.locale.format)),typeof r.maxDate=="string"&&(this.maxDate=n(r.maxDate,this.locale.format)),typeof r.startDate=="object"&&(this.startDate=n(r.startDate)),typeof r.endDate=="object"&&(this.endDate=n(r.endDate)),typeof r.minDate=="object"&&(this.minDate=n(r.minDate)),typeof r.maxDate=="object"&&(this.maxDate=n(r.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),typeof r.applyButtonClasses=="string"&&(this.applyButtonClasses=r.applyButtonClasses),typeof r.applyClass=="string"&&(this.applyButtonClasses=r.applyClass),typeof r.cancelButtonClasses=="string"&&(this.cancelButtonClasses=r.cancelButtonClasses),typeof r.cancelClass=="string"&&(this.cancelButtonClasses=r.cancelClass),typeof r.maxSpan=="object"&&(this.maxSpan=r.maxSpan),typeof r.dateLimit=="object"&&(this.maxSpan=r.dateLimit),typeof r.opens=="string"&&(this.opens=r.opens),typeof r.drops=="string"&&(this.drops=r.drops),typeof r.showWeekNumbers=="boolean"&&(this.showWeekNumbers=r.showWeekNumbers),typeof r.showISOWeekNumbers=="boolean"&&(this.showISOWeekNumbers=r.showISOWeekNumbers),typeof r.buttonClasses=="string"&&(this.buttonClasses=r.buttonClasses),typeof r.buttonClasses=="object"&&(this.buttonClasses=r.buttonClasses.join(" ")),typeof r.showDropdowns=="boolean"&&(this.showDropdowns=r.showDropdowns),typeof r.minYear=="number"&&(this.minYear=r.minYear),typeof r.maxYear=="number"&&(this.maxYear=r.maxYear),typeof r.showCustomRangeLabel=="boolean"&&(this.showCustomRangeLabel=r.showCustomRangeLabel),typeof r.singleDatePicker=="boolean"&&(this.singleDatePicker=r.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),typeof r.timePicker=="boolean"&&(this.timePicker=r.timePicker),typeof r.timePickerSeconds=="boolean"&&(this.timePickerSeconds=r.timePickerSeconds),typeof r.timePickerIncrement=="number"&&(this.timePickerIncrement=r.timePickerIncrement),typeof r.timePicker24Hour=="boolean"&&(this.timePicker24Hour=r.timePicker24Hour),typeof r.autoApply=="boolean"&&(this.autoApply=r.autoApply),typeof r.autoUpdateInput=="boolean"&&(this.autoUpdateInput=r.autoUpdateInput),typeof r.linkedCalendars=="boolean"&&(this.linkedCalendars=r.linkedCalendars),typeof r.isInvalidDate=="function"&&(this.isInvalidDate=r.isInvalidDate),typeof r.isCustomDate=="function"&&(this.isCustomDate=r.isCustomDate),typeof r.alwaysShowCalendars=="boolean"&&(this.alwaysShowCalendars=r.alwaysShowCalendars),this.locale.firstDay!=0)for(y=this.locale.firstDay;y>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),y--;if(typeof r.startDate=="undefined"&&typeof r.endDate=="undefined"&&t(this.element).is(":text")&&(c=t(this.element).val(),v=c.split(this.locale.separator),f=o=null,v.length==2?(f=n(v[0],this.locale.format),o=n(v[1],this.locale.format)):this.singleDatePicker&&c!==""&&(f=n(c,this.locale.format),o=n(c,this.locale.format)),f!==null&&o!==null&&(this.setStartDate(f),this.setEndDate(o))),typeof r.ranges=="object"){for(e in r.ranges)(f=typeof r.ranges[e][0]=="string"?n(r.ranges[e][0],this.locale.format):n(r.ranges[e][0]),o=typeof r.ranges[e][1]=="string"?n(r.ranges[e][1],this.locale.format):n(r.ranges[e][1]),this.minDate&&f.isBefore(this.minDate)&&(f=this.minDate.clone()),s=this.maxDate,this.maxSpan&&s&&f.clone().add(this.maxSpan).isAfter(s)&&(s=f.clone().add(this.maxSpan)),s&&o.isAfter(s)&&(o=s.clone()),this.minDate&&o.isBefore(this.minDate,this.timepicker?"minute":"day")||s&&f.isAfter(s,this.timepicker?"minute":"day"))||(h=document.createElement("textarea"),h.innerHTML=e,a=h.value,this.ranges[a]=[f,o]);l="<ul>";for(e in this.ranges)l+='<li data-range-key="'+e+'">'+e+"<\/li>";this.showCustomRangeLabel&&(l+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"<\/li>");l+="<\/ul>";this.container.find(".ranges").prepend(l)}typeof u=="function"&&(this.callback=u);this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide());this.timePicker&&this.autoApply&&(this.autoApply=!1);this.autoApply&&this.container.addClass("auto-apply");typeof r.ranges=="object"&&this.container.addClass("show-ranges");this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),!this.timePicker&&this.autoApply&&this.container.addClass("auto-apply"));(typeof r.ranges=="undefined"&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar");this.container.addClass("opens"+this.opens);this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses);this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses);this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses);this.container.find(".applyBtn").html(this.locale.applyLabel);this.container.find(".cancelBtn").html(this.locale.cancelLabel);this.container.find(".drp-calendar").on("click.daterangepicker",".prev",t.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",t.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",t.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",t.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",t.proxy(this.timeChanged,this));this.container.find(".ranges").on("click.daterangepicker","li",t.proxy(this.clickRange,this));this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",t.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",t.proxy(this.clickCancel,this));if(this.element.is("input")||this.element.is("button"))this.element.on({"click.daterangepicker":t.proxy(this.show,this),"focus.daterangepicker":t.proxy(this.show,this),"keyup.daterangepicker":t.proxy(this.elementChanged,this),"keydown.daterangepicker":t.proxy(this.keydown,this)});else{this.element.on("click.daterangepicker",t.proxy(this.toggle,this));this.element.on("keydown.daterangepicker",t.proxy(this.toggle,this))}this.updateElement()};return i.prototype={constructor:i,setStartDate:function(t){typeof t=="string"&&(this.startDate=n(t,this.locale.format));typeof t=="object"&&(this.startDate=n(t));this.timePicker||(this.startDate=this.startDate.startOf("day"));this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement));this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement));this.isShowing||this.updateElement();this.updateMonthsInView()},setEndDate:function(t){typeof t=="string"&&(this.endDate=n(t,this.locale.format));typeof t=="object"&&(this.endDate=n(t));this.timePicker||(this.endDate=this.endDate.endOf("day"));this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone());this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone());this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan));this.previousRightTime=this.endDate.clone();this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format));this.isShowing||this.updateElement();this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").prop("disabled",!1).removeClass("disabled"):this.container.find(".right .calendar-time select").prop("disabled",!0).addClass("disabled"));this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format));this.updateMonthsInView();this.updateCalendars();this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2);this.rightCalendar.month=this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.startDate.clone().date(2).add(1,"month"):this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var n,t,r,i;(this.timePicker&&(this.endDate?(n=parseInt(this.container.find(".left .hourselect").val(),10),t=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(t)&&(t=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),r=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||(i=this.container.find(".left .ampmselect").val(),i==="PM"&&n<12&&(n+=12),i==="AM"&&n===12&&(n=0))):(n=parseInt(this.container.find(".right .hourselect").val(),10),t=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(t)&&(t=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),r=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||(i=this.container.find(".right .ampmselect").val(),i==="PM"&&n<12&&(n+=12),i==="AM"&&n===12&&(n=0))),this.leftCalendar.month.hour(n).minute(t).second(r),this.rightCalendar.month.hour(n).minute(t).second(r)),this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),this.endDate!=null)&&this.calculateChosenLabel()},renderCalendar:function(i){var r=i=="left"?this.leftCalendar:this.rightCalendar,d=r.month.month(),g=r.month.year(),yt=r.month.hour(),et=r.month.minute(),ot=r.month.second(),pt=n([g,d]).daysInMonth(),w=n([g,d,1]),wt=n([g,d,pt]),st=n(w).subtract(1,"month").month(),ht=n(w).subtract(1,"month").year(),nt=n([ht,st]).daysInMonth(),ct=w.day(),r=[],v,y,tt,c,b,a,ut,f,u,o,p,k,ft,s;for(r.firstDay=w,r.lastDay=wt,s=0;s<6;s++)r[s]=[];v=nt-ct+this.locale.firstDay+1;v>nt&&(v-=7);ct==this.locale.firstDay&&(v=nt-6);y=n([ht,st,v,12,et,ot]);for(var s=0,u=0,f=0;s<42;s++,u++,y=n(y).add(24,"hour"))s>0&&u%7==0&&(u=0,f++),r[f][u]=y.clone().hour(yt).minute(et).second(ot),y.hour(12),this.minDate&&r[f][u].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&r[f][u].isBefore(this.minDate)&&i=="left"&&(r[f][u]=this.minDate.clone()),this.maxDate&&r[f][u].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&r[f][u].isAfter(this.maxDate)&&i=="right"&&(r[f][u]=this.maxDate.clone());i=="left"?this.leftCalendar.calendar=r:this.rightCalendar.calendar=r;var l=i=="left"?this.minDate:this.startDate,h=this.maxDate,dt=i=="left"?this.startDate:this.endDate,gt=this.locale.direction=="ltr"?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"},e='<table class="table-condensed">';if(e+="<thead>",e+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(e+="<th><\/th>"),e+=l&&!l.isBefore(r.firstDay)||this.linkedCalendars&&i!="left"?"<th><\/th>":'<th class="prev available"><span><\/span><\/th>',tt=this.locale.monthNames[r[1][1].month()]+r[1][1].format(" YYYY"),this.showDropdowns){var lt=r[1][1].month(),it=r[1][1].year(),at=h&&h.year()||this.maxYear,vt=l&&l.year()||this.minYear,bt=it==vt,kt=it==at,rt='<select class="monthselect">';for(c=0;c<12;c++)rt+=(!bt||l&&c>=l.month())&&(!kt||h&&c<=h.month())?"<option value='"+c+"'"+(c===lt?" selected='selected'":"")+">"+this.locale.monthNames[c]+"<\/option>":"<option value='"+c+"'"+(c===lt?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[c]+"<\/option>";for(rt+="<\/select>",b='<select class="yearselect">',a=vt;a<=at;a++)b+='<option value="'+a+'"'+(a===it?' selected="selected"':"")+">"+a+"<\/option>";b+="<\/select>";tt=rt+b}for(e+='<th colspan="5" class="month">'+tt+"<\/th>",e+=(!h||h.isAfter(r.lastDay))&&(!this.linkedCalendars||i=="right"||this.singleDatePicker)?'<th class="next available"><span><\/span><\/th>':"<th><\/th>",e+="<\/tr>",e+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(e+='<th class="week">'+this.locale.weekLabel+"<\/th>"),t.each(this.locale.daysOfWeek,function(n,t){e+="<th>"+t+"<\/th>"}),e+="<\/tr>",e+="<\/thead>",e+="<tbody>",this.endDate==null&&this.maxSpan&&(ut=this.startDate.clone().add(this.maxSpan).endOf("day"),(!h||ut.isBefore(h))&&(h=ut)),f=0;f<6;f++){for(e+="<tr>",this.showWeekNumbers?e+='<td class="week">'+r[f][0].week()+"<\/td>":this.showISOWeekNumbers&&(e+='<td class="week">'+r[f][0].isoWeek()+"<\/td>"),u=0;u<7;u++){for(o=[],r[f][u].isSame(new Date,"day")&&o.push("today"),r[f][u].isoWeekday()>5&&o.push("weekend"),r[f][u].month()!=r[1][1].month()&&o.push("off","ends"),this.minDate&&r[f][u].isBefore(this.minDate,"day")&&o.push("off","disabled"),h&&r[f][u].isAfter(h,"day")&&o.push("off","disabled"),this.isInvalidDate(r[f][u])&&o.push("off","disabled"),r[f][u].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&o.push("active","start-date"),this.endDate!=null&&r[f][u].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&o.push("active","end-date"),this.endDate!=null&&r[f][u]>this.startDate&&r[f][u]<this.endDate&&o.push("in-range"),p=this.isCustomDate(r[f][u]),p!==!1&&(typeof p=="string"?o.push(p):Array.prototype.push.apply(o,p)),k="",ft=!1,s=0;s<o.length;s++)k+=o[s]+" ",o[s]=="disabled"&&(ft=!0);ft||(k+="available");e+='<td class="'+k.replace(/^\s+|\s+$/g,"")+'" data-title="r'+f+"c"+u+'">'+r[f][u].date()+"<\/td>"}e+="<\/tr>"}e+="<\/tbody>";e+="<\/table>";this.container.find(".drp-calendar."+i+" .calendar-table").html(e)},renderTimePicker:function(n){var r,i,e,u,s,v,y,p,c,o,f,t,l,a;if(n!="right"||this.endDate){for(u=this.maxDate,this.maxSpan&&(!this.maxDate||this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))&&(u=this.startDate.clone().add(this.maxSpan)),n=="left"?(i=this.startDate.clone(),e=this.minDate):n=="right"&&(i=this.endDate.clone(),e=this.startDate,s=this.container.find(".drp-calendar.right .calendar-time"),s.html()!=""&&(i.hour(isNaN(i.hour())?s.find(".hourselect option:selected").val():i.hour()),i.minute(isNaN(i.minute())?s.find(".minuteselect option:selected").val():i.minute()),i.second(isNaN(i.second())?s.find(".secondselect option:selected").val():i.second()),this.timePicker24Hour||(v=s.find(".ampmselect option:selected").val(),v==="PM"&&i.hour()<12&&i.hour(i.hour()+12),v==="AM"&&i.hour()===12&&i.hour(0))),i.isBefore(this.startDate)&&(i=this.startDate.clone()),u&&i.isAfter(u)&&(i=u.clone())),r='<select class="hourselect">',y=this.timePicker24Hour?0:1,p=this.timePicker24Hour?23:12,t=y;t<=p;t++)c=t,this.timePicker24Hour||(c=i.hour()>=12?t==12?12:t+12:t==12?0:t),o=i.clone().hour(c),f=!1,e&&o.minute(59).isBefore(e)&&(f=!0),u&&o.minute(0).isAfter(u)&&(f=!0),r+=c!=i.hour()||f?f?'<option value="'+t+'" disabled="disabled" class="disabled">'+t+"<\/option>":'<option value="'+t+'">'+t+"<\/option>":'<option value="'+t+'" selected="selected">'+t+"<\/option>";for(r+="<\/select> ",r+=': <select class="minuteselect">',t=0;t<60;t+=this.timePickerIncrement){var h=t<10?"0"+t:t,o=i.clone().minute(t),f=!1;e&&o.second(59).isBefore(e)&&(f=!0);u&&o.second(0).isAfter(u)&&(f=!0);r+=i.minute()!=t||f?f?'<option value="'+t+'" disabled="disabled" class="disabled">'+h+"<\/option>":'<option value="'+t+'">'+h+"<\/option>":'<option value="'+t+'" selected="selected">'+h+"<\/option>"}if(r+="<\/select> ",this.timePickerSeconds){for(r+=': <select class="secondselect">',t=0;t<60;t++){var h=t<10?"0"+t:t,o=i.clone().second(t),f=!1;e&&o.isBefore(e)&&(f=!0);u&&o.isAfter(u)&&(f=!0);r+=i.second()!=t||f?f?'<option value="'+t+'" disabled="disabled" class="disabled">'+h+"<\/option>":'<option value="'+t+'">'+h+"<\/option>":'<option value="'+t+'" selected="selected">'+h+"<\/option>"}r+="<\/select> "}this.timePicker24Hour||(r+='<select class="ampmselect">',l="",a="",e&&i.clone().hour(12).minute(0).second(0).isBefore(e)&&(l=' disabled="disabled" class="disabled"'),u&&i.clone().hour(0).minute(0).second(0).isAfter(u)&&(a=' disabled="disabled" class="disabled"'),r+=i.hour()>=12?'<option value="AM"'+l+'>AM<\/option><option value="PM" selected="selected"'+a+">PM<\/option>":'<option value="AM" selected="selected"'+l+'>AM<\/option><option value="PM"'+a+">PM<\/option>",r+="<\/select>");this.container.find(".drp-calendar."+n+" .calendar-time").html(r)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").prop("disabled",!1):this.container.find("button.applyBtn").prop("disabled",!0)},move:function(){var i={top:0,left:0},n,f=this.drops,o=t(window).width(),u,e,r;this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},o=this.parentEl[0].clientWidth+this.parentEl.offset().left);switch(f){case"auto":n=this.element.offset().top+this.element.outerHeight()-i.top;n+this.container.outerHeight()>=this.parentEl[0].scrollHeight&&(n=this.element.offset().top-this.container.outerHeight()-i.top,f="up");break;case"up":n=this.element.offset().top-this.container.outerHeight()-i.top;break;default:n=this.element.offset().top+this.element.outerHeight()-i.top}this.container.css({top:0,left:0,right:"auto"});u=this.container.outerWidth();this.container.toggleClass("drop-up",f=="up");this.opens=="left"?(e=o-this.element.offset().left-this.element.outerWidth(),u+e>t(window).width()?this.container.css({top:n,right:"auto",left:9}):this.container.css({top:n,right:e,left:"auto"})):this.opens=="center"?(r=this.element.offset().left-i.left+this.element.outerWidth()/2-u/2,r<0?this.container.css({top:n,right:"auto",left:9}):r+u>t(window).width()?this.container.css({top:n,left:"auto",right:0}):this.container.css({top:n,left:r,right:"auto"})):(r=this.element.offset().left-i.left,r+u>t(window).width()?this.container.css({top:n,left:"auto",right:0}):this.container.css({top:n,left:r,right:"auto"}))},show:function(){if(!this.isShowing){this._outsideClickProxy=t.proxy(function(n){this.outsideClick(n)},this);t(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy);t(window).on("resize.daterangepicker",t.proxy(function(n){this.move(n)},this));this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.previousRightTime=this.endDate.clone();this.updateView();this.container.show();this.move();this.element.trigger("show.daterangepicker",this);this.isShowing=!0}},hide:function(){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),t(document).off(".daterangepicker"),t(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()},outsideClick:function(n){var i=t(n.target);n.type=="focusin"||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar");this.move();this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar");this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(n){var t=n.target.getAttribute("data-range-key"),i;this.chosenLabel=t;t==this.locale.customRangeLabel?this.showCalendars():(i=this.ranges[t],this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply())},clickPrev:function(n){var i=t(n.target).parents(".drp-calendar");i.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month");this.updateCalendars()},clickNext:function(n){var i=t(n.target).parents(".drp-calendar");i.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month"));this.updateCalendars()},hoverDate:function(n){if(t(n.target).hasClass("available")){var i=t(n.target).attr("data-title"),r=i.substr(1,1),u=i.substr(3,1),e=t(n.target).parents(".drp-calendar"),f=e.hasClass("left")?this.leftCalendar.calendar[r][u]:this.rightCalendar.calendar[r][u],o=this.leftCalendar,s=this.rightCalendar,h=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each(function(n,i){if(!t(i).hasClass("week")){var u=t(i).attr("data-title"),e=u.substr(1,1),c=u.substr(3,1),l=t(i).parents(".drp-calendar"),r=l.hasClass("left")?o.calendar[e][c]:s.calendar[e][c];r.isAfter(h)&&r.isBefore(f)||r.isSame(f,"day")?t(i).addClass("in-range"):t(i).removeClass("in-range")}})}},clickDate:function(n){var i,f,u,e;if(t(n.target).hasClass("available")){var o=t(n.target).attr("data-title"),s=o.substr(1,1),h=o.substr(3,1),c=t(n.target).parents(".drp-calendar"),r=c.hasClass("left")?this.leftCalendar.calendar[s][h]:this.rightCalendar.calendar[s][h];this.endDate||r.isBefore(this.startDate,"day")?(this.timePicker&&(i=parseInt(this.container.find(".left .hourselect").val(),10),this.timePicker24Hour||(f=this.container.find(".left .ampmselect").val(),f==="PM"&&i<12&&(i+=12),f==="AM"&&i===12&&(i=0)),u=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(u)&&(u=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),e=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,r=r.clone().hour(i).minute(u).second(e)),this.endDate=null,this.setStartDate(r.clone())):!this.endDate&&r.isBefore(this.startDate)?this.setEndDate(this.startDate.clone()):(this.timePicker&&(i=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||(f=this.container.find(".right .ampmselect").val(),f==="PM"&&i<12&&(i+=12),f==="AM"&&i===12&&(i=0)),u=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(u)&&(u=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),e=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,r=r.clone().hour(i).minute(u).second(e)),this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply()));this.singleDatePicker&&(this.setEndDate(this.startDate),!this.timePicker&&this.autoApply&&this.clickApply());this.updateView();n.stopPropagation()}},calculateChosenLabel:function(){var i=!0,r=0,n,t;for(n in this.ranges){if(this.timePicker){if(t=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm",this.startDate.format(t)==this.ranges[n][0].format(t)&&this.endDate.format(t)==this.ranges[n][1].format(t)){i=!1;this.chosenLabel=this.container.find(".ranges li:eq("+r+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[n][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[n][1].format("YYYY-MM-DD")){i=!1;this.chosenLabel=this.container.find(".ranges li:eq("+r+")").addClass("active").attr("data-range-key");break}r++}i&&(this.chosenLabel=this.showCustomRangeLabel?this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):null,this.showCalendars())},clickApply:function(){this.hide();this.element.trigger("apply.daterangepicker",this)},clickCancel:function(){this.startDate=this.oldStartDate;this.endDate=this.oldEndDate;this.hide();this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(n){var u=t(n.target).closest(".drp-calendar").hasClass("left"),e=u?"left":"right",f=this.container.find(".drp-calendar."+e),r=parseInt(f.find(".monthselect").val(),10),i=f.find(".yearselect").val();u||(i<this.startDate.year()||i==this.startDate.year()&&r<this.startDate.month())&&(r=this.startDate.month(),i=this.startDate.year());this.minDate&&(i<this.minDate.year()||i==this.minDate.year()&&r<this.minDate.month())&&(r=this.minDate.month(),i=this.minDate.year());this.maxDate&&(i>this.maxDate.year()||i==this.maxDate.year()&&r>this.maxDate.month())&&(r=this.maxDate.month(),i=this.maxDate.year());u?(this.leftCalendar.month.month(r).year(i),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(r).year(i),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month")));this.updateCalendars()},timeChanged:function(n){var r=t(n.target).closest(".drp-calendar"),h=r.hasClass("left"),u=parseInt(r.find(".hourselect").val(),10),e=parseInt(r.find(".minuteselect").val(),10),o,s,i,f;isNaN(e)&&(e=parseInt(r.find(".minuteselect option:last").val(),10));o=this.timePickerSeconds?parseInt(r.find(".secondselect").val(),10):0;this.timePicker24Hour||(s=r.find(".ampmselect").val(),s==="PM"&&u<12&&(u+=12),s==="AM"&&u===12&&(u=0));h?(i=this.startDate.clone(),i.hour(u),i.minute(e),i.second(o),this.setStartDate(i),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==i.format("YYYY-MM-DD")&&this.endDate.isBefore(i)&&this.setEndDate(i.clone())):this.endDate&&(f=this.endDate.clone(),f.hour(u),f.minute(e),f.second(o),this.setEndDate(f));this.updateCalendars();this.updateFormInputs();this.renderTimePicker("left");this.renderTimePicker("right")},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var r=this.element.val().split(this.locale.separator),t=null,i=null;(r.length===2&&(t=n(r[0],this.locale.format),i=n(r[1],this.locale.format)),(this.singleDatePicker||t===null||i===null)&&(t=n(this.element.val(),this.locale.format),i=t),t.isValid()&&i.isValid())&&(this.setStartDate(t),this.setEndDate(i),this.updateView())}},keydown:function(n){(n.keyCode===9||n.keyCode===13)&&this.hide();n.keyCode===27&&(n.preventDefault(),n.stopPropagation(),this.hide())},updateElement:function(){if(this.element.is("input")&&this.autoUpdateInput){var n=this.startDate.format(this.locale.format);this.singleDatePicker||(n+=this.locale.separator+this.endDate.format(this.locale.format));n!==this.element.val()&&this.element.val(n).trigger("change")}},remove:function(){this.container.remove();this.element.off(".daterangepicker");this.element.removeData()}},t.fn.daterangepicker=function(n,r){var u=t.extend(!0,{},t.fn.daterangepicker.defaultOptions,n);return this.each(function(){var n=t(this);n.data("daterangepicker")&&n.data("daterangepicker").remove();n.data("daterangepicker",new i(n,u,r))}),this},i});!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),n(i),i}:n(jQuery)}(function(n){function c(){var n,i=document.createElement("fakeelement"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(n in t)if(void 0!==i.style[n])return t[n]}function s(n){return 9===n?navigator.appVersion.indexOf("MSIE 9.")!==-1:(userAgent=navigator.userAgent,userAgent.indexOf("MSIE ")>-1||userAgent.indexOf("Trident/")>-1)}function h(n){return parseInt(String(n).split(/%|px|em|cm|vh|vw/)[0])}function l(t){var i=t.replace(/^.*#/,""),r=n(t);r.attr("id",i+"-tmp");window.location.hash=t;r.attr("id",i)}var r=n(window),u=n(document),t="iziModal",i={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened",DESTROYED:"destroyed"},o=c(),f=!!/Mobi/.test(navigator.userAgent),e;return window.$iziModal={},window.$iziModal.autoOpen=0,window.$iziModal.history=!1,e=function(n,t){this.init(n,t)},e.prototype={constructor:e,init:function(r,u){var f=this;this.$element=n(r);void 0!==this.$element[0].id&&""!==this.$element[0].id?this.id=this.$element[0].id:(this.id=t+Math.floor(1e7*Math.random()+1),this.$element.attr("id",this.id));this.classes=void 0!==this.$element.attr("class")?this.$element.attr("class"):"";this.content=this.$element.html();this.state=i.CLOSED;this.options=u;this.width=0;this.timer=null;this.timerTimeout=null;this.progressBar=null;this.isPaused=!1;this.isFullscreen=!1;this.headerHeight=0;this.modalHeight=0;this.$overlay=n('<div class="'+t+'-overlay" style="background-color:'+u.overlayColor+'"><\/div>');this.$navigate=n('<div class="'+t+'-navigate"><div class="'+t+'-navigate-caption">Use<\/div><button class="'+t+'-navigate-prev"><\/button><button class="'+t+'-navigate-next"><\/button><\/div>');this.group={name:this.$element.attr("data-"+t+"-group"),index:null,ids:[]};this.$element.attr("aria-hidden","true");this.$element.attr("aria-labelledby",this.id);this.$element.attr("role","dialog");this.$element.hasClass("iziModal")||this.$element.addClass("iziModal");void 0===this.group.name&&""!==u.group&&(this.group.name=u.group,this.$element.attr("data-"+t+"-group",u.group));this.options.loop===!0&&this.$element.attr("data-"+t+"-loop",!0);n.each(this.options,function(n,i){var r=f.$element.attr("data-"+t+"-"+n);try{"undefined"!=typeof r&&(u[n]=""===r||"true"==r?!0:"false"==r?!1:"function"==typeof i?new Function(r):r)}catch(e){}});u.appendTo!==!1&&this.$element.appendTo(u.appendTo);u.iframe===!0?(this.$element.html('<div class="'+t+'-wrap"><div class="'+t+'-content"><iframe class="'+t+'-iframe"><\/iframe>'+this.content+"<\/div><\/div>"),null!==u.iframeHeight&&this.$element.find("."+t+"-iframe").css("height",u.iframeHeight)):this.$element.html('<div class="'+t+'-wrap"><div class="'+t+'-content">'+this.content+"<\/div><\/div>");null!==this.options.background&&this.$element.css("background",this.options.background);this.$wrap=this.$element.find("."+t+"-wrap");null===u.zindex||isNaN(parseInt(u.zindex))||(this.$element.css("z-index",u.zindex),this.$navigate.css("z-index",u.zindex-1),this.$overlay.css("z-index",u.zindex-2));""!==u.radius&&this.$element.css("border-radius",u.radius);""!==u.padding&&this.$element.find("."+t+"-content").css("padding",u.padding);""!==u.theme&&("light"===u.theme?this.$element.addClass(t+"-light"):this.$element.addClass(u.theme));u.rtl===!0&&this.$element.addClass(t+"-rtl");u.openFullscreen===!0&&(this.isFullscreen=!0,this.$element.addClass("isFullscreen"));this.createHeader();this.recalcWidth();this.recalcVerticalPos();!f.options.afterRender||"function"!=typeof f.options.afterRender&&"object"!=typeof f.options.afterRender||f.options.afterRender(f)},createHeader:function(){this.$header=n('<div class="'+t+'-header"><h2 class="'+t+'-header-title">'+this.options.title+'<\/h2><p class="'+t+'-header-subtitle">'+this.options.subtitle+'<\/p><div class="'+t+'-header-buttons"><\/div><\/div>');this.options.closeButton===!0&&this.$header.find("."+t+"-header-buttons").append('<a href="javascript:void(0)" class="'+t+"-button "+t+'-button-close" data-'+t+"-close><\/a>");this.options.fullscreen===!0&&this.$header.find("."+t+"-header-buttons").append('<a href="javascript:void(0)" class="'+t+"-button "+t+'-button-fullscreen" data-'+t+"-fullscreen><\/a>");this.options.timeoutProgressbar===!0&&this.$header.prepend('<div class="'+t+'-progressbar"><div style="background-color:'+this.options.timeoutProgressbarColor+'"><\/div><\/div>');""===this.options.subtitle&&this.$header.addClass(t+"-noSubtitle");""!==this.options.title&&(null!==this.options.headerColor&&(this.options.borderBottom===!0&&this.$element.css("border-bottom","3px solid "+this.options.headerColor),this.$header.css("background",this.options.headerColor)),null===this.options.icon&&null===this.options.iconText||(this.$header.prepend('<i class="'+t+'-header-icon"><\/i>'),null!==this.options.icon&&this.$header.find("."+t+"-header-icon").addClass(this.options.icon).css("color",this.options.iconColor),null!==this.options.iconText&&this.$header.find("."+t+"-header-icon").html(this.options.iconText)),this.$element.css("overflow","hidden").prepend(this.$header))},setGroup:function(i){var u=this,r=this.group.name||i,f;(this.group.ids=[],void 0!==i&&i!==this.group.name&&(r=i,this.group.name=r,this.$element.attr("data-"+t+"-group",r)),void 0!==r&&""!==r)&&(f=0,n.each(n("."+t+"[data-"+t+"-group="+r+"]"),function(){u.group.ids.push(n(this)[0].id);u.id==n(this)[0].id&&(u.group.index=f);f++}))},toggle:function(){this.state==i.OPENED&&this.close();this.state==i.CLOSED&&this.open()},startProgress:function(n){var i=this;this.isPaused=!1;clearTimeout(this.timerTimeout);this.options.timeoutProgressbar===!0?(this.progressBar={hideEta:null,maxHideTime:null,currentTime:(new Date).getTime(),el:this.$element.find("."+t+"-progressbar > div"),updateProgress:function(){if(!i.isPaused){i.progressBar.currentTime=i.progressBar.currentTime+10;var n=(i.progressBar.hideEta-i.progressBar.currentTime)/i.progressBar.maxHideTime*100;i.progressBar.el.width(n+"%");n<0&&i.close()}}},n>0&&(this.progressBar.maxHideTime=parseFloat(n),this.progressBar.hideEta=(new Date).getTime()+this.progressBar.maxHideTime,this.timerTimeout=setInterval(this.progressBar.updateProgress,10))):this.timerTimeout=setTimeout(function(){i.close()},i.options.timeout)},pauseProgress:function(){this.isPaused=!0},resumeProgress:function(){this.isPaused=!1},resetProgress:function(){clearTimeout(this.timerTimeout);this.progressBar={};this.$element.find("."+t+"-progressbar > div").width("100%")},open:function(r){function h(){e.state=i.OPENED;e.$element.trigger(i.OPENED);!e.options.onOpened||"function"!=typeof e.options.onOpened&&"object"!=typeof e.options.onOpened||e.options.onOpened(e)}function c(){e.$element.off("click","[data-"+t+"-close]").on("click","[data-"+t+"-close]",function(i){i.preventDefault();var r=n(i.currentTarget).attr("data-"+t+"-transitionOut");void 0!==r?e.close({transition:r}):e.close()});e.$element.off("click","[data-"+t+"-fullscreen]").on("click","[data-"+t+"-fullscreen]",function(n){n.preventDefault();e.isFullscreen===!0?(e.isFullscreen=!1,e.$element.removeClass("isFullscreen")):(e.isFullscreen=!0,e.$element.addClass("isFullscreen"));e.options.onFullscreen&&"function"==typeof e.options.onFullscreen&&e.options.onFullscreen(e);e.$element.trigger("fullscreen",e)});e.$navigate.off("click","."+t+"-navigate-next").on("click","."+t+"-navigate-next",function(n){e.next(n)});e.$element.off("click","[data-"+t+"-next]").on("click","[data-"+t+"-next]",function(n){e.next(n)});e.$navigate.off("click","."+t+"-navigate-prev").on("click","."+t+"-navigate-prev",function(n){e.prev(n)});e.$element.off("click","[data-"+t+"-prev]").on("click","[data-"+t+"-prev]",function(n){e.prev(n)})}var e=this,s;try{void 0!==r&&r.preventClose===!1&&n.each(n("."+t),function(t,i){if(void 0!==n(i).data().iziModal){var r=n(i).iziModal("getState");"opened"!=r&&"opening"!=r||n(i).iziModal("close")}})}catch(v){}if(function(){if(e.options.history){var n=document.title;document.title=n+" - "+e.options.title;l("#"+e.id);document.title=n;window.$iziModal.history=!0}else window.$iziModal.history=!1}(),this.state==i.CLOSED){if(c(),this.setGroup(),this.state=i.OPENING,this.$element.trigger(i.OPENING),this.$element.attr("aria-hidden","false"),this.options.timeoutProgressbar===!0&&this.$element.find("."+t+"-progressbar > div").width("100%"),this.options.iframe===!0){this.$element.find("."+t+"-content").addClass(t+"-content-loader");this.$element.find("."+t+"-iframe").on("load",function(){n(this).parent().removeClass(t+"-content-loader")});s=null;try{s=""!==n(r.currentTarget).attr("href")?n(r.currentTarget).attr("href"):null}catch(v){}if(null===this.options.iframeURL||null!==s&&void 0!==s||(s=this.options.iframeURL),null===s||void 0===s)throw new Error("Failed to find iframe URL");this.$element.find("."+t+"-iframe").attr("src",s)}(this.options.bodyOverflow||f)&&(n("html").addClass(t+"-isOverflow"),f&&n("body").css("overflow","hidden"));this.options.onOpening&&"function"==typeof this.options.onOpening&&this.options.onOpening(this),function(){var f,u,i;e.group.ids.length>1&&(e.$navigate.appendTo("body"),e.$navigate.addClass("fadeIn"),e.options.navigateCaption===!0&&e.$navigate.find("."+t+"-navigate-caption").show(),f=e.$element.outerWidth(),e.options.navigateArrows!==!1?"closeScreenEdge"===e.options.navigateArrows?(e.$navigate.find("."+t+"-navigate-prev").css("left",0).show(),e.$navigate.find("."+t+"-navigate-next").css("right",0).show()):(e.$navigate.find("."+t+"-navigate-prev").css("margin-left",-(f/2+84)).show(),e.$navigate.find("."+t+"-navigate-next").css("margin-right",-(f/2+84)).show()):(e.$navigate.find("."+t+"-navigate-prev").hide(),e.$navigate.find("."+t+"-navigate-next").hide()),0===e.group.index&&(u=n("."+t+"[data-"+t+'-group="'+e.group.name+'"][data-'+t+"-loop]").length,0===u&&e.options.loop===!1&&e.$navigate.find("."+t+"-navigate-prev").hide()),e.group.index+1===e.group.ids.length&&(u=n("."+t+"[data-"+t+'-group="'+e.group.name+'"][data-'+t+"-loop]").length,0===u&&e.options.loop===!1&&e.$navigate.find("."+t+"-navigate-next").hide()));e.options.overlay===!0&&(e.options.appendToOverlay===!1?e.$overlay.appendTo("body"):e.$overlay.appendTo(e.options.appendToOverlay));e.options.transitionInOverlay&&e.$overlay.addClass(e.options.transitionInOverlay);i=e.options.transitionIn;"object"==typeof r&&(void 0===r.transition&&void 0===r.transitionIn||(i=r.transition||r.transitionIn),void 0!==r.zindex&&e.setZindex(r.zindex));""!==i&&void 0!==o?(e.$element.addClass("transitionIn "+i).show(),e.$wrap.one(o,function(){e.$element.removeClass(i+" transitionIn");e.$overlay.removeClass(e.options.transitionInOverlay);e.$navigate.removeClass("fadeIn");h()})):(e.$element.show(),h());e.options.pauseOnHover!==!0||e.options.pauseOnHover!==!0||e.options.timeout===!1||isNaN(parseInt(e.options.timeout))||e.options.timeout===!1||0===e.options.timeout||(e.$element.off("mouseenter").on("mouseenter",function(n){n.preventDefault();e.isPaused=!0}),e.$element.off("mouseleave").on("mouseleave",function(n){n.preventDefault();e.isPaused=!1}))}();this.options.timeout===!1||isNaN(parseInt(this.options.timeout))||this.options.timeout===!1||0===this.options.timeout||e.startProgress(this.options.timeout);this.options.overlayClose&&!this.$element.hasClass(this.options.transitionOut)&&this.$overlay.click(function(){e.close()});this.options.focusInput&&this.$element.find(":input:not(button):enabled:visible:first").focus(),function a(){e.recalcLayout();e.timer=setTimeout(a,300)}();u.on("keydown."+t,function(n){e.options.closeOnEscape&&27===n.keyCode&&e.close()})}},close:function(r){function h(){e.state=i.CLOSED;e.$element.trigger(i.CLOSED);e.options.iframe===!0&&e.$element.find("."+t+"-iframe").attr("src","");(e.options.bodyOverflow||f)&&(n("html").removeClass(t+"-isOverflow"),f&&n("body").css("overflow","auto"));e.options.onClosed&&"function"==typeof e.options.onClosed&&e.options.onClosed(e);e.options.restoreDefaultContent===!0&&e.$element.find("."+t+"-content").html(e.content);0===n("."+t+":visible").length&&n("html").removeClass(t+"-isAttached")}var e=this,s;(this.state==i.OPENED||this.state==i.OPENING)&&(u.off("keydown."+t),this.state=i.CLOSING,this.$element.trigger(i.CLOSING),this.$element.attr("aria-hidden","true"),clearTimeout(this.timer),clearTimeout(this.timerTimeout),e.options.onClosing&&"function"==typeof e.options.onClosing&&e.options.onClosing(this),s=this.options.transitionOut,"object"==typeof r&&(void 0===r.transition&&void 0===r.transitionOut||(s=r.transition||r.transitionOut)),s===!1||""===s||void 0===o?(this.$element.hide(),this.$overlay.remove(),this.$navigate.remove(),h()):(this.$element.attr("class",[this.classes,t,s,"light"==this.options.theme?t+"-light":this.options.theme,this.isFullscreen===!0?"isFullscreen":"",this.options.rtl?t+"-rtl":""].join(" ")),this.$overlay.attr("class",t+"-overlay "+this.options.transitionOutOverlay),e.options.navigateArrows===!1||f||this.$navigate.attr("class",t+"-navigate fadeOut"),this.$element.one(o,function(){e.$element.hasClass(s)&&e.$element.removeClass(s+" transitionOut").hide();e.$overlay.removeClass(e.options.transitionOutOverlay).remove();e.$navigate.removeClass("fadeOut").remove();h()})))},next:function(i){var r=this,f="fadeInRight",e="fadeOutLeft",o=n("."+t+":visible"),u={};u.out=this;void 0!==i&&"object"!=typeof i?(i.preventDefault(),o=n(i.currentTarget),f=o.attr("data-"+t+"-transitionIn"),e=o.attr("data-"+t+"-transitionOut")):void 0!==i&&(void 0!==i.transitionIn&&(f=i.transitionIn),void 0!==i.transitionOut&&(e=i.transitionOut));this.close({transition:e});setTimeout(function(){for(var e,o=n("."+t+"[data-"+t+'-group="'+r.group.name+'"][data-'+t+"-loop]").length,i=r.group.index+1;i<=r.group.ids.length;i++){try{u["in"]=n("#"+r.group.ids[i]).data().iziModal}catch(s){}if("undefined"!=typeof u["in"]){n("#"+r.group.ids[i]).iziModal("open",{transition:f});break}if(i==r.group.ids.length&&o>0||r.options.loop===!0)for(e=0;e<=r.group.ids.length;e++)if(u["in"]=n("#"+r.group.ids[e]).data().iziModal,"undefined"!=typeof u["in"]){n("#"+r.group.ids[e]).iziModal("open",{transition:f});break}}},200);n(document).trigger(t+"-group-change",u)},prev:function(i){var r=this,f="fadeInLeft",e="fadeOutRight",o=n("."+t+":visible"),u={};u.out=this;void 0!==i&&"object"!=typeof i?(i.preventDefault(),o=n(i.currentTarget),f=o.attr("data-"+t+"-transitionIn"),e=o.attr("data-"+t+"-transitionOut")):void 0!==i&&(void 0!==i.transitionIn&&(f=i.transitionIn),void 0!==i.transitionOut&&(e=i.transitionOut));this.close({transition:e});setTimeout(function(){for(var e,o=n("."+t+"[data-"+t+'-group="'+r.group.name+'"][data-'+t+"-loop]").length,i=r.group.index;i>=0;i--){try{u["in"]=n("#"+r.group.ids[i-1]).data().iziModal}catch(s){}if("undefined"!=typeof u["in"]){n("#"+r.group.ids[i-1]).iziModal("open",{transition:f});break}if(0===i&&o>0||r.options.loop===!0)for(e=r.group.ids.length-1;e>=0;e--)if(u["in"]=n("#"+r.group.ids[e]).data().iziModal,"undefined"!=typeof u["in"]){n("#"+r.group.ids[e]).iziModal("open",{transition:f});break}}},200);n(document).trigger(t+"-group-change",u)},destroy:function(){var r=n.Event("destroy");this.$element.trigger(r);u.off("keydown."+t);clearTimeout(this.timer);clearTimeout(this.timerTimeout);this.options.iframe===!0&&this.$element.find("."+t+"-iframe").remove();this.$element.html(this.$element.find("."+t+"-content").html());this.$element.off("click","[data-"+t+"-close]");this.$element.off("click","[data-"+t+"-fullscreen]");this.$element.off("."+t).removeData(t).attr("style","");this.$overlay.remove();this.$navigate.remove();this.$element.trigger(i.DESTROYED);this.$element=null},getState:function(){return this.state},getGroup:function(){return this.group},setWidth:function(n){this.options.width=n;this.recalcWidth();var i=this.$element.outerWidth();this.options.navigateArrows!==!0&&"closeToModal"!=this.options.navigateArrows||(this.$navigate.find("."+t+"-navigate-prev").css("margin-left",-(i/2+84)).show(),this.$navigate.find("."+t+"-navigate-next").css("margin-right",-(i/2+84)).show())},setTop:function(n){this.options.top=n;this.recalcVerticalPos(!1)},setBottom:function(n){this.options.bottom=n;this.recalcVerticalPos(!1)},setHeader:function(n){n?this.$element.find("."+t+"-header").show():(this.headerHeight=0,this.$element.find("."+t+"-header").hide())},setTitle:function(n){this.options.title=n;0===this.headerHeight&&this.createHeader();0===this.$header.find("."+t+"-header-title").length&&this.$header.append('<h2 class="'+t+'-header-title"><\/h2>');this.$header.find("."+t+"-header-title").html(n)},setSubtitle:function(n){""===n?(this.$header.find("."+t+"-header-subtitle").remove(),this.$header.addClass(t+"-noSubtitle")):(0===this.$header.find("."+t+"-header-subtitle").length&&this.$header.append('<p class="'+t+'-header-subtitle"><\/p>'),this.$header.removeClass(t+"-noSubtitle"));this.$header.find("."+t+"-header-subtitle").html(n);this.options.subtitle=n},setIcon:function(n){0===this.$header.find("."+t+"-header-icon").length&&this.$header.prepend('<i class="'+t+'-header-icon"><\/i>');this.$header.find("."+t+"-header-icon").attr("class",t+"-header-icon "+n);this.options.icon=n},setIconText:function(n){this.$header.find("."+t+"-header-icon").html(n);this.options.iconText=n},setHeaderColor:function(n){this.options.borderBottom===!0&&this.$element.css("border-bottom","3px solid "+n);this.$header.css("background",n);this.options.headerColor=n},setBackground:function(n){n===!1?(this.options.background=null,this.$element.css("background","")):(this.$element.css("background",n),this.options.background=n)},setZindex:function(n){isNaN(parseInt(this.options.zindex))||(this.options.zindex=n,this.$element.css("z-index",n),this.$navigate.css("z-index",n-1),this.$overlay.css("z-index",n-2))},setFullscreen:function(n){n?(this.isFullscreen=!0,this.$element.addClass("isFullscreen")):(this.isFullscreen=!1,this.$element.removeClass("isFullscreen"))},setContent:function(n){if("object"==typeof n){var i=n["default"]||!1;i===!0&&(this.content=n.content);n=n.content}this.options.iframe===!1&&this.$element.find("."+t+"-content").html(n)},setTransitionIn:function(n){this.options.transitionIn=n},setTransitionOut:function(n){this.options.transitionOut=n},setTimeout:function(n){this.options.timeout=n},resetContent:function(){this.$element.find("."+t+"-content").html(this.content)},startLoading:function(){this.$element.find("."+t+"-loader").length||this.$element.append('<div class="'+t+'-loader fadeIn"><\/div>');this.$element.find("."+t+"-loader").css({top:this.headerHeight,borderRadius:this.options.radius})},stopLoading:function(){var n=this.$element.find("."+t+"-loader");n.length||(this.$element.prepend('<div class="'+t+'-loader fadeIn"><\/div>'),n=this.$element.find("."+t+"-loader").css("border-radius",this.options.radius));n.removeClass("fadeIn").addClass("fadeOut");setTimeout(function(){n.remove()},600)},recalcWidth:function(){var t=this,n;(this.$element.css("max-width",this.options.width),s())&&(n=t.options.width,n.toString().split("%").length>1&&(n=t.$element.outerWidth()),t.$element.css({left:"50%",marginLeft:-(n/2)}))},recalcVerticalPos:function(n){null!==this.options.top&&this.options.top!==!1?(this.$element.css("margin-top",this.options.top),0===this.options.top&&this.$element.css({borderTopRightRadius:0,borderTopLeftRadius:0})):n===!1&&this.$element.css({marginTop:"",borderRadius:this.options.radius});null!==this.options.bottom&&this.options.bottom!==!1?(this.$element.css("margin-bottom",this.options.bottom),0===this.options.bottom&&this.$element.css({borderBottomRightRadius:0,borderBottomLeftRadius:0})):n===!1&&this.$element.css({marginBottom:"",borderRadius:this.options.radius})},recalcLayout:function(){var f=this,u=r.height(),c=this.$element.outerHeight(),l=this.$element.outerWidth(),e=this.$element.find("."+t+"-content")[0].scrollHeight,a=e+this.headerHeight,v=this.$element.innerHeight()-this.headerHeight,y=(parseInt(-((this.$element.innerHeight()+1)/2))+"px",this.$wrap.scrollTop()),o=0;s()&&(l>=r.width()||this.isFullscreen===!0?this.$element.css({left:"0",marginLeft:""}):this.$element.css({left:"50%",marginLeft:-(l/2)}));this.options.borderBottom===!0&&""!==this.options.title&&(o=3);this.$element.find("."+t+"-header").length&&this.$element.find("."+t+"-header").is(":visible")?(this.headerHeight=parseInt(this.$element.find("."+t+"-header").innerHeight()),this.$element.css("overflow","hidden")):(this.headerHeight=0,this.$element.css("overflow",""));this.$element.find("."+t+"-loader").length&&this.$element.find("."+t+"-loader").css("top",this.headerHeight);c!==this.modalHeight&&(this.modalHeight=c,this.options.onResize&&"function"==typeof this.options.onResize&&this.options.onResize(this));this.state!=i.OPENED&&this.state!=i.OPENING||(this.options.iframe===!0&&(u<this.options.iframeHeight+this.headerHeight+o||this.isFullscreen===!0?this.$element.find("."+t+"-iframe").css("height",u-(this.headerHeight+o)):this.$element.find("."+t+"-iframe").css("height",this.options.iframeHeight)),c==u?this.$element.addClass("isAttached"):this.$element.removeClass("isAttached"),this.isFullscreen===!1&&this.$element.width()>=r.width()?this.$element.find("."+t+"-button-fullscreen").hide():this.$element.find("."+t+"-button-fullscreen").show(),this.recalcButtons(),this.isFullscreen===!1&&(u=u-(h(this.options.top)||0)-(h(this.options.bottom)||0)),a>u?(this.options.top>0&&null===this.options.bottom&&e<r.height()&&this.$element.addClass("isAttachedBottom"),this.options.bottom>0&&null===this.options.top&&e<r.height()&&this.$element.addClass("isAttachedTop"),1===n("."+t+":visible").length&&n("html").addClass(t+"-isAttached"),this.$element.css("height",u)):(this.$element.css("height",e+(this.headerHeight+o)),this.$element.removeClass("isAttachedTop isAttachedBottom"),1===n("."+t+":visible").length&&n("html").removeClass(t+"-isAttached")),function(){e>v&&a>u?(f.$element.addClass("hasScroll"),f.$wrap.css("height",c-(f.headerHeight+o))):(f.$element.removeClass("hasScroll"),f.$wrap.css("height","auto"))}(),function(){v+y<e-30?f.$element.addClass("hasShadow"):f.$element.removeClass("hasShadow")}())},recalcButtons:function(){var n=this.$header.find("."+t+"-header-buttons").innerWidth()+10;this.options.rtl===!0?this.$header.css("padding-left",n):this.$header.css("padding-right",n)}},r.off("load."+t).on("load."+t,function(){var r=document.location.hash,i;if(0===window.$iziModal.autoOpen&&!n("."+t).is(":visible"))try{i=n(r).data();"undefined"!=typeof i&&i.iziModal.options.autoOpen!==!1&&n(r).iziModal("open")}catch(u){}}),r.off("hashchange."+t).on("hashchange."+t,function(){var i=document.location.hash,r;if(""!==i)try{r=n(i).data();"undefined"!=typeof r&&"opening"!==n(i).iziModal("getState")&&setTimeout(function(){n(i).iziModal("open",{preventClose:!1})},200)}catch(u){}else window.$iziModal.history&&n.each(n("."+t),function(t,i){if(void 0!==n(i).data().iziModal){var r=n(i).iziModal("getState");"opened"!=r&&"opening"!=r||n(i).iziModal("close")}})}),u.off("click","[data-"+t+"-open]").on("click","[data-"+t+"-open]",function(i){i.preventDefault();var u=n("."+t+":visible"),r=n(i.currentTarget).attr("data-"+t+"-open"),s=n(i.currentTarget).attr("data-"+t+"-preventClose"),f=n(i.currentTarget).attr("data-"+t+"-transitionIn"),e=n(i.currentTarget).attr("data-"+t+"-transitionOut"),o=n(i.currentTarget).attr("data-"+t+"-zindex");void 0!==o&&n(r).iziModal("setZindex",o);void 0===s&&(void 0!==e?u.iziModal("close",{transition:e}):u.iziModal("close"));setTimeout(function(){void 0!==f?n(r).iziModal("open",{transition:f}):n(r).iziModal("open")},200)}),u.off("keyup."+t).on("keyup."+t,function(i){if(n("."+t+":visible").length){var u=n("."+t+":visible")[0].id,e=n("#"+u).data().iziModal.options.arrowKeys,o=n("#"+u).iziModal("getGroup"),r=i||window.event,f=r.target||r.srcElement;void 0===u||!e||void 0===o.name||r.ctrlKey||r.metaKey||r.altKey||"INPUT"===f.tagName.toUpperCase()||"TEXTAREA"==f.tagName.toUpperCase()||(37===r.keyCode?n("#"+u).iziModal("prev",r):39===r.keyCode&&n("#"+u).iziModal("next",r))}}),n.fn[t]=function(i,r){var u,s,l,h;if(!n(this).length&&"object"==typeof i){if(u={$el:document.createElement("div"),id:this.selector.split("#"),"class":this.selector.split(".")},u.id.length>1){try{u.$el=document.createElement(id[0])}catch(a){}u.$el.id=this.selector.split("#")[1].trim()}else if(u["class"].length>1){try{u.$el=document.createElement(u["class"][0])}catch(a){}for(s=1;s<u["class"].length;s++)u.$el.classList.add(u["class"][s].trim())}document.body.appendChild(u.$el);this.push(n(this.selector))}for(l=this,h=0;h<l.length;h++){var c=n(l[h]),f=c.data(t),o=n.extend({},n.fn[t].defaults,c.data(),"object"==typeof i&&i);if(f||i&&"object"!=typeof i){if("string"==typeof i&&"undefined"!=typeof f)return f[i].apply(f,[].concat(r))}else c.data(t,f=new e(c,o));o.autoOpen&&(isNaN(parseInt(o.autoOpen))?o.autoOpen===!0&&f.open():setTimeout(function(){f.open()},o.autoOpen),window.$iziModal.autoOpen++)}return this},n.fn[t].defaults={title:"",subtitle:"",headerColor:"#88A0B9",background:null,theme:"",icon:null,iconText:null,iconColor:"",rtl:!1,width:600,top:null,bottom:null,borderBottom:!0,padding:0,radius:3,zindex:999,iframe:!1,iframeHeight:400,iframeURL:null,focusInput:!0,group:"",loop:!1,arrowKeys:!0,navigateCaption:!0,navigateArrows:!0,history:!1,restoreDefaultContent:!1,autoOpen:0,bodyOverflow:!1,fullscreen:!1,openFullscreen:!1,closeOnEscape:!0,closeButton:!0,appendTo:"body",appendToOverlay:"body",overlay:!0,overlayClose:!0,overlayColor:"rgba(0, 0, 0, 0.4)",timeout:!1,timeoutProgressbar:!1,pauseOnHover:!1,timeoutProgressbarColor:"rgba(255,255,255,0.5)",transitionIn:"comingIn",transitionOut:"comingOut",transitionInOverlay:"fadeIn",transitionOutOverlay:"fadeOut",onFullscreen:function(){},onResize:function(){},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){},afterRender:function(){}},n.fn[t].Constructor=e,n.fn.iziModal})