event-timeline/app/static/timeline/js/library/moment.js

9 lines
28 KiB
JavaScript
Raw Normal View History

2021-11-12 18:21:51 +00:00
/*
TimelineJS - ver. 2017-12-15-16-48-40 - 2017-12-15
Copyright (c) 2012-2016 Northwestern University
a project of the Northwestern University Knight Lab, originally created by Zach Wise
https://github.com/NUKnightLab/TimelineJS3
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
(function(e){function t(e,t,n){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:n;default:throw new Error("Implement me")}}function n(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function r(e,t){function n(){le.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}var r=!0;return d(function(){return r&&(n(),r=!1),t.apply(this,arguments)},t)}function s(e,t){return function(n){return h(e.call(this,n),t)}}function a(e,t){return function(n){return this.lang().ordinal(e.call(this,n),t)}}function i(){}function o(e){b(e),d(this,e)}function u(e){var t=g(e),n=t.year||0,r=t.quarter||0,s=t.month||0,a=t.week||0,i=t.day||0,o=t.hour||0,u=t.minute||0,d=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*d+6e4*u+36e5*o,this._days=+i+7*a,this._months=+s+3*r+12*n,this._data={},this._bubble()}function d(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return t.hasOwnProperty("toString")&&(e.toString=t.toString),t.hasOwnProperty("valueOf")&&(e.valueOf=t.valueOf),e}function c(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&Te.hasOwnProperty(t)&&(n[t]=e[t]);return n}function f(e){return e<0?Math.ceil(e):Math.floor(e)}function h(e,t,n){for(var r=""+Math.abs(e),s=e>=0;r.length<t;)r="0"+r;return(s?n?"+":"":"-")+r}function l(e,t,n,r){var s=t._milliseconds,a=t._days,i=t._months;r=null==r||r,s&&e._d.setTime(+e._d+s*n),a&&ue(e,"Date",oe(e,"Date")+a*n),i&&ie(e,oe(e,"Month")+i*n),r&&le.updateOffset(e,a||i)}function _(e){return"[object Array]"===Object.prototype.toString.call(e)}function m(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function y(e,t,n){var r,s=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<s;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&i++;return i+a}function p(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=nt[e]||rt[t]||t}return e}function g(e){var t,n,r={};for(n in e)e.hasOwnProperty(n)&&(t=p(n),t&&(r[t]=e[n]));return r}function Y(t){var n,r;if(0===t.indexOf("week"))n=7,r="day";else{if(0!==t.indexOf("month"))return;n=12,r="month"}le[t]=function(s,a){var i,o,u=le.fn._lang[t],d=[];if("number"==typeof s&&(a=s,s=e),o=function(e){var t=le().utc().set(r,e);return u.call(le.fn._lang,t,s||"")},null!=a)return o(a);for(i=0;i<n;i++)d.push(o(i));return d}}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function M(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function D(e,t,n){return ne(le([e,11,31+t-n]),t,n).week}function v(e){return k(e)?366:365}function k(e){return e%4===0&&e%100!==0||e%400===0}function b(e){var t;e._a&&e._pf.overflow===-2&&(t=e._a[we]<0||e._a[we]>11?we:e._a[Me]<1||e._a[Me]>M(e._a[Ye],e._a[we])?Me:e._a[De]<0||e._a[De]>23?De:e._a[ve]<0||e._a[ve]>59?ve:e._a[ke]<0||e._a[ke]>59?ke:e._a[be]<0||e._a[be]>999?be:-1,e._pf._overflowDayOfYear&&(t<Ye||t>Me)&&(t=Me),e._pf.overflow=t)}function S(e){return null==e._isValid&&(e._isValid=!isNaN(e._d.getTime())&&e._pf.overflow<0&&!e._pf.empty&&!e._pf.invalidMonth&&!e._pf.nullInput&&!e._pf.invalidFormat&&!e._pf.userInvalidated,e._strict&&(e._isValid=e._isValid&&0===e._pf.charsLeftOver&&0===e._pf.unusedTokens.length)),e._isValid}function T(e){return e?e.toLowerCase().replace("_","-"):e}function O(e,t){return t._isUTC?le(e).zone(t._offset||0):le(e).local()}function W(e,t){return t.abbr=e,Se[e]||(Se[e]=new i),Se[e].set(t),Se[e]}function G(e){delete Se[e]}function F(e){var t,n,r,s,a=0,i=function(e){if(!Se[e]&&Oe)try{require("./lang/"+e)}catch(e){}return Se[e]};if(!e)return le.fn._lang;if(!_(e)){if(n=i(e))return n;e=[e]}for(;a<e.length;){for(s=T(e[a]).split("-"),t=s.length,r=T(e[a+1]),r=r?r.split("-"):null;t>0;){if(n=i(s.slice(0,t).join("-")))return n;if(r&&r.length>=t&&y(s,r,!0)>=t-1)break;t--}a++}return le.fn._lang}function C(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function P(e){var t,n,r=e.match(Ce);for(t=0,n=r.length;t<n;t++)ut[r[t]]?r[