-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
2 lines (2 loc) · 88.1 KB
/
main.js
1
2
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){const r=(()=>{let e=(e,t=[],r=NaN)=>{let n=(e=>{let r=document.createElement(e);return t.forEach(e=>{r.classList.toggle(e)}),r})(e);return Number.isNaN(r)||r.appendChild(n),{node:n}};return{Button:(t,r,n="button")=>{let a=e(n,t);return a.icon=e("i",r,a.node),a.onClick=(e=>{a.node.addEventListener("click",e)}),a},createElement:e}})();e.exports={Bootstrap:r}},function(e,t,r){const{Bootstrap:n}=r(0),a={ActionButton:(e,t,r=NaN)=>{let a=n.createElement("div",e,r),o=a.node;return n.createElement("i",t,a.node),{node:o,setClickFunction:e=>o.addEventListener("click",e)}},PriorityPicker:(e,t,r)=>{let a=0,o=n.createElement("div",["btn-group","btn-group-sm"]),i=((t,r,a,o)=>Array.from(Array(r)).map((r,i)=>{let u=a.map((e,t)=>0===t?[e,"border-0","active"]:[e,"border-0"]),s=Array.from(Array(e)).map(()=>o),d=n.createElement("div",["btn",...u[i]],t);return d.node.icon=n.createElement("i",s[i],d.node),d.node.addEventListener("click",()=>{c(i),l()}),d}))(o.node,e,t,r),u=[],s=o.node,l=()=>u.forEach(e=>e()),c=(e=0)=>{[i[a],i[e]].forEach(e=>{e.node.classList.toggle("active")}),a=e};return{addCallback:e=>u.push(e),buttons:i,node:s,setActiveButton:c,value:()=>a}}};e.exports={UI:a}},function(e,t,r){const{Home:n}=r(3);document.body.appendChild(n.node)},function(e,t,r){const{ProjectHeader:n}=r(4),{TaskForm:a}=r(5),{TaskList:o}=r(6),{ToDo:i}=r(8),u=(()=>{let e=document.createElement("section");e.id="main",[n,o,a].forEach(t=>e.appendChild(t.node)),n.renderOptions(i.projectNames());return n.setCallback(e=>{let t=i.setActiveProject(e);o.clearList();let r=o.renderTasks(t.tasks());"completed"===t.name&&r.forEach(e=>e.markAsCompleted())}),a.onClickNewTask(()=>{let e=a.getValues();if("completed"!==i.getActiveProject().name&&e.reduce((e,t)=>"undefined"!==t&&null!==t&&""!==t&&e,!0)){let t=i.addTask(e[0],e[1],e[2]),r=o.appendTask(t.description,t.formattedDate(),t.priority),n=()=>(e=>{i.getActiveProject().removeTask(e)})(t);r.buttons[0].setClickFunction(n);let a=()=>(e=>{i.completeTask(e)})(t);r.buttons[1].setClickFunction(a);let u=()=>t.priority=r.getPriority();r.setValueChangeFunction(u)}console.log(i.getActiveProject().tasks())}),{node:e}})();e.exports={Home:u}},function(e,t,r){const{Bootstrap:n}=r(0),a=(()=>{let e=n.createElement("div",["container","p-3"]);e.node.id="projectHeader";let t=n.createElement("div",["row","d-flex","justify-content-center"],e.node),r=n.createElement("div",["col-6"],t.node),a=n.createElement("select",["custom-select","bg-transparent","border-0","text-light","text-center","text-capitalize"],r.node),o=e.node,i=[],u=e=>{i.forEach(t=>t(e))};return a.node.onchange=(e=>{let t=Number.parseInt(e.target.value);u(t)}),{node:o,renderOptions:e=>{(()=>{for(;a.node.hasChildNodes();)a.node.removeChild(a.node.firstChild)})(),e.forEach((e,t)=>{let r=document.createElement("option");r.value=t,r.textContent=e,a.node.appendChild(r)})},setCallback:e=>i.push(e)}})();e.exports={ProjectHeader:a}},function(e,t,r){const{Bootstrap:n}=r(0),{UI:a}=r(1),o=(e=>{let t=n.createElement("div",["container"]),r=t.node;r.id="taskCreator";let o=n.createElement("div",["row","h-100"],t.node),i=(t=>{let r=n.createElement("form",["p-1","card","bg-transparent","border-secondary"],t),o=r.node,i=((e,t)=>Array.from(Array(2)).map((t,r)=>{let a=0===r?["form-row"]:["form-row","d-flex","justify-content-between"];return n.createElement("div",a,e)}))(r.node);i[0].col=n.createElement("div",["col"],i[0].node),i[1].columns=((e,t,r)=>Array.from(Array(3)).map(()=>n.createElement("div",r,e)))(i[1].node,0,["col-auto"]);let u=((e,t,r)=>{let a=n.createElement("input",r,e);return a.node.placeholder="Task Description",a.value=(()=>a.node.value),a})(i[0].col.node,0,e),s=((e,t)=>{let r=n.createElement("input",t,e);return r.node.type="date",r.value=(()=>r.node.valueAsDate),r})(i[1].columns[0].node,e),l=a.PriorityPicker(3,["btn-outline-info","btn-outline-warning","btn-outline-danger"],["fas","fa-flag"]);i[1].columns[1].node.appendChild(l.node);let c=n.Button(["btn","btn-success","btn-sm","rounded-circle"],["fas","fa-plus"],"div");return i[1].columns[2].node.appendChild(c.node),{date:s,description:u,newTask:c,node:o,priority:l}})(n.createElement("div",["col","col-sm","d-flex","flex-column","justify-content-center"],o.node).node);return{node:r,getValues:()=>[i.description.value(),i.date.value(),i.priority.value()],onClickNewTask:e=>i.newTask.node.addEventListener("click",e)}})(["form-control","form-control-sm","bg-transparent","border-0","text-light"]);e.exports={TaskForm:o}},function(e,t,r){const{Bootstrap:n}=r(0),{TaskCard:a}=r(7);let o=(()=>{let e=n.createElement("div",["container"]).node;e.id="taskList";let t=(e=>{let t=n.createElement("div",["row","h-100"],e),r=t.node,a=n.createElement("div",["col","h-100","d-flex","flex-column"],t.node);a.node.id="listColumn";return{addCell:e=>a.node.appendChild(e),clear:()=>{for(;a.node.hasChildNodes();)a.node.firstChild.remove()},node:r}})(e),r=(e,r,n)=>{let o=a(e,r,n);return t.addCell(o.node),o};return{appendTask:r,clearList:()=>{t.clear()},node:e,renderTasks:e=>{return e.map(e=>r(e.description,e.formattedDate(),e.priority))}}})();e.exports={TaskList:o}},function(e,t,r){const{Bootstrap:n}=r(0),{UI:a}=r(1);e.exports={TaskCard:(e,t,r)=>{let o=n.createElement("div",["card","p-2","bg-transparent","border-secondary"]),i=o.node,u=Array.from(Array(2)).map(()=>n.createElement("div",["row"],o.node)),s=[["col"],["col","d-flex","justify-content-between"]],l=Array.from(Array(2)).map((e,t)=>n.createElement("div",s[t],u[t].node)),c=n.createElement("input",["form-control","form-control-sm","bg-transparent","border-0","text-light"],l[0].node);c.node.value=e,n.createElement("span",["badge","badge-pill","badge-secondary","align-self-center"],l[1].node).node.textContent=t;let d=a.PriorityPicker(3,["btn-outline-info","btn-outline-warning","btn-outline-danger"],["fas","fa-flag"]);d.setActiveButton(r),l[1].node.appendChild(d.node);let f=n.createElement("div",["btn-group","btn-group-sm"],l[1].node);return{buttons:(e=>{let t=[["btn","btn-danger"],["btn","btn-success"]],r=[["fas","fa-times"],["fas","fa-check"]];return Array.from(Array(t.length)).map((n,i)=>{let u=a.ActionButton(t[i],r[i],e);return u.setClickFunction(()=>{o.node.remove()}),u})})(f.node),getPriority:()=>d.value(),markAsCompleted:()=>{f.node.remove(),d.node.remove(),["text-light","text-muted"].forEach(e=>c.node.classList.toggle(e))},node:i,setPriority:e=>d.setActiveButton(e),setValueChangeFunction:e=>d.addCallback(e)}}}},function(e,t,r){const{Project:n}=r(9),a=(e=>{let t=["inbox","completed"].map(e=>n(e)),r=t[0];return{addProject:e=>{let r=n(e);return t.push(r),r},addTask:(e,t=Date.now(),n,a=r)=>a.addTask(e,t,n),completeTask:e=>{r.removeTask(e),t[1].addTask(e.description,e.dueDate,e.priority)},getActiveProject:()=>r,getProject:e=>t[e],setActiveProject:e=>r=t[e],projects:t,projectNames:()=>t.map(e=>e.name)}})();e.exports={ToDo:a}},function(e,t,r){const{Task:n,priorityLevels:a}=r(10);e.exports={Project:e=>{let t=[];return{addTask:(e,r=Date.now(),o=a.NORMAL)=>{let i=n(e,r,o);return t.push(i),i},name:e,removeTask:e=>t.splice(t.indexOf(e),1),tasks:()=>[...t],taskDescriptions:()=>t.map(e=>e.description)}}}},function(e,t,r){const{format:n}=r(11);e.exports={priorityLevels:{HIGH:0,NORMAL:1,LOW:2},Task:(e,t,r)=>{let n=r;return{description:e,dueDate:t,formattedDate:()=>t.toDateString(),priority:n,values:()=>[e,t,n]}}}},function(e,t,r){"use strict";function n(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}r.r(t);var a=6e4;function o(e){var t=new Date(e.getTime()),r=t.getTimezoneOffset();t.setSeconds(0,0);var n=t.getTime()%a;return r*a+n}var i=36e5,u=6e4,s=2,l={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function c(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var r=t||{},a=null==r.additionalDigits?s:n(r.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var c=function(e){var t,r={},n=e.split(l.dateTimeDelimeter);l.plainTime.test(n[0])?(r.date=null,t=n[0]):(r.date=n[0],t=n[1],l.timeZoneDelimeter.test(r.date)&&(r.date=e.split(l.timeZoneDelimeter)[0],t=e.substr(r.date.length,e.length)));if(t){var a=l.timezone.exec(t);a?(r.time=t.replace(a[1],""),r.timezone=a[1]):r.time=t}return r}(e),f=function(e,t){var r,n=l.YYY[t],a=l.YYYYY[t];if(r=l.YYYY.exec(e)||a.exec(e)){var o=r[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(r=l.YY.exec(e)||n.exec(e)){var i=r[1];return{year:100*parseInt(i,10),restDateString:e.slice(i.length)}}return{year:null}}(c.date,a),h=f.year,v=function(e,t){if(null===t)return null;var r,n,a,o;if(0===e.length)return(n=new Date(0)).setUTCFullYear(t),n;if(r=l.MM.exec(e))return n=new Date(0),a=parseInt(r[1],10)-1,w(t,a)?(n.setUTCFullYear(t,a),n):new Date(NaN);if(r=l.DDD.exec(e)){n=new Date(0);var i=parseInt(r[1],10);return function(e,t){if(t<1)return!1;var r=g(e);if(r&&t>366)return!1;if(!r&&t>365)return!1;return!0}(t,i)?(n.setUTCFullYear(t,0,i),n):new Date(NaN)}if(r=l.MMDD.exec(e)){n=new Date(0),a=parseInt(r[1],10)-1;var u=parseInt(r[2],10);return w(t,a,u)?(n.setUTCFullYear(t,a,u),n):new Date(NaN)}if(r=l.Www.exec(e))return o=parseInt(r[1],10)-1,m(t,o)?d(t,o):new Date(NaN);if(r=l.WwwD.exec(e)){o=parseInt(r[1],10)-1;var s=parseInt(r[2],10)-1;return m(t,o,s)?d(t,o,s):new Date(NaN)}return null}(f.restDateString,h);if(isNaN(v))return new Date(NaN);if(v){var b,T=v.getTime(),D=0;if(c.time&&(D=function(e){var t,r,n;if(t=l.HH.exec(e))return y(r=parseFloat(t[1].replace(",",".")))?r%24*i:NaN;if(t=l.HHMM.exec(e))return r=parseInt(t[1],10),n=parseFloat(t[2].replace(",",".")),y(r,n)?r%24*i+n*u:NaN;if(t=l.HHMMSS.exec(e)){r=parseInt(t[1],10),n=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return y(r,n,a)?r%24*i+n*u+1e3*a:NaN}return null}(c.time),isNaN(D)))return new Date(NaN);if(c.timezone){if(b=function(e){var t,r,n;if(t=l.timezoneZ.exec(e))return 0;if(t=l.timezoneHH.exec(e))return p(n=parseInt(t[2],10))?(r=n*i,"+"===t[1]?-r:r):NaN;if(t=l.timezoneHHMM.exec(e)){n=parseInt(t[2],10);var a=parseInt(t[3],10);return p(n,a)?(r=n*i+a*u,"+"===t[1]?-r:r):NaN}return 0}(c.timezone),isNaN(b))return new Date(NaN)}else b=o(new Date(T+D)),b=o(new Date(T+D+b));return new Date(T+D+b)}return new Date(NaN)}function d(e,t,r){t=t||0,r=r||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var a=7*t+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+a),n}var f=[31,28,31,30,31,30,31,31,30,31,30,31],h=[31,29,31,30,31,30,31,31,30,31,30,31];function g(e){return e%400==0||e%4==0&&e%100!=0}function w(e,t,r){if(t<0||t>11)return!1;if(null!=r){if(r<1)return!1;var n=g(e);if(n&&r>h[t])return!1;if(!n&&r>f[t])return!1}return!0}function m(e,t,r){return!(t<0||t>52)&&(null==r||!(r<0||r>6))}function y(e,t,r){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==r||!(r<0||r>=60)))}function p(e,t){return null==t||!(t<0||t>59)}function v(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setDate(a.getDate()+o),a}function b(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r).getTime(),o=n(t);return new Date(a+o)}var T=36e5;function D(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return b(e,n(t)*T,r)}function E(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:n(o),u=null==r.weekStartsOn?i:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=c(e,r),l=s.getDay(),d=(l<u?7:0)+l-u;return s.setDate(s.getDate()-d),s.setHours(0,0,0,0),s}function M(e){e=e||{};var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function x(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=M(t);return r.weekStartsOn=1,E(e,r)}function q(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear(),a=new Date(0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);var o=x(a,t),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var u=x(i,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function C(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=q(e,t),n=new Date(0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),x(n,t)}function k(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setHours(0,0,0,0),r}var S=864e5;function Y(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=k(e,r),a=k(t,r),i=n.getTime()-o(n),u=a.getTime()-o(a);return Math.round((i-u)/S)}function N(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=Y(a,C(a,r),r),u=new Date(0);return u.setFullYear(o,0,4),u.setHours(0,0,0,0),(a=C(u,r)).setDate(a.getDate()+i),a}function O(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=n(t);return N(e,q(e,r)+a,r)}var H=6e4;function U(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return b(e,n(t)*H,r)}function P(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear(),a=r.getMonth(),o=new Date(0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}function W(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=a.getMonth()+o,u=new Date(0);u.setFullYear(a.getFullYear(),i,1),u.setHours(0,0,0,0);var s=P(u,r);return a.setMonth(i,Math.min(s,a.getDate())),a}function F(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return W(e,3*n(t),r)}function I(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return b(e,1e3*n(t),r)}function L(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return v(e,7*n(t),r)}function j(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return W(e,12*n(t),r)}function B(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=e||{},a=t||{},o=c(n.start,r).getTime(),i=c(n.end,r).getTime(),u=c(a.start,r).getTime(),s=c(a.end,r).getTime();if(!(o<=i&&u<=s))throw new RangeError("Invalid interval");return o<s&&u<i}function A(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r);if(isNaN(n))return NaN;var a,o,i=n.getTime();return(null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t)).forEach(function(e,t){var n=c(e,r);if(isNaN(n))return a=NaN,void(o=NaN);var u=Math.abs(i-n.getTime());(null==a||u<o)&&(a=t,o=u)}),a}function Q(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r);if(isNaN(n))return new Date(NaN);var a,o,i=n.getTime();return(null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t)).forEach(function(e){var t=c(e,r);if(isNaN(t))return a=new Date(NaN),void(o=NaN);var n=Math.abs(i-t.getTime());(null==a||n<o)&&(a=t,o=n)}),a}function X(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=n.getTime()-a.getTime();return o<0?-1:o>0?1:o}function R(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=n.getTime()-a.getTime();return o>0?-1:o<0?1:o}function z(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return q(e,r)-q(t,r)}var G=6048e5;function $(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=x(e,r),a=x(t,r),i=n.getTime()-o(n),u=a.getTime()-o(a);return Math.round((i-u)/G)}function Z(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}function _(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return Math.floor(r.getMonth()/3)+1}function J(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return 4*(n.getFullYear()-a.getFullYear())+(_(n,r)-_(a,r))}var V=6048e5;function K(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=E(e,r),a=E(t,r),i=n.getTime()-o(n),u=a.getTime()-o(a);return Math.round((i-u)/V)}function ee(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getFullYear()-a.getFullYear()}function te(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=X(n,a,r),i=Math.abs(Y(n,a,r));n.setDate(n.getDate()-o*i);var u=o*(i-(X(n,a,r)===-o));return 0===u?0:u}function re(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getTime()-a.getTime()}var ne=36e5;function ae(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=re(e,t,r)/ne;return n>0?Math.floor(n):Math.ceil(n)}function oe(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return O(e,-n(t),r)}function ie(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=X(n,a,r),i=Math.abs(z(n,a,r)),u=o*(i-(X(n=oe(n,o*i,r),a,r)===-o));return 0===u?0:u}var ue=6e4;function se(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=re(e,t,r)/ue;return n>0?Math.floor(n):Math.ceil(n)}function le(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=X(n,a,r),i=Math.abs(Z(n,a,r));n.setMonth(n.getMonth()-o*i);var u=o*(i-(X(n,a,r)===-o));return 0===u?0:u}function ce(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=le(e,t,r)/3;return n>0?Math.floor(n):Math.ceil(n)}function de(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=re(e,t,r)/1e3;return n>0?Math.floor(n):Math.ceil(n)}function fe(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=te(e,t,r)/7;return n>0?Math.floor(n):Math.ceil(n)}function he(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),o=X(n,a,r),i=Math.abs(ee(n,a,r));n.setFullYear(n.getFullYear()-o*i);var u=o*(i-(X(n,a,r)===-o));return 0===u?0:u}function ge(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=e||{},n=c(r.start,t),a=c(r.end,t).getTime();if(!(n.getTime()<=a))throw new RangeError("Invalid interval");var o=[],i=n;for(i.setHours(0,0,0,0);i.getTime()<=a;)o.push(c(i,t)),i.setDate(i.getDate()+1);return o}function we(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=e||{},n=c(r.start,t),a=c(r.end,t),o=a.getTime();if(!(n.getTime()<=o))throw new RangeError("Invalid interval");var i=E(n,t),u=E(a,t);i.setHours(15),u.setHours(15),o=u.getTime();for(var s=[],l=i;l.getTime()<=o;)l.setHours(0),s.push(c(l,t)),(l=L(l,1)).setHours(15);return s}function me(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setHours(23,59,59,999),r}function ye(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear(),a=9+10*Math.floor(n/10);return r.setFullYear(a,11,31),r.setHours(23,59,59,999),r}function pe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setMinutes(59,59,999),r}function ve(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:n(o),u=null==r.weekStartsOn?i:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=c(e,r),l=s.getDay(),d=6+(l<u?-7:0)-(l-u);return s.setDate(s.getDate()+d),s.setHours(23,59,59,999),s}function be(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=M(t);return r.weekStartsOn=1,ve(e,r)}function Te(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=q(e,t),n=new Date(0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);var a=x(n,t);return a.setMilliseconds(a.getMilliseconds()-1),a}function De(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setSeconds(59,999),r}function Ee(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function Me(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getMonth(),a=n-n%3+3;return r.setMonth(a,0),r.setHours(23,59,59,999),r}function xe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setMilliseconds(999),r}function qe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function Ce(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return!isNaN(r)}var ke={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Se(e){return function(t){var r=t||{},n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ne(e){return function(t,r){var n=r||{},a=n.width?String(n.width):e.defaultWidth;return("formatting"===(n.context?String(n.context):"standalone")&&e.formattingValues?e.formattingValues[a]||e.formattingValues[e.defaultFormattingWidth]:e.values[a]||e.values[e.defaultWidth])[e.argumentCallback?e.argumentCallback(t):t]}}function Oe(e){return function(t,r){var n=String(t),a=r||{},o=a.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],u=n.match(i);if(!u)return null;var s,l=u[0],c=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth];return s="[object Array]"===Object.prototype.toString.call(c)?c.findIndex(function(e){return e.test(n)}):function(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}(c,function(e){return e.test(n)}),s=e.valueCallback?e.valueCallback(s):s,{value:s=a.valueCallback?a.valueCallback(s):s,rest:n.slice(l.length)}}}var He={formatDistance:function(e,t,r){var n;return r=r||{},n="string"==typeof ke[e]?ke[e]:1===t?ke[e].one:ke[e].other.replace("{{count}}",t),r.addSuffix?r.comparison>0?"in "+n:n+" ago":n},formatLong:{date:Se({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Se({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Se({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:function(e,t,r,n){return Ye[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Ne({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ne({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ne({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ne({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ne({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaulFormattingWidth:"wide"})},match:{ordinalNumber:function(e){return function(t,r){var n=String(t),a=r||{},o=n.match(e.matchPattern);if(!o)return null;var i=o[0],u=n.match(e.parsePattern);if(!u)return null;var s=e.valueCallback?e.valueCallback(u[0]):u[0];return{value:s=a.valueCallback?a.valueCallback(s):s,rest:n.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Oe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Oe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Oe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Oe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Oe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Ue=864e5;function Pe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getUTCDay(),a=(n<1?7:0)+n-1;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function We(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var o=Pe(a,t),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var u=Pe(i,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}var Fe=6048e5;function Ie(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=Pe(r,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=We(e,t),n=new Date(0);return n.setUTCFullYear(r,0,4),n.setUTCHours(0,0,0,0),Pe(n,t)}(r,t).getTime();return Math.round(n/Fe)+1}function Le(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:n(o),u=null==r.weekStartsOn?i:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=c(e,r),l=s.getUTCDay(),d=(l<u?7:0)+l-u;return s.setUTCDate(s.getUTCDate()-d),s.setUTCHours(0,0,0,0),s}function je(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),a=r.getUTCFullYear(),o=t||{},i=o.locale,u=i&&i.options&&i.options.firstWeekContainsDate,s=null==u?1:n(u),l=null==o.firstWeekContainsDate?s:n(o.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(a+1,0,l),d.setUTCHours(0,0,0,0);var f=Le(d,t),h=new Date(0);h.setUTCFullYear(a,0,l),h.setUTCHours(0,0,0,0);var g=Le(h,t);return r.getTime()>=f.getTime()?a+1:r.getTime()>=g.getTime()?a:a-1}var Be=6048e5;function Ae(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),a=Le(r,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.firstWeekContainsDate,i=null==o?1:n(o),u=null==r.firstWeekContainsDate?i:n(r.firstWeekContainsDate),s=je(e,t),l=new Date(0);return l.setUTCFullYear(s,0,u),l.setUTCHours(0,0,0,0),Le(l,t)}(r,t).getTime();return Math.round(a/Be)+1}var Qe="midnight",Xe="noon",Re="morning",ze="afternoon",Ge="evening",$e="night";function Ze(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}function _e(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+Ze(Math.floor(a/60),2)+r+Ze(a%60,2)}function Je(e,t){return e%60==0?(e>0?"-":"+")+Ze(Math.abs(e)/60,2):_e(e,t)}function Ve(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;if(0===o)return r+String(a);var i=t||"";return r+String(a)+i+Ze(o,2)}var Ke={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r,n){var a=e.getUTCFullYear(),o=a>0?a:1-a;return"yy"===t?Ze(o%100,2):"yo"===t?r.ordinalNumber(o,{unit:"year"}):Ze(o,t.length)},Y:function(e,t,r,n){var a=je(e,n),o=a>0?a:1-a;return"YY"===t?Ze(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Ze(o,t.length)},R:function(e,t,r,n){return Ze(We(e,n),t.length)},u:function(e,t,r,n){return Ze(e.getUTCFullYear(),t.length)},Q:function(e,t,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Ze(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,r,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Ze(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,r,n){var a=e.getUTCMonth();switch(t){case"M":return String(a+1);case"MM":return Ze(a+1,2);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,r,n){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return Ze(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var a=Ae(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Ze(a,t.length)},I:function(e,t,r,n){var a=Ie(e,n);return"Io"===t?r.ordinalNumber(a,{unit:"week"}):Ze(a,t.length)},d:function(e,t,r,n){var a=e.getUTCDate();return"do"===t?r.ordinalNumber(a,{unit:"date"}):Ze(a,t.length)},D:function(e,t,r,n){var a=function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getTime();r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0);var a=n-r.getTime();return Math.floor(a/Ue)+1}(e,n);return"Do"===t?r.ordinalNumber(a,{unit:"dayOfYear"}):Ze(a,t.length)},E:function(e,t,r,n){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ze(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ze(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r,n){var a=e.getUTCDay(),o=0===a?7:a;switch(t){case"i":return String(o);case"ii":return Ze(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,a=e.getUTCHours();switch(n=12===a?Xe:0===a?Qe:a/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,a=e.getUTCHours();switch(n=a>=17?Ge:a>=12?ze:a>=4?Re:$e,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r,n){var a=e.getUTCHours()%12;return 0===a&&(a=12),"ho"===t?r.ordinalNumber(a,{unit:"hour"}):Ze(a,t.length)},H:function(e,t,r,n){var a=e.getUTCHours();return"Ho"===t?r.ordinalNumber(a,{unit:"hour"}):Ze(a,t.length)},K:function(e,t,r,n){var a=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(a,{unit:"hour"}):Ze(a,t.length)},k:function(e,t,r,n){var a=e.getUTCHours();return 0===a&&(a=24),"ko"===t?r.ordinalNumber(a,{unit:"hour"}):Ze(a,t.length)},m:function(e,t,r,n){var a=e.getUTCMinutes();return"mo"===t?r.ordinalNumber(a,{unit:"minute"}):Ze(a,t.length)},s:function(e,t,r,n){var a=e.getUTCSeconds();return"so"===t?r.ordinalNumber(a,{unit:"second"}):Ze(a,t.length)},S:function(e,t,r,n){var a=t.length,o=e.getUTCMilliseconds();return Ze(Math.floor(o*Math.pow(10,a-3)),a)},X:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return Je(a);case"XXXX":case"XX":return _e(a);case"XXXXX":case"XXX":default:return _e(a,":")}},x:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return Je(a);case"xxxx":case"xx":return _e(a);case"xxxxx":case"xxx":default:return _e(a,":")}},O:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ve(a,":");case"OOOO":default:return"GMT"+_e(a,":")}},z:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ve(a,":");case"zzzz":default:return"GMT"+_e(a,":")}},t:function(e,t,r,n){var a=n._originalDate||e;return Ze(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,r,n){return Ze((n._originalDate||e).getTime(),t.length)}};function et(e,t,r){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function tt(e,t,r){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var rt={p:tt,P:function(e,t,r){var n,a=e.match(/(P+)(p+)?/),o=a[1],i=a[2];if(!i)return et(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",et(o,t)).replace("{{time}}",tt(i,t))}};function nt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return b(e,-n(t),r)}var at=["D","DD","YY","YYYY"];function ot(e){return-1!==at.indexOf(e)}function it(e){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+e+"` token; see: https://git.io/fxCyr")}var ut=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lt=/^'(.*?)'?$/,ct=/''/g;function dt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=String(t),i=r||{},u=i.locale||He,s=u.options&&u.options.firstWeekContainsDate,l=null==s?1:n(s),d=null==i.firstWeekContainsDate?l:n(i.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=u.options&&u.options.weekStartsOn,h=null==f?0:n(f),g=null==i.weekStartsOn?h:n(i.weekStartsOn);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");var w=c(e,i);if(!Ce(w,i))return"Invalid Date";var m=nt(w,o(w),i),y={firstWeekContainsDate:d,weekStartsOn:g,locale:u,_originalDate:w};return a.match(st).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,rt[t])(e,u.formatLong,y):e}).join("").match(ut).map(function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return function(e){return e.match(lt)[1].replace(ct,"'")}(e);var r=Ke[t];return r?(!i.awareOfUnicodeTokens&&ot(e)&&it(e),r(m,e,u.localize,y)):e}).join("")}var ft=1440,ht=2520,gt=43200,wt=86400;function mt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=r||{},a=n.locale||He;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var i=X(e,t,n);if(isNaN(i))return"Invalid Date";var u,s,l=M(n);l.addSuffix=Boolean(n.addSuffix),l.comparison=i,i>0?(u=c(t,n),s=c(e,n)):(u=c(e,n),s=c(t,n));var d,f=de(s,u,n),h=(o(s)-o(u))/1e3,g=Math.round((f-h)/60);if(g<2)return n.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,l):f<10?a.formatDistance("lessThanXSeconds",10,l):f<20?a.formatDistance("lessThanXSeconds",20,l):f<40?a.formatDistance("halfAMinute",null,l):f<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):0===g?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",g,l);if(g<45)return a.formatDistance("xMinutes",g,l);if(g<90)return a.formatDistance("aboutXHours",1,l);if(g<ft){var w=Math.round(g/60);return a.formatDistance("aboutXHours",w,l)}if(g<ht)return a.formatDistance("xDays",1,l);if(g<gt){var m=Math.round(g/ft);return a.formatDistance("xDays",m,l)}if(g<wt)return d=Math.round(g/gt),a.formatDistance("aboutXMonths",d,l);if((d=le(s,u,n))<12){var y=Math.round(g/gt);return a.formatDistance("xMonths",y,l)}var p=d%12,v=Math.floor(d/12);return p<3?a.formatDistance("aboutXYears",v,l):p<9?a.formatDistance("overXYears",v,l):a.formatDistance("almostXYears",v+1,l)}var yt=1440,pt=43200,vt=525600;function bt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=r||{},a=n.locale||He;if(!a.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var i=X(e,t,n);if(isNaN(i))return"Invalid Date";var u,s,l=M(n);l.addSuffix=Boolean(n.addSuffix),l.comparison=i,i>0?(u=c(t,n),s=c(e,n)):(u=c(e,n),s=c(t,n));var d,f=null==n.roundingMethod?"round":String(n.roundingMethod);if("floor"===f)d=Math.floor;else if("ceil"===f)d=Math.ceil;else{if("round"!==f)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");d=Math.round}var h,g=de(s,u,r),w=d((g-(o(s)-o(u))/1e3)/60);if("second"===(h=null==n.unit?w<1?"second":w<60?"minute":w<yt?"hour":w<pt?"day":w<vt?"month":"year":String(n.unit)))return a.formatDistance("xSeconds",g,l);if("minute"===h)return a.formatDistance("xMinutes",w,l);if("hour"===h){var m=d(w/60);return a.formatDistance("xHours",m,l)}if("day"===h){var y=d(w/yt);return a.formatDistance("xDays",y,l)}if("month"===h){var p=d(w/pt);return a.formatDistance("xMonths",p,l)}if("year"===h){var v=d(w/vt);return a.formatDistance("xYears",v,l)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function Tt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r),i=r||{},u=i.locale||He;if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");if(!u.formatRelative)throw new RangeError("locale must contain formatRelative property");var s,l=Y(n,a,i);if(isNaN(l))return"Invalid Date";s=l<-6?"other":l<-1?"lastWeek":l<0?"yesterday":l<1?"today":l<2?"tomorrow":l<7?"nextWeek":"other";var d=nt(n,o(n),i),f=nt(a,o(a),i);return dt(n,u.formatRelative(s,d,f,i),i)}function Dt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getDate()}function Et(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getDay()}function Mt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=new Date(0);return n.setFullYear(r.getFullYear(),0,1),n.setHours(0,0,0,0),n}function xt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return Y(r,Mt(r,t),t)+1}function qt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t).getFullYear();return r%400==0||r%4==0&&r%100!=0}function Ct(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return isNaN(r)?NaN:qt(r,t)?366:365}function kt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t).getFullYear();return 10*Math.floor(r/10)}function St(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getHours()}function Yt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t).getDay();return 0===r&&(r=7),r}var Nt=6048e5;function Ot(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=x(r,t).getTime()-C(r,t).getTime();return Math.round(n/Nt)+1}var Ht=6048e5;function Ut(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=C(e,t),n=C(L(r,60,t),t).valueOf()-r.valueOf();return Math.round(n/Ht)}function Pt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getMilliseconds()}function Wt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getMinutes()}function Ft(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getMonth()}var It=864e5;function Lt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=e||{},a=t||{},o=c(n.start,r).getTime(),i=c(n.end,r).getTime(),u=c(a.start,r).getTime(),s=c(a.end,r).getTime();if(!(o<=i&&u<=s))throw new RangeError("Invalid interval");if(!(o<s&&u<i))return 0;var l=(s>i?i:s)-(u<o?o:u);return Math.ceil(l/It)}function jt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getSeconds()}function Bt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getTime()}function At(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Math.floor(Bt(e,t)/1e3)}function Qt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),a=r.getFullYear(),o=t||{},i=o.locale,u=i&&i.options&&i.options.firstWeekContainsDate,s=null==u?1:n(u),l=null==o.firstWeekContainsDate?s:n(o.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setFullYear(a+1,0,l),d.setHours(0,0,0,0);var f=E(d,t),h=new Date(0);h.setFullYear(a,0,l),h.setHours(0,0,0,0);var g=E(h,t);return r.getTime()>=f.getTime()?a+1:r.getTime()>=g.getTime()?a:a-1}function Xt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.firstWeekContainsDate,i=null==o?1:n(o),u=null==r.firstWeekContainsDate?i:n(r.firstWeekContainsDate),s=Qt(e,t),l=new Date(0);return l.setFullYear(s,0,u),l.setHours(0,0,0,0),E(l,t)}var Rt=6048e5;function zt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=E(r,t).getTime()-Xt(r,t).getTime();return Math.round(n/Rt)+1}function Gt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setDate(1),r.setHours(0,0,0,0),r}function $t(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:n(o),u=null==r.weekStartsOn?i:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Et(Gt(e,t),t),l=Et(e,t),c=(s<u?7-u:s)>l?7-u:0;return Math.ceil((Dt(e,t)+c)/7)}function Zt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(0,0,0,0),r}function _t(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return K(Zt(e,t),Gt(e,t),t)+1}function Jt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return c(e,t).getFullYear()}function Vt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getTime()>a.getTime()}function Kt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getTime()<a.getTime()}function er(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function tr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getTime()===a.getTime()}function rr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===c(e,t).getDate()}function nr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 5===c(e,t).getDay()}function ar(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return me(r,t).getTime()===Ee(r,t).getTime()}function or(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===c(e,t).getDay()}function ir(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=k(e,r),a=k(t,r);return n.getTime()===a.getTime()}function ur(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setMinutes(0,0,0),r}function sr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ur(e,r),a=ur(t,r);return n.getTime()===a.getTime()}function lr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=E(e,r),a=E(t,r);return n.getTime()===a.getTime()}function cr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=M(r);return n.weekStartsOn=1,lr(e,t,n)}function dr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=C(e,r),a=C(t,r);return n.getTime()===a.getTime()}function fr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setSeconds(0,0),r}function hr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fr(e,r),a=fr(t,r);return n.getTime()===a.getTime()}function gr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function wr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getMonth(),a=n-n%3;return r.setMonth(a,1),r.setHours(0,0,0,0),r}function mr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wr(e,r),a=wr(t,r);return n.getTime()===a.getTime()}function yr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t);return r.setMilliseconds(0),r}function pr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=yr(e,r),a=yr(t,r);return n.getTime()===a.getTime()}function vr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=c(e,r),a=c(t,r);return n.getFullYear()===a.getFullYear()}function br(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 6===c(e,t).getDay()}function Tr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 0===c(e,t).getDay()}function Dr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 4===c(e,t).getDay()}function Er(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 2===c(e,t).getDay()}function Mr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 3===c(e,t).getDay()}function xr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t).getDay();return 0===r||6===r}function qr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=t||{},a=c(e,r).getTime(),o=c(n.start,r).getTime(),i=c(n.end,r).getTime();if(!(o<=i))throw new RangeError("Invalid interval");return a>=o&&a<=i}function Cr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear(),a=9+10*Math.floor(n/10);return r.setFullYear(a+1,0,0),r.setHours(0,0,0,0),r}function kr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:n(o),u=null==r.weekStartsOn?i:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var s=c(e,t),l=s.getDay(),d=6+(l<u?-7:0)-(l-u);return s.setHours(0,0,0,0),s.setDate(s.getDate()+d),s}function Sr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=M(t);return r.weekStartsOn=1,kr(e,r)}function Yr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=q(e,t),n=new Date(0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);var a=x(n,t);return a.setDate(a.getDate()-1),a}function Nr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getMonth(),a=n-n%3+3;return r.setMonth(a,0),r.setHours(0,0,0,0),r}function Or(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(0,0,0,0),r}function Hr(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r;return(null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e)).forEach(function(e){var n=c(e,t);(void 0===r||r<n||isNaN(n))&&(r=n)}),r}function Ur(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r;return(null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e)).forEach(function(e){var n=c(e,t);(void 0===r||r>n||isNaN(n))&&(r=n)}),r}function Pr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=r||{},o=a.locale,i=o&&o.options&&o.options.weekStartsOn,u=null==i?0:n(i),s=null==a.weekStartsOn?u:n(a.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=c(e,r),d=n(t),f=l.getUTCDay(),h=((d%7+7)%7<s?7:0)+d-f;return l.setUTCDate(l.getUTCDate()+h),l}var Wr=36e5,Fr=6e4,Ir=1e3,Lr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},jr=/^([+-])(\d{2})(\d{2})?|Z/,Br=/^([+-])(\d{2})(\d{2})|Z/,Ar=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Qr=/^([+-])(\d{2}):(\d{2})|Z/,Xr=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Rr(e,t,r){var n=t.match(e);if(!n)return null;var a=parseInt(n[0],10);return{value:r?r(a):a,rest:t.slice(n[0].length)}}function zr(e,t){var r=t.match(e);if(!r)return null;if("Z"===r[0])return{value:0,rest:t.slice(1)};var n="+"===r[1]?1:-1,a=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(a*Wr+o*Fr+i*Ir),rest:t.slice(r[0].length)}}function Gr(e,t){return Rr(Lr.anyDigitsSigned,e,t)}function $r(e,t,r){switch(e){case 1:return Rr(Lr.singleDigit,t,r);case 2:return Rr(Lr.twoDigits,t,r);case 3:return Rr(Lr.threeDigits,t,r);case 4:return Rr(Lr.fourDigits,t,r);default:return Rr(new RegExp("^\\d{1,"+e+"}"),t,r)}}function Zr(e,t,r){switch(e){case 1:return Rr(Lr.singleDigitSigned,t,r);case 2:return Rr(Lr.twoDigitsSigned,t,r);case 3:return Rr(Lr.threeDigitsSigned,t,r);case 4:return Rr(Lr.fourDigitsSigned,t,r);default:return Rr(new RegExp("^-?\\d{1,"+e+"}"),t,r)}}function _r(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Jr(e,t){var r,n=t>0,a=n?t:1-t;if(a<=50)r=e||100;else{var o=a+50;r=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return n?r:1-r}var Vr=[31,28,31,30,31,30,31,31,30,31,30,31],Kr=[31,29,31,30,31,30,31,31,30,31,30,31];function en(e){return e%400==0||e%4==0&&e%100!=0}var tn={G:{priority:140,parse:function(e,t,r,n){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}},set:function(e,t,r){return e.setUTCFullYear(1===t?10:-9,0,1),e.setUTCHours(0,0,0,0),e}},y:{priority:130,parse:function(e,t,r,n){var a=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return $r(4,e,a);case"yo":return r.ordinalNumber(e,{unit:"year",valueCallback:a});default:return $r(t.length,e,a)}},validate:function(e,t,r){return t.isTwoDigitYear||t.year>0},set:function(e,t,r){var n=je(e,r);if(t.isTwoDigitYear){var a=Jr(t.year,n);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var o=n>0?t.year:1-t.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}},Y:{priority:130,parse:function(e,t,r,n){var a=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return $r(4,e,a);case"Yo":return r.ordinalNumber(e,{unit:"year",valueCallback:a});default:return $r(t.length,e,a)}},validate:function(e,t,r){return t.isTwoDigitYear||t.year>0},set:function(e,t,r){var n=e.getUTCFullYear();if(t.isTwoDigitYear){var a=Jr(t.year,n);return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Le(e,r)}var o=n>0?t.year:1-t.year;return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Le(e,r)}},R:{priority:130,parse:function(e,t,r,n){return Zr("R"===t?4:t.length,e)},set:function(e,t,r){var n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Pe(n)}},u:{priority:130,parse:function(e,t,r,n){return Zr("u"===t?4:t.length,e)},set:function(e,t,r){return e.setUTCFullYear(t,0,1),e.setUTCHours(0,0,0,0),e}},Q:{priority:120,parse:function(e,t,r,n){switch(t){case"Q":case"QQ":return $r(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=1&&t<=4},set:function(e,t,r){return e.setUTCMonth(3*(t-1),1),e.setUTCHours(0,0,0,0),e}},q:{priority:120,parse:function(e,t,r,n){switch(t){case"q":case"qq":return $r(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=1&&t<=4},set:function(e,t,r){return e.setUTCMonth(3*(t-1),1),e.setUTCHours(0,0,0,0),e}},M:{priority:110,parse:function(e,t,r,n){var a=function(e){return e-1};switch(t){case"M":return Rr(Lr.month,e,a);case"MM":return $r(2,e,a);case"Mo":return r.ordinalNumber(e,{unit:"month",valueCallback:a});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r){return e.setUTCMonth(t,1),e.setUTCHours(0,0,0,0),e}},L:{priority:110,parse:function(e,t,r,n){var a=function(e){return e-1};switch(t){case"L":return Rr(Lr.month,e,a);case"LL":return $r(2,e,a);case"Lo":return r.ordinalNumber(e,{unit:"month",valueCallback:a});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r){return e.setUTCMonth(t,1),e.setUTCHours(0,0,0,0),e}},w:{priority:100,parse:function(e,t,r,n){switch(t){case"w":return Rr(Lr.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=53},set:function(e,t,r){return Le(function(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=Ae(a,r)-o;return a.setUTCDate(a.getUTCDate()-7*i),a}(e,t,r),r)}},I:{priority:100,parse:function(e,t,r,n){switch(t){case"I":return Rr(Lr.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=53},set:function(e,t,r){return Pe(function(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=Ie(a,r)-o;return a.setUTCDate(a.getUTCDate()-7*i),a}(e,t,r),r)}},d:{priority:90,parse:function(e,t,r,n){switch(t){case"d":return Rr(Lr.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return $r(t.length,e)}},validate:function(e,t,r){var n=en(e.getUTCFullYear()),a=e.getUTCMonth();return n?t>=1&&t<=Kr[a]:t>=1&&t<=Vr[a]},set:function(e,t,r){return e.setUTCDate(t),e.setUTCHours(0,0,0,0),e}},D:{priority:90,parse:function(e,t,r,n){switch(t){case"D":case"DD":return Rr(Lr.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return $r(t.length,e)}},validate:function(e,t,r){return en(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,r){return e.setUTCMonth(0,t),e.setUTCHours(0,0,0,0),e}},E:{priority:90,parse:function(e,t,r,n){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r){return(e=Pr(e,t,r)).setUTCHours(0,0,0,0),e}},e:{priority:90,parse:function(e,t,r,n){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return $r(t.length,e,a);case"eo":return r.ordinalNumber(e,{unit:"day",valueCallback:a});case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r){return(e=Pr(e,t,r)).setUTCHours(0,0,0,0),e}},c:{priority:90,parse:function(e,t,r,n){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return $r(t.length,e,a);case"co":return r.ordinalNumber(e,{unit:"day",valueCallback:a});case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r){return(e=Pr(e,t,r)).setUTCHours(0,0,0,0),e}},i:{priority:90,parse:function(e,t,r,n){var a=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return $r(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiii":return r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiiii":return r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiii":default:return r.day(e,{width:"wide",context:"formatting",valueCallback:a})||r.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a})}},validate:function(e,t,r){return t>=1&&t<=7},set:function(e,t,r){return(e=function(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=n(t);a%7==0&&(a-=7);var o=c(e,r),i=o.getUTCDay(),u=((a%7+7)%7<1?7:0)+a-i;return o.setUTCDate(o.getUTCDate()+u),o}(e,t,r)).setUTCHours(0,0,0,0),e}},a:{priority:80,parse:function(e,t,r,n){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r){return e.setUTCHours(_r(t),0,0,0),e}},b:{priority:80,parse:function(e,t,r,n){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r){return e.setUTCHours(_r(t),0,0,0),e}},B:{priority:80,parse:function(e,t,r,n){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r){return e.setUTCHours(_r(t),0,0,0),e}},h:{priority:70,parse:function(e,t,r,n){switch(t){case"h":return Rr(Lr.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=12},set:function(e,t,r){var n=e.getUTCHours()>=12;return n&&t<12?e.setUTCHours(t+12,0,0,0):n||12!==t?e.setUTCHours(t,0,0,0):e.setUTCHours(0,0,0,0),e}},H:{priority:70,parse:function(e,t,r,n){switch(t){case"H":return Rr(Lr.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=23},set:function(e,t,r){return e.setUTCHours(t,0,0,0),e}},K:{priority:70,parse:function(e,t,r,n){switch(t){case"K":return Rr(Lr.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r){return e.getUTCHours()>=12&&t<12?e.setUTCHours(t+12,0,0,0):e.setUTCHours(t,0,0,0),e}},k:{priority:70,parse:function(e,t,r,n){switch(t){case"k":return Rr(Lr.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=24},set:function(e,t,r){var n=t<=24?t%24:t;return e.setUTCHours(n,0,0,0),e}},m:{priority:60,parse:function(e,t,r,n){switch(t){case"m":return Rr(Lr.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=59},set:function(e,t,r){return e.setUTCMinutes(t,0,0),e}},s:{priority:50,parse:function(e,t,r,n){switch(t){case"s":return Rr(Lr.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return $r(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=59},set:function(e,t,r){return e.setUTCSeconds(t,0),e}},S:{priority:40,parse:function(e,t,r,n){return $r(t.length,e,function(e){return Math.floor(e*Math.pow(10,3-t.length))})},set:function(e,t,r){return e.setUTCMilliseconds(t),e}},X:{priority:20,parse:function(e,t,r,n){switch(t){case"X":return zr(jr,e);case"XX":return zr(Br,e);case"XXXX":return zr(Ar,e);case"XXXXX":return zr(Xr,e);case"XXX":default:return zr(Qr,e)}},set:function(e,t,r){return new Date(e.getTime()-t)}},x:{priority:20,parse:function(e,t,r,n){switch(t){case"x":return zr(jr,e);case"xx":return zr(Br,e);case"xxxx":return zr(Ar,e);case"xxxxx":return zr(Xr,e);case"xxx":default:return zr(Qr,e)}},set:function(e,t,r){return new Date(e.getTime()-t)}},t:{priority:10,parse:function(e,t,r,n){return Gr(e)},set:function(e,t,r){return new Date(1e3*t)}},T:{priority:10,parse:function(e,t,r,n){return Gr(e)},set:function(e,t,r){return new Date(t)}}},rn=20,nn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,an=/^'(.*?)'?$/,on=/''/g,un=/\S/;function sn(e,t,r,a){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var i=String(e),u=String(t),s=a||{},l=s.locale||He;if(!l.match)throw new RangeError("locale must contain match property");var d=l.options&&l.options.firstWeekContainsDate,f=null==d?1:n(d),h=null==s.firstWeekContainsDate?f:n(s.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=l.options&&l.options.weekStartsOn,w=null==g?0:n(g),m=null==s.weekStartsOn?w:n(s.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===u)return""===i?c(r,s):new Date(NaN);var y,p={firstWeekContainsDate:h,weekStartsOn:m,locale:l},v=[{priority:rn,set:ln,index:0}],b=u.match(nn);for(y=0;y<b.length;y++){var T=b[y];!s.awareOfUnicodeTokens&&ot(T)&&it(T);var D=T[0],E=tn[D];if(E){var M=E.parse(i,T,l.match,p);if(!M)return new Date(NaN);v.push({priority:E.priority,set:E.set,validate:E.validate,value:M.value,index:v.length}),i=M.rest}else{if("''"===T?T="'":"'"===D&&(T=cn(T)),0!==i.indexOf(T))return new Date(NaN);i=i.slice(T.length)}}if(i.length>0&&un.test(i))return new Date(NaN);var x=v.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,r){return r.indexOf(e)===t}).map(function(e){return v.filter(function(t){return t.priority===e}).reverse()}).map(function(e){return e[0]}),q=c(r,s);if(isNaN(q))return new Date(NaN);var C=nt(q,o(q));for(y=0;y<x.length;y++){var k=x[y];if(k.validate&&!k.validate(C,k.value,p))return new Date(NaN);C=k.set(C,k.value,p)}return C}function ln(e){var t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}function cn(e){return e.match(an)[1].replace(on,"'")}function dn(e,t,r){if(arguments.length<1)throw new TypeError("1 argument required, but only none provided present");var a=1===arguments.length?1:n(t);if(2===arguments.length&&"number"!=typeof t&&"string"!=typeof t&&(r=t,a=1),!a||a>30||a<1)throw new RangeError("nearestTo must be between 1 and 30");var o=c(e,r),i=o.getSeconds(),u=o.getMinutes()+i/60,s=Math.floor(u/a)*a,l=u%a,d=Math.round(l/a)*a;return new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),s+d)}function fn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setDate(o),a}function hn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=r||{},o=a.locale,i=o&&o.options&&o.options.weekStartsOn,u=null==i?0:n(i),s=null==a.weekStartsOn?u:n(a.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=c(e,a),d=n(t),f=l.getDay();return v(l,((d%7+7)%7<s?7:0)+d-f,a)}function gn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setMonth(0),a.setDate(o),a}function wn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setHours(o),a}function mn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r);return v(a,n(t)-Yt(a,r),r)}function yn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=Ot(a,r)-o;return a.setDate(a.getDate()-7*i),a}function pn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setMilliseconds(o),a}function vn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setMinutes(o),a}function bn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=a.getFullYear(),u=a.getDate(),s=new Date(0);s.setFullYear(i,o,15),s.setHours(0,0,0,0);var l=P(s,r);return a.setMonth(o,Math.min(u,l)),a}function Tn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t)-(Math.floor(a.getMonth()/3)+1);return bn(a,a.getMonth()+3*o,r)}function Dn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return a.setSeconds(o),a}function En(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t),i=zt(a,r)-o;return a.setDate(a.getDate()-7*i),a}function Mn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=r||{},o=a.locale,i=o&&o.options&&o.options.firstWeekContainsDate,u=null==i?1:n(i),s=null==a.firstWeekContainsDate?u:n(a.firstWeekContainsDate),l=c(e,r),d=n(t),f=Y(l,Xt(l,r),r),h=new Date(0);return h.setFullYear(d,0,s),h.setHours(0,0,0,0),(l=Xt(h,r)).setDate(l.getDate()+f),l}function xn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var a=c(e,r),o=n(t);return isNaN(a)?new Date(NaN):(a.setFullYear(o),a)}function qn(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=c(e,t),n=r.getFullYear(),a=10*Math.floor(n/10);return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}function Cn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return v(e,-n(t),r)}function kn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return D(e,-n(t),r)}function Sn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return U(e,-n(t),r)}function Yn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return W(e,-n(t),r)}function Nn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return F(e,-n(t),r)}function On(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return I(e,-n(t),r)}function Hn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return L(e,-n(t),r)}function Un(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return j(e,-n(t),r)}r.d(t,"addDays",function(){return v}),r.d(t,"addHours",function(){return D}),r.d(t,"addISOWeekYears",function(){return O}),r.d(t,"addMilliseconds",function(){return b}),r.d(t,"addMinutes",function(){return U}),r.d(t,"addMonths",function(){return W}),r.d(t,"addQuarters",function(){return F}),r.d(t,"addSeconds",function(){return I}),r.d(t,"addWeeks",function(){return L}),r.d(t,"addYears",function(){return j}),r.d(t,"areIntervalsOverlapping",function(){return B}),r.d(t,"closestIndexTo",function(){return A}),r.d(t,"closestTo",function(){return Q}),r.d(t,"compareAsc",function(){return X}),r.d(t,"compareDesc",function(){return R}),r.d(t,"differenceInCalendarDays",function(){return Y}),r.d(t,"differenceInCalendarISOWeekYears",function(){return z}),r.d(t,"differenceInCalendarISOWeeks",function(){return $}),r.d(t,"differenceInCalendarMonths",function(){return Z}),r.d(t,"differenceInCalendarQuarters",function(){return J}),r.d(t,"differenceInCalendarWeeks",function(){return K}),r.d(t,"differenceInCalendarYears",function(){return ee}),r.d(t,"differenceInDays",function(){return te}),r.d(t,"differenceInHours",function(){return ae}),r.d(t,"differenceInISOWeekYears",function(){return ie}),r.d(t,"differenceInMilliseconds",function(){return re}),r.d(t,"differenceInMinutes",function(){return se}),r.d(t,"differenceInMonths",function(){return le}),r.d(t,"differenceInQuarters",function(){return ce}),r.d(t,"differenceInSeconds",function(){return de}),r.d(t,"differenceInWeeks",function(){return fe}),r.d(t,"differenceInYears",function(){return he}),r.d(t,"eachDayOfInterval",function(){return ge}),r.d(t,"eachWeekOfInterval",function(){return we}),r.d(t,"endOfDay",function(){return me}),r.d(t,"endOfDecade",function(){return ye}),r.d(t,"endOfHour",function(){return pe}),r.d(t,"endOfISOWeek",function(){return be}),r.d(t,"endOfISOWeekYear",function(){return Te}),r.d(t,"endOfMinute",function(){return De}),r.d(t,"endOfMonth",function(){return Ee}),r.d(t,"endOfQuarter",function(){return Me}),r.d(t,"endOfSecond",function(){return xe}),r.d(t,"endOfWeek",function(){return ve}),r.d(t,"endOfYear",function(){return qe}),r.d(t,"format",function(){return dt}),r.d(t,"formatDistance",function(){return mt}),r.d(t,"formatDistanceStrict",function(){return bt}),r.d(t,"formatRelative",function(){return Tt}),r.d(t,"getDate",function(){return Dt}),r.d(t,"getDay",function(){return Et}),r.d(t,"getDayOfYear",function(){return xt}),r.d(t,"getDaysInMonth",function(){return P}),r.d(t,"getDaysInYear",function(){return Ct}),r.d(t,"getDecade",function(){return kt}),r.d(t,"getHours",function(){return St}),r.d(t,"getISODay",function(){return Yt}),r.d(t,"getISOWeek",function(){return Ot}),r.d(t,"getISOWeekYear",function(){return q}),r.d(t,"getISOWeeksInYear",function(){return Ut}),r.d(t,"getMilliseconds",function(){return Pt}),r.d(t,"getMinutes",function(){return Wt}),r.d(t,"getMonth",function(){return Ft}),r.d(t,"getOverlappingDaysInIntervals",function(){return Lt}),r.d(t,"getQuarter",function(){return _}),r.d(t,"getSeconds",function(){return jt}),r.d(t,"getTime",function(){return Bt}),r.d(t,"getUnixTime",function(){return At}),r.d(t,"getWeek",function(){return zt}),r.d(t,"getWeekOfMonth",function(){return $t}),r.d(t,"getWeekYear",function(){return Qt}),r.d(t,"getWeeksInMonth",function(){return _t}),r.d(t,"getYear",function(){return Jt}),r.d(t,"isAfter",function(){return Vt}),r.d(t,"isBefore",function(){return Kt}),r.d(t,"isDate",function(){return er}),r.d(t,"isEqual",function(){return tr}),r.d(t,"isFirstDayOfMonth",function(){return rr}),r.d(t,"isFriday",function(){return nr}),r.d(t,"isLastDayOfMonth",function(){return ar}),r.d(t,"isLeapYear",function(){return qt}),r.d(t,"isMonday",function(){return or}),r.d(t,"isSameDay",function(){return ir}),r.d(t,"isSameHour",function(){return sr}),r.d(t,"isSameISOWeek",function(){return cr}),r.d(t,"isSameISOWeekYear",function(){return dr}),r.d(t,"isSameMinute",function(){return hr}),r.d(t,"isSameMonth",function(){return gr}),r.d(t,"isSameQuarter",function(){return mr}),r.d(t,"isSameSecond",function(){return pr}),r.d(t,"isSameWeek",function(){return lr}),r.d(t,"isSameYear",function(){return vr}),r.d(t,"isSaturday",function(){return br}),r.d(t,"isSunday",function(){return Tr}),r.d(t,"isThursday",function(){return Dr}),r.d(t,"isTuesday",function(){return Er}),r.d(t,"isValid",function(){return Ce}),r.d(t,"isWednesday",function(){return Mr}),r.d(t,"isWeekend",function(){return xr}),r.d(t,"isWithinInterval",function(){return qr}),r.d(t,"lastDayOfDecade",function(){return Cr}),r.d(t,"lastDayOfISOWeek",function(){return Sr}),r.d(t,"lastDayOfISOWeekYear",function(){return Yr}),r.d(t,"lastDayOfMonth",function(){return Zt}),r.d(t,"lastDayOfQuarter",function(){return Nr}),r.d(t,"lastDayOfWeek",function(){return kr}),r.d(t,"lastDayOfYear",function(){return Or}),r.d(t,"max",function(){return Hr}),r.d(t,"min",function(){return Ur}),r.d(t,"parse",function(){return sn}),r.d(t,"roundToNearestMinutes",function(){return dn}),r.d(t,"setDate",function(){return fn}),r.d(t,"setDay",function(){return hn}),r.d(t,"setDayOfYear",function(){return gn}),r.d(t,"setHours",function(){return wn}),r.d(t,"setISODay",function(){return mn}),r.d(t,"setISOWeek",function(){return yn}),r.d(t,"setISOWeekYear",function(){return N}),r.d(t,"setMilliseconds",function(){return pn}),r.d(t,"setMinutes",function(){return vn}),r.d(t,"setMonth",function(){return bn}),r.d(t,"setQuarter",function(){return Tn}),r.d(t,"setSeconds",function(){return Dn}),r.d(t,"setWeek",function(){return En}),r.d(t,"setWeekYear",function(){return Mn}),r.d(t,"setYear",function(){return xn}),r.d(t,"startOfDay",function(){return k}),r.d(t,"startOfDecade",function(){return qn}),r.d(t,"startOfHour",function(){return ur}),r.d(t,"startOfISOWeek",function(){return x}),r.d(t,"startOfISOWeekYear",function(){return C}),r.d(t,"startOfMinute",function(){return fr}),r.d(t,"startOfMonth",function(){return Gt}),r.d(t,"startOfQuarter",function(){return wr}),r.d(t,"startOfSecond",function(){return yr}),r.d(t,"startOfWeek",function(){return E}),r.d(t,"startOfWeekYear",function(){return Xt}),r.d(t,"startOfYear",function(){return Mt}),r.d(t,"subDays",function(){return Cn}),r.d(t,"subHours",function(){return kn}),r.d(t,"subISOWeekYears",function(){return oe}),r.d(t,"subMilliseconds",function(){return nt}),r.d(t,"subMinutes",function(){return Sn}),r.d(t,"subMonths",function(){return Yn}),r.d(t,"subQuarters",function(){return Nn}),r.d(t,"subSeconds",function(){return On}),r.d(t,"subWeeks",function(){return Hn}),r.d(t,"subYears",function(){return Un}),r.d(t,"toDate",function(){return c})}]);
//# sourceMappingURL=main.js.map