UNPKG

@entestat/formula

Version:

fast excel formula parser

1 lines 1.46 MB
!function(M,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.FormulaParser=b():M.FormulaParser=b()}(window,(function(){return function(M){var b={};function p(z){if(b[z])return b[z].exports;var o=b[z]={i:z,l:!1,exports:{}};return M[z].call(o.exports,o,o.exports,p),o.l=!0,o.exports}return p.m=M,p.c=b,p.d=function(M,b,z){p.o(M,b)||Object.defineProperty(M,b,{enumerable:!0,get:z})},p.r=function(M){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},p.t=function(M,b){if(1&b&&(M=p(M)),8&b)return M;if(4&b&&"object"==typeof M&&M&&M.__esModule)return M;var z=Object.create(null);if(p.r(z),Object.defineProperty(z,"default",{enumerable:!0,value:M}),2&b&&"string"!=typeof M)for(var o in M)p.d(z,o,function(b){return M[b]}.bind(null,o));return z},p.n=function(M){var b=M&&M.__esModule?function(){return M.default}:function(){return M};return p.d(b,"a",b),b},p.o=function(M,b){return Object.prototype.hasOwnProperty.call(M,b)},p.p="",p(p.s=151)}([function(M,b,p){"use strict";function z(M){return M&&0===M.length}function o(M){return null==M?[]:Object.keys(M)}function e(M){for(var b=[],p=Object.keys(M),z=0;z<p.length;z++)b.push(M[p[z]]);return b}function n(M,b){for(var p=[],z=o(M),e=0;e<z.length;e++){var n=z[e];p.push(b.call(null,M[n],n))}return p}function t(M,b){for(var p=[],z=0;z<M.length;z++)p.push(b.call(null,M[z],z));return p}function O(M){for(var b=[],p=0;p<M.length;p++){var z=M[p];Array.isArray(z)?b=b.concat(O(z)):b.push(z)}return b}function c(M){return z(M)?void 0:M[0]}function r(M){var b=M&&M.length;return b?M[b-1]:void 0}function a(M,b){if(Array.isArray(M))for(var p=0;p<M.length;p++)b.call(null,M[p],p);else{if(!v(M))throw Error("non exhaustive match");var z=o(M);for(p=0;p<z.length;p++){var e=z[p],n=M[e];b.call(null,n,e)}}}function A(M){return"string"==typeof M}function i(M){return void 0===M}function s(M){return M instanceof Function}function d(M,b){return void 0===b&&(b=1),M.slice(b,M.length)}function q(M,b){return void 0===b&&(b=1),M.slice(0,M.length-b)}function u(M,b){var p=[];if(Array.isArray(M))for(var z=0;z<M.length;z++){var o=M[z];b.call(null,o)&&p.push(o)}return p}function l(M,b){return u(M,(function(M){return!b(M)}))}function f(M,b){for(var p=Object.keys(M),z={},o=0;o<p.length;o++){var e=p[o],n=M[e];b(n)&&(z[e]=n)}return z}function W(M,b){return!!v(M)&&M.hasOwnProperty(b)}function m(M,b){return void 0!==L(M,(function(M){return M===b}))}function h(M){for(var b=[],p=0;p<M.length;p++)b.push(M[p]);return b}function _(M){var b={};for(var p in M)Object.prototype.hasOwnProperty.call(M,p)&&(b[p]=M[p]);return b}function L(M,b){for(var p=0;p<M.length;p++){var z=M[p];if(b.call(null,z))return z}}function R(M,b){for(var p=[],z=0;z<M.length;z++){var o=M[z];b.call(null,o)&&p.push(o)}return p}function X(M,b,p){for(var z=Array.isArray(M),n=z?M:e(M),t=z?[]:o(M),O=p,c=0;c<n.length;c++)O=b.call(null,O,n[c],z?c:t[c]);return O}function B(M){return l(M,(function(M){return null==M}))}function N(M,b){void 0===b&&(b=function(M){return M});var p=[];return X(M,(function(M,z){var o=b(z);return m(p,o)?M:(p.push(o),M.concat(z))}),[])}function y(M){for(var b=[],p=1;p<arguments.length;p++)b[p-1]=arguments[p];var z=[null],o=z.concat(b);return Function.bind.apply(M,o)}function T(M){return Array.isArray(M)}function g(M){return M instanceof RegExp}function v(M){return M instanceof Object}function E(M,b){for(var p=0;p<M.length;p++)if(!b(M[p],p))return!1;return!0}function k(M,b){return l(M,(function(M){return m(b,M)}))}function w(M,b){for(var p=0;p<M.length;p++)if(b(M[p]))return!0;return!1}function Y(M,b){for(var p=0;p<M.length;p++)if(M[p]===b)return p;return-1}function D(M,b){var p=h(M);return p.sort((function(M,p){return b(M)-b(p)})),p}function S(M,b){if(M.length!==b.length)throw Error("can't zipObject with different number of keys and values!");for(var p={},z=0;z<M.length;z++)p[M[z]]=b[z];return p}function C(M){for(var b=[],p=1;p<arguments.length;p++)b[p-1]=arguments[p];for(var z=0;z<b.length;z++)for(var e=b[z],n=o(e),t=0;t<n.length;t++){var O=n[t];M[O]=e[O]}return M}function x(M){for(var b=[],p=1;p<arguments.length;p++)b[p-1]=arguments[p];for(var z=0;z<b.length;z++)for(var e=b[z],n=o(e),t=0;t<n.length;t++){var O=n[t];W(M,O)||(M[O]=e[O])}return M}function P(){for(var M=[],b=0;b<arguments.length;b++)M[b]=arguments[b];return x.apply(null,[{}].concat(M))}function I(M,b){var p={};return a(M,(function(M){var z=b(M),o=p[z];o?o.push(M):p[z]=[M]})),p}function j(M,b){for(var p=_(M),z=o(b),e=0;e<z.length;e++){var n=z[e],t=b[n];p[n]=t}return p}function U(){}function H(M){return M}function F(M){for(var b=[],p=0;p<M.length;p++){var z=M[p];b.push(void 0!==z?z:void 0)}return b}function G(M){console&&console.error&&console.error("Error: "+M)}function V(M){console&&console.warn&&console.warn("Warning: "+M)}function K(){return"function"==typeof Map}function J(M,b){b.forEach((function(b){var p=b.prototype;Object.getOwnPropertyNames(p).forEach((function(z){if("constructor"!==z){var o=Object.getOwnPropertyDescriptor(p,z);o&&(o.get||o.set)?Object.defineProperty(M.prototype,z,o):M.prototype[z]=b.prototype[z]}}))}))}function Q(M){function b(){}b.prototype=M;var p=new b;function z(){return typeof p.bar}return z(),z(),M}function $(M){return M[M.length-1]}function Z(M){var b=(new Date).getTime(),p=M();return{time:(new Date).getTime()-b,value:p}}p.d(b,"A",(function(){return z})),p.d(b,"G",(function(){return o})),p.d(b,"U",(function(){return e})),p.d(b,"J",(function(){return n})),p.d(b,"I",(function(){return t})),p.d(b,"t",(function(){return O})),p.d(b,"s",(function(){return c})),p.d(b,"H",(function(){return r})),p.d(b,"u",(function(){return a})),p.d(b,"E",(function(){return A})),p.d(b,"F",(function(){return i})),p.d(b,"B",(function(){return s})),p.d(b,"m",(function(){return d})),p.d(b,"n",(function(){return q})),p.d(b,"p",(function(){return u})),p.d(b,"P",(function(){return l})),p.d(b,"N",(function(){return f})),p.d(b,"w",(function(){return W})),p.d(b,"j",(function(){return m})),p.d(b,"g",(function(){return h})),p.d(b,"h",(function(){return _})),p.d(b,"q",(function(){return L})),p.d(b,"r",(function(){return R})),p.d(b,"O",(function(){return X})),p.d(b,"i",(function(){return B})),p.d(b,"T",(function(){return N})),p.d(b,"y",(function(){return T})),p.d(b,"D",(function(){return g})),p.d(b,"C",(function(){return v})),p.d(b,"o",(function(){return E})),p.d(b,"l",(function(){return k})),p.d(b,"Q",(function(){return w})),p.d(b,"x",(function(){return Y})),p.d(b,"f",(function(){return C})),p.d(b,"k",(function(){return P})),p.d(b,"v",(function(){return I})),p.d(b,"K",(function(){return j})),p.d(b,"b",(function(){return U})),p.d(b,"a",(function(){return H})),p.d(b,"L",(function(){return F})),p.d(b,"c",(function(){return G})),p.d(b,"d",(function(){return V})),p.d(b,"z",(function(){return K})),p.d(b,"e",(function(){return J})),p.d(b,"S",(function(){return Q})),p.d(b,"M",(function(){return $})),p.d(b,"R",(function(){return Z}))},function(M,b,p){(function(M){M.exports=function(){"use strict";var b,z;function o(){return b.apply(null,arguments)}function e(M){return M instanceof Array||"[object Array]"===Object.prototype.toString.call(M)}function n(M){return null!=M&&"[object Object]"===Object.prototype.toString.call(M)}function t(M,b){return Object.prototype.hasOwnProperty.call(M,b)}function O(M){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(M).length;var b;for(b in M)if(t(M,b))return!1;return!0}function c(M){return void 0===M}function r(M){return"number"==typeof M||"[object Number]"===Object.prototype.toString.call(M)}function a(M){return M instanceof Date||"[object Date]"===Object.prototype.toString.call(M)}function A(M,b){var p,z=[],o=M.length;for(p=0;p<o;++p)z.push(b(M[p],p));return z}function i(M,b){for(var p in b)t(b,p)&&(M[p]=b[p]);return t(b,"toString")&&(M.toString=b.toString),t(b,"valueOf")&&(M.valueOf=b.valueOf),M}function s(M,b,p,z){return Rb(M,b,p,z,!0).utc()}function d(M){return null==M._pf&&(M._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}),M._pf}function q(M){if(null==M._isValid){var b=d(M),p=z.call(b.parsedDateParts,(function(M){return null!=M})),o=!isNaN(M._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidEra&&!b.invalidMonth&&!b.invalidWeekday&&!b.weekdayMismatch&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&p);if(M._strict&&(o=o&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour),null!=Object.isFrozen&&Object.isFrozen(M))return o;M._isValid=o}return M._isValid}function u(M){var b=s(NaN);return null!=M?i(d(b),M):d(b).userInvalidated=!0,b}z=Array.prototype.some?Array.prototype.some:function(M){var b,p=Object(this),z=p.length>>>0;for(b=0;b<z;b++)if(b in p&&M.call(this,p[b],b,p))return!0;return!1};var l=o.momentProperties=[],f=!1;function W(M,b){var p,z,o,e=l.length;if(c(b._isAMomentObject)||(M._isAMomentObject=b._isAMomentObject),c(b._i)||(M._i=b._i),c(b._f)||(M._f=b._f),c(b._l)||(M._l=b._l),c(b._strict)||(M._strict=b._strict),c(b._tzm)||(M._tzm=b._tzm),c(b._isUTC)||(M._isUTC=b._isUTC),c(b._offset)||(M._offset=b._offset),c(b._pf)||(M._pf=d(b)),c(b._locale)||(M._locale=b._locale),e>0)for(p=0;p<e;p++)c(o=b[z=l[p]])||(M[z]=o);return M}function m(M){W(this,M),this._d=new Date(null!=M._d?M._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===f&&(f=!0,o.updateOffset(this),f=!1)}function h(M){return M instanceof m||null!=M&&null!=M._isAMomentObject}function _(M){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+M)}function L(M,b){var p=!0;return i((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,M),p){var z,e,n,O=[],c=arguments.length;for(e=0;e<c;e++){if(z="","object"==typeof arguments[e]){for(n in z+="\n["+e+"] ",arguments[0])t(arguments[0],n)&&(z+=n+": "+arguments[0][n]+", ");z=z.slice(0,-2)}else z=arguments[e];O.push(z)}_(M+"\nArguments: "+Array.prototype.slice.call(O).join("")+"\n"+(new Error).stack),p=!1}return b.apply(this,arguments)}),b)}var R,X={};function B(M,b){null!=o.deprecationHandler&&o.deprecationHandler(M,b),X[M]||(_(b),X[M]=!0)}function N(M){return"undefined"!=typeof Function&&M instanceof Function||"[object Function]"===Object.prototype.toString.call(M)}function y(M,b){var p,z=i({},M);for(p in b)t(b,p)&&(n(M[p])&&n(b[p])?(z[p]={},i(z[p],M[p]),i(z[p],b[p])):null!=b[p]?z[p]=b[p]:delete z[p]);for(p in M)t(M,p)&&!t(b,p)&&n(M[p])&&(z[p]=i({},z[p]));return z}function T(M){null!=M&&this.set(M)}function g(M,b,p){var z=""+Math.abs(M),o=b-z.length;return(M>=0?p?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+z}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,R=Object.keys?Object.keys:function(M){var b,p=[];for(b in M)t(M,b)&&p.push(b);return p};var v=/(\[[^\[]*\])|(\\)?([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,k={},w={};function Y(M,b,p,z){var o=z;"string"==typeof z&&(o=function(){return this[z]()}),M&&(w[M]=o),b&&(w[b[0]]=function(){return g(o.apply(this,arguments),b[1],b[2])}),p&&(w[p]=function(){return this.localeData().ordinal(o.apply(this,arguments),M)})}function D(M,b){return M.isValid()?(b=S(b,M.localeData()),k[b]=k[b]||function(M){var b,p,z,o=M.match(v);for(b=0,p=o.length;b<p;b++)w[o[b]]?o[b]=w[o[b]]:o[b]=(z=o[b]).match(/\[[\s\S]/)?z.replace(/^\[|\]$/g,""):z.replace(/\\/g,"");return function(b){var z,e="";for(z=0;z<p;z++)e+=N(o[z])?o[z].call(b,M):o[z];return e}}(b),k[b](M)):M.localeData().invalidDate()}function S(M,b){var p=5;function z(M){return b.longDateFormat(M)||M}for(E.lastIndex=0;p>=0&&E.test(M);)M=M.replace(E,z),E.lastIndex=0,p-=1;return M}var C={};function x(M,b){var p=M.toLowerCase();C[p]=C[p+"s"]=C[b]=M}function P(M){return"string"==typeof M?C[M]||C[M.toLowerCase()]:void 0}function I(M){var b,p,z={};for(p in M)t(M,p)&&(b=P(p))&&(z[b]=M[p]);return z}var j={};function U(M,b){j[M]=b}function H(M){return M%4==0&&M%100!=0||M%400==0}function F(M){return M<0?Math.ceil(M)||0:Math.floor(M)}function G(M){var b=+M,p=0;return 0!==b&&isFinite(b)&&(p=F(b)),p}function V(M,b){return function(p){return null!=p?(J(this,M,p),o.updateOffset(this,b),this):K(this,M)}}function K(M,b){return M.isValid()?M._d["get"+(M._isUTC?"UTC":"")+b]():NaN}function J(M,b,p){M.isValid()&&!isNaN(p)&&("FullYear"===b&&H(M.year())&&1===M.month()&&29===M.date()?(p=G(p),M._d["set"+(M._isUTC?"UTC":"")+b](p,M.month(),hM(p,M.month()))):M._d["set"+(M._isUTC?"UTC":"")+b](p))}var Q,$=/\d/,Z=/\d\d/,MM=/\d{3}/,bM=/\d{4}/,pM=/[+-]?\d{6}/,zM=/\d\d?/,oM=/\d\d\d\d?/,eM=/\d\d\d\d\d\d?/,nM=/\d{1,3}/,tM=/\d{1,4}/,OM=/[+-]?\d{1,6}/,cM=/\d+/,rM=/[+-]?\d+/,aM=/Z|[+-]\d\d:?\d\d/gi,AM=/Z|[+-]\d\d(?::?\d\d)?/gi,iM=/[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 sM(M,b,p){Q[M]=N(b)?b:function(M,z){return M&&p?p:b}}function dM(M,b){return t(Q,M)?Q[M](b._strict,b._locale):new RegExp(qM(M.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(M,b,p,z,o){return b||p||z||o}))))}function qM(M){return M.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Q={};var uM,lM={};function fM(M,b){var p,z,o=b;for("string"==typeof M&&(M=[M]),r(b)&&(o=function(M,p){p[b]=G(M)}),z=M.length,p=0;p<z;p++)lM[M[p]]=o}function WM(M,b){fM(M,(function(M,p,z,o){z._w=z._w||{},b(M,z._w,z,o)}))}function mM(M,b,p){null!=b&&t(lM,M)&&lM[M](b,p._a,p,M)}function hM(M,b){if(isNaN(M)||isNaN(b))return NaN;var p,z=(b%(p=12)+p)%p;return M+=(b-z)/12,1===z?H(M)?29:28:31-z%7%2}uM=Array.prototype.indexOf?Array.prototype.indexOf:function(M){var b;for(b=0;b<this.length;++b)if(this[b]===M)return b;return-1},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(M){return this.localeData().monthsShort(this,M)})),Y("MMMM",0,0,(function(M){return this.localeData().months(this,M)})),x("month","M"),U("month",8),sM("M",zM),sM("MM",zM,Z),sM("MMM",(function(M,b){return b.monthsShortRegex(M)})),sM("MMMM",(function(M,b){return b.monthsRegex(M)})),fM(["M","MM"],(function(M,b){b[1]=G(M)-1})),fM(["MMM","MMMM"],(function(M,b,p,z){var o=p._locale.monthsParse(M,z,p._strict);null!=o?b[1]=o:d(p).invalidMonth=M}));var _M="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),LM="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),RM=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,XM=iM,BM=iM;function NM(M,b,p){var z,o,e,n=M.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],z=0;z<12;++z)e=s([2e3,z]),this._shortMonthsParse[z]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[z]=this.months(e,"").toLocaleLowerCase();return p?"MMM"===b?-1!==(o=uM.call(this._shortMonthsParse,n))?o:null:-1!==(o=uM.call(this._longMonthsParse,n))?o:null:"MMM"===b?-1!==(o=uM.call(this._shortMonthsParse,n))||-1!==(o=uM.call(this._longMonthsParse,n))?o:null:-1!==(o=uM.call(this._longMonthsParse,n))||-1!==(o=uM.call(this._shortMonthsParse,n))?o:null}function yM(M,b){var p;if(!M.isValid())return M;if("string"==typeof b)if(/^\d+$/.test(b))b=G(b);else if(!r(b=M.localeData().monthsParse(b)))return M;return p=Math.min(M.date(),hM(M.year(),b)),M._d["set"+(M._isUTC?"UTC":"")+"Month"](b,p),M}function TM(M){return null!=M?(yM(this,M),o.updateOffset(this,!0),this):K(this,"Month")}function gM(){function M(M,b){return b.length-M.length}var b,p,z=[],o=[],e=[];for(b=0;b<12;b++)p=s([2e3,b]),z.push(this.monthsShort(p,"")),o.push(this.months(p,"")),e.push(this.months(p,"")),e.push(this.monthsShort(p,""));for(z.sort(M),o.sort(M),e.sort(M),b=0;b<12;b++)z[b]=qM(z[b]),o[b]=qM(o[b]);for(b=0;b<24;b++)e[b]=qM(e[b]);this._monthsRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+z.join("|")+")","i")}function vM(M){return H(M)?366:365}Y("Y",0,0,(function(){var M=this.year();return M<=9999?g(M,4):"+"+M})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),x("year","y"),U("year",1),sM("Y",rM),sM("YY",zM,Z),sM("YYYY",tM,bM),sM("YYYYY",OM,pM),sM("YYYYYY",OM,pM),fM(["YYYYY","YYYYYY"],0),fM("YYYY",(function(M,b){b[0]=2===M.length?o.parseTwoDigitYear(M):G(M)})),fM("YY",(function(M,b){b[0]=o.parseTwoDigitYear(M)})),fM("Y",(function(M,b){b[0]=parseInt(M,10)})),o.parseTwoDigitYear=function(M){return G(M)+(G(M)>68?1900:2e3)};var EM=V("FullYear",!0);function kM(M,b,p,z,o,e,n){var t;return M<100&&M>=0?(t=new Date(M+400,b,p,z,o,e,n),isFinite(t.getFullYear())&&t.setFullYear(M)):t=new Date(M,b,p,z,o,e,n),t}function wM(M){var b,p;return M<100&&M>=0?((p=Array.prototype.slice.call(arguments))[0]=M+400,b=new Date(Date.UTC.apply(null,p)),isFinite(b.getUTCFullYear())&&b.setUTCFullYear(M)):b=new Date(Date.UTC.apply(null,arguments)),b}function YM(M,b,p){var z=7+b-p;return-(7+wM(M,0,z).getUTCDay()-b)%7+z-1}function DM(M,b,p,z,o){var e,n,t=1+7*(b-1)+(7+p-z)%7+YM(M,z,o);return t<=0?n=vM(e=M-1)+t:t>vM(M)?(e=M+1,n=t-vM(M)):(e=M,n=t),{year:e,dayOfYear:n}}function SM(M,b,p){var z,o,e=YM(M.year(),b,p),n=Math.floor((M.dayOfYear()-e-1)/7)+1;return n<1?z=n+CM(o=M.year()-1,b,p):n>CM(M.year(),b,p)?(z=n-CM(M.year(),b,p),o=M.year()+1):(o=M.year(),z=n),{week:z,year:o}}function CM(M,b,p){var z=YM(M,b,p),o=YM(M+1,b,p);return(vM(M)-z+o)/7}function xM(M,b){return M.slice(b,7).concat(M.slice(0,b))}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),x("week","w"),x("isoWeek","W"),U("week",5),U("isoWeek",5),sM("w",zM),sM("ww",zM,Z),sM("W",zM),sM("WW",zM,Z),WM(["w","ww","W","WW"],(function(M,b,p,z){b[z.substr(0,1)]=G(M)})),Y("d",0,"do","day"),Y("dd",0,0,(function(M){return this.localeData().weekdaysMin(this,M)})),Y("ddd",0,0,(function(M){return this.localeData().weekdaysShort(this,M)})),Y("dddd",0,0,(function(M){return this.localeData().weekdays(this,M)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),x("day","d"),x("weekday","e"),x("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),sM("d",zM),sM("e",zM),sM("E",zM),sM("dd",(function(M,b){return b.weekdaysMinRegex(M)})),sM("ddd",(function(M,b){return b.weekdaysShortRegex(M)})),sM("dddd",(function(M,b){return b.weekdaysRegex(M)})),WM(["dd","ddd","dddd"],(function(M,b,p,z){var o=p._locale.weekdaysParse(M,z,p._strict);null!=o?b.d=o:d(p).invalidWeekday=M})),WM(["d","e","E"],(function(M,b,p,z){b[z]=G(M)}));var PM="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),IM="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jM="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),UM=iM,HM=iM,FM=iM;function GM(M,b,p){var z,o,e,n=M.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],z=0;z<7;++z)e=s([2e3,1]).day(z),this._minWeekdaysParse[z]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[z]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[z]=this.weekdays(e,"").toLocaleLowerCase();return p?"dddd"===b?-1!==(o=uM.call(this._weekdaysParse,n))?o:null:"ddd"===b?-1!==(o=uM.call(this._shortWeekdaysParse,n))?o:null:-1!==(o=uM.call(this._minWeekdaysParse,n))?o:null:"dddd"===b?-1!==(o=uM.call(this._weekdaysParse,n))||-1!==(o=uM.call(this._shortWeekdaysParse,n))||-1!==(o=uM.call(this._minWeekdaysParse,n))?o:null:"ddd"===b?-1!==(o=uM.call(this._shortWeekdaysParse,n))||-1!==(o=uM.call(this._weekdaysParse,n))||-1!==(o=uM.call(this._minWeekdaysParse,n))?o:null:-1!==(o=uM.call(this._minWeekdaysParse,n))||-1!==(o=uM.call(this._weekdaysParse,n))||-1!==(o=uM.call(this._shortWeekdaysParse,n))?o:null}function VM(){function M(M,b){return b.length-M.length}var b,p,z,o,e,n=[],t=[],O=[],c=[];for(b=0;b<7;b++)p=s([2e3,1]).day(b),z=qM(this.weekdaysMin(p,"")),o=qM(this.weekdaysShort(p,"")),e=qM(this.weekdays(p,"")),n.push(z),t.push(o),O.push(e),c.push(z),c.push(o),c.push(e);n.sort(M),t.sort(M),O.sort(M),c.sort(M),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+O.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function KM(){return this.hours()%12||12}function JM(M,b){Y(M,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)}))}function QM(M,b){return b._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,KM),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+KM.apply(this)+g(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+KM.apply(this)+g(this.minutes(),2)+g(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+g(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+g(this.minutes(),2)+g(this.seconds(),2)})),JM("a",!0),JM("A",!1),x("hour","h"),U("hour",13),sM("a",QM),sM("A",QM),sM("H",zM),sM("h",zM),sM("k",zM),sM("HH",zM,Z),sM("hh",zM,Z),sM("kk",zM,Z),sM("hmm",oM),sM("hmmss",eM),sM("Hmm",oM),sM("Hmmss",eM),fM(["H","HH"],3),fM(["k","kk"],(function(M,b,p){var z=G(M);b[3]=24===z?0:z})),fM(["a","A"],(function(M,b,p){p._isPm=p._locale.isPM(M),p._meridiem=M})),fM(["h","hh"],(function(M,b,p){b[3]=G(M),d(p).bigHour=!0})),fM("hmm",(function(M,b,p){var z=M.length-2;b[3]=G(M.substr(0,z)),b[4]=G(M.substr(z)),d(p).bigHour=!0})),fM("hmmss",(function(M,b,p){var z=M.length-4,o=M.length-2;b[3]=G(M.substr(0,z)),b[4]=G(M.substr(z,2)),b[5]=G(M.substr(o)),d(p).bigHour=!0})),fM("Hmm",(function(M,b,p){var z=M.length-2;b[3]=G(M.substr(0,z)),b[4]=G(M.substr(z))})),fM("Hmmss",(function(M,b,p){var z=M.length-4,o=M.length-2;b[3]=G(M.substr(0,z)),b[4]=G(M.substr(z,2)),b[5]=G(M.substr(o))}));var $M,ZM=V("Hours",!0),Mb={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:_M,monthsShort:LM,week:{dow:0,doy:6},weekdays:PM,weekdaysMin:jM,weekdaysShort:IM,meridiemParse:/[ap]\.?m?\.?/i},bb={},pb={};function zb(M,b){var p,z=Math.min(M.length,b.length);for(p=0;p<z;p+=1)if(M[p]!==b[p])return p;return z}function ob(M){return M?M.toLowerCase().replace("_","-"):M}function eb(b){var z=null;if(void 0===bb[b]&&void 0!==M&&M&&M.exports&&function(M){return null!=M.match("^[^/\\\\]*$")}(b))try{z=$M._abbr,p(158)("./"+b),nb(z)}catch(M){bb[b]=null}return bb[b]}function nb(M,b){var p;return M&&((p=c(b)?Ob(M):tb(M,b))?$M=p:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+M+" not found. Did you forget to load it?")),$M._abbr}function tb(M,b){if(null!==b){var p,z=Mb;if(b.abbr=M,null!=bb[M])B("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."),z=bb[M]._config;else if(null!=b.parentLocale)if(null!=bb[b.parentLocale])z=bb[b.parentLocale]._config;else{if(null==(p=eb(b.parentLocale)))return pb[b.parentLocale]||(pb[b.parentLocale]=[]),pb[b.parentLocale].push({name:M,config:b}),null;z=p._config}return bb[M]=new T(y(z,b)),pb[M]&&pb[M].forEach((function(M){tb(M.name,M.config)})),nb(M),bb[M]}return delete bb[M],null}function Ob(M){var b;if(M&&M._locale&&M._locale._abbr&&(M=M._locale._abbr),!M)return $M;if(!e(M)){if(b=eb(M))return b;M=[M]}return function(M){for(var b,p,z,o,e=0;e<M.length;){for(b=(o=ob(M[e]).split("-")).length,p=(p=ob(M[e+1]))?p.split("-"):null;b>0;){if(z=eb(o.slice(0,b).join("-")))return z;if(p&&p.length>=b&&zb(o,p)>=b-1)break;b--}e++}return $M}(M)}function cb(M){var b,p=M._a;return p&&-2===d(M).overflow&&(b=p[1]<0||p[1]>11?1:p[2]<1||p[2]>hM(p[0],p[1])?2:p[3]<0||p[3]>24||24===p[3]&&(0!==p[4]||0!==p[5]||0!==p[6])?3:p[4]<0||p[4]>59?4:p[5]<0||p[5]>59?5:p[6]<0||p[6]>999?6:-1,d(M)._overflowDayOfYear&&(b<0||b>2)&&(b=2),d(M)._overflowWeeks&&-1===b&&(b=7),d(M)._overflowWeekday&&-1===b&&(b=8),d(M).overflow=b),M}var rb=/^\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)?)?$/,ab=/^\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)?)?$/,Ab=/Z|[+-]\d\d(?::?\d\d)?/,ib=[["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]],sb=[["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/]],db=/^\/?Date\((-?\d+)/i,qb=/^(?:(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}))$/,ub={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function lb(M){var b,p,z,o,e,n,t=M._i,O=rb.exec(t)||ab.exec(t),c=ib.length,r=sb.length;if(O){for(d(M).iso=!0,b=0,p=c;b<p;b++)if(ib[b][1].exec(O[1])){o=ib[b][0],z=!1!==ib[b][2];break}if(null==o)return void(M._isValid=!1);if(O[3]){for(b=0,p=r;b<p;b++)if(sb[b][1].exec(O[3])){e=(O[2]||" ")+sb[b][0];break}if(null==e)return void(M._isValid=!1)}if(!z&&null!=e)return void(M._isValid=!1);if(O[4]){if(!Ab.exec(O[4]))return void(M._isValid=!1);n="Z"}M._f=o+(e||"")+(n||""),_b(M)}else M._isValid=!1}function fb(M){var b=parseInt(M,10);return b<=49?2e3+b:b<=999?1900+b:b}function Wb(M){var b,p,z,o,e,n,t,O,c=qb.exec(M._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(p=c[4],z=c[3],o=c[2],e=c[5],n=c[6],t=c[7],O=[fb(p),LM.indexOf(z),parseInt(o,10),parseInt(e,10),parseInt(n,10)],t&&O.push(parseInt(t,10)),b=O,!function(M,b,p){return!M||IM.indexOf(M)===new Date(b[0],b[1],b[2]).getDay()||(d(p).weekdayMismatch=!0,p._isValid=!1,!1)}(c[1],b,M))return;M._a=b,M._tzm=function(M,b,p){if(M)return ub[M];if(b)return 0;var z=parseInt(p,10),o=z%100;return(z-o)/100*60+o}(c[8],c[9],c[10]),M._d=wM.apply(null,M._a),M._d.setUTCMinutes(M._d.getUTCMinutes()-M._tzm),d(M).rfc2822=!0}else M._isValid=!1}function mb(M,b,p){return null!=M?M:null!=b?b:p}function hb(M){var b,p,z,e,n,t=[];if(!M._d){for(z=function(M){var b=new Date(o.now());return M._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}(M),M._w&&null==M._a[2]&&null==M._a[1]&&function(M){var b,p,z,o,e,n,t,O,c;null!=(b=M._w).GG||null!=b.W||null!=b.E?(e=1,n=4,p=mb(b.GG,M._a[0],SM(Xb(),1,4).year),z=mb(b.W,1),((o=mb(b.E,1))<1||o>7)&&(O=!0)):(e=M._locale._week.dow,n=M._locale._week.doy,c=SM(Xb(),e,n),p=mb(b.gg,M._a[0],c.year),z=mb(b.w,c.week),null!=b.d?((o=b.d)<0||o>6)&&(O=!0):null!=b.e?(o=b.e+e,(b.e<0||b.e>6)&&(O=!0)):o=e),z<1||z>CM(p,e,n)?d(M)._overflowWeeks=!0:null!=O?d(M)._overflowWeekday=!0:(t=DM(p,z,o,e,n),M._a[0]=t.year,M._dayOfYear=t.dayOfYear)}(M),null!=M._dayOfYear&&(n=mb(M._a[0],z[0]),(M._dayOfYear>vM(n)||0===M._dayOfYear)&&(d(M)._overflowDayOfYear=!0),p=wM(n,0,M._dayOfYear),M._a[1]=p.getUTCMonth(),M._a[2]=p.getUTCDate()),b=0;b<3&&null==M._a[b];++b)M._a[b]=t[b]=z[b];for(;b<7;b++)M._a[b]=t[b]=null==M._a[b]?2===b?1:0:M._a[b];24===M._a[3]&&0===M._a[4]&&0===M._a[5]&&0===M._a[6]&&(M._nextDay=!0,M._a[3]=0),M._d=(M._useUTC?wM:kM).apply(null,t),e=M._useUTC?M._d.getUTCDay():M._d.getDay(),null!=M._tzm&&M._d.setUTCMinutes(M._d.getUTCMinutes()-M._tzm),M._nextDay&&(M._a[3]=24),M._w&&void 0!==M._w.d&&M._w.d!==e&&(d(M).weekdayMismatch=!0)}}function _b(M){if(M._f!==o.ISO_8601)if(M._f!==o.RFC_2822){M._a=[],d(M).empty=!0;var b,p,z,e,n,t,O,c=""+M._i,r=c.length,a=0;for(O=(z=S(M._f,M._locale).match(v)||[]).length,b=0;b<O;b++)e=z[b],(p=(c.match(dM(e,M))||[])[0])&&((n=c.substr(0,c.indexOf(p))).length>0&&d(M).unusedInput.push(n),c=c.slice(c.indexOf(p)+p.length),a+=p.length),w[e]?(p?d(M).empty=!1:d(M).unusedTokens.push(e),mM(e,p,M)):M._strict&&!p&&d(M).unusedTokens.push(e);d(M).charsLeftOver=r-a,c.length>0&&d(M).unusedInput.push(c),M._a[3]<=12&&!0===d(M).bigHour&&M._a[3]>0&&(d(M).bigHour=void 0),d(M).parsedDateParts=M._a.slice(0),d(M).meridiem=M._meridiem,M._a[3]=function(M,b,p){var z;return null==p?b:null!=M.meridiemHour?M.meridiemHour(b,p):null!=M.isPM?((z=M.isPM(p))&&b<12&&(b+=12),z||12!==b||(b=0),b):b}(M._locale,M._a[3],M._meridiem),null!==(t=d(M).era)&&(M._a[0]=M._locale.erasConvertYear(t,M._a[0])),hb(M),cb(M)}else Wb(M);else lb(M)}function Lb(M){var b=M._i,p=M._f;return M._locale=M._locale||Ob(M._l),null===b||void 0===p&&""===b?u({nullInput:!0}):("string"==typeof b&&(M._i=b=M._locale.preparse(b)),h(b)?new m(cb(b)):(a(b)?M._d=b:e(p)?function(M){var b,p,z,o,e,n,t=!1,O=M._f.length;if(0===O)return d(M).invalidFormat=!0,void(M._d=new Date(NaN));for(o=0;o<O;o++)e=0,n=!1,b=W({},M),null!=M._useUTC&&(b._useUTC=M._useUTC),b._f=M._f[o],_b(b),q(b)&&(n=!0),e+=d(b).charsLeftOver,e+=10*d(b).unusedTokens.length,d(b).score=e,t?e<z&&(z=e,p=b):(null==z||e<z||n)&&(z=e,p=b,n&&(t=!0));i(M,p||b)}(M):p?_b(M):function(M){var b=M._i;c(b)?M._d=new Date(o.now()):a(b)?M._d=new Date(b.valueOf()):"string"==typeof b?function(M){var b=db.exec(M._i);null===b?(lb(M),!1===M._isValid&&(delete M._isValid,Wb(M),!1===M._isValid&&(delete M._isValid,M._strict?M._isValid=!1:o.createFromInputFallback(M)))):M._d=new Date(+b[1])}(M):e(b)?(M._a=A(b.slice(0),(function(M){return parseInt(M,10)})),hb(M)):n(b)?function(M){if(!M._d){var b=I(M._i),p=void 0===b.day?b.date:b.day;M._a=A([b.year,b.month,p,b.hour,b.minute,b.second,b.millisecond],(function(M){return M&&parseInt(M,10)})),hb(M)}}(M):r(b)?M._d=new Date(b):o.createFromInputFallback(M)}(M),q(M)||(M._d=null),M))}function Rb(M,b,p,z,o){var t,c={};return!0!==b&&!1!==b||(z=b,b=void 0),!0!==p&&!1!==p||(z=p,p=void 0),(n(M)&&O(M)||e(M)&&0===M.length)&&(M=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=p,c._i=M,c._f=b,c._strict=z,(t=new m(cb(Lb(c))))._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xb(M,b,p,z){return Rb(M,b,p,z,!1)}o.createFromInputFallback=L("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(M){M._d=new Date(M._i+(M._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Bb=L("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var M=Xb.apply(null,arguments);return this.isValid()&&M.isValid()?M<this?this:M:u()})),Nb=L("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var M=Xb.apply(null,arguments);return this.isValid()&&M.isValid()?M>this?this:M:u()}));function yb(M,b){var p,z;if(1===b.length&&e(b[0])&&(b=b[0]),!b.length)return Xb();for(p=b[0],z=1;z<b.length;++z)b[z].isValid()&&!b[z][M](p)||(p=b[z]);return p}var Tb=["year","quarter","month","week","day","hour","minute","second","millisecond"];function gb(M){var b=I(M),p=b.year||0,z=b.quarter||0,o=b.month||0,e=b.week||b.isoWeek||0,n=b.day||0,O=b.hour||0,c=b.minute||0,r=b.second||0,a=b.millisecond||0;this._isValid=function(M){var b,p,z=!1,o=Tb.length;for(b in M)if(t(M,b)&&(-1===uM.call(Tb,b)||null!=M[b]&&isNaN(M[b])))return!1;for(p=0;p<o;++p)if(M[Tb[p]]){if(z)return!1;parseFloat(M[Tb[p]])!==G(M[Tb[p]])&&(z=!0)}return!0}(b),this._milliseconds=+a+1e3*r+6e4*c+1e3*O*60*60,this._days=+n+7*e,this._months=+o+3*z+12*p,this._data={},this._locale=Ob(),this._bubble()}function vb(M){return M instanceof gb}function Eb(M){return M<0?-1*Math.round(-1*M):Math.round(M)}function kb(M,b){Y(M,0,0,(function(){var M=this.utcOffset(),p="+";return M<0&&(M=-M,p="-"),p+g(~~(M/60),2)+b+g(~~M%60,2)}))}kb("Z",":"),kb("ZZ",""),sM("Z",AM),sM("ZZ",AM),fM(["Z","ZZ"],(function(M,b,p){p._useUTC=!0,p._tzm=Yb(AM,M)}));var wb=/([\+\-]|\d\d)/gi;function Yb(M,b){var p,z,o=(b||"").match(M);return null===o?null:0===(z=60*(p=((o[o.length-1]||[])+"").match(wb)||["-",0,0])[1]+G(p[2]))?0:"+"===p[0]?z:-z}function Db(M,b){var p,z;return b._isUTC?(p=b.clone(),z=(h(M)||a(M)?M.valueOf():Xb(M).valueOf())-p.valueOf(),p._d.setTime(p._d.valueOf()+z),o.updateOffset(p,!1),p):Xb(M).local()}function Sb(M){return-Math.round(M._d.getTimezoneOffset())}function Cb(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var xb=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pb=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ib(M,b){var p,z,o,e,n,O,c=M,a=null;return vb(M)?c={ms:M._milliseconds,d:M._days,M:M._months}:r(M)||!isNaN(+M)?(c={},b?c[b]=+M:c.milliseconds=+M):(a=xb.exec(M))?(p="-"===a[1]?-1:1,c={y:0,d:G(a[2])*p,h:G(a[3])*p,m:G(a[4])*p,s:G(a[5])*p,ms:G(Eb(1e3*a[6]))*p}):(a=Pb.exec(M))?(p="-"===a[1]?-1:1,c={y:jb(a[2],p),M:jb(a[3],p),w:jb(a[4],p),d:jb(a[5],p),h:jb(a[6],p),m:jb(a[7],p),s:jb(a[8],p)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(e=Xb(c.from),n=Xb(c.to),o=e.isValid()&&n.isValid()?(n=Db(n,e),e.isBefore(n)?O=Ub(e,n):((O=Ub(n,e)).milliseconds=-O.milliseconds,O.months=-O.months),O):{milliseconds:0,months:0},(c={}).ms=o.milliseconds,c.M=o.months),z=new gb(c),vb(M)&&t(M,"_locale")&&(z._locale=M._locale),vb(M)&&t(M,"_isValid")&&(z._isValid=M._isValid),z}function jb(M,b){var p=M&&parseFloat(M.replace(",","."));return(isNaN(p)?0:p)*b}function Ub(M,b){var p={};return p.months=b.month()-M.month()+12*(b.year()-M.year()),M.clone().add(p.months,"M").isAfter(b)&&--p.months,p.milliseconds=+b-+M.clone().add(p.months,"M"),p}function Hb(M,b){return function(p,z){var o;return null===z||isNaN(+z)||(B(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=p,p=z,z=o),Fb(this,Ib(p,z),M),this}}function Fb(M,b,p,z){var e=b._milliseconds,n=Eb(b._days),t=Eb(b._months);M.isValid()&&(z=null==z||z,t&&yM(M,K(M,"Month")+t*p),n&&J(M,"Date",K(M,"Date")+n*p),e&&M._d.setTime(M._d.valueOf()+e*p),z&&o.updateOffset(M,n||t))}Ib.fn=gb.prototype,Ib.invalid=function(){return Ib(NaN)};var Gb=Hb(1,"add"),Vb=Hb(-1,"subtract");function Kb(M){return"string"==typeof M||M instanceof String}function Jb(M){return h(M)||a(M)||Kb(M)||r(M)||function(M){var b=e(M),p=!1;return b&&(p=0===M.filter((function(b){return!r(b)&&Kb(M)})).length),b&&p}(M)||function(M){var b,p,z=n(M)&&!O(M),o=!1,e=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=e.length;for(b=0;b<c;b+=1)p=e[b],o=o||t(M,p);return z&&o}(M)||null==M}function Qb(M){var b,p=n(M)&&!O(M),z=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(b=0;b<o.length;b+=1)z=z||t(M,o[b]);return p&&z}function $b(M,b){if(M.date()<b.date())return-$b(b,M);var p=12*(b.year()-M.year())+(b.month()-M.month()),z=M.clone().add(p,"months");return-(p+(b-z<0?(b-z)/(z-M.clone().add(p-1,"months")):(b-z)/(M.clone().add(p+1,"months")-z)))||0}function Zb(M){var b;return void 0===M?this._locale._abbr:(null!=(b=Ob(M))&&(this._locale=b),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Mp=L("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(M){return void 0===M?this.localeData():this.locale(M)}));function bp(){return this._locale}function pp(M,b){return(M%b+b)%b}function zp(M,b,p){return M<100&&M>=0?new Date(M+400,b,p)-126227808e5:new Date(M,b,p).valueOf()}function op(M,b,p){return M<100&&M>=0?Date.UTC(M+400,b,p)-126227808e5:Date.UTC(M,b,p)}function ep(M,b){return b.erasAbbrRegex(M)}function np(){var M,b,p=[],z=[],o=[],e=[],n=this.eras();for(M=0,b=n.length;M<b;++M)z.push(qM(n[M].name)),p.push(qM(n[M].abbr)),o.push(qM(n[M].narrow)),e.push(qM(n[M].name)),e.push(qM(n[M].abbr)),e.push(qM(n[M].narrow));this._erasRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+z.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+p.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function tp(M,b){Y(0,[M,M.length],0,b)}function Op(M,b,p,z,o){var e;return null==M?SM(this,z,o).year:(b>(e=CM(M,z,o))&&(b=e),cp.call(this,M,b,p,z,o))}function cp(M,b,p,z,o){var e=DM(M,b,p,z,o),n=wM(e.year,0,e.dayOfYear);return this.year(n.getUTCFullYear()),this.month(n.getUTCMonth()),this.date(n.getUTCDate()),this}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),sM("N",ep),sM("NN",ep),sM("NNN",ep),sM("NNNN",(function(M,b){return b.erasNameRegex(M)})),sM("NNNNN",(function(M,b){return b.erasNarrowRegex(M)})),fM(["N","NN","NNN","NNNN","NNNNN"],(function(M,b,p,z){var o=p._locale.erasParse(M,z,p._strict);o?d(p).era=o:d(p).invalidEra=M})),sM("y",cM),sM("yy",cM),sM("yyy",cM),sM("yyyy",cM),sM("yo",(function(M,b){return b._eraYearOrdinalRegex||cM})),fM(["y","yy","yyy","yyyy"],0),fM(["yo"],(function(M,b,p,z){var o;p._locale._eraYearOrdinalRegex&&(o=M.match(p._locale._eraYearOrdinalRegex)),p._locale.eraYearOrdinalParse?b[0]=p._locale.eraYearOrdinalParse(M,o):b[0]=parseInt(M,10)})),Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tp("gggg","weekYear"),tp("ggggg","weekYear"),tp("GGGG","isoWeekYear"),tp("GGGGG","isoWeekYear"),x("weekYear","gg"),x("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),sM("G",rM),sM("g",rM),sM("GG",zM,Z),sM("gg",zM,Z),sM("GGGG",tM,bM),sM("gggg",tM,bM),sM("GGGGG",OM,pM),sM("ggggg",OM,pM),WM(["gggg","ggggg","GGGG","GGGGG"],(function(M,b,p,z){b[z.substr(0,2)]=G(M)})),WM(["gg","GG"],(function(M,b,p,z){b[z]=o.parseTwoDigitYear(M)})),Y("Q",0,"Qo","quarter"),x("quarter","Q"),U("quarter",7),sM("Q",$),fM("Q",(function(M,b){b[1]=3*(G(M)-1)})),Y("D",["DD",2],"Do","date"),x("date","D"),U("date",9),sM("D",zM),sM("DD",zM,Z),sM("Do",(function(M,b){return M?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient})),fM(["D","DD"],2),fM("Do",(function(M,b){b[2]=G(M.match(zM)[0])}));var rp=V("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),x("dayOfYear","DDD"),U("dayOfYear",4),sM("DDD",nM),sM("DDDD",MM),fM(["DDD","DDDD"],(function(M,b,p){p._dayOfYear=G(M)})),Y("m",["mm",2],0,"minute"),x("minute","m"),U("minute",14),sM("m",zM),sM("mm",zM,Z),fM(["m","mm"],4);var ap=V("Minutes",!1);Y("s",["ss",2],0,"second"),x("second","s"),U("second",15),sM("s",zM),sM("ss",zM,Z),fM(["s","ss"],5);var Ap,ip,sp=V("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),x("millisecond","ms"),U("millisecond",16),sM("S",nM,$),sM("SS",nM,Z),sM("SSS",nM,MM),Ap="SSSS";Ap.length<=9;Ap+="S")sM(Ap,cM);function dp(M,b){b[6]=G(1e3*("0."+M))}for(Ap="S";Ap.length<=9;Ap+="S")fM(Ap,dp);ip=V("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var qp=m.prototype;function up(M){return M}qp.add=Gb,qp.calendar=function(M,b){1===arguments.length&&(arguments[0]?Jb(arguments[0])?(M=arguments[0],b=void 0):Qb(arguments[0])&&(b=arguments[0],M=void 0):(M=void 0,b=void 0));var p=M||Xb(),z=Db(p,this).startOf("day"),e=o.calendarFormat(this,z)||"sameElse",n=b&&(N(b[e])?b[e].call(this,p):b[e]);return this.format(n||this.localeData().calendar(e,this,Xb(p)))},qp.clone=function(){return new m(this)},qp.diff=function(M,b,p){var z,o,e;if(!this.isValid())return NaN;if(!(z=Db(M,this)).isValid())return NaN;switch(o=6e4*(z.utcOffset()-this.utcOffset()),b=P(b)){case"year":e=$b(this,z)/12;break;case"month":e=$b(this,z);break;case"quarter":e=$b(this,z)/3;break;case"second":e=(this-z)/1e3;break;case"minute":e=(this-z)/6e4;break;case"hour":e=(this-z)/36e5;break;case"day":e=(this-z-o)/864e5;break;case"week":e=(this-z-o)/6048e5;break;default:e=this-z}return p?e:F(e)},qp.endOf=function(M){var b,p;if(void 0===(M=P(M))||"millisecond"===M||!this.isValid())return this;switch(p=this._isUTC?op:zp,M){case"year":b=p(this.year()+1,0,1)-1;break;case"quarter":b=p(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":b=p(this.year(),this.month()+1,1)-1;break;case"week":b=p(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":b=p(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":b=p(this.year(),this.month(),this.date()+1)-1;break;case"hour":b=this._d.valueOf(),b+=36e5-pp(b+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":b=this._d.valueOf(),b+=6e4-pp(b,6e4)-1;break;case"second":b=this._d.valueOf(),b+=1e3-pp(b,1e3)-1}return this._d.setTime(b),o.updateOffset(this,!0),this},qp.format=function(M){M||(M=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var b=D(this,M);return this.localeData().postformat(b)},qp.from=function(M,b){return this.isValid()&&(h(M)&&M.isValid()||Xb(M).isValid())?Ib({to:this,from:M}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()},qp.fromNow=function(M){return this.from(Xb(),M)},qp.to=function(M,b){return this.isValid()&&(h(M)&&M.isValid()||Xb(M).isValid())?Ib({from:this,to:M}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()},qp.toNow=function(M){return this.to(Xb(),M)},qp.get=function(M){return N(this[M=P(M)])?this[M]():this},qp.invalidAt=function(){return d(this).overflow},qp.isAfter=function(M,b){var p=h(M)?M:Xb(M);return!(!this.isValid()||!p.isValid())&&("millisecond"===(b=P(b)||"millisecond")?this.valueOf()>p.valueOf():p.valueOf()<this.clone().startOf(b).valueOf())},qp.isBefore=function(M,b){var p=h(M)?M:Xb(M);return!(!this.isValid()||!p.isValid())&&("millisecond"===(b=P(b)||"millisecond")?this.valueOf()<p.valueOf():this.clone().endOf(b).valueOf()<p.valueOf())},qp.isBetween=function(M,b,p,z){var o=h(M)?M:Xb(M),e=h(b)?b:Xb(b);return!!(this.isValid()&&o.isValid()&&e.isValid())&&(("("===(z=z||"()")[0]?this.isAfter(o,p):!this.isBefore(o,p))&&(")"===z[1]?this.isBefore(e,p):!this.isAfter(e,p)))},qp.isSame=function(M,b){var p,z=h(M)?M:Xb(M);return!(!this.isValid()||!z.isValid())&&("millisecond"===(b=P(b)||"millisecond")?this.valueOf()===z.valueOf():(p=z.valueOf(),this.clone().startOf(b).valueOf()<=p&&p<=this.clone().endOf(b).valueOf()))},qp.isSameOrAfter=function(M,b){return this.isSame(M,b)||this.isAfter(M,b)},qp.isSameOrBefore=function(M,b){return this.isSame(M,b)||this.isBefore(M,b)},qp.isValid=function(){return q(this)},qp.lang=Mp,qp.locale=Zb,qp.localeData=bp,qp.max=Nb,qp.min=Bb,qp.parsingFlags=function(){return i({},d(this))},qp.set=function(M,b){if("object"==typeof M){var p,z=function(M){var b,p=[];for(b in M)t(M,b)&&p.push({unit:b,priority:j[b]});return p.sort((function(M,b){return M.priority-b.priority})),p}(M=I(M)),o=z.length;for(p=0;p<o;p++)this[z[p].unit](M[z[p].unit])}else if(N(this[M=P(M)]))return this[M](b);return this},qp.startOf=function(M){var b,p;if(void 0===(M=P(M))||"millisecond"===M||!this.isValid())return this;switch(p=this._isUTC?op:zp,M){case"year":b=p(this.year(),0,1);break;case"quarter":b=p(this.year(),this.month()-this.month()%3,1);break;case"month":b=p(this.year(),this.month(),1);break;case"week":b=p(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":b=p(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":b=p(this.year(),this.month(),this.date());break;case"hour":b=this._d.valueOf(),b-=pp(b+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":b=this._d.valueOf(),b-=pp(b,6e4);break;case"second":b=this._d.valueOf(),b-=pp(b,1e3)}return this._d.setTime(b),o.updateOffset(this,!0),this},qp.subtract=Vb,qp.toArray=function(){var M=this;return[M.year(),M.month(),M.date(),M.hour(),M.minute(),M.second(),M.millisecond()]},qp.toObject=function(){var M=this;return{years:M.year(),months:M.month(),date:M.date(),hours:M.hours(),minutes:M.minutes(),seconds:M.seconds(),milliseconds:M.milliseconds()}},qp.toDate=function(){return new Date(this.valueOf())},qp.toISOString=function(M){if(!this.isValid())return null;var b=!0!==M,p=b?this.clone().utc():this;return p.year()<0||p.year()>9999?D(p,b?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?b?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",D(p,"Z")):D(p,b?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},qp.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var M,b,p,z="moment",o="";return this.isLocal()||(z=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),M="["+z+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p=o+'[")]',this.format(M+b+"-MM-DD[T]HH:mm:ss.SSS"+p)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(qp[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),qp.toJSON=function(){return this.isValid()?this.toISOString():null},qp.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},qp.unix=function(){return Math.floor(this.valueOf()/1e3)},qp.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},qp.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},qp.eraName=function(){var M,b,p,z=this.localeData().eras();for(M=0,b=z.length;M<b;++M){if(p=this.clone().startOf("day").valueOf(),z[M].since<=p&&p<=z[M].until)return z[M].name;if(z[M].until<=p&&p<=z[M].since)return z[M].name}return""},qp.eraNarrow=function(){var M,b,p,z=this.localeData().eras();for(M=0,b=z.length;M<b;++M){if(p=this.clone().startOf("day").valueOf(),z[M].since<=p&&p<=z[M].until)return z[M].narrow;if(z[M].until<=p&&p<=z[M].since)return z[M].narrow}return""},qp.eraAbbr=function(){var M,b,p,z=this.localeData().eras();for(M=0,b=z.length;M<b;++M){if(p=this.clone().startOf("day").valueOf(),z[M].since<=p&&p<=z[M].until)return z[M].abbr;if(z[M].until<=p&&p<=z[M].since)return z[M].abbr}return""},qp.eraYear=function(){var M,b,p,z,e=this.localeData().eras();for(M=0,b=e.length;M<b;++M)if(p=e[M].since<=e[M].until?1:-1,z=this.clone().startOf("day").valueOf(),e[M].since<=z&&z<=e[M].until||e[M].until<=z&&z<=e[M].since)return(this.year()-o(e[M].since).year())*p+e[M].offset;return this.year()},qp.year=EM,qp.isLeapYear=function(){return H(this.year())},qp.weekYear=function(M){return Op.call(this,M,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},qp.isoWeekYear=function(M){return Op.call(this,M,this.isoWeek(),this.isoWeekday(),1,4)},qp.quarter=qp.quarters=function(M){return null==M?Math.ceil((this.month()+1)/3):this.month(3*(M-1)+this.month()%3)},qp.month=TM,qp.daysInMonth=function(){return hM(this.year(),this.month())},qp.week=qp.weeks=function(M){var b=this.localeData().week(this);return null==M?b:this.add(7*(M-b),"d")},qp.isoWeek=qp.isoWeeks=function(M){var b=SM(this,1,4).week;return null==M?b:this.add(7*(M-b),"d")},qp.weeksInYear=function(){var M=this.localeData()._week;return CM(this.year(),M.dow,M.doy)},qp.weeksInWeekYear=function(){var M=this.localeData()._week;return CM(this.weekYear(),M.dow,M.doy)},qp.isoWeeksInYear=function(){return CM(this.year(),1,4)},qp.isoWeeksInISOWeekYear=function(){return CM(this.isoWeekYear(),1,4)},qp.date=rp,qp.day=qp.days=function(M){if(!this.isValid())return null!=M?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=M?(M=function(M,b){return"string"!=typeof M?M:isNaN(M)?"number"==typeof(M=b.weekdaysParse(M))?M:null:parseInt(M,10)}(M,this.localeData()),this.add(M-b,"d")):b},qp.weekday=function(M){if(!this.isValid())return null!=M?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==M?b:this.add(M-b,"d")},qp.isoWeekday=function(M){if(!this.isValid())return null!=M?this:NaN;if(null!=M){var b=function(M,b){return"string"==typeof M?b.weekdaysParse(M)%7||7:isNaN(M)?null:M}(M,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7},qp.dayOfYear=function(M){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)