UNPKG

@bentoboxes/nova-utils

Version:

This set of utilities are intended to

1 lines 443 kB
var NovaUtils=function(e){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var c=0;c<r.length;c++){var n=r[c];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,r,c){return r&&n(e.prototype,r),c&&n(e,c),e}function o(e,r,c){return r in e?Object.defineProperty(e,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[r]=c,e}function a(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),c.push.apply(c,n)}return c}function i(e){for(var r=1;r<arguments.length;r++){var c=null!=arguments[r]?arguments[r]:{};r%2?a(Object(c),!0).forEach(function(r){o(e,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(c,r))})}return e}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var c=0,n=new Array(r);c<r;c++)n[c]=e[c];return n}function s(e,r){var c;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(c=function(e,r){if(e){if("string"==typeof e)return u(e,r);var c=Object.prototype.toString.call(e).slice(8,-1);return"Object"===c&&e.constructor&&(c=e.constructor.name),"Map"===c||"Set"===c?Array.from(e):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?u(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){c&&(e=c);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){c=e[Symbol.iterator]()},n:function(){var e=c.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==c.return||c.return()}finally{if(i)throw o}}}}var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function p(e,r){return e(r={exports:{}},r.exports),r.exports}var f,b,A,d=p(function(e,r){e.exports=function(){var r,c;function n(){return r.apply(null,arguments)}function t(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var r;for(r in e)if(a(e,r))return!1;return!0}function u(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function M(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,r){var c,n=[];for(c=0;c<e.length;++c)n.push(r(e[c],c));return n}function f(e,r){for(var c in r)a(r,c)&&(e[c]=r[c]);return a(r,"toString")&&(e.toString=r.toString),a(r,"valueOf")&&(e.valueOf=r.valueOf),e}function b(e,r,c,n){return Xr(e,r,c,n,!0).utc()}function A(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function d(e){if(null==e._isValid){var r=A(e),n=c.call(r.parsedDateParts,function(e){return null!=e}),t=!isNaN(e._d.getTime())&&r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&n);if(e._strict&&(t=t&&0===r.charsLeftOver&&0===r.unusedTokens.length&&void 0===r.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return t;e._isValid=t}return e._isValid}function z(e){var r=b(NaN);return null!=e?f(A(r),e):A(r).userInvalidated=!0,r}c=Array.prototype.some?Array.prototype.some:function(e){var r,c=Object(this),n=c.length>>>0;for(r=0;r<n;r++)if(r in c&&e.call(this,c[r],r,c))return!0;return!1};var h=n.momentProperties=[],g=!1;function m(e,r){var c,n,t;if(u(r._isAMomentObject)||(e._isAMomentObject=r._isAMomentObject),u(r._i)||(e._i=r._i),u(r._f)||(e._f=r._f),u(r._l)||(e._l=r._l),u(r._strict)||(e._strict=r._strict),u(r._tzm)||(e._tzm=r._tzm),u(r._isUTC)||(e._isUTC=r._isUTC),u(r._offset)||(e._offset=r._offset),u(r._pf)||(e._pf=A(r)),u(r._locale)||(e._locale=r._locale),h.length>0)for(c=0;c<h.length;c++)n=h[c],u(t=r[n])||(e[n]=t);return e}function q(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,n.updateOffset(this),g=!1)}function O(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function L(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function N(e,r){var c=!0;return f(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),c){var t,o,i,u=[];for(o=0;o<arguments.length;o++){if(t="","object"==typeof arguments[o]){for(i in t+="\n["+o+"] ",arguments[0])a(arguments[0],i)&&(t+=i+": "+arguments[0][i]+", ");t=t.slice(0,-2)}else t=arguments[o];u.push(t)}L(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),c=!1}return r.apply(this,arguments)},r)}var v,y={};function T(e,r){null!=n.deprecationHandler&&n.deprecationHandler(e,r),y[e]||(L(r),y[e]=!0)}function W(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function B(e,r){var c,n=f({},e);for(c in r)a(r,c)&&(o(e[c])&&o(r[c])?(n[c]={},f(n[c],e[c]),f(n[c],r[c])):null!=r[c]?n[c]=r[c]:delete n[c]);for(c in e)a(e,c)&&!a(r,c)&&o(e[c])&&(n[c]=f({},n[c]));return n}function _(e){null!=e&&this.set(e)}function X(e,r,c){var n=""+Math.abs(e),t=r-n.length,o=e>=0;return(o?c?"+":"":"-")+Math.pow(10,Math.max(0,t)).toString().substr(1)+n}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,v=Object.keys?Object.keys:function(e){var r,c=[];for(r in e)a(e,r)&&c.push(r);return c};var S=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,w={},D={};function C(e,r,c,n){var t=n;"string"==typeof n&&(t=function(){return this[n]()}),e&&(D[e]=t),r&&(D[r[0]]=function(){return X(t.apply(this,arguments),r[1],r[2])}),c&&(D[c]=function(){return this.localeData().ordinal(t.apply(this,arguments),e)})}function R(e,r){return e.isValid()?(r=k(r,e.localeData()),w[r]=w[r]||function(e){var r,c,n,t=e.match(S);for(r=0,c=t.length;r<c;r++)D[t[r]]?t[r]=D[t[r]]:t[r]=(n=t[r]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(r){var n,o="";for(n=0;n<c;n++)o+=W(t[n])?t[n].call(r,e):t[n];return o}}(r),w[r](e)):e.localeData().invalidDate()}function k(e,r){var c=5;function n(e){return r.longDateFormat(e)||e}for(E.lastIndex=0;c>=0&&E.test(e);)e=e.replace(E,n),E.lastIndex=0,c-=1;return e}var x={};function P(e,r){var c=e.toLowerCase();x[c]=x[c+"s"]=x[r]=e}function I(e){return"string"==typeof e?x[e]||x[e.toLowerCase()]:void 0}function U(e){var r,c,n={};for(c in e)a(e,c)&&(r=I(c))&&(n[r]=e[c]);return n}var j={};function H(e,r){j[e]=r}function F(e){return e%4==0&&e%100!=0||e%400==0}function V(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var r=+e,c=0;return 0!==r&&isFinite(r)&&(c=V(r)),c}function Y(e,r){return function(c){return null!=c?(Q(this,e,c),n.updateOffset(this,r),this):K(this,e)}}function K(e,r){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+r]():NaN}function Q(e,r,c){e.isValid()&&!isNaN(c)&&("FullYear"===r&&F(e.year())&&1===e.month()&&29===e.date()?(c=G(c),e._d["set"+(e._isUTC?"UTC":"")+r](c,e.month(),Xe(c,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+r](c))}var J,Z=/\d/,$=/\d\d/,ee=/\d{3}/,re=/\d{4}/,ce=/[+-]?\d{6}/,ne=/\d\d?/,te=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ae=/\d{1,3}/,ie=/\d{1,4}/,ue=/[+-]?\d{1,6}/,se=/\d+/,Me=/[+-]?\d+/,le=/Z|[+-]\d\d:?\d\d/gi,pe=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function be(e,r,c){J[e]=W(r)?r:function(e,n){return e&&c?c:r}}function Ae(e,r){return a(J,e)?J[e](r._strict,r._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,r,c,n,t){return r||c||n||t})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}J={};var ze={};function he(e,r){var c,n=r;for("string"==typeof e&&(e=[e]),s(r)&&(n=function(e,c){c[r]=G(e)}),c=0;c<e.length;c++)ze[e[c]]=n}function ge(e,r){he(e,function(e,c,n,t){n._w=n._w||{},r(e,n._w,n,t)})}function me(e,r,c){null!=r&&a(ze,e)&&ze[e](r,c._a,c,e)}var qe,Oe=0,Le=1,Ne=2,ve=3,ye=4,Te=5,We=6,Be=7,_e=8;function Xe(e,r){if(isNaN(e)||isNaN(r))return NaN;var c,n=(r%(c=12)+c)%c;return e+=(r-n)/12,1===n?F(e)?29:28:31-n%7%2}qe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var r;for(r=0;r<this.length;++r)if(this[r]===e)return r;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),P("month","M"),H("month",8),be("M",ne),be("MM",ne,$),be("MMM",function(e,r){return r.monthsShortRegex(e)}),be("MMMM",function(e,r){return r.monthsRegex(e)}),he(["M","MM"],function(e,r){r[Le]=G(e)-1}),he(["MMM","MMMM"],function(e,r,c,n){var t=c._locale.monthsParse(e,n,c._strict);null!=t?r[Le]=t:A(c).invalidMonth=e});var Se="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ee="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),we=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De=fe,Ce=fe;function Re(e,r){var c;if(!e.isValid())return e;if("string"==typeof r)if(/^\d+$/.test(r))r=G(r);else if(!s(r=e.localeData().monthsParse(r)))return e;return c=Math.min(e.date(),Xe(e.year(),r)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](r,c),e}function ke(e){return null!=e?(Re(this,e),n.updateOffset(this,!0),this):K(this,"Month")}function xe(){function e(e,r){return r.length-e.length}var r,c,n=[],t=[],o=[];for(r=0;r<12;r++)c=b([2e3,r]),n.push(this.monthsShort(c,"")),t.push(this.months(c,"")),o.push(this.months(c,"")),o.push(this.monthsShort(c,""));for(n.sort(e),t.sort(e),o.sort(e),r=0;r<12;r++)n[r]=de(n[r]),t[r]=de(t[r]);for(r=0;r<24;r++)o[r]=de(o[r]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Pe(e){return F(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?X(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),P("year","y"),H("year",1),be("Y",Me),be("YY",ne,$),be("YYYY",ie,re),be("YYYYY",ue,ce),be("YYYYYY",ue,ce),he(["YYYYY","YYYYYY"],Oe),he("YYYY",function(e,r){r[Oe]=2===e.length?n.parseTwoDigitYear(e):G(e)}),he("YY",function(e,r){r[Oe]=n.parseTwoDigitYear(e)}),he("Y",function(e,r){r[Oe]=parseInt(e,10)}),n.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var Ie=Y("FullYear",!0);function Ue(e){var r,c;return e<100&&e>=0?((c=Array.prototype.slice.call(arguments))[0]=e+400,r=new Date(Date.UTC.apply(null,c)),isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e)):r=new Date(Date.UTC.apply(null,arguments)),r}function je(e,r,c){var n=7+r-c,t=(7+Ue(e,0,n).getUTCDay()-r)%7;return-t+n-1}function He(e,r,c,n,t){var o,a,i=(7+c-n)%7,u=je(e,n,t),s=1+7*(r-1)+i+u;return s<=0?a=Pe(o=e-1)+s:s>Pe(e)?(o=e+1,a=s-Pe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Fe(e,r,c){var n,t,o=je(e.year(),r,c),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(t=e.year()-1,n=a+Ve(t,r,c)):a>Ve(e.year(),r,c)?(n=a-Ve(e.year(),r,c),t=e.year()+1):(t=e.year(),n=a),{week:n,year:t}}function Ve(e,r,c){var n=je(e,r,c),t=je(e+1,r,c);return(Pe(e)-n+t)/7}function Ge(e,r){return e.slice(r,7).concat(e.slice(0,r))}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),H("week",5),H("isoWeek",5),be("w",ne),be("ww",ne,$),be("W",ne),be("WW",ne,$),ge(["w","ww","W","WW"],function(e,r,c,n){r[n.substr(0,1)]=G(e)}),C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),be("d",ne),be("e",ne),be("E",ne),be("dd",function(e,r){return r.weekdaysMinRegex(e)}),be("ddd",function(e,r){return r.weekdaysShortRegex(e)}),be("dddd",function(e,r){return r.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,r,c,n){var t=c._locale.weekdaysParse(e,n,c._strict);null!=t?r.d=t:A(c).invalidWeekday=e}),ge(["d","e","E"],function(e,r,c,n){r[n]=G(e)});var Ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Je=fe,Ze=fe,$e=fe;function er(){function e(e,r){return r.length-e.length}var r,c,n,t,o,a=[],i=[],u=[],s=[];for(r=0;r<7;r++)c=b([2e3,1]).day(r),n=de(this.weekdaysMin(c,"")),t=de(this.weekdaysShort(c,"")),o=de(this.weekdays(c,"")),a.push(n),i.push(t),u.push(o),s.push(n),s.push(t),s.push(o);a.sort(e),i.sort(e),u.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function rr(){return this.hours()%12||12}function cr(e,r){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),r)})}function nr(e,r){return r._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,rr),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+rr.apply(this)+X(this.minutes(),2)}),C("hmmss",0,0,function(){return""+rr.apply(this)+X(this.minutes(),2)+X(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+X(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+X(this.minutes(),2)+X(this.seconds(),2)}),cr("a",!0),cr("A",!1),P("hour","h"),H("hour",13),be("a",nr),be("A",nr),be("H",ne),be("h",ne),be("k",ne),be("HH",ne,$),be("hh",ne,$),be("kk",ne,$),be("hmm",te),be("hmmss",oe),be("Hmm",te),be("Hmmss",oe),he(["H","HH"],ve),he(["k","kk"],function(e,r,c){var n=G(e);r[ve]=24===n?0:n}),he(["a","A"],function(e,r,c){c._isPm=c._locale.isPM(e),c._meridiem=e}),he(["h","hh"],function(e,r,c){r[ve]=G(e),A(c).bigHour=!0}),he("hmm",function(e,r,c){var n=e.length-2;r[ve]=G(e.substr(0,n)),r[ye]=G(e.substr(n)),A(c).bigHour=!0}),he("hmmss",function(e,r,c){var n=e.length-4,t=e.length-2;r[ve]=G(e.substr(0,n)),r[ye]=G(e.substr(n,2)),r[Te]=G(e.substr(t)),A(c).bigHour=!0}),he("Hmm",function(e,r,c){var n=e.length-2;r[ve]=G(e.substr(0,n)),r[ye]=G(e.substr(n))}),he("Hmmss",function(e,r,c){var n=e.length-4,t=e.length-2;r[ve]=G(e.substr(0,n)),r[ye]=G(e.substr(n,2)),r[Te]=G(e.substr(t))});var tr,or=Y("Hours",!0),ar={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:Ee,week:{dow:0,doy:6},weekdays:Ye,weekdaysMin:Qe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ir={},ur={};function sr(e,r){var c,n=Math.min(e.length,r.length);for(c=0;c<n;c+=1)if(e[c]!==r[c])return c;return n}function Mr(e){return e?e.toLowerCase().replace("_","-"):e}function lr(r){var c=null;if(void 0===ir[r]&&e&&e.exports)try{c=tr._abbr,l(),pr(c)}catch(e){ir[r]=null}return ir[r]}function pr(e,r){var c;return e&&((c=u(r)?br(e):fr(e,r))?tr=c:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tr._abbr}function fr(e,r){if(null!==r){var c,n=ar;if(r.abbr=e,null!=ir[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ir[e]._config;else if(null!=r.parentLocale)if(null!=ir[r.parentLocale])n=ir[r.parentLocale]._config;else{if(null==(c=lr(r.parentLocale)))return ur[r.parentLocale]||(ur[r.parentLocale]=[]),ur[r.parentLocale].push({name:e,config:r}),null;n=c._config}return ir[e]=new _(B(n,r)),ur[e]&&ur[e].forEach(function(e){fr(e.name,e.config)}),pr(e),ir[e]}return delete ir[e],null}function br(e){var r;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tr;if(!t(e)){if(r=lr(e))return r;e=[e]}return function(e){for(var r,c,n,t,o=0;o<e.length;){for(t=Mr(e[o]).split("-"),r=t.length,c=(c=Mr(e[o+1]))?c.split("-"):null;r>0;){if(n=lr(t.slice(0,r).join("-")))return n;if(c&&c.length>=r&&sr(t,c)>=r-1)break;r--}o++}return tr}(e)}function Ar(e){var r,c=e._a;return c&&-2===A(e).overflow&&(r=c[Le]<0||c[Le]>11?Le:c[Ne]<1||c[Ne]>Xe(c[Oe],c[Le])?Ne:c[ve]<0||c[ve]>24||24===c[ve]&&(0!==c[ye]||0!==c[Te]||0!==c[We])?ve:c[ye]<0||c[ye]>59?ye:c[Te]<0||c[Te]>59?Te:c[We]<0||c[We]>999?We:-1,A(e)._overflowDayOfYear&&(r<Oe||r>Ne)&&(r=Ne),A(e)._overflowWeeks&&-1===r&&(r=Be),A(e)._overflowWeekday&&-1===r&&(r=_e),A(e).overflow=r),e}var dr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,hr=/Z|[+-]\d\d(?::?\d\d)?/,gr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],qr=/^\/?Date\((-?\d+)/i,Or=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Lr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nr(e){var r,c,n,t,o,a,i=e._i,u=dr.exec(i)||zr.exec(i);if(u){for(A(e).iso=!0,r=0,c=gr.length;r<c;r++)if(gr[r][1].exec(u[1])){t=gr[r][0],n=!1!==gr[r][2];break}if(null==t)return void(e._isValid=!1);if(u[3]){for(r=0,c=mr.length;r<c;r++)if(mr[r][1].exec(u[3])){o=(u[2]||" ")+mr[r][0];break}if(null==o)return void(e._isValid=!1)}if(!n&&null!=o)return void(e._isValid=!1);if(u[4]){if(!hr.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=t+(o||"")+(a||""),Br(e)}else e._isValid=!1}function vr(e){var r=parseInt(e,10);return r<=49?2e3+r:r<=999?1900+r:r}function yr(e){var r,c,n,t,o,a,i,u,s=Or.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(s){if(c=s[4],n=s[3],t=s[2],o=s[5],a=s[6],i=s[7],u=[vr(c),Ee.indexOf(n),parseInt(t,10),parseInt(o,10),parseInt(a,10)],i&&u.push(parseInt(i,10)),r=u,!function(e,r,c){if(e){var n=Ke.indexOf(e),t=new Date(r[0],r[1],r[2]).getDay();if(n!==t)return A(c).weekdayMismatch=!0,c._isValid=!1,!1}return!0}(s[1],r,e))return;e._a=r,e._tzm=function(e,r,c){if(e)return Lr[e];if(r)return 0;var n=parseInt(c,10),t=n%100,o=(n-t)/100;return 60*o+t}(s[8],s[9],s[10]),e._d=Ue.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),A(e).rfc2822=!0}else e._isValid=!1}function Tr(e,r,c){return null!=e?e:null!=r?r:c}function Wr(e){var r,c,t,o,a,i=[];if(!e._d){for(t=function(e){var r=new Date(n.now());return e._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()]}(e),e._w&&null==e._a[Ne]&&null==e._a[Le]&&function(e){var r,c,n,t,o,a,i,u,s;null!=(r=e._w).GG||null!=r.W||null!=r.E?(o=1,a=4,c=Tr(r.GG,e._a[Oe],Fe(Sr(),1,4).year),n=Tr(r.W,1),((t=Tr(r.E,1))<1||t>7)&&(u=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,s=Fe(Sr(),o,a),c=Tr(r.gg,e._a[Oe],s.year),n=Tr(r.w,s.week),null!=r.d?((t=r.d)<0||t>6)&&(u=!0):null!=r.e?(t=r.e+o,(r.e<0||r.e>6)&&(u=!0)):t=o),n<1||n>Ve(c,o,a)?A(e)._overflowWeeks=!0:null!=u?A(e)._overflowWeekday=!0:(i=He(c,n,t,o,a),e._a[Oe]=i.year,e._dayOfYear=i.dayOfYear)}(e),null!=e._dayOfYear&&(a=Tr(e._a[Oe],t[Oe]),(e._dayOfYear>Pe(a)||0===e._dayOfYear)&&(A(e)._overflowDayOfYear=!0),c=Ue(a,0,e._dayOfYear),e._a[Le]=c.getUTCMonth(),e._a[Ne]=c.getUTCDate()),r=0;r<3&&null==e._a[r];++r)e._a[r]=i[r]=t[r];for(;r<7;r++)e._a[r]=i[r]=null==e._a[r]?2===r?1:0:e._a[r];24===e._a[ve]&&0===e._a[ye]&&0===e._a[Te]&&0===e._a[We]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Ue:function(e,r,c,n,t,o,a){var i;return e<100&&e>=0?(i=new Date(e+400,r,c,n,t,o,a),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,r,c,n,t,o,a),i}).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(A(e).weekdayMismatch=!0)}}function Br(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],A(e).empty=!0;var r,c,t,o,a,i,u=""+e._i,s=u.length,M=0;for(t=k(e._f,e._locale).match(S)||[],r=0;r<t.length;r++)o=t[r],(c=(u.match(Ae(o,e))||[])[0])&&((a=u.substr(0,u.indexOf(c))).length>0&&A(e).unusedInput.push(a),u=u.slice(u.indexOf(c)+c.length),M+=c.length),D[o]?(c?A(e).empty=!1:A(e).unusedTokens.push(o),me(o,c,e)):e._strict&&!c&&A(e).unusedTokens.push(o);A(e).charsLeftOver=s-M,u.length>0&&A(e).unusedInput.push(u),e._a[ve]<=12&&!0===A(e).bigHour&&e._a[ve]>0&&(A(e).bigHour=void 0),A(e).parsedDateParts=e._a.slice(0),A(e).meridiem=e._meridiem,e._a[ve]=(l=e._locale,p=e._a[ve],null==(f=e._meridiem)?p:null!=l.meridiemHour?l.meridiemHour(p,f):null!=l.isPM?((b=l.isPM(f))&&p<12&&(p+=12),b||12!==p||(p=0),p):p),null!==(i=A(e).era)&&(e._a[Oe]=e._locale.erasConvertYear(i,e._a[Oe])),Wr(e),Ar(e)}else yr(e);else Nr(e);var l,p,f,b}function _r(e){var r=e._i,c=e._f;return e._locale=e._locale||br(e._l),null===r||void 0===c&&""===r?z({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),O(r)?new q(Ar(r)):(M(r)?e._d=r:t(c)?function(e){var r,c,n,t,o,a,i=!1;if(0===e._f.length)return A(e).invalidFormat=!0,void(e._d=new Date(NaN));for(t=0;t<e._f.length;t++)o=0,a=!1,r=m({},e),null!=e._useUTC&&(r._useUTC=e._useUTC),r._f=e._f[t],Br(r),d(r)&&(a=!0),o+=A(r).charsLeftOver,o+=10*A(r).unusedTokens.length,A(r).score=o,i?o<n&&(n=o,c=r):(null==n||o<n||a)&&(n=o,c=r,a&&(i=!0));f(e,c||r)}(e):c?Br(e):function(e){var r=e._i;u(r)?e._d=new Date(n.now()):M(r)?e._d=new Date(r.valueOf()):"string"==typeof r?function(e){var r=qr.exec(e._i);null===r?(Nr(e),!1===e._isValid&&(delete e._isValid,yr(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+r[1])}(e):t(r)?(e._a=p(r.slice(0),function(e){return parseInt(e,10)}),Wr(e)):o(r)?function(e){if(!e._d){var r=U(e._i),c=void 0===r.day?r.date:r.day;e._a=p([r.year,r.month,c,r.hour,r.minute,r.second,r.millisecond],function(e){return e&&parseInt(e,10)}),Wr(e)}}(e):s(r)?e._d=new Date(r):n.createFromInputFallback(e)}(e),d(e)||(e._d=null),e))}function Xr(e,r,c,n,a){var u,s={};return!0!==r&&!1!==r||(n=r,r=void 0),!0!==c&&!1!==c||(n=c,c=void 0),(o(e)&&i(e)||t(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=c,s._i=e,s._f=r,s._strict=n,(u=new q(Ar(_r(s))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Sr(e,r,c,n){return Xr(e,r,c,n,!1)}n.createFromInputFallback=N("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var Er=N("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Sr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:z()}),wr=N("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Sr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:z()});function Dr(e,r){var c,n;if(1===r.length&&t(r[0])&&(r=r[0]),!r.length)return Sr();for(c=r[0],n=1;n<r.length;++n)r[n].isValid()&&!r[n][e](c)||(c=r[n]);return c}var Cr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rr(e){var r=U(e),c=r.year||0,n=r.quarter||0,t=r.month||0,o=r.week||r.isoWeek||0,i=r.day||0,u=r.hour||0,s=r.minute||0,M=r.second||0,l=r.millisecond||0;this._isValid=function(e){var r,c,n=!1;for(r in e)if(a(e,r)&&(-1===qe.call(Cr,r)||null!=e[r]&&isNaN(e[r])))return!1;for(c=0;c<Cr.length;++c)if(e[Cr[c]]){if(n)return!1;parseFloat(e[Cr[c]])!==G(e[Cr[c]])&&(n=!0)}return!0}(r),this._milliseconds=+l+1e3*M+6e4*s+1e3*u*60*60,this._days=+i+7*o,this._months=+t+3*n+12*c,this._data={},this._locale=br(),this._bubble()}function kr(e){return e instanceof Rr}function xr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pr(e,r){C(e,0,0,function(){var e=this.utcOffset(),c="+";return e<0&&(e=-e,c="-"),c+X(~~(e/60),2)+r+X(~~e%60,2)})}Pr("Z",":"),Pr("ZZ",""),be("Z",pe),be("ZZ",pe),he(["Z","ZZ"],function(e,r,c){c._useUTC=!0,c._tzm=Ur(pe,e)});var Ir=/([\+\-]|\d\d)/gi;function Ur(e,r){var c,n,t,o=(r||"").match(e);return null===o?null:(c=o[o.length-1]||[],n=(c+"").match(Ir)||["-",0,0],0===(t=60*n[1]+G(n[2]))?0:"+"===n[0]?t:-t)}function jr(e,r){var c,t;return r._isUTC?(c=r.clone(),t=(O(e)||M(e)?e.valueOf():Sr(e).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+t),n.updateOffset(c,!1),c):Sr(e).local()}function Hr(e){return-Math.round(e._d.getTimezoneOffset())}function Fr(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Vr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Gr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Yr(e,r){var c,n,t,o,i,u,M=e,l=null;return kr(e)?M={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(M={},r?M[r]=+e:M.milliseconds=+e):(l=Vr.exec(e))?(c="-"===l[1]?-1:1,M={y:0,d:G(l[Ne])*c,h:G(l[ve])*c,m:G(l[ye])*c,s:G(l[Te])*c,ms:G(xr(1e3*l[We]))*c}):(l=Gr.exec(e))?(c="-"===l[1]?-1:1,M={y:Kr(l[2],c),M:Kr(l[3],c),w:Kr(l[4],c),d:Kr(l[5],c),h:Kr(l[6],c),m:Kr(l[7],c),s:Kr(l[8],c)}):null==M?M={}:"object"==typeof M&&("from"in M||"to"in M)&&(o=Sr(M.from),i=Sr(M.to),t=o.isValid()&&i.isValid()?(i=jr(i,o),o.isBefore(i)?u=Qr(o,i):((u=Qr(i,o)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(M={}).ms=t.milliseconds,M.M=t.months),n=new Rr(M),kr(e)&&a(e,"_locale")&&(n._locale=e._locale),kr(e)&&a(e,"_isValid")&&(n._isValid=e._isValid),n}function Kr(e,r){var c=e&&parseFloat(e.replace(",","."));return(isNaN(c)?0:c)*r}function Qr(e,r){var c={};return c.months=r.month()-e.month()+12*(r.year()-e.year()),e.clone().add(c.months,"M").isAfter(r)&&--c.months,c.milliseconds=+r-+e.clone().add(c.months,"M"),c}function Jr(e,r){return function(c,n){var t;return null===n||isNaN(+n)||(T(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=c,c=n,n=t),Zr(this,Yr(c,n),e),this}}function Zr(e,r,c,t){var o=r._milliseconds,a=xr(r._days),i=xr(r._months);e.isValid()&&(t=null==t||t,i&&Re(e,K(e,"Month")+i*c),a&&Q(e,"Date",K(e,"Date")+a*c),o&&e._d.setTime(e._d.valueOf()+o*c),t&&n.updateOffset(e,a||i))}Yr.fn=Rr.prototype,Yr.invalid=function(){return Yr(NaN)};var $r=Jr(1,"add"),ec=Jr(-1,"subtract");function rc(e){return"string"==typeof e||e instanceof String}function cc(e,r){if(e.date()<r.date())return-cc(r,e);var c,n,t=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(t,"months");return r-o<0?(c=e.clone().add(t-1,"months"),n=(r-o)/(o-c)):(c=e.clone().add(t+1,"months"),n=(r-o)/(c-o)),-(t+n)||0}function nc(e){var r;return void 0===e?this._locale._abbr:(null!=(r=br(e))&&(this._locale=r),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tc=N("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function oc(){return this._locale}var ac=1e3,ic=60*ac,uc=60*ic,sc=3506328*uc;function Mc(e,r){return(e%r+r)%r}function lc(e,r,c){return e<100&&e>=0?new Date(e+400,r,c)-sc:new Date(e,r,c).valueOf()}function pc(e,r,c){return e<100&&e>=0?Date.UTC(e+400,r,c)-sc:Date.UTC(e,r,c)}function fc(e,r){return r.erasAbbrRegex(e)}function bc(){var e,r,c=[],n=[],t=[],o=[],a=this.eras();for(e=0,r=a.length;e<r;++e)n.push(de(a[e].name)),c.push(de(a[e].abbr)),t.push(de(a[e].narrow)),o.push(de(a[e].name)),o.push(de(a[e].abbr)),o.push(de(a[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}function Ac(e,r){C(0,[e,e.length],0,r)}function dc(e,r,c,n,t){var o;return null==e?Fe(this,n,t).year:(o=Ve(e,n,t),r>o&&(r=o),function(e,r,c,n,t){var o=He(e,r,c,n,t),a=Ue(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,r,c,n,t))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),be("N",fc),be("NN",fc),be("NNN",fc),be("NNNN",function(e,r){return r.erasNameRegex(e)}),be("NNNNN",function(e,r){return r.erasNarrowRegex(e)}),he(["N","NN","NNN","NNNN","NNNNN"],function(e,r,c,n){var t=c._locale.erasParse(e,n,c._strict);t?A(c).era=t:A(c).invalidEra=e}),be("y",se),be("yy",se),be("yyy",se),be("yyyy",se),be("yo",function(e,r){return r._eraYearOrdinalRegex||se}),he(["y","yy","yyy","yyyy"],Oe),he(["yo"],function(e,r,c,n){var t;c._locale._eraYearOrdinalRegex&&(t=e.match(c._locale._eraYearOrdinalRegex)),c._locale.eraYearOrdinalParse?r[Oe]=c._locale.eraYearOrdinalParse(e,t):r[Oe]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ac("gggg","weekYear"),Ac("ggggg","weekYear"),Ac("GGGG","isoWeekYear"),Ac("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),be("G",Me),be("g",Me),be("GG",ne,$),be("gg",ne,$),be("GGGG",ie,re),be("gggg",ie,re),be("GGGGG",ue,ce),be("ggggg",ue,ce),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,r,c,n){r[n.substr(0,2)]=G(e)}),ge(["gg","GG"],function(e,r,c,t){r[t]=n.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),P("quarter","Q"),H("quarter",7),be("Q",Z),he("Q",function(e,r){r[Le]=3*(G(e)-1)}),C("D",["DD",2],"Do","date"),P("date","D"),H("date",9),be("D",ne),be("DD",ne,$),be("Do",function(e,r){return e?r._dayOfMonthOrdinalParse||r._ordinalParse:r._dayOfMonthOrdinalParseLenient}),he(["D","DD"],Ne),he("Do",function(e,r){r[Ne]=G(e.match(ne)[0])});var zc=Y("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),H("dayOfYear",4),be("DDD",ae),be("DDDD",ee),he(["DDD","DDDD"],function(e,r,c){c._dayOfYear=G(e)}),C("m",["mm",2],0,"minute"),P("minute","m"),H("minute",14),be("m",ne),be("mm",ne,$),he(["m","mm"],ye);var hc=Y("Minutes",!1);C("s",["ss",2],0,"second"),P("second","s"),H("second",15),be("s",ne),be("ss",ne,$),he(["s","ss"],Te);var gc,mc,qc=Y("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),H("millisecond",16),be("S",ae,Z),be("SS",ae,$),be("SSS",ae,ee),gc="SSSS";gc.length<=9;gc+="S")be(gc,se);function Oc(e,r){r[We]=G(1e3*("0."+e))}for(gc="S";gc.length<=9;gc+="S")he(gc,Oc);mc=Y("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var Lc=q.prototype;function Nc(e){return e}Lc.add=$r,Lc.calendar=function(e,r){var c;1===arguments.length&&(arguments[0]?O(c=arguments[0])||M(c)||rc(c)||s(c)||function(e){var r=t(e),c=!1;return r&&(c=0===e.filter(function(r){return!s(r)&&rc(e)}).length),r&&c}(c)||function(e){var r,c,n=o(e)&&!i(e),t=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(r=0;r<u.length;r+=1)c=u[r],t=t||a(e,c);return n&&t}(c)||null==c?(e=arguments[0],r=void 0):function(e){var r,c,n=o(e)&&!i(e),t=!1,u=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(r=0;r<u.length;r+=1)c=u[r],t=t||a(e,c);return n&&t}(arguments[0])&&(r=arguments[0],e=void 0):(e=void 0,r=void 0));var u=e||Sr(),l=jr(u,this).startOf("day"),p=n.calendarFormat(this,l)||"sameElse",f=r&&(W(r[p])?r[p].call(this,u):r[p]);return this.format(f||this.localeData().calendar(p,this,Sr(u)))},Lc.clone=function(){return new q(this)},Lc.diff=function(e,r,c){var n,t,o;if(!this.isValid())return NaN;if(!(n=jr(e,this)).isValid())return NaN;switch(t=6e4*(n.utcOffset()-this.utcOffset()),r=I(r)){case"year":o=cc(this,n)/12;break;case"month":o=cc(this,n);break;case"quarter":o=cc(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-t)/864e5;break;case"week":o=(this-n-t)/6048e5;break;default:o=this-n}return c?o:V(o)},Lc.endOf=function(e){var r,c;if(void 0===(e=I(e))||"millisecond"===e||!this.isValid())return this;switch(c=this._isUTC?pc:lc,e){case"year":r=c(this.year()+1,0,1)-1;break;case"quarter":r=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=c(this.year(),this.month()+1,1)-1;break;case"week":r=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=uc-Mc(r+(this._isUTC?0:this.utcOffset()*ic),uc)-1;break;case"minute":r=this._d.valueOf(),r+=ic-Mc(r,ic)-1;break;case"second":r=this._d.valueOf(),r+=ac-Mc(r,ac)-1}return this._d.setTime(r),n.updateOffset(this,!0),this},Lc.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var r=R(this,e);return this.localeData().postformat(r)},Lc.from=function(e,r){return this.isValid()&&(O(e)&&e.isValid()||Sr(e).isValid())?Yr({to:this,from:e}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()},Lc.fromNow=function(e){return this.from(Sr(),e)},Lc.to=function(e,r){return this.isValid()&&(O(e)&&e.isValid()||Sr(e).isValid())?Yr({from:this,to:e}).locale(this.locale()).humanize(!r):this.localeData().invalidDate()},Lc.toNow=function(e){return this.to(Sr(),e)},Lc.get=function(e){return W(this[e=I(e)])?this[e]():this},Lc.invalidAt=function(){return A(this).overflow},Lc.isAfter=function(e,r){var c=O(e)?e:Sr(e);return!(!this.isValid()||!c.isValid())&&("millisecond"===(r=I(r)||"millisecond")?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(r).valueOf())},Lc.isBefore=function(e,r){var c=O(e)?e:Sr(e);return!(!this.isValid()||!c.isValid())&&("millisecond"===(r=I(r)||"millisecond")?this.valueOf()<c.valueOf():this.clone().endOf(r).valueOf()<c.valueOf())},Lc.isBetween=function(e,r,c,n){var t=O(e)?e:Sr(e),o=O(r)?r:Sr(r);return!!(this.isValid()&&t.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(t,c):!this.isBefore(t,c))&&(")"===n[1]?this.isBefore(o,c):!this.isAfter(o,c))},Lc.isSame=function(e,r){var c,n=O(e)?e:Sr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(r=I(r)||"millisecond")?this.valueOf()===n.valueOf():(c=n.valueOf(),this.clone().startOf(r).valueOf()<=c&&c<=this.clone().endOf(r).valueOf()))},Lc.isSameOrAfter=function(e,r){return this.isSame(e,r)||this.isAfter(e,r)},Lc.isSameOrBefore=function(e,r){return this.isSame(e,r)||this.isBefore(e,r)},Lc.isValid=function(){return d(this)},Lc.lang=tc,Lc.locale=nc,Lc.localeData=oc,Lc.max=wr,Lc.min=Er,Lc.parsingFlags=function(){return f({},A(this))},Lc.set=function(e,r){if("object"==typeof e){var c,n=function(e){var r,c=[];for(r in e)a(e,r)&&c.push({unit:r,priority:j[r]});return c.sort(function(e,r){return e.priority-r.priority}),c}(e=U(e));for(c=0;c<n.length;c++)this[n[c].unit](e[n[c].unit])}else if(W(this[e=I(e)]))return this[e](r);return this},Lc.startOf=function(e){var r,c;if(void 0===(e=I(e))||"millisecond"===e||!this.isValid())return this;switch(c=this._isUTC?pc:lc,e){case"year":r=c(this.year(),0,1);break;case"quarter":r=c(this.year(),this.month()-this.month()%3,1);break;case"month":r=c(this.year(),this.month(),1);break;case"week":r=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=c(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=Mc(r+(this._isUTC?0:this.utcOffset()*ic),uc);break;case"minute":r=this._d.valueOf(),r-=Mc(r,ic);break;case"second":r=this._d.valueOf(),r-=Mc(r,ac)}return this._d.setTime(r),n.updateOffset(this,!0),this},Lc.subtract=ec,Lc.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Lc.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Lc.toDate=function(){return new Date(this.valueOf())},Lc.toISOString=function(e){if(!this.isValid())return null;var r=!0!==e,c=r?this.clone().utc():this;return c.year()<0||c.year()>9999?R(c,r?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):W(Date.prototype.toISOString)?r?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(c,"Z")):R(c,r?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Lc.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,r,c,n="moment",t="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z"),e="["+n+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",c=t+'[")]',this.format(e+r+"-MM-DD[T]HH:mm:ss.SSS"+c)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Lc[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Lc.toJSON=function(){return this.isValid()?this.toISOString():null},Lc.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Lc.unix=function(){return Math.floor(this.valueOf()/1e3)},Lc.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Lc.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Lc.eraName=function(){var e,r,c,n=this.localeData().eras();for(e=0,r=n.length;e<r;++e){if(c=this.clone().startOf("day").valueOf(),n[e].since<=c&&c<=n[e].until)return n[e].name;if(n[e].until<=c&&c<=n[e].since)return n[e].name}return""},Lc.eraNarrow=function(){var e,r,c,n=this.localeData().eras();for(e=0,r=n.length;e<r;++e){if(c=this.clone().startOf("day").valueOf(),n[e].since<=c&&c<=n[e].until)return n[e].narrow;if(n[e].until<=c&&c<=n[e].since)return n[e].narrow}return""},Lc.eraAbbr=function(){var e,r,c,n=this.localeData().eras();for(e=0,r=n.length;e<r;++e){if(c=this.clone().startOf("day").valueOf(),n[e].since<=c&&c<=n[e].until)return n[e].abbr;if(n[e].until<=c&&c<=n[e].since)return n[e].abbr}return""},Lc.eraYear=function(){var e,r,c,t,o=this.localeData().eras();for(e=0,r=o.length;e<r;++e)if(c=o[e].since<=o[e].until?1:-1,t=this.clone().startOf("day").valueOf(),o[e].since<=t&&t<=o[e].until||o[e].until<=t&&t<=o[e].since)return(this.year()-n(o[e].since).year())*c+o[e].offset;return this.year()},Lc.year=Ie,Lc.isLeapYear=function(){return F(this.year())},Lc.weekYear=function(e){return dc.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Lc.isoWeekYear=function(e){return dc.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Lc.quarter=Lc.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Lc.month=ke,Lc.daysInMonth=function(){return Xe(this.year(),this.month())},Lc.week=Lc.weeks=function(e){var r=this.localeData().week(this);return null==e?r:this.add(7*(e-r),"d")},Lc.isoWeek=Lc.isoWeeks=function(e){var r=Fe(this,1,4).week;return null==e?r:this.add(7*(e-r),"d")},Lc.weeksInYear=function(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)},Lc.weeksInWeekYear=function(){var e=this.localeData()._week;return Ve(this.weekYear(),e.dow,e.doy)},Lc.isoWeeksInYear=function(){return Ve(this.year(),1,4)},Lc.isoWeeksInISOWeekYear=function(){return Ve(this.isoWeekYear(),1,4)},Lc.date=zc,Lc.day=Lc.days=function(e){if(!this.isValid())return null!=e?this:NaN;var r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,r){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=r.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-r,"d")):r},Lc.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var r=(this.day()+7-this.localeData()._week.dow)%7;return null==e?r:this.add(e-r,"d")},Lc.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var r=function(e,r){return"string"==typeof e?r.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?r:r-7)}return this.day()||7},Lc.dayOfYear=function(e){var r=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?r:this.add(e-r,"d")},Lc.hour=Lc.hours=or,Lc.minute=Lc.minutes=hc,Lc.second=Lc.seconds=qc,Lc.millisecond=Lc.milliseconds=mc,Lc.utcOffset=function(e,r,c){var t,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ur(pe,e)))return this}else Math.abs(e)<16&&!c&&(e*=60);return!this._isUTC&&r&&(t=Hr(this)),this._offset=e,this._isUTC=!0,null!=t&&this.add(t,"m"),o!==e&&(!r||this._changeInProgress?Zr(this,Yr(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Hr(this)},Lc.utc=function(e){return this.utcOffset(0,e)},Lc.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Hr(this),"m")),this},Lc.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ur(le,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Lc.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Sr(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Lc.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Lc.isLocal=function(){return!!this.isValid()&&!this._isUTC},Lc.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Lc.isUtc=Fr,Lc.isUTC=Fr,Lc.zoneAbbr=function(){return this._isUTC?"UTC":""},Lc.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Lc.dates=N("dates accessor is deprecated. Use date instead.",zc),Lc.months=N("months accessor is deprecated. Use month instead",ke),Lc.years=N("years accessor is deprecated. Use year instead",Ie),Lc.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,r){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,r),this):-this.utcOffset()}),Lc.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,r={};return m(r,this),(r=_r(r))._a?(e=r._isUTC?b(r._a):Sr(r._a),this._isDSTShifted=this.isValid()&&function(e,r,c){var n,t=Math.min(e.length,r.length),o=Math.abs(e.length-r.length),a=0;for(n=0;n<t;n++)(c&&e[n]!==r[n]||!c&&G(e[n])!==G(r[n]))&&a++;return a+o}(r._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var vc=_.prototype;function yc(e,r,c,n){var t=br(),o=b().set(n,r);return t[c](o,e)}function Tc(e,r,c){if(s(e)&&(r=e,e=void 0),e=e||"",null!=r)return yc(e,r,c,"month");var n,t=[];for(n=0;n<12;n++)t[n]=yc(e,n,c,"month");return t}function Wc(e,r,c,n){"boolean"==typeof e?(s(r)&&(c=r,r=void 0),r=r||""):(c=r=e,e=!1,s(r)&&(c=r,r=void 0),r=r||"");var t,o=br(),a=e?o._week.dow:0,i=[];if(null!=c)return yc(r,(c+a)%7,n,"day");for(t=0;t<7;t++)i[t]=yc(r,(t+a)%7,n,"day");return i}vc.calendar=function(e,r,c){var n=this._calendar[e]||this._calendar.sameElse;return W(n)?n.call(r,c):n},vc.longDateFormat=function(e){var r=this._longDateFormat[e],c=this._longDateFormat[e.toUpperCase()];return r||!c?r:(this._longDateFormat[e]=c.match(S).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},vc.invalidDate=function(){return this._invalidDate},vc.ordinal=function(e){return this._ordinal.replace("%d",e)},vc.preparse=Nc,vc.postformat=Nc,vc.relativeTime=function(e,r,c,n){var t=this._relativeTime[c];return W(t)?t(e,r,c,n):t.replace(/%d/i,e)},vc.pastFuture=function(e,r){var c=this._relativeTime[e>0?"future":"past"];return W(c)?c(r):c.replace(/%s/i,r)},vc.set=function(e){var r,c;for(c in e)a(e,c)&&(W(r=e[c])?this[c]=r:this["_"+c]=r);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vc.eras=function(e,r){var c,t,o,a=this._eras||br("en")._eras;for(c=0,t=a.length;c<t;++c){switch(typeof a[c].since){case"string":o=n(a[c].since).startOf("day"),a[c].since=o.valueOf()}switch(typeof a[c].until){case"undefined":a[c].until=1/0;break;case"string":o=n(a[c].until).startOf("day").valueOf(),a[c].until=o.valueOf()}}return a},vc.erasParse=function(e,r,c){var n,t,o,a,i,u=this.eras();for(e=e.toUpperCase(),n=0,t=u.length;n<t;++n)if(o=u[n].name.toUpperCase(),a=u[n].abbr.toUpperCase(),i=u[n].narrow.toUpperCase(),c)switch(r){case"N":case"NN":case"NNN":if(a===e)return u[n];break;case"NNNN":if(o===e)return u[n];break;case"NNNNN":if(i===e)return u[n]}else if([o,a,i].indexOf(e)>=0)return u[n]},vc.erasConvertYear=function(e,r){var c=e.since<=e.until?1:-1;return void 0===r?n(e.since).year():n(e.since).year()+(r-e.offset)*c},vc.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||bc.call(this),e?this._erasAbbrRegex:this._erasRegex},vc.erasNameRegex=function(e){return a(this,"_erasNameRegex")||bc.call(this),e?this._erasNameRegex:this._erasRegex},vc.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||bc.call(this),e?this._erasNarrowRegex:this._erasRegex},vc.months=function(e,r){return e?t(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||we).test(r)?"format":"standalone"][e.month()]:t(this._months)?this._months:this._months.standalone},vc.monthsShort=function(e,r){return e?t(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[we.test(r)?"format":"standalone"][e.month()]:t(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vc.monthsParse=function(e,r,c){var n,t,o;if(this._monthsParseExact)return function(e,r,c){var n,t,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=b([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return c?"MMM"===r?-1!==(t=qe.call(this._shortMonthsParse,a))?t:null:-1!==(t=qe.call(this._longMonthsParse,a))?t:null:"MMM"===r?-1!==(t=qe.call(this._shortMonthsParse,a))?t:-1!==(t=qe.call(this._longMonthsParse,a))?t:null:-1!==(t=qe.call(this._longMonthsParse,a))?t:-1!==(t=qe.call(this._shortMonthsParse,a))?t:null}.call(this,e,r