@coast/rrule
Version:
JavaScript library for working with recurrence rules for calendar dates.
40 lines • 211 kB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"k",(function(){return u})),n.d(t,"l",(function(){return c})),n.d(t,"n",(function(){return l})),n.d(t,"i",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"j",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return y})),n.d(t,"h",(function(){return m})),n.d(t,"c",(function(){return v}));var r=n(3),i=function(e){return null!=e},o=function(e){return"number"==typeof e},a=function(e){return r.a.indexOf(e)>=0},s=Array.isArray,u=function(e,t){void 0===t&&(t=e),1===arguments.length&&(t=e,e=0);for(var n=[],r=e;r<t;r++)n.push(r);return n},c=function(e,t){var n=0,r=[];if(s(e))for(;n<t;n++)r[n]=[].concat(e);else for(;n<t;n++)r[n]=e;return r},l=function(e){return s(e)?e:[e]};function f(e,t,n){void 0===n&&(n=" ");var r=String(e);return t>>=0,r.length>t?String(r):((t-=r.length)>n.length&&(n+=c(n,t/n.length)),n.slice(0,t)+String(r))}var d=function(e,t,n){var r=e.split(t);return n?r.slice(0,n).concat([r.slice(n).join(t)]):r},h=function(e,t){var n=e%t;return n*t<0?n+t:n},p=function(e,t){return{div:Math.floor(e/t),mod:h(e,t)}},y=function(e){return!i(e)||0===e.length},m=function(e){return!y(e)},v=function(e,t){return m(e)&&-1!==e.indexOf(t)}},function(e,t,n){"use strict";var r,i,o=n(0);(i=r||(r={})).MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],i.ONE_DAY=864e5,i.MAXYEAR=9999,i.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),i.PY_WEEKDAYS=[6,0,1,2,3,4,5],i.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/i.ONE_DAY)+1},i.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},i.isDate=function(e){return e instanceof Date},i.isValidDate=function(e){return i.isDate(e)&&!isNaN(e.getTime())},i.tzOffset=function(e){return 60*e.getTimezoneOffset()*1e3},i.daysBetween=function(e,t){var n=e.getTime()-i.tzOffset(e)-(t.getTime()-i.tzOffset(t));return Math.round(n/i.ONE_DAY)},i.toOrdinal=function(e){return i.daysBetween(e,i.ORDINAL_BASE)},i.fromOrdinal=function(e){return new Date(i.ORDINAL_BASE.getTime()+e*i.ONE_DAY)},i.getMonthDays=function(e){var t=e.getUTCMonth();return 1===t&&i.isLeapYear(e.getUTCFullYear())?29:i.MONTH_DAYS[t]},i.getWeekday=function(e){return i.PY_WEEKDAYS[e.getUTCDay()]},i.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[i.getWeekday(n),i.getMonthDays(n)]},i.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},i.clone=function(e){return new Date(e.getTime())},i.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(i.clone(e[n]));return t},i.sort=function(e){e.sort((function(e,t){return e.getTime()-t.getTime()}))},i.timeToUntilString=function(e,t){void 0===t&&(t=!0);var n=new Date(e);return[Object(o.i)(n.getUTCFullYear().toString(),4,"0"),Object(o.i)(n.getUTCMonth()+1,2,"0"),Object(o.i)(n.getUTCDate(),2,"0"),"T",Object(o.i)(n.getUTCHours(),2,"0"),Object(o.i)(n.getUTCMinutes(),2,"0"),Object(o.i)(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},i.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw new Error("Invalid UNTIL value: "+e);return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))};var a=r,s=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function c(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function f(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var d,h=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.iterator=r,i}return c(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(s);function p(e){return e<d.HOURLY}!function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"}(d||(d={}));var y=n(3),m=function(){function e(e,t,n,r){this.hour=e,this.minute=t,this.second=n,this.millisecond=r||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},e}(),v=function(e){function t(t,n,r,i,o,a,s){var u=e.call(this,i,o,a,s)||this;return u.year=t,u.month=n,u.day=r,u}return c(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return r.getWeekday(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),n=Object(o.j)(this.month,12);this.month=n,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,n){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var r=Object(o.a)(this.hour,24),i=r.div,a=r.mod;if(i&&(this.hour=a,this.addDaily(i)),Object(o.b)(n)||Object(o.c)(n,this.hour))break}},t.prototype.addMinutes=function(e,t,n,r){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var i=Object(o.a)(this.minute,60),a=i.div,s=i.mod;if(a&&(this.minute=s,this.addHours(a,!1,n)),(Object(o.b)(n)||Object(o.c)(n,this.hour))&&(Object(o.b)(r)||Object(o.c)(r,this.minute)))break}},t.prototype.addSeconds=function(e,t,n,r,i){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var a=Object(o.a)(this.second,60),s=a.div,u=a.mod;if(s&&(this.second=u,this.addMinutes(s,!1,n,r)),(Object(o.b)(n)||Object(o.c)(n,this.hour))&&(Object(o.b)(r)||Object(o.c)(r,this.minute))&&(Object(o.b)(i)||Object(o.c)(i,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=r.monthRange(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>r.MAXYEAR))return;e=r.monthRange(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var n=e.freq,r=e.interval,i=e.wkst,o=e.byhour,a=e.byminute,s=e.bysecond;switch(n){case d.YEARLY:return this.addYears(r);case d.MONTHLY:return this.addMonths(r);case d.WEEKLY:return this.addWeekly(r,i);case d.DAILY:return this.addDaily(r);case d.HOURLY:return this.addHours(r,t,o);case d.MINUTELY:return this.addMinutes(r,t,o,a);case d.SECONDLY:return this.addSeconds(r,t,o,a,s)}},t}(m);function g(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object(o.c)(re,i)||t.push(i),a.isDate(e[i])&&!a.isValidDate(e[i])&&t.push(i)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return l({},e)}function b(e){var t=e.split("\n").map(k).filter((function(e){return null!==e}));return l(l({},t[0]),t[1])}function w(e){var t={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!n)return t;n[0];var r=n[1],i=n[2];return r&&(t.tzid=r),t.dtstart=a.untilStringToDate(i),t}function k(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return x(e);t[0];var n=t[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return x(e);case"DTSTART":return w(e);default:throw new Error("Unsupported RFC prop "+n+" in "+e)}}function x(e){var t=w(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach((function(n){var r=n.split("="),i=r[0],o=r[1];switch(i.toUpperCase()){case"FREQ":t.freq=d[o.toUpperCase()];break;case"WKST":t.wkst=te[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var s=function(e){if(-1!==e.indexOf(",")){return e.split(",").map(T)}return T(e)}(o),u=i.toLowerCase();t[u]=s;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=function(e){return e.split(",").map((function(e){if(2===e.length)return te[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/),n=Number(t[1]),r=t[2],i=te[r].weekday;return new y.b(i,n)}))}(o);break;case"DTSTART":case"TZID":var c=w(e);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=a.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+i+"'")}})),t}function T(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var O=n(4),E=function(){function e(e,t){this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=a.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":"+e:";TZID="+this.tzid+":"+e},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){if(this.isUTC)return this.date;try{return O.DateTime.fromJSDate(this.date).setZone(this.tzid,{keepLocalTime:!0}).toJSDate()}catch(e){return e instanceof TypeError&&console.error("Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone"),this.date}},e}();function S(e){for(var t=[],n="",r=Object.keys(e),i=Object.keys(ne),s=0;s<r.length;s++)if("tzid"!==r[s]&&Object(o.c)(i,r[s])){var u=r[s].toUpperCase(),c=e[r[s]],l="";if(Object(o.f)(c)&&(!Object(o.d)(c)||c.length)){switch(u){case"FREQ":l=ie.FREQUENCIES[e.freq];break;case"WKST":l=Object(o.e)(c)?new y.b(c).toString():c.toString();break;case"BYWEEKDAY":u="BYDAY",l=Object(o.n)(c).map((function(e){return e instanceof y.b?e:Object(o.d)(e)?new y.b(e[0],e[1]):new y.b(e)})).toString();break;case"DTSTART":n=D(c,e.tzid);break;case"UNTIL":l=a.timeToUntilString(c,!e.tzid);break;default:if(Object(o.d)(c)){for(var f=[],d=0;d<c.length;d++)f[d]=String(c[d]);l=f.toString()}else l=String(c)}l&&t.push([u,l])}}var h=t.map((function(e){return e[0]+"="+e[1].toString()})).join(";"),p="";return""!==h&&(p="RRULE:"+h),[n,p].filter((function(e){return!!e})).join("\n")}function D(e,t){return e?"DTSTART"+new E(new Date(e),t).toString():""}var j=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?a.clone(t):a.cloneDates(t)),"all"===e?this.all=t:(n._value=t,this[e].push(n))},e.prototype._cacheGet=function(e,t){var n=!1,r=t?Object.keys(t):[],i=function(e){for(var n=0;n<r.length;n++){var i=r[n];if(String(t[i])!==String(e[i]))return!0}return!1},u=this[e];if("all"===e)n=this.all;else if(Object(o.d)(u))for(var c=0;c<u.length;c++){var l=u[c];if(!r.length||!i(l)){n=l._value;break}}if(!n&&this.all){var f=new s(e,t);for(c=0;c<this.all.length&&f.accept(this.all[c]);c++);n=f.getValue(),this._cacheAdd(e,n,t)}return Object(o.d)(n)?a.cloneDates(n):n instanceof Date?a.clone(n):n},e}(),N=f(Object(o.l)(1,31),Object(o.l)(2,28),Object(o.l)(3,31),Object(o.l)(4,30),Object(o.l)(5,31),Object(o.l)(6,30),Object(o.l)(7,31),Object(o.l)(8,31),Object(o.l)(9,30),Object(o.l)(10,31),Object(o.l)(11,30),Object(o.l)(12,31),Object(o.l)(1,7)),C=f(Object(o.l)(1,31),Object(o.l)(2,29),Object(o.l)(3,31),Object(o.l)(4,30),Object(o.l)(5,31),Object(o.l)(6,30),Object(o.l)(7,31),Object(o.l)(8,31),Object(o.l)(9,30),Object(o.l)(10,31),Object(o.l)(11,30),Object(o.l)(12,31),Object(o.l)(1,7)),M=Object(o.k)(1,29),L=Object(o.k)(1,30),A=Object(o.k)(1,31),I=Object(o.k)(1,32),R=f(I,L,I,A,I,A,I,I,A,I,A,I,I.slice(0,7)),U=f(I,M,I,A,I,A,I,I,A,I,A,I,I.slice(0,7)),_=Object(o.k)(-28,0),q=Object(o.k)(-29,0),Y=Object(o.k)(-30,0),H=Object(o.k)(-31,0),F=f(H,q,H,Y,H,Y,H,H,Y,H,Y,H,H.slice(0,7)),W=f(H,_,H,Y,H,Y,H,H,Y,H,Y,H,H.slice(0,7)),V=[0,31,60,91,121,152,182,213,244,274,305,335,366],P=[0,31,59,90,120,151,181,212,243,273,304,334,365],z=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Object(o.k)(7));return e}();function Z(e,t){var n,r,i=new Date(Date.UTC(e,0,1)),s=a.isLeapYear(e)?366:365,u=a.isLeapYear(e+1)?366:365,c=a.toOrdinal(i),f=a.getWeekday(i),d=l(l({yearlen:s,nextyearlen:u,yearordinal:c,yearweekday:f},function(e){var t=a.isLeapYear(e)?366:365,n=new Date(Date.UTC(e,0,1)),r=a.getWeekday(n);if(365===t)return{mmask:N,mdaymask:U,nmdaymask:W,wdaymask:z.slice(r),mrange:P};return{mmask:C,mdaymask:R,nmdaymask:F,wdaymask:z.slice(r),mrange:V}}(e)),{wnomask:null});if(Object(o.b)(t.byweekno))return d;d.wnomask=Object(o.l)(0,s+7);var h=n=Object(o.j)(7-f+t.wkst,7);h>=4?(h=0,r=d.yearlen+Object(o.j)(f-t.wkst,7)):r=s-h;for(var p=Math.floor(r/7),y=Object(o.j)(r,7),m=Math.floor(p+y/4),v=0;v<t.byweekno.length;v++){var g=t.byweekno[v];if(g<0&&(g+=m+1),g>0&&g<=m){var b=void 0;g>1?(b=h+7*(g-1),h!==n&&(b-=7-n)):b=h;for(var w=0;w<7&&(d.wnomask[b]=1,b++,d.wdaymask[b]!==t.wkst);w++);}}if(Object(o.c)(t.byweekno,1)){b=h+7*m;if(h!==n&&(b-=7-n),b<s)for(v=0;v<7&&(d.wnomask[b]=1,b+=1,d.wdaymask[b]!==t.wkst);v++);}if(h){var k=void 0;if(Object(o.c)(t.byweekno,-1))k=-1;else{var x=a.getWeekday(new Date(Date.UTC(e-1,0,1))),T=Object(o.j)(7-x.valueOf()+t.wkst,7),O=a.isLeapYear(e-1)?366:365,E=void 0;T>=4?(T=0,E=O+Object(o.j)(x-t.wkst,7)):E=s-h,k=Math.floor(52+Object(o.j)(E,7)/4)}if(Object(o.c)(t.byweekno,k))for(b=0;b<h;b++)d.wnomask[b]=1}return d}var B=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Z(e,n)),Object(o.h)(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var r=this.yearinfo,i=r.yearlen,a=r.mrange,s=r.wdaymask;this.monthinfo=function(e,t,n,r,i,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},u=[];if(a.freq===ie.YEARLY)if(Object(o.b)(a.bymonth))u=[[0,n]];else for(var c=0;c<a.bymonth.length;c++)t=a.bymonth[c],u.push(r.slice(t-1,t+1));else a.freq===ie.MONTHLY&&(u=[r.slice(t-1,t+1)]);if(Object(o.b)(u))return s;for(s.nwdaymask=Object(o.l)(0,n),c=0;c<u.length;c++)for(var l=u[c],f=l[0],d=l[1]-1,h=0;h<a.bynweekday.length;h++){var p=void 0,y=a.bynweekday[h],m=y[0],v=y[1];v<0?(p=d+7*(v+1),p-=Object(o.j)(i[p]-m,7)):(p=f+7*(v-1),p+=Object(o.j)(7-i[p]+m,7)),f<=p&&p<=d&&(s.nwdaymask[p]=1)}return s}(e,t,i,a,s,n)}Object(o.f)(n.byeaster)&&(this.eastermask=function(e,t){void 0===t&&(t=0);var n=e%19,r=Math.floor(e/100),i=e%100,o=Math.floor(r/4),a=r%4,s=Math.floor((r+8)/25),u=Math.floor((r-s+1)/3),c=Math.floor(19*n+r-o-u+15)%30,l=Math.floor(i/4),f=i%4,d=Math.floor(32+2*a+2*l-c-f)%7,h=Math.floor((n+11*c+22*d)/451),p=Math.floor((c+d-7*h+114)/31),y=(c+d-7*h+114)%31+1,m=Date.UTC(e,p-1,y+t),v=Date.UTC(e,0,1);return[Math.ceil((m-v)/864e5)]}(e,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!0,configurable:!0}),e.prototype.ydayset=function(){return[Object(o.k)(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t,n){for(var r=this.mrange[t-1],i=this.mrange[t],a=Object(o.l)(null,this.yearlen),s=r;s<i;s++)a[s]=s;return[a,r,i]},e.prototype.wdayset=function(e,t,n){for(var r=Object(o.l)(null,this.yearlen+7),i=a.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,s=i,u=0;u<7&&(r[i]=i,++i,this.wdaymask[i]!==this.options.wkst);u++);return[r,s,i]},e.prototype.ddayset=function(e,t,n){var r=Object(o.l)(null,this.yearlen),i=a.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return r[i]=i,[r,i,i+1]},e.prototype.htimeset=function(e,t,n,r){var i=this,o=[];return this.options.byminute.forEach((function(t){o=o.concat(i.mtimeset(e,t,n,r))})),a.sort(o),o},e.prototype.mtimeset=function(e,t,n,r){var i=this.options.bysecond.map((function(n){return new m(e,t,n,r)}));return a.sort(i),i},e.prototype.stimeset=function(e,t,n,r){return[new m(e,t,n,r)]},e.prototype.getdayset=function(e){switch(e){case d.YEARLY:return this.ydayset.bind(this);case d.MONTHLY:return this.mdayset.bind(this);case d.WEEKLY:return this.wdayset.bind(this);case d.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case d.HOURLY:return this.htimeset.bind(this);case d.MINUTELY:return this.mtimeset.bind(this);case d.SECONDLY:return this.stimeset.bind(this)}},e}();function $(e,t,n,r,i,s){for(var u=[],c=0;c<e.length;c++){var l=void 0,f=void 0,d=e[c];d<0?(l=Math.floor(d/t.length),f=Object(o.j)(d,t.length)):(l=Math.floor((d-1)/t.length),f=Object(o.j)(d-1,t.length));for(var h=[],p=n;p<r;p++){var y=s[p];Object(o.f)(y)&&h.push(y)}var m=void 0;m=l<0?h.slice(l)[0]:h[l];var v=t[f],g=a.fromOrdinal(i.yearordinal+m),b=a.combine(g,v);Object(o.c)(u,b)||u.push(b)}return a.sort(u),u}function J(e,t){var n=t.dtstart,r=t.freq,i=t.interval,s=t.until,u=t.bysetpos,c=t.count;if(0===c||0===i)return K(e);var l=v.fromDate(n),f=new B(t);f.rebuild(l.year,l.month);for(var d=function(e,t,n){var r=n.freq,i=n.byhour,a=n.byminute,s=n.bysecond;if(p(r))return function(e){var t=e.dtstart.getTime()%1e3;if(!p(e.freq))return[];var n=[];return e.byhour.forEach((function(r){e.byminute.forEach((function(i){e.bysecond.forEach((function(e){n.push(new m(r,i,e,t))}))}))})),n}(n);if(r>=ie.HOURLY&&Object(o.h)(i)&&!Object(o.c)(i,t.hour)||r>=ie.MINUTELY&&Object(o.h)(a)&&!Object(o.c)(a,t.minute)||r>=ie.SECONDLY&&Object(o.h)(s)&&!Object(o.c)(s,t.second))return[];return e.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}(f,l,t);;){var h=f.getdayset(r)(l.year,l.month,l.day),y=h[0],g=h[1],b=h[2],w=Q(y,g,b,f,t);if(Object(o.h)(u))for(var k=$(u,d,g,b,f,y),x=0;x<k.length;x++){var T=k[x];if(s&&T>s)return K(e);if(T>=n){var O=X(T,t);if(!e.accept(O))return K(e);if(c&&!--c)return K(e)}}else for(x=g;x<b;x++){var E=y[x];if(Object(o.f)(E))for(var S=a.fromOrdinal(f.yearordinal+E),D=0;D<d.length;D++){var j=d[D];T=a.combine(S,j);if(s&&T>s)return K(e);if(T>=n){O=X(T,t);if(!e.accept(O))return K(e);if(c&&!--c)return K(e)}}}if(0===t.interval)return K(e);if(l.add(t,w),l.year>a.MAXYEAR)return K(e);p(r)||(d=f.gettimeset(r)(l.hour,l.minute,l.second,0)),f.rebuild(l.year,l.month)}}function G(e,t,n){var r=n.bymonth,i=n.byweekno,a=n.byweekday,s=n.byeaster,u=n.bymonthday,c=n.bynmonthday,l=n.byyearday;return Object(o.h)(r)&&!Object(o.c)(r,e.mmask[t])||Object(o.h)(i)&&!e.wnomask[t]||Object(o.h)(a)&&!Object(o.c)(a,e.wdaymask[t])||Object(o.h)(e.nwdaymask)&&!e.nwdaymask[t]||null!==s&&!Object(o.c)(e.eastermask,t)||(Object(o.h)(u)||Object(o.h)(c))&&!Object(o.c)(u,e.mdaymask[t])&&!Object(o.c)(c,e.nmdaymask[t])||Object(o.h)(l)&&(t<e.yearlen&&!Object(o.c)(l,t+1)&&!Object(o.c)(l,-e.yearlen+t)||t>=e.yearlen&&!Object(o.c)(l,t+1-e.yearlen)&&!Object(o.c)(l,-e.nextyearlen+t-e.yearlen))}function X(e,t){return new E(e,t.tzid).rezonedDate()}function K(e){return e.getValue()}function Q(e,t,n,r,i){for(var o=!1,a=t;a<n;a++){var s=e[a];(o=G(r,s,i))&&(e[s]=null)}return o}var ee=function(){return ee._nlp||(ee._nlp=n(6)),ee._nlp},te={MO:new y.b(0),TU:new y.b(1),WE:new y.b(2),TH:new y.b(3),FR:new y.b(4),SA:new y.b(5),SU:new y.b(6)},ne={freq:d.YEARLY,dtstart:null,interval:1,wkst:te.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},re=Object.keys(ne),ie=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new j,this.origOptions=g(e);var n=function(e){var t=l(l({},ne),g(e));if(Object(o.f)(t.byeaster)&&(t.freq=ie.YEARLY),!Object(o.f)(t.freq)||!ie.FREQUENCIES[t.freq])throw new Error("Invalid frequency: "+t.freq+" "+e.freq);if(t.dtstart||(t.dtstart=new Date((new Date).setMilliseconds(0))),Object(o.f)(t.wkst)?Object(o.e)(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=ie.MO.weekday,Object(o.f)(t.bysetpos)){Object(o.e)(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var n=0;n<t.bysetpos.length;n++){if(0===(s=t.bysetpos[n])||!(s>=-366&&s<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||Object(o.h)(t.byweekno)||Object(o.h)(t.byyearday)||Boolean(t.bymonthday)||Object(o.h)(t.bymonthday)||Object(o.f)(t.byweekday)||Object(o.f)(t.byeaster)))switch(t.freq){case ie.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case ie.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case ie.WEEKLY:t.byweekday=[a.getWeekday(t.dtstart)]}if(Object(o.f)(t.bymonth)&&!Object(o.d)(t.bymonth)&&(t.bymonth=[t.bymonth]),Object(o.f)(t.byyearday)&&!Object(o.d)(t.byyearday)&&Object(o.e)(t.byyearday)&&(t.byyearday=[t.byyearday]),Object(o.f)(t.bymonthday))if(Object(o.d)(t.bymonthday)){var r=[],i=[];for(n=0;n<t.bymonthday.length;n++){var s;(s=t.bymonthday[n])>0?r.push(s):s<0&&i.push(s)}t.bymonthday=r,t.bynmonthday=i}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(Object(o.f)(t.byweekno)&&!Object(o.d)(t.byweekno)&&(t.byweekno=[t.byweekno]),Object(o.f)(t.byweekday))if(Object(o.e)(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Object(o.g)(t.byweekday))t.byweekday=[y.b.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof y.b)!t.byweekday.n||t.freq>ie.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{var u=[],c=[];for(n=0;n<t.byweekday.length;n++){var f=t.byweekday[n];Object(o.e)(f)?u.push(f):Object(o.g)(f)?u.push(y.b.fromStr(f).weekday):!f.n||t.freq>ie.MONTHLY?u.push(f.weekday):c.push([f.weekday,f.n])}t.byweekday=Object(o.h)(u)?u:null,t.bynweekday=Object(o.h)(c)?c:null}else t.bynweekday=null;return Object(o.f)(t.byhour)?Object(o.e)(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<ie.HOURLY?[t.dtstart.getUTCHours()]:null,Object(o.f)(t.byminute)?Object(o.e)(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<ie.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Object(o.f)(t.bysecond)?Object(o.e)(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<ie.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}(e).parsedOptions;this.options=n}return e.parseText=function(e,t){return ee().parseText(e,t)},e.fromText=function(e,t){return ee().fromText(e,t)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return J(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},e.prototype.all=function(e){if(e)return this._iter(new h("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new s("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,n,r){if(void 0===n&&(n=!1),!a.isValidDate(e)||!a.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var i={before:t,after:e,inc:n};if(r)return this._iter(new h("between",i,r));var o=this._cacheGet("between",i);return!1===o&&(o=this._iter(new s("between",i)),this._cacheAdd("between",o,i)),o},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!a.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},r=this._cacheGet("before",n);return!1===r&&(r=this._iter(new s("before",n)),this._cacheAdd("before",r,n)),r},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!a.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},r=this._cacheGet("after",n);return!1===r&&(r=this._iter(new s("after",n)),this._cacheAdd("after",r,n)),r},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return S(this.origOptions)},e.prototype.toText=function(e,t,n){return ee().toText(this,e,t,n)},e.prototype.isFullyConvertibleToText=function(){return ee().isFullyConvertible(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=d.YEARLY,e.MONTHLY=d.MONTHLY,e.WEEKLY=d.WEEKLY,e.DAILY=d.DAILY,e.HOURLY=d.HOURLY,e.MINUTELY=d.MINUTELY,e.SECONDLY=d.SECONDLY,e.MO=te.MO,e.TU=te.TU,e.WE=te.WE,e.TH=te.TH,e.FR=te.FR,e.SA=te.SA,e.SU=te.SU,e.parseString=b,e.optionsToString=S,e}();var oe={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function ae(e,t){var n=[],r=[],i=[],a=[],s=w(e),u=s.dtstart,c=s.tzid;return function(e,t){void 0===t&&(t=!1);if(!(e=e&&e.trim()))throw new Error("Invalid empty string");if(!t)return e.split(/\s/);var n=e.split("\n"),r=0;for(;r<n.length;){var i=n[r]=n[r].replace(/\s+$/g,"");i?r>0&&" "===i[0]?(n[r-1]+=i.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(e,t.unfold).forEach((function(e){if(e){var t=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t=Object(o.m)(e,":",1),n=t[0],r=t[1];return{name:n,value:r}}(e),n=t.name,r=t.value,i=n.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}(e),s=t.name,u=t.parms,l=t.value;switch(s.toUpperCase()){case"RRULE":if(u.length)throw new Error("unsupported RRULE parm: "+u.join(","));n.push(b(e));break;case"RDATE":var f=/RDATE(?:;TZID=([^:=]+))?/i.exec(e),d=(f[0],f[1]);d&&!c&&(c=d),r=r.concat(ce(l,u));break;case"EXRULE":if(u.length)throw new Error("unsupported EXRULE parm: "+u.join(","));i.push(b(l));break;case"EXDATE":a=a.concat(ce(l,u));break;case"DTSTART":break;default:throw new Error("unsupported property: "+s)}}})),{dtstart:u,tzid:c,rrulevals:n,rdatevals:r,exrulevals:i,exdatevals:a}}function se(e,t){return void 0===t&&(t={}),function(e,t){var n=ae(e,t),r=n.rrulevals,i=n.rdatevals,o=n.exrulevals,a=n.exdatevals,s=n.dtstart,u=n.tzid,c=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||i.length||o.length||a.length){var l=new fe(c);return l.dtstart(s),l.tzid(u||void 0),r.forEach((function(e){l.rrule(new ie(ue(e,s,u),c))})),i.forEach((function(e){l.rdate(e)})),o.forEach((function(e){l.exrule(new ie(ue(e,s,u),c))})),a.forEach((function(e){l.exdate(e)})),t.compatible&&t.dtstart&&l.rdate(s),l}var f=r[0]||{};return new ie(ue(f,f.dtstart||t.dtstart||s,f.tzid||t.tzid||u),c)}(e,function(e){var t=[],n=Object.keys(e),r=Object.keys(oe);if(n.forEach((function(e){Object(o.c)(r,e)||t.push(e)})),t.length)throw new Error("Invalid options: "+t.join(", "));return l(l({},oe),e)}(t))}function ue(e,t,n){return l(l({},e),{dtstart:t,tzid:n})}function ce(e,t){return function(e){e.forEach((function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)}))}(t),e.split(",").map((function(e){return a.untilStringToDate(e)}))}function le(e){var t=this;return function(n){if(void 0!==n&&(t["_"+e]=n),void 0!==t["_"+e])return t["_"+e];for(var r=0;r<t._rrule.length;r++){var i=t._rrule[r].origOptions[e];if(i)return i}}}var fe=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this,{},t)||this;return n.dtstart=le.apply(n,["dtstart"]),n.tzid=le.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return c(t,e),t.prototype._iter=function(e){return function(e,t,n,r,i,o){var s={},u=e.accept;function c(e,t){n.forEach((function(n){n.between(e,t,!0).forEach((function(e){s[Number(e)]=!0}))}))}i.forEach((function(e){var t=new E(e,o).rezonedDate();s[Number(t)]=!0})),e.accept=function(e){var t=Number(e);return isNaN(t)?u.call(this,e):!(!s[t]&&(c(new Date(t-1),new Date(t+1)),!s[t]))||(s[t]=!0,u.call(this,e))},"between"===e.method&&(c(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!s[t]||(s[t]=!0,u.call(this,e))});for(var l=0;l<r.length;l++){var f=new E(r[l],o).rezonedDate();if(!e.accept(new Date(f.getTime())))break}t.forEach((function(t){J(e,t.options)}));var d=e._result;switch(a.sort(d),e.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){de(e,this._rrule)},t.prototype.exrule=function(e){de(e,this._exrule)},t.prototype.rdate=function(e){he(e,this._rdate)},t.prototype.exdate=function(e){he(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map((function(e){return se(e.toString())}))},t.prototype.exrules=function(){return this._exrule.map((function(e){return se(e.toString())}))},t.prototype.rdates=function(){return this._rdate.map((function(e){return new Date(e.getTime())}))},t.prototype.exdates=function(){return this._exdate.map((function(e){return new Date(e.getTime())}))},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(S({dtstart:this._dtstart}))),this._rrule.forEach((function(t){e=e.concat(t.toString().split("\n"))})),this._exrule.forEach((function(t){e=e.concat(t.toString().split("\n").map((function(e){return e.replace(/^RRULE:/,"EXRULE:")})).filter((function(e){return!/^DTSTART/.test(e)})))})),this._rdate.length&&e.push(pe("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(pe("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach((function(t){return e.rrule(t.clone())})),this._exrule.forEach((function(t){return e.exrule(t.clone())})),this._rdate.forEach((function(t){return e.rdate(new Date(t.getTime()))})),this._exdate.forEach((function(t){return e.exdate(new Date(t.getTime()))})),e},t}(ie);function de(e,t){if(!(e instanceof ie))throw new TypeError(String(e)+" is not RRule instance");Object(o.c)(t.map(String),String(e))||t.push(e)}function he(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");Object(o.c)(t.map(Number),Number(e))||(t.push(e),a.sort(t))}function pe(e,t,n){var r=!n||"UTC"===n.toUpperCase();return""+(r?e+":":e+";TZID="+n+":")+t.map((function(e){return a.timeToUntilString(e.valueOf(),r)})).join(",")}n.d(t,"a",(function(){return ie}));
/*!
* rrule.js - Library for working with recurrence rules for calendar dates.
* https://github.com/jakubroztocil/rrule
*
* Copyright 2010, Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence.
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE
*
* Based on:
* python-dateutil - Extensions to the standard Python datetime module.
* Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
* Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE
*
*/t.b=ie},function(e,t,n){var r;
/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,u=o.slice,c=o.concat,l=o.push,f=o.indexOf,d={},h=d.toString,p=d.hasOwnProperty,y=p.toString,m=y.call(Object),v={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,noModule:!0};function k(e,t,n){var r,i=(t=t||a).createElement("script");if(i.text=e,n)for(r in w)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var T=function(e,t){return new T.fn.init(e,t)},O=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function E(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}T.fn=T.prototype={jquery:"3.3.1",constructor:T,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(c&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&T.isPlainObject(n)?n:{},a[t]=T.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},T.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=s(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&y.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){k(e)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(O,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?T.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(E(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return c.apply([],a)},guid:1,support:v}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=o[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var S=
/*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/
function(e){var t,n,r,i,o,a,s,u,c,l,f,d,h,p,y,m,v,g,b,w="sizzle"+1*new Date,k=e.document,x=0,T=0,O=ae(),E=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},j={}.hasOwnProperty,N=[],C=N.pop,M=N.push,L=N.push,A=N.slice,I=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="[\\x20\\t\\r\\n\\f]",_="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",q="\\["+U+"*("+_+")(?:"+U+"*([*^$|!~]?=)"+U+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+_+"))|)"+U+"*\\]",Y=":("+_+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",H=new RegExp(U+"+","g"),F=new RegExp("^"+U+"+|((?:^|[^\\\\])(?:\\\\.)*)"+U+"+$","g"),W=new RegExp("^"+U+"*,"+U+"*"),V=new RegExp("^"+U+"*([>+~]|"+U+")"+U+"*"),P=new RegExp("="+U+"*([^\\]'\"]*?)"+U+"*\\]","g"),z=new RegExp(Y),Z=new RegExp("^"+_+"$"),B={ID:new RegExp("^#("+_+")"),CLASS:new RegExp("^\\.("+_+")"),TAG:new RegExp("^("+_+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+Y),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+U+"*(even|odd|(([+-]|)(\\d*)n|)"+U+"*(?:([+-]|)"+U+"*(\\d+)|))"+U+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+U+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+U+"*((?:-\\d)?\\d*)"+U+"*\\)|)(?=[^-]|$)","i")},$=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Q=new RegExp("\\\\([\\da-f]{1,6}"+U+"?|("+U+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=ge((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{L.apply(N=A.call(k.childNodes),k.childNodes),N[k.childNodes.length].nodeType}catch(e){L={apply:N.length?function(e,t){M.apply(e,A.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,c,l,f,p,v,g=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&((t?t.ownerDocument||t:k)!==h&&d(t),t=t||h,y)){if(11!==x&&(f=X.exec(e)))if(o=f[1]){if(9===x){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(g&&(c=g.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!m||!m.test(e))){if(1!==x)g=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(te,ne):t.setAttribute("id",l=w),s=(p=a(e)).length;s--;)p[s]="#"+l+" "+ve(p[s]);v=p.join(","),g=K.test(e)&&ye(t.parentNode)||t}if(v)try{return L.apply(r,g.querySelectorAll(v)),r}catch(e){}finally{l===w&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[w]=!0,e}function ue(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return se((function(t){return t=+t,se((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:k;return a!==h&&9===a.nodeType&&a.documentElement?(p=(h=a).documentElement,y=!o(h),k!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=G.test(h.getElementsByClassName),n.getById=ue((function(e){return p.appendChild(e).id=w,!h.getElementsByName||!h.getElementsByName(w).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(Q,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Q,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&y)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=G.test(h.querySelectorAll))&&(ue((function(e){p.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+U+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+U+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+U+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=G.test(g=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),v.push("!=",Y)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=G.test(p.compareDocumentPosition),b=t||G.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===h||e.ownerDocument===k&&b(k,e)?-1:t===h||t.ownerDocument===k&&b(k,t)?1:l?I(l,e)-I(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:l?I(l,e)-I(l,t):0;if(i===o)return le(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?le(a[r],s[r]):a[r]===k?-1:s[r]===k?1:0},h):h},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&d(e),t=t.replace(P,"='$1']"),n.matchesSelector&&y&&!S[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=g.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,h,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==h&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==h&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&j.call(r.attrHandle,t.toLowerCase())?i(e,t,!y):void 0;return void 0!==o?o:n.attributes||!y?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(D),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:B,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Q,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Q,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return B.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Q,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=O[e+" "];return t||(t=new RegExp("(^|"+U+")"+e+"("+U+"|$)"))&&O(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return