PageSourceSearch

https://bookings.theoldinn.com/files/js/searchbox.js

js theoldinn.com collected 2026-09-25 04:51:42 UTC 716,775 bytes, 17,231 lines download raw bytes

1$ = jQuery;
2
3// 01 - Searchbox Plugins
4// 02 - Searchbox Functions
5// 03 - Searchbox Parameters Settings
6// 04 - Searchbox Run
7// 05 - Appending Overlays to Body Element
8
9
10// *********************************************************************************************** //
11// *********************************************************************************************** //
12// 01 - SEARCHBOX PLUGINS
13// *********************************************************************************************** //
14
15
16/* ********************************************************************************* */
17
18/* Tooltipster v3.3.0 */
19
20/* ********************************************************************************* */
21(function (e, t, n) { function s(t, n) { this.bodyOverflowX; this.callbacks = { hide: [], show: [] }; this.checkInterval = null; this.Content; this.$el = e(t); this.$elProxy; this.elProxyPosition; this.enabled = true; this.options = e.extend({}, i, n); this.mouseIsOverProxy = false; this.namespace = "tooltipster-" + Math.round(Math.random() * 1e5); this.Status = "hidden"; this.timerHide = null; this.timerShow = null; this.$tooltip; this.options.iconTheme = this.options.iconTheme.replace(".", ""); this.options.theme = this.options.theme.replace(".", ""); this._init() } function o(t, n) { var r = true; e.each(t, function (e, i) { if (typeof n[e] === "undefined" || t[e] !== n[e]) { r = false; return false } }); return r } function f() { return !a && u } function l() { var e = n.body || n.documentElement, t = e.style, r = "transition"; if (typeof t[r] == "string") { return true } v = ["Moz", "Webkit", "Khtml", "O", "ms"], r = r.charAt(0).toUpperCase() + r.substr(1); for (var i = 0; i < v.length; i++) { if (typeof t[v[i] + r] == "string") { return true } } return false } var r = "tooltipster", i = { animation: "fade", arrow: true, arrowColor: "", autoClose: true, content: null, contentAsHTML: false, contentCloning: true, debug: true, delay: 200, minWidth: 0, maxWidth: null, functionInit: function (e, t) { }, functionBefore: function (e, t) { t() }, functionReady: function (e, t) { }, functionAfter: function (e) { }, hideOnClick: false, icon: "(?)", iconCloning: true, iconDesktop: false, iconTouch: false, iconTheme: "tooltipster-icon", interactive: false, interactiveTolerance: 350, multiple: false, offsetX: 0, offsetY: 0, onlyOne: false, position: "top", positionTracker: false, positionTrackerCallback: function (e) { if (this.option("trigger") == "hover" && this.option("autoClose")) { this.hide() } }, restoration: "current", speed: 350, timer: 0, theme: "tooltipster-default", touchDevices: true, trigger: "hover", updateAnimation: true }; s.prototype = { _init: function () { var t = this; if (n.querySelector) { var r = null; if (t.$el.data("tooltipster-initialTitle") === undefined) { r = t.$el.attr("title"); if (r === undefined) r = null; t.$el.data("tooltipster-initialTitle", r) } if (t.options.content !== null) { t._content_set(t.options.content) } else { t._content_set(r) } var i = t.options.functionInit.call(t.$el, t.$el, t.Content); if (typeof i !== "undefined") t._content_set(i); t.$el.removeAttr("title").addClass("tooltipstered"); if (!u && t.options.iconDesktop || u && t.options.iconTouch) { if (typeof t.options.icon === "string") { t.$elProxy = e('<span class="' + t.options.iconTheme + '"></span>'); t.$elProxy.text(t.options.icon) } else { if (t.options.iconCloning) t.$elProxy = t.options.icon.clone(true); else t.$elProxy = t.options.icon } t.$elProxy.insertAfter(t.$el) } else { t.$elProxy = t.$el } if (t.options.trigger == "hover") { t.$elProxy.on("mouseenter." + t.namespace, function () { if (!f() || t.options.touchDevices) { t.mouseIsOverProxy = true; t._show() } }).on("mouseleave." + t.namespace, function () { if (!f() || t.options.touchDevices) { t.mouseIsOverProxy = false } }); if (u && t.options.touchDevices) { t.$elProxy.on("touchstart." + t.namespace, function () { t._showNow() }) } } else if (t.options.trigger == "click") { t.$elProxy.on("click." + t.namespace, function () { if (!f() || t.options.touchDevices) { t._show() } }) } } }, _show: function () { var e = this; if (e.Status != "shown" && e.Status != "appearing") { if (e.options.delay) { e.t
21imerShow = setTimeout(function () { if (e.options.trigger == "click" || e.options.trigger == "hover" && e.mouseIsOverProxy) { e._showNow() } }, e.options.delay) } else e._showNow() } }, _showNow: function (n) { var r = this; r.options.functionBefore.call(r.$el, r.$el, function () { if (r.enabled && r.Content !== null) { if (n) r.callbacks.show.push(n); r.callbacks.hide = []; clearTimeout(r.timerShow); r.timerShow = null; clearTimeout(r.timerHide); r.timerHide = null; if (r.options.onlyOne) { e(".tooltipstered").not(r.$el).each(function (t, n) { var r = e(n), i = r.data("tooltipster-ns"); e.each(i, function (e, t) { var n = r.data(t), i = n.status(), s = n.option("autoClose"); if (i !== "hidden" && i !== "disappearing" && s) { n.hide() } }) }) } var i = function () { r.Status = "shown"; e.each(r.callbacks.show, function (e, t) { t.call(r.$el) }); r.callbacks.show = [] }; if (r.Status !== "hidden") { var s = 0; if (r.Status === "disappearing") { r.Status = "appearing"; if (l()) { r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-" + r.options.animation + "-show"); if (r.options.speed > 0) r.$tooltip.delay(r.options.speed); r.$tooltip.queue(i) } else { r.$tooltip.stop().fadeIn(i) } } else if (r.Status === "shown") { i() } } else { r.Status = "appearing"; var s = r.options.speed; r.bodyOverflowX = e("body").css("overflow-x"); e("body").css("overflow-x", "hidden"); var o = "tooltipster-" + r.options.animation, a = "-webkit-transition-duration: " + r.options.speed + "ms; -webkit-animation-duration: " + r.options.speed + "ms; -moz-transition-duration: " + r.options.speed + "ms; -moz-animation-duration: " + r.options.speed + "ms; -o-transition-duration: " + r.options.speed + "ms; -o-animation-duration: " + r.options.speed + "ms; -ms-transition-duration: " + r.options.speed + "ms; -ms-animation-duration: " + r.options.speed + "ms; transition-duration: " + r.options.speed + "ms; animation-duration: " + r.options.speed + "ms;", f = r.options.minWidth ? "min-width:" + Math.round(r.options.minWidth) + "px;" : "", c = r.options.maxWidth ? "max-width:" + Math.round(r.options.maxWidth) + "px;" : "", h = r.options.interactive ? "pointer-events: auto;" : ""; r.$tooltip = e('<div class="tooltipster-base ' + r.options.theme + '" style="' + f + " " + c + " " + h + " " + a + '"><div class="tooltipster-content"></div></div>'); if (l()) r.$tooltip.addClass(o); r._content_insert(); r.$tooltip.appendTo("body"); r.reposition(); r.options.functionReady.call(r.$el, r.$el, r.$tooltip); if (l()) { r.$tooltip.addClass(o + "-show"); if (r.options.speed > 0) r.$tooltip.delay(r.options.speed); r.$tooltip.queue(i) } else { r.$tooltip.css("display", "none").fadeIn(r.options.speed, i) } r._interval_set(); e(t).on("scroll." + r.namespace + " resize." + r.namespace, function () { r.reposition() }); if (r.options.autoClose) { e("body").off("." + r.namespace); if (r.options.trigger == "hover") { if (u) { setTimeout(function () { e("body").on("touchstart." + r.namespace, function () { r.hide() }) }, 0) } if (r.options.interactive) { if (u) { r.$tooltip.on("touchstart." + r.namespace, function (e) { e.stopPropagation() }) } var p = null; r.$elProxy.add(r.$tooltip).on("mouseleave." + r.namespace + "-autoClose", function () { clearTimeout(p); p = setTimeout(function () { r.hide() }, r.options.interactiveTolerance) }).on("mouseenter." + r.namespace + "-autoClose", function () { clearTimeout(p) }) } else { r.$elProxy.on("mouseleave." + r.namespace + "-autoClose", function () { r.hide() }) } if (r.options.hideOnClick) { r.$elProxy.on("click." + r.namespace + "-autoClose", function () { r.hide() }) } } else if (r.options.trigger == "click") { setTimeout(function () { e("body").on("click." + r.namespace + " touchstart." + r.namespace, function () { r.hide() }) }, 0); if (r.options.interactive) { r.$tooltip.on("click." + r.namespace + " touchstart." + r.namespace, function (e) { e.stopPropagation() }) } } } } if (r.options.timer > 0) { r.timerHide = setTimeout(function () { r.timerHide = null; r.hide() }, r.options.timer + s) } } }) }, _interval_set: function () { var t = this; t.checkInterval = setInterval(function () { if (e("body").find(t.$el).length === 0 || e("body").find(t.$elProxy).length === 0 || t.Status == "hidden" || e("body").find(t.$tooltip).length === 0) { if (t.Status == "shown" || t.Status == "appearing") t.hide(); t._interval_cancel() } else { if (t.options.positionTracker) { var n = t._repositionInfo(t.$elProxy), r = false; if (o(n.dimension, t.elProxyPosition.dimension)) { if (t.$elProxy.css("position") === "fixed") { if (o(n.position, t.elProxyPosition.position)) r = true } else { if (o(n.offset, t.elProxyPosition.offset)) r = true } } if (!r) { t.reposition(); t.options.positionTrackerCallback.call(t, t.$el) } } } }, 200) }, _interval_cancel: function () { clearInterval(this.checkInterval); this.checkInterval = null }
21, _content_set: function (e) { if (typeof e === "object" && e !== null && this.options.contentCloning) { e = e.clone(true) } this.Content = e }, _content_insert: function () { var e = this, t = this.$tooltip.find(".tooltipster-content"); if (typeof e.Content === "string" && !e.options.contentAsHTML) { t.text(e.Content) } else { t.empty().append(e.Content) } }, _update: function (e) { var t = this; t._content_set(e); if (t.Content !== null) { if (t.Status !== "hidden") { t._content_insert(); t.reposition(); if (t.options.updateAnimation) { if (l()) { t.$tooltip.css({ width: "", "-webkit-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms", "-moz-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms", "-o-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms", "-ms-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms", transition: "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms" }).addClass("tooltipster-content-changing"); setTimeout(function () { if (t.Status != "hidden") { t.$tooltip.removeClass("tooltipster-content-changing"); setTimeout(function () { if (t.Status !== "hidden") { t.$tooltip.css({ "-webkit-transition": t.options.speed + "ms", "-moz-transition": t.options.speed + "ms", "-o-transition": t.options.speed + "ms", "-ms-transition": t.options.speed + "ms", transition: t.options.speed + "ms" }) } }, t.options.speed) } }, t.options.speed) } else { t.$tooltip.fadeTo(t.options.speed, .5, function () { if (t.Status != "hidden") { t.$tooltip.fadeTo(t.options.speed, 1) } }) } } } } else { t.hide() } }, _repositionInfo: function (e) { return { dimension: { height: e.outerHeight(false), width: e.outerWidth(false) }, offset: e.offset(), position: { left: parseInt(e.css("left")), top: parseInt(e.css("top")) } } }, hide: function (n) { var r = this; if (n) r.callbacks.hide.push(n); r.callbacks.show = []; clearTimeout(r.timerShow); r.timerShow = null; clearTimeout(r.timerHide); r.timerHide = null; var i = function () { e.each(r.callbacks.hide, function (e, t) { t.call(r.$el) }); r.callbacks.hide = [] }; if (r.Status == "shown" || r.Status == "appearing") { r.Status = "disappearing"; var s = function () { r.Status = "hidden"; if (typeof r.Content == "object" && r.Content !== null) { r.Content.detach() } r.$tooltip.remove(); r.$tooltip = null; e(t).off("." + r.namespace); e("body").off("." + r.namespace).css("overflow-x", r.bodyOverflowX); e("body").off("." + r.namespace); r.$elProxy.off("." + r.namespace + "-autoClose"); r.options.functionAfter.call(r.$el, r.$el); i() }; if (l()) { r.$tooltip.clearQueue().removeClass("tooltipster-" + r.options.animation + "-show").addClass("tooltipster-dying"); if (r.options.speed > 0) r.$tooltip.delay(r.options.speed); r.$tooltip.queue(s) } else { r.$tooltip.stop().fadeOut(r.options.speed, s) } } else if (r.Status == "hidden") { i() } return r }, show: function (e) { this._showNow(e); return this }, update: function (e) { return this.content(e) }, content: function (e) { if (typeof e === "undefined") { return this.Content } else { this._update(e); return this } }, reposition: function () { var n = this; if (e("body").find(n.$tooltip).length !== 0) { n.$tooltip.css("width", ""); n.elProxyPosition = n._repositionInfo(n.$elProxy); var r = null, i = e(t).width(), s = n.elProxyPosition, o = n.$tooltip.outerWidth(false), u = n.$tooltip.innerWidth() + 1, a = n.$tooltip.outerHeight(false); if (n.$elProxy.is("area")) { var f = n.$elProxy.attr("shape"), l = n.$elProxy.parent().attr("name"), c = e('img[usemap="#' + l + '"]'), h = c.offset().left, p = c.offset().top, d = n.$elProxy.attr("coords") !== undefined ? n.$elProxy.attr("coords").split(",") : undefined; if (f == "circle") { var v = parseInt(d[0]), m = parseInt(d[1]), g = parseInt(d[2]); s.dimension.height = g * 2; s.dimension.width = g * 2; s.offset.top = p + m - g; s.offset.left = h + v - g } else if (f == "rect") { var v = parseInt(d[0]), m = parseInt(d[1]), y = parseInt(d[2]), b = parseInt(d[3]); s.dimension.height = b - m; s.dimension.width = y - v; s.offset.top = p + m; s.offset.left = h + v } else if (f == "poly") { var w = [], E = [], S = 0, x = 0, T = 0, N = 0, C = "even"; for (var k = 0; k < d.length; k++) { var L = parseInt(d[k]); if (C == "even") { if (L > T) { T = L; if (k === 0) { S = T } } if (L < S) { S = L } C = "odd" } else { if (L > N) { N = L; if (k == 1) { x = N } } if (L < x) { x = L } C = "even" } } s.dimension.height = N - x; s.dimension.width = T - S; s.offset.top = p + x; s.offset.left = h + S } else { s.dimension.height = c.outerHeight(false); s.dimension.width = c.outerWidth(false); s.offset.top = p; s.offset.left = h } } var A = 0, O = 0, M = 0, _ = parseInt(n.options.offsetY), D = parseInt(n.options.offsetX), P = n.options.position; function H() { var n = e(t).scrollLeft(); if (A - n < 0) { r = A - n; A = n } if (A + o - n > i) { r = A - (i + n - o); A = i + n - o } } function B(n, r) { if (s.offset.top - e(t).scrollTop() - a - _ - 12 < 0 && r.indexOf("top") > -1) { P = n } if (s.offset.top + s.dimension.height + a + 12 + _ > e(t).scrollTop() + e(t).height() && r.indexOf("bottom") > -1) { P = n; M = s.offset.top - a - _ - 12 } } if (P == "top") { var j = s.offset.left + o - (s.offset.left + s.dimension.width); A = s.offset.left + D - j / 2; M = s.offset.top - a - _ - 12; H(); B("bottom", "top") } if (P == "top-left") { A = s.offset.left + D; M = s.offset.top - a - _ - 12; H(); B("bottom-left", "top-left") } if (P == "top-right") { A = s.offset.left + s.dimension.width + D - o; M = s.offset.top - a - _ - 12; H(); B("bottom-right", "top-right") } if (P == "bottom") { var j = s.offset.left + o - (s.offset.left + s.dimension.width); A = s.offset.left - j / 2 + D; M = s.offset.top + s.dimension.height + _ + 12; H(); B("top", "bottom") } if (P == "bottom-left") { A = s.offset.left + D; M = s.offset.top + s.dimension.height + _ + 12; H(); B("top-left", "bottom-left") } if (P == "bottom-right") { A = s.offset.left + s.dimension.width + D - o; M = s.offset.top + s.dimension.height + _ + 12; H(); B("top-right", "bottom-right") } if (P == "left") { A = s.offset.left - D - o - 12; O = s.offset.left + D + s.dimension.width + 12; var F = s.offset.top + a - (s.offset.top + s.dimension.height); M = s.offset.top - F / 2 - _; if (A < 0 && O + o > i) { var I = parseFloat(n.$tooltip.css("border-width")) * 2, q = o + A - I; n.$tooltip.css("width", q + "px"); a = n.$tooltip.outerHeight(false); A = s.offset.left - D - q - 12 - I; F = s.offset.top + a - (s.offset.top + s.dimension.height); M = s.offset.top - F / 2 - _ } else if (A < 0) { A = s.offset.left + D + s.dimension.width + 12; r = "left" } } if (P == "right") { A = s.offset.left + D + s.dimension.width + 12; O = s.offset.left - D - o - 12; var F = s.offset.top + a - (s.offset.top + s.dimension.height); M = s.offset.top - F / 2 - _; if (A + o > i && O < 0) { var I = parseFloat(n.$tooltip.css("border-width")) * 2, q = i - A - I; n.$tooltip.css("width", q + "px"); a = n.$tooltip.outerHeight(false); F = s.offset.top + a - (s.offset.top + s.dimension.height); M = s.offset.top - F / 2 - _ } else if (A + o > i) { A = s.offset.left - D - o - 12; r = "right" } } if (n.options.arrow) { var R = "tooltipster-arrow-" + P; if (n.options.arrowColor.length < 1) { var U = n.$tooltip.css("background-color") } else { var U = n.options.arrowColor } if (!r) { r = "" } else if (r == "left") { R = "tooltipster-arrow-right"; r = "" } else if (r == "right") { R = "tooltipster-arrow-left"; r = "" } else { r = "left:" + Math.round(r) + "px;" } if (P == "top" || P == "top-left" || P == "top-right") { var z = parseFloat(n.$tooltip.css("border-bottom-width")), W = n.$tooltip.css("border-bottom-color") } else if (P == "bottom" || P == "bottom-left" || P == "bottom-right") { var z = parseFloat(n.$tooltip.css("border-top-width")), W = n.$tooltip.css("border-top-color") } else if (P == "left") { var z = parseFloat(n.$tooltip.css("border-right-width")), W = n.$tooltip.css("border-right-color") } else if (P == "right") { var z = parseFloat(n.$tooltip.css("border-left-width")), W = n.$tooltip.css("border-left-color") } else { var z = parseFloat(n.$tooltip.css("border-bottom-width")), W = n.$tooltip.css("border-bottom-color") } if (z > 1) { z++ } var X = ""; if (z !== 0) { var V = "", J = "border-color: " + W + ";"; if (R.indexOf("bottom") !== -1) { V = "margin-top: -" + Math.round(z) + "px;" } else if (R.indexOf("top") !== -1) { V = "margin-bottom: -" + Math.round(z) + "px;" } else if (R.indexOf("left") !== -1) { V = "margin-right: -" + Math.round(z) + "px;" } else if (R.indexOf("right") !== -1) { V = "margin-left: -" + Math.round(z) + "px;" } X = '<span class="tooltipster-arrow-border" style="' + V + " " + J + ';"></span>' } n.$tooltip.find(".tooltipster-arrow").remove(); var K = '<div class="' + R + ' tooltipster-arrow" style="' + r + '">' + X + '<span style="border-color:' + U + ';"></span></div>'; n.$tooltip.append(K) } n.$tooltip.css({ top: Math.round(M) + "px", left: Math.round(A) + "px" }) } return n }, enable: function () { this.enabled = true; return this }, disable: function () { this.hide(); this.enabled = false; return this }, destroy: function () { var t = this; t.hide(); if (t.$el[0] !== t.$elProxy[0]) { t.$elProxy.remove() } t.$el.removeData(t.namespace).off("." + t.namespace); var n = t.$el.data("tooltipster-ns"); if (n.length === 1) { var r = null; if (t.options.restoration === "previous") { r = t.$el.data("tooltipster-initialTitle") } else if (t.options.restoration === "current") { r = typeof t.Content === "string" ? t.Content : e("<div></div>").append(t.Content).html() } if (r) { t.$el.attr("title", r) } t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle") } else { n = e.grep(n, function (e, n) { return e !== t.namespace }); t.$el.data("tooltipster-ns", n) } return t }, elementIcon: function () { return this.$el[0] !== this.$elProxy[0] ? this.$elProxy[0] : undefined }, elementTooltip: function () { return this.$tooltip ? this.$tooltip[0] : undefined }, option: function (e, t) { if (typeof t == "undefined") return this.options[e]; else { this.options[e] = t; return this } }, status: function () { return this.Status } }; e.fn[r] = function () { var t = arguments; if (this.length === 0) { if (typeof t[0] === "string") { var n = true; switch (t[0]) { case "setDefaults": e.extend(i, t[1]); break; default: n = false; break }if (n) return true; else return this } else { return this } } else { if (typeof t[0] === "string") { var r = "#*$~&"; this.each(function () { var n = e(this).data("tooltipster-ns"), i = n ? e(this).data(n[0]) : null; if (i) { if (typeof i[t[0]] === "function") { var s = i[t[0]](t[1], t[2]) } else { throw new Error('Unknown method .tooltipster("' + t[0] + '")') } if (s !== i) { r = s; return false } } else { throw new Error("You called Tooltipster's \"" + t[0] + '" method on an uninitialized element') } }); return r !== "#*$~&" ? r : this } else { var o = [], u = t[0] && typeof t[0].multiple !== "undefined", a = u && t[0].multiple || !u && i.multiple, f = t[0] && typeof t[0].debug !== "undefined", l = f && t[0].debug || !f && i.debug; this.each(function () { var n = false, r = e(this).data("tooltipster-ns"), i = null; if (!r) { n = true } else if (a) { n = true } else if (l) { console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.') } if (n) { i = new s(this, t[0]); if (!r) r = []; r.push(i.namespace); e(this).data("tooltipster-ns", r); e(this).data(i.namespace, i) } o.push(i) }); if (a) return o; else return this } } }; var u = !!("ontouchstart" in t); var a = false; e("body").one("mousemove", function () { a = true }) })(jQuery, window, document);
22
23
24// *********************************************************************************************** //
25// ========================================================================================
26// MOMENT WITH LOCALES
27// ========================================================================================
28; (function (global, factory) {
29    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
30        typeof define === 'function' && define.amd ? define(factory) :
31            global.moment = factory()
32}(this, (function () {
33    'use strict';
34
35    var hookCallback;
36
37    function hooks() {
38        return hookCallback.apply(null, arguments);
39    }
40
41    // This is done to register the method called with moment()
42    // without creating circular dependencies.
43    function setHookCallback(callback) {
44        hookCallback = callback;
45    }
46
47    function isArray(input) {
48        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
49    }
50
51    function isObject(input) {
52        // IE8 will treat undefined and null as object if it wasn't for
53        // input != null
54        return input != null && Object.prototype.toString.call(input) === '[object Object]';
55    }
56
57    function isObjectEmpty(obj) {
58        var k;
59        for (k in obj) {
60            // even if its not own property I'd still call it non-empty
61            return false;
vendor: 11,875 bytes, lines 62-476
62        }
63        return true;
64    }
65
66    function isUndefined(input) {
67        return input === void 0;
68    }
69
70    function isNumber(input) {
71        return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
72    }
73
74    function isDate(input) {
75        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
76    }
77
78    function map(arr, fn) {
79        var res = [], i;
80        for (i = 0; i < arr.length; ++i) {
81            res.push(fn(arr[i], i));
82        }
83        return res;
84    }
85
86    function hasOwnProp(a, b) {
87        return Object.prototype.hasOwnProperty.call(a, b);
88    }
89
90    function extend(a, b) {
91        for (var i in b) {
92            if (hasOwnProp(b, i)) {
93                a[i] = b[i];
94            }
95        }
96
97        if (hasOwnProp(b, 'toString')) {
98            a.toString = b.toString;
99        }
100
101        if (hasOwnProp(b, 'valueOf')) {
102            a.valueOf = b.valueOf;
103        }
104
105        return a;
106    }
107
108    function createUTC(input, format, locale, strict) {
109        return createLocalOrUTC(input, format, locale, strict, true).utc();
110    }
111
112    function defaultParsingFlags() {
113        // We need to deep clone this object.
114        return {
115            empty: false,
116            unusedTokens: [],
117            unusedInput: [],
118            overflow: -2,
119            charsLeftOver: 0,
120            nullInput: false,
121            invalidMonth: null,
122            invalidFormat: false,
123            userInvalidated: false,
124            iso: false,
125            parsedDateParts: [],
126            meridiem: null,
127            rfc2822: false,
128            weekdayMismatch: false
129        };
130    }
131
132    function getParsingFlags(m) {
133        if (m._pf == null) {
134            m._pf = defaultParsingFlags();
135        }
136        return m._pf;
137    }
138
139    var some;
140    if (Array.prototype.some) {
141        some = Array.prototype.some;
142    } else {
143        some = function (fun) {
144            var t = Object(this);
145            var len = t.length >>> 0;
146
147            for (var i = 0; i < len; i++) {
148                if (i in t && fun.call(this, t[i], i, t)) {
149                    return true;
150                }
151            }
152
153            return false;
154        };
155    }
156
157    var some$1 = some;
158
159    function isValid(m) {
160        if (m._isValid == null) {
161            var flags = getParsingFlags(m);
162            var parsedParts = some$1.call(flags.parsedDateParts, function (i) {
163                return i != null;
164            });
165            var isNowValid = !isNaN(m._d.getTime()) &&
166                flags.overflow < 0 &&
167                !flags.empty &&
168                !flags.invalidMonth &&
169                !flags.invalidWeekday &&
170                !flags.nullInput &&
171                !flags.invalidFormat &&
172                !flags.userInvalidated &&
173                (!flags.meridiem || (flags.meridiem && parsedParts));
174
175            if (m._strict) {
176                isNowValid = isNowValid &&
177                    flags.charsLeftOver === 0 &&
178                    flags.unusedTokens.length === 0 &&
179                    flags.bigHour === undefined;
180            }
181
182            if (Object.isFrozen == null || !Object.isFrozen(m)) {
183                m._isValid = isNowValid;
184            }
185            else {
186                return isNowValid;
187            }
188        }
189        return m._isValid;
190    }
191
192    function createInvalid(flags) {
193        var m = createUTC(NaN);
194        if (flags != null) {
195            extend(getParsingFlags(m), flags);
196        }
197        else {
198            getParsingFlags(m).userInvalidated = true;
199        }
200
201        return m;
202    }
203
204    // Plugins that add properties should also add the key here (null value),
205    // so we can properly clone ourselves.
206    var momentProperties = hooks.momentProperties = [];
207
208    function copyConfig(to, from) {
209        var i, prop, val;
210
211        if (!isUndefined(from._isAMomentObject)) {
212            to._isAMomentObject = from._isAMomentObject;
213        }
214        if (!isUndefined(from._i)) {
215            to._i = from._i;
216        }
217        if (!isUndefined(from._f)) {
218            to._f = from._f;
219        }
220        if (!isUndefined(from._l)) {
221            to._l = from._l;
222        }
223        if (!isUndefined(from._strict)) {
224            to._strict = from._strict;
225        }
226        if (!isUndefined(from._tzm)) {
227            to._tzm = from._tzm;
228        }
229        if (!isUndefined(from._isUTC)) {
230            to._isUTC = from._isUTC;
231        }
232        if (!isUndefined(from._offset)) {
233            to._offset = from._offset;
234        }
235        if (!isUndefined(from._pf)) {
236            to._pf = getParsingFlags(from);
237        }
238        if (!isUndefined(from._locale)) {
239            to._locale = from._locale;
240        }
241
242        if (momentProperties.length > 0) {
243            for (i = 0; i < momentProperties.length; i++) {
244                prop = momentProperties[i];
245                val = from[prop];
246                if (!isUndefined(val)) {
247                    to[prop] = val;
248                }
249            }
250        }
251
252        return to;
253    }
254
255    var updateInProgress = false;
256
257    // Moment prototype object
258    function Moment(config) {
259        copyConfig(this, config);
260        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
261        if (!this.isValid()) {
262            this._d = new Date(NaN);
263        }
264        // Prevent infinite loop in case updateOffset creates new moment
265        // objects.
266        if (updateInProgress === false) {
267            updateInProgress = true;
268            hooks.updateOffset(this);
269            updateInProgress = false;
270        }
271    }
272
273    function isMoment(obj) {
274        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
275    }
276
277    function absFloor(number) {
278        if (number < 0) {
279            // -0 -> 0
280            return Math.ceil(number) || 0;
281        } else {
282            return Math.floor(number);
283        }
284    }
285
286    function toInt(argumentForCoercion) {
287        var coercedNumber = +argumentForCoercion,
288            value = 0;
289
290        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
291            value = absFloor(coercedNumber);
292        }
293
294        return value;
295    }
296
297    // compare two arrays, return the number of differences
298    function compareArrays(array1, array2, dontConvert) {
299        var len = Math.min(array1.length, array2.length),
300            lengthDiff = Math.abs(array1.length - array2.length),
301            diffs = 0,
302            i;
303        for (i = 0; i < len; i++) {
304            if ((dontConvert && array1[i] !== array2[i]) ||
305                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
306                diffs++;
307            }
308        }
309        return diffs + lengthDiff;
310    }
311
312    function warn(msg) {
313        if (hooks.suppressDeprecationWarnings === false &&
314            (typeof console !== 'undefined') && console.warn) {
315            console.warn('Deprecation warning: ' + msg);
316        }
317    }
318
319    function deprecate(msg, fn) {
320        var firstTime = true;
321
322        return extend(function () {
323            if (hooks.deprecationHandler != null) {
324                hooks.deprecationHandler(null, msg);
325            }
326            if (firstTime) {
327                var args = [];
328                var arg;
329                for (var i = 0; i < arguments.length; i++) {
330                    arg = '';
331                    if (typeof arguments[i] === 'object') {
332                        arg += '\n[' + i + '] ';
333                        for (var key in arguments[0]) {
334                            arg += key + ': ' + arguments[0][key] + ', ';
335                        }
336                        arg = arg.slice(0, -2); // Remove trailing comma and space
337                    } else {
338                        arg = arguments[i];
339                    }
340                    args.push(arg);
341                }
342                warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
343                firstTime = false;
344            }
345            return fn.apply(this, arguments);
346        }, fn);
347    }
348
349    var deprecations = {};
350
351    function deprecateSimple(name, msg) {
352        if (hooks.deprecationHandler != null) {
353            hooks.deprecationHandler(name, msg);
354        }
355        if (!deprecations[name]) {
356            warn(msg);
357            deprecations[name] = true;
358        }
359    }
360
361    hooks.suppressDeprecationWarnings = false;
362    hooks.deprecationHandler = null;
363
364    function isFunction(input) {
365        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
366    }
367
368    function set(config) {
369        var prop, i;
370        for (i in config) {
371            prop = config[i];
372            if (isFunction(prop)) {
373                this[i] = prop;
374            } else {
375                this['_' + i] = prop;
376            }
377        }
378        this._config = config;
379        // Lenient ordinal parsing accepts just a number in addition to
380        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
381        // TODO: Remove "ordinalParse" fallback in next major release.
382        this._dayOfMonthOrdinalParseLenient = new RegExp(
383            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
384            '|' + (/\d{1,2}/).source);
385    }
386
387    function mergeConfigs(parentConfig, childConfig) {
388        var res = extend({}, parentConfig), prop;
389        for (prop in childConfig) {
390            if (hasOwnProp(childConfig, prop)) {
391                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
392                    res[prop] = {};
393                    extend(res[prop], parentConfig[prop]);
394                    extend(res[prop], childConfig[prop]);
395                } else if (childConfig[prop] != null) {
396                    res[prop] = childConfig[prop];
397                } else {
398                    delete res[prop];
399                }
400            }
401        }
402        for (prop in parentConfig) {
403            if (hasOwnProp(parentConfig, prop) &&
404                !hasOwnProp(childConfig, prop) &&
405                isObject(parentConfig[prop])) {
406                // make sure changes to properties don't modify parent config
407                res[prop] = extend({}, res[prop]);
408            }
409        }
410        return res;
411    }
412
413    function Locale(config) {
414        if (config != null) {
415            this.set(config);
416        }
417    }
418
419    var keys;
420
421    if (Object.keys) {
422        keys = Object.keys;
423    } else {
424        keys = function (obj) {
425            var i, res = [];
426            for (i in obj) {
427                if (hasOwnProp(obj, i)) {
428                    res.push(i);
429                }
430            }
431            return res;
432        };
433    }
434
435    var keys$1 = keys;
436
437    var defaultCalendar = {
438        sameDay: '[Today at] LT',
439        nextDay: '[Tomorrow at] LT',
440        nextWeek: 'dddd [at] LT',
441        lastDay: '[Yesterday at] LT',
442        lastWeek: '[Last] dddd [at] LT',
443        sameElse: 'L'
444    };
445
446    function calendar(key, mom, now) {
447        var output = this._calendar[key] || this._calendar['sameElse'];
448        return isFunction(output) ? output.call(mom, now) : output;
449    }
450
451    var defaultLongDateFormat = {
452        LTS: 'h:mm:ss A',
453        LT: 'h:mm A',
454        L: 'MM/DD/YYYY',
455        LL: 'MMMM D, YYYY',
456        LLL: 'MMMM D, YYYY h:mm A',
457        LLLL: 'dddd, MMMM D, YYYY h:mm A'
458    };
459
460    function longDateFormat(key) {
461        var format = this._longDateFormat[key],
462            formatUpper = this._longDateFormat[key.toUpperCase()];
463
464        if (format || !formatUpper) {
465            return format;
466        }
467
468        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
469            return val.slice(1);
470        });
471
472        return this._longDateFormat[key];
473    }
474
475    var defaultInvalidDate = 'Invalid date';
476
477    function invalidDate() {
478        return this._invalidDate;
479    }
480
481    var defaultOrdinal = '%d';
482    var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
483
484    function ordinal(number) {
485        return this._ordinal.replace('%d', number);
486    }
487
488    var defaultRelativeTime = {
489        future: 'in %s',
490        past: '%s ago',
491        s: 'a few seconds',
492        ss: '%d seconds',
493        m: 'a minute',
494        mm: '%d minutes',
495        h: 'an hour',
496        hh: '%d hours',
497        d: 'a day',
498        dd: '%d days',
499        M: 'a month',
500        MM: '%d months',
501        y: 'a year',
502        yy: '%d years'
503    };
504
505    function relativeTime(number, withoutSuffix, string, isFuture) {
506        var output = this._relativeTime[string];
507        return (isFunction(output)) ?
508            output(number, withoutSuffix, string, isFuture) :
509            output.replace(/%d/i, number);
510    }
511
512    function pastFuture(diff, output) {
513        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
514        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
515    }
516
517    var aliases = {};
518
519    function addUnitAlias(unit, shorthand) {
520        var lowerCase = unit.toLowerCase();
521        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
522    }
523
524    function normalizeUnits(units) {
525        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
526    }
527
528    function normalizeObjectUnits(inputObject) {
529        var normalizedInput = {},
530            normalizedProp,
531            prop;
532
533        for (prop in inputObject) {
534            if (hasOwnProp(inputObject, prop)) {
535                normalizedProp = normalizeUnits(prop);
536                if (normalizedProp) {
537                    normalizedInput[normalizedProp] = inputObject[prop];
538                }
539            }
540        }
541
542        return normalizedInput;
543    }
544
545    var priorities = {};
546
547    function addUnitPriority(unit, priority) {
548        priorities[unit] = priority;
549    }
550
551    function getPrioritizedUnits(unitsObj) {
552        var units = [];
553        for (var u in unitsObj) {
554            units.push({ unit: u, priority: priorities[u] });
555        }
556        units.sort(function (a, b) {
557            return a.priority - b.priority;
558        });
559        return units;
560    }
561
562    function makeGetSet(unit, keepTime) {
563        return function (value) {
564            if (value != null) {
565                set$1(this, unit, value);
566                hooks.updateOffset(this, keepTime);
567                return this;
568            } else {
569                return get(this, unit);
570            }
571        };
572    }
573
574    function get(mom, unit) {
575        return mom.isValid() ?
576            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
577    }
578
579    function set$1(mom, unit, value) {
580        if (mom.isValid()) {
581            mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
582        }
583    }
584
585    // MOMENTS
586
587    function stringGet(units) {
588        units = normalizeUnits(units);
589        if (isFunction(this[units])) {
590            return this[units]();
591        }
592        return this;
593    }
594
595
596    function stringSet(units, value) {
597        if (typeof units === 'object') {
598            units = normalizeObjectUnits(units);
599            var prioritized = getPrioritizedUnits(units);
600            for (var i = 0; i < prioritized.length; i++) {
601                this[prioritized[i].unit](units[prioritized[i].unit]);
602            }
603        } else {
604            units = normalizeUnits(units);
605            if (isFunction(this[units])) {
606                return this[units](value);
607            }
608        }
609        return this;
610    }
611
612    function zeroFill(number, targetLength, forceSign) {
613        var absNumber = '' + Math.abs(number),
614            zerosToFill = targetLength - absNumber.length,
615            sign = number >= 0;
616        return (sign ? (forceSign ? '+' : '') : '-') +
617            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
618    }
619
620    var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 50,347 bytes, lines 620-2126
620|x|X|zz?|ZZ?|.)/g;
621
622    var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
623
624    var formatFunctions = {};
625
626    var formatTokenFunctions = {};
627
628    // token:    'M'
629    // padded:   ['MM', 2]
630    // ordinal:  'Mo'
631    // callback: function () { this.month() + 1 }
632    function addFormatToken(token, padded, ordinal, callback) {
633        var func = callback;
634        if (typeof callback === 'string') {
635            func = function () {
636                return this[callback]();
637            };
638        }
639        if (token) {
640            formatTokenFunctions[token] = func;
641        }
642        if (padded) {
643            formatTokenFunctions[padded[0]] = function () {
644                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
645            };
646        }
647        if (ordinal) {
648            formatTokenFunctions[ordinal] = function () {
649                return this.localeData().ordinal(func.apply(this, arguments), token);
650            };
651        }
652    }
653
654    function removeFormattingTokens(input) {
655        if (input.match(/\[[\s\S]/)) {
656            return input.replace(/^\[|\]$/g, '');
657        }
658        return input.replace(/\\/g, '');
659    }
660
661    function makeFormatFunction(format) {
662        var array = format.match(formattingTokens), i, length;
663
664        for (i = 0, length = array.length; i < length; i++) {
665            if (formatTokenFunctions[array[i]]) {
666                array[i] = formatTokenFunctions[array[i]];
667            } else {
668                array[i] = removeFormattingTokens(array[i]);
669            }
670        }
671
672        return function (mom) {
673            var output = '', i;
674            for (i = 0; i < length; i++) {
675                output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
676            }
677            return output;
678        };
679    }
680
681    // format date using native date object
682    function formatMoment(m, format) {
683        if (!m.isValid()) {
684            return m.localeData().invalidDate();
685        }
686
687        format = expandFormat(format, m.localeData());
688        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
689
690        return formatFunctions[format](m);
691    }
692
693    function expandFormat(format, locale) {
694        var i = 5;
695
696        function replaceLongDateFormatTokens(input) {
697            return locale.longDateFormat(input) || input;
698        }
699
700        localFormattingTokens.lastIndex = 0;
701        while (i >= 0 && localFormattingTokens.test(format)) {
702            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
703            localFormattingTokens.lastIndex = 0;
704            i -= 1;
705        }
706
707        return format;
708    }
709
710    var match1 = /\d/;            //       0 - 9
711    var match2 = /\d\d/;          //      00 - 99
712    var match3 = /\d{3}/;         //     000 - 999
713    var match4 = /\d{4}/;         //    0000 - 9999
714    var match6 = /[+-]?\d{6}/;    // -999999 - 999999
715    var match1to2 = /\d\d?/;         //       0 - 99
716    var match3to4 = /\d\d\d\d?/;     //     999 - 9999
717    var match5to6 = /\d\d\d\d\d\d?/; //   99999 - 999999
718    var match1to3 = /\d{1,3}/;       //       0 - 999
719    var match1to4 = /\d{1,4}/;       //       0 - 9999
720    var match1to6 = /[+-]?\d{1,6}/;  // -999999 - 999999
721
722    var matchUnsigned = /\d+/;           //       0 - inf
723    var matchSigned = /[+-]?\d+/;      //    -inf - inf
724
725    var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
726    var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
727
728    var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
729
730    // any word (or two) characters or numbers including two/three word month in arabic.
731    // includes scottish gaelic two word and hyphenated months
732    var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
733
734
735    var regexes = {};
736
737    function addRegexToken(token, regex, strictRegex) {
738        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
739            return (isStrict && strictRegex) ? strictRegex : regex;
740        };
741    }
742
743    function getParseRegexForToken(token, config) {
744        if (!hasOwnProp(regexes, token)) {
745            return new RegExp(unescapeFormat(token));
746        }
747
748        return regexes[token](config._strict, config._locale);
749    }
750
751    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
752    function unescapeFormat(s) {
753        return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
754            return p1 || p2 || p3 || p4;
755        }));
756    }
757
758    function regexEscape(s) {
759        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
760    }
761
762    var tokens = {};
763
764    function addParseToken(token, callback) {
765        var i, func = callback;
766        if (typeof token === 'string') {
767            token = [token];
768        }
769        if (isNumber(callback)) {
770            func = function (input, array) {
771                array[callback] = toInt(input);
772            };
773        }
774        for (i = 0; i < token.length; i++) {
775            tokens[token[i]] = func;
776        }
777    }
778
779    function addWeekParseToken(token, callback) {
780        addParseToken(token, function (input, array, config, token) {
781            config._w = config._w || {};
782            callback(input, config._w, config, token);
783        });
784    }
785
786    function addTimeToArrayFromToken(token, input, config) {
787        if (input != null && hasOwnProp(tokens, token)) {
788            tokens[token](input, config._a, config, token);
789        }
790    }
791
792    var YEAR = 0;
793    var MONTH = 1;
794    var DATE = 2;
795    var HOUR = 3;
796    var MINUTE = 4;
797    var SECOND = 5;
798    var MILLISECOND = 6;
799    var WEEK = 7;
800    var WEEKDAY = 8;
801
802    var indexOf;
803
804    if (Array.prototype.indexOf) {
805        indexOf = Array.prototype.indexOf;
806    } else {
807        indexOf = function (o) {
808            // I know
809            var i;
810            for (i = 0; i < this.length; ++i) {
811                if (this[i] === o) {
812                    return i;
813                }
814            }
815            return -1;
816        };
817    }
818
819    var indexOf$1 = indexOf;
820
821    function daysInMonth(year, month) {
822        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
823    }
824
825    // FORMATTING
826
827    addFormatToken('M', ['MM', 2], 'Mo', function () {
828        return this.month() + 1;
829    });
830
831    addFormatToken('MMM', 0, 0, function (format) {
832        return this.localeData().monthsShort(this, format);
833    });
834
835    addFormatToken('MMMM', 0, 0, function (format) {
836        return this.localeData().months(this, format);
837    });
838
839    // ALIASES
840
841    addUnitAlias('month', 'M');
842
843    // PRIORITY
844
845    addUnitPriority('month', 8);
846
847    // PARSING
848
849    addRegexToken('M', match1to2);
850    addRegexToken('MM', match1to2, match2);
851    addRegexToken('MMM', function (isStrict, locale) {
852        return locale.monthsShortRegex(isStrict);
853    });
854    addRegexToken('MMMM', function (isStrict, locale) {
855        return locale.monthsRegex(isStrict);
856    });
857
858    addParseToken(['M', 'MM'], function (input, array) {
859        array[MONTH] = toInt(input) - 1;
860    });
861
862    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
863        var month = config._locale.monthsParse(input, token, config._strict);
864        // if we didn't find a month name, mark the date as invalid.
865        if (month != null) {
866            array[MONTH] = month;
867        } else {
868            getParsingFlags(config).invalidMonth = input;
869        }
870    });
871
872    // LOCALES
873
874    var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
875    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
876    function localeMonths(m, format) {
877        if (!m) {
878            return isArray(this._months) ? this._months :
879                this._months['standalone'];
880        }
881        return isArray(this._months) ? this._months[m.month()] :
882            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
883    }
884
885    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
886    function localeMonthsShort(m, format) {
887        if (!m) {
888            return isArray(this._monthsShort) ? this._monthsShort :
889                this._monthsShort['standalone'];
890        }
891        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
892            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
893    }
894
895    function handleStrictParse(monthName, format, strict) {
896        var i, ii, mom, llc = monthName.toLocaleLowerCase();
897        if (!this._monthsParse) {
898            // this is not used
899            this._monthsParse = [];
900            this._longMonthsParse = [];
901            this._shortMonthsParse = [];
902            for (i = 0; i < 12; ++i) {
903                mom = createUTC([2000, i]);
904                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
905                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
906            }
907        }
908
909        if (strict) {
910            if (format === 'MMM') {
911                ii = indexOf$1.call(this._shortMonthsParse, llc);
912                return ii !== -1 ? ii : null;
913            } else {
914                ii = indexOf$1.call(this._longMonthsParse, llc);
915                return ii !== -1 ? ii : null;
916            }
917        } else {
918            if (format === 'MMM') {
919                ii = indexOf$1.call(this._shortMonthsParse, llc);
920                if (ii !== -1) {
921                    return ii;
922                }
923                ii = indexOf$1.call(this._longMonthsParse, llc);
924                return ii !== -1 ? ii : null;
925            } else {
926                ii = indexOf$1.call(this._longMonthsParse, llc);
927                if (ii !== -1) {
928                    return ii;
929                }
930                ii = indexOf$1.call(this._shortMonthsParse, llc);
931                return ii !== -1 ? ii : null;
932            }
933        }
934    }
935
936    function localeMonthsParse(monthName, format, strict) {
937        var i, mom, regex;
938
939        if (this._monthsParseExact) {
940            return handleStrictParse.call(this, monthName, format, strict);
941        }
942
943        if (!this._monthsParse) {
944            this._monthsParse = [];
945            this._longMonthsParse = [];
946            this._shortMonthsParse = [];
947        }
948
949        // TODO: add sorting
950        // Sorting makes sure if one month (or abbr) is a prefix of another
951        // see sorting in computeMonthsParse
952        for (i = 0; i < 12; i++) {
953            // make the regex if we don't have it already
954            mom = createUTC([2000, i]);
955            if (strict && !this._longMonthsParse[i]) {
956                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
957                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
958            }
959            if (!strict && !this._monthsParse[i]) {
960                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
961                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
962            }
963            // test the regex
964            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
965                return i;
966            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
967                return i;
968            } else if (!strict && this._monthsParse[i].test(monthName)) {
969                return i;
970            }
971        }
972    }
973
974    // MOMENTS
975
976    function setMonth(mom, value) {
977        var dayOfMonth;
978
979        if (!mom.isValid()) {
980            // No op
981            return mom;
982        }
983
984        if (typeof value === 'string') {
985            if (/^\d+$/.test(value)) {
986                value = toInt(value);
987            } else {
988                value = mom.localeData().monthsParse(value);
989                // TODO: Another silent failure?
990                if (!isNumber(value)) {
991                    return mom;
992                }
993            }
994        }
995
996        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
997        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
998        return mom;
999    }
1000
1001    function getSetMonth(value) {
1002        if (value != null) {
1003            setMonth(this, value);
1004            hooks.updateOffset(this, true);
1005            return this;
1006        } else {
1007            return get(this, 'Month');
1008        }
1009    }
1010
1011    function getDaysInMonth() {
1012        return daysInMonth(this.year(), this.month());
1013    }
1014
1015    var defaultMonthsShortRegex = matchWord;
1016    function monthsShortRegex(isStrict) {
1017        if (this._monthsParseExact) {
1018            if (!hasOwnProp(this, '_monthsRegex')) {
1019                computeMonthsParse.call(this);
1020            }
1021            if (isStrict) {
1022                return this._monthsShortStrictRegex;
1023            } else {
1024                return this._monthsShortRegex;
1025            }
1026        } else {
1027            if (!hasOwnProp(this, '_monthsShortRegex')) {
1028                this._monthsShortRegex = defaultMonthsShortRegex;
1029            }
1030            return this._monthsShortStrictRegex && isStrict ?
1031                this._monthsShortStrictRegex : this._monthsShortRegex;
1032        }
1033    }
1034
1035    var defaultMonthsRegex = matchWord;
1036    function monthsRegex(isStrict) {
1037        if (this._monthsParseExact) {
1038            if (!hasOwnProp(this, '_monthsRegex')) {
1039                computeMonthsParse.call(this);
1040            }
1041            if (isStrict) {
1042                return this._monthsStrictRegex;
1043            } else {
1044                return this._monthsRegex;
1045            }
1046        } else {
1047            if (!hasOwnProp(this, '_monthsRegex')) {
1048                this._monthsRegex = defaultMonthsRegex;
1049            }
1050            return this._monthsStrictRegex && isStrict ?
1051                this._monthsStrictRegex : this._monthsRegex;
1052        }
1053    }
1054
1055    function computeMonthsParse() {
1056        function cmpLenRev(a, b) {
1057            return b.length - a.length;
1058        }
1059
1060        var shortPieces = [], longPieces = [], mixedPieces = [],
1061            i, mom;
1062        for (i = 0; i < 12; i++) {
1063            // make the regex if we don't have it already
1064            mom = createUTC([2000, i]);
1065            shortPieces.push(this.monthsShort(mom, ''));
1066            longPieces.push(this.months(mom, ''));
1067            mixedPieces.push(this.months(mom, ''));
1068            mixedPieces.push(this.monthsShort(mom, ''));
1069        }
1070        // Sorting makes sure if one month (or abbr) is a prefix of another it
1071        // will match the longer piece.
1072        shortPieces.sort(cmpLenRev);
1073        longPieces.sort(cmpLenRev);
1074        mixedPieces.sort(cmpLenRev);
1075        for (i = 0; i < 12; i++) {
1076            shortPieces[i] = regexEscape(shortPieces[i]);
1077            longPieces[i] = regexEscape(longPieces[i]);
1078        }
1079        for (i = 0; i < 24; i++) {
1080            mixedPieces[i] = regexEscape(mixedPieces[i]);
1081        }
1082
1083        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1084        this._monthsShortRegex = this._monthsRegex;
1085        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1086        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1087    }
1088
1089    // FORMATTING
1090
1091    addFormatToken('Y', 0, 0, function () {
1092        var y = this.year();
1093        return y <= 9999 ? '' + y : '+' + y;
1094    });
1095
1096    addFormatToken(0, ['YY', 2], 0, function () {
1097        return this.year() % 100;
1098    });
1099
1100    addFormatToken(0, ['YYYY', 4], 0, 'year');
1101    addFormatToken(0, ['YYYYY', 5], 0, 'year');
1102    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1103
1104    // ALIASES
1105
1106    addUnitAlias('year', 'y');
1107
1108    // PRIORITIES
1109
1110    addUnitPriority('year', 1);
1111
1112    // PARSING
1113
1114    addRegexToken('Y', matchSigned);
1115    addRegexToken('YY', match1to2, match2);
1116    addRegexToken('YYYY', match1to4, match4);
1117    addRegexToken('YYYYY', match1to6, match6);
1118    addRegexToken('YYYYYY', match1to6, match6);
1119
1120    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1121    addParseToken('YYYY', function (input, array) {
1122        array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1123    });
1124    addParseToken('YY', function (input, array) {
1125        array[YEAR] = hooks.parseTwoDigitYear(input);
1126    });
1127    addParseToken('Y', function (input, array) {
1128        array[YEAR] = parseInt(input, 10);
1129    });
1130
1131    // HELPERS
1132
1133    function daysInYear(year) {
1134        return isLeapYear(year) ? 366 : 365;
1135    }
1136
1137    function isLeapYear(year) {
1138        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
1139    }
1140
1141    // HOOKS
1142
1143    hooks.parseTwoDigitYear = function (input) {
1144        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1145    };
1146
1147    // MOMENTS
1148
1149    var getSetYear = makeGetSet('FullYear', true);
1150
1151    function getIsLeapYear() {
1152        return isLeapYear(this.year());
1153    }
1154
1155    function createDate(y, m, d, h, M, s, ms) {
1156        // can't just apply() to create a date:
1157        // https://stackoverflow.com/q/181348
1158        var date = new Date(y, m, d, h, M, s, ms);
1159
1160        // the date constructor remaps years 0-99 to 1900-1999
1161        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
1162            date.setFullYear(y);
1163        }
1164        return date;
1165    }
1166
1167    function createUTCDate(y) {
1168        var date = new Date(Date.UTC.apply(null, arguments));
1169
1170        // the Date.UTC function remaps years 0-99 to 1900-1999
1171        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
1172            date.setUTCFullYear(y);
1173        }
1174        return date;
1175    }
1176
1177    // start-of-first-week - start-of-year
1178    function firstWeekOffset(year, dow, doy) {
1179        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1180            fwd = 7 + dow - doy,
1181            // first-week day local weekday -- which local weekday is fwd
1182            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1183
1184        return -fwdlw + fwd - 1;
1185    }
1186
1187    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1188    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1189        var localWeekday = (7 + weekday - dow) % 7,
1190            weekOffset = firstWeekOffset(year, dow, doy),
1191            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1192            resYear, resDayOfYear;
1193
1194        if (dayOfYear <= 0) {
1195            resYear = year - 1;
1196            resDayOfYear = daysInYear(resYear) + dayOfYear;
1197        } else if (dayOfYear > daysInYear(year)) {
1198            resYear = year + 1;
1199            resDayOfYear = dayOfYear - daysInYear(year);
1200        } else {
1201            resYear = year;
1202            resDayOfYear = dayOfYear;
1203        }
1204
1205        return {
1206            year: resYear,
1207            dayOfYear: resDayOfYear
1208        };
1209    }
1210
1211    function weekOfYear(mom, dow, doy) {
1212        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1213            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1214            resWeek, resYear;
1215
1216        if (week < 1) {
1217            resYear = mom.year() - 1;
1218            resWeek = week + weeksInYear(resYear, dow, doy);
1219        } else if (week > weeksInYear(mom.year(), dow, doy)) {
1220            resWeek = week - weeksInYear(mom.year(), dow, doy);
1221            resYear = mom.year() + 1;
1222        } else {
1223            resYear = mom.year();
1224            resWeek = week;
1225        }
1226
1227        return {
1228            week: resWeek,
1229            year: resYear
1230        };
1231    }
1232
1233    function weeksInYear(year, dow, doy) {
1234        var weekOffset = firstWeekOffset(year, dow, doy),
1235            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
1236        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
1237    }
1238
1239    // FORMATTING
1240
1241    addFormatToken('w', ['ww', 2], 'wo', 'week');
1242    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1243
1244    // ALIASES
1245
1246    addUnitAlias('week', 'w');
1247    addUnitAlias('isoWeek', 'W');
1248
1249    // PRIORITIES
1250
1251    addUnitPriority('week', 5);
1252    addUnitPriority('isoWeek', 5);
1253
1254    // PARSING
1255
1256    addRegexToken('w', match1to2);
1257    addRegexToken('ww', match1to2, match2);
1258    addRegexToken('W', match1to2);
1259    addRegexToken('WW', match1to2, match2);
1260
1261    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
1262        week[token.substr(0, 1)] = toInt(input);
1263    });
1264
1265    // HELPERS
1266
1267    // LOCALES
1268
1269    function localeWeek(mom) {
1270        return weekOfYear(mom, this._week.dow, this._week.doy).week;
1271    }
1272
1273    var defaultLocaleWeek = {
1274        dow: 0, // Sunday is the first day of the week.
1275        doy: 6  // The week that contains Jan 1st is the first week of the year.
1276    };
1277
1278    function localeFirstDayOfWeek() {
1279        return this._week.dow;
1280    }
1281
1282    function localeFirstDayOfYear() {
1283        return this._week.doy;
1284    }
1285
1286    // MOMENTS
1287
1288    function getSetWeek(input) {
1289        var week = this.localeData().week(this);
1290        return input == null ? week : this.add((input - week) * 7, 'd');
1291    }
1292
1293    function getSetISOWeek(input) {
1294        var week = weekOfYear(this, 1, 4).week;
1295        return input == null ? week : this.add((input - week) * 7, 'd');
1296    }
1297
1298    // FORMATTING
1299
1300    addFormatToken('d', 0, 'do', 'day');
1301
1302    addFormatToken('dd', 0, 0, function (format) {
1303        return this.localeData().weekdaysMin(this, format);
1304    });
1305
1306    addFormatToken('ddd', 0, 0, function (format) {
1307        return this.localeData().weekdaysShort(this, format);
1308    });
1309
1310    addFormatToken('dddd', 0, 0, function (format) {
1311        return this.localeData().weekdays(this, format);
1312    });
1313
1314    addFormatToken('e', 0, 0, 'weekday');
1315    addFormatToken('E', 0, 0, 'isoWeekday');
1316
1317    // ALIASES
1318
1319    addUnitAlias('day', 'd');
1320    addUnitAlias('weekday', 'e');
1321    addUnitAlias('isoWeekday', 'E');
1322
1323    // PRIORITY
1324    addUnitPriority('day', 11);
1325    addUnitPriority('weekday', 11);
1326    addUnitPriority('isoWeekday', 11);
1327
1328    // PARSING
1329
1330    addRegexToken('d', match1to2);
1331    addRegexToken('e', match1to2);
1332    addRegexToken('E', match1to2);
1333    addRegexToken('dd', function (isStrict, locale) {
1334        return locale.weekdaysMinRegex(isStrict);
1335    });
1336    addRegexToken('ddd', function (isStrict, locale) {
1337        return locale.weekdaysShortRegex(isStrict);
1338    });
1339    addRegexToken('dddd', function (isStrict, locale) {
1340        return locale.weekdaysRegex(isStrict);
1341    });
1342
1343    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
1344        var weekday = config._locale.weekdaysParse(input, token, config._strict);
1345        // if we didn't get a weekday name, mark the date as invalid
1346        if (weekday != null) {
1347            week.d = weekday;
1348        } else {
1349            getParsingFlags(config).invalidWeekday = input;
1350        }
1351    });
1352
1353    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
1354        week[token] = toInt(input);
1355    });
1356
1357    // HELPERS
1358
1359    function parseWeekday(input, locale) {
1360        if (typeof input !== 'string') {
1361            return input;
1362        }
1363
1364        if (!isNaN(input)) {
1365            return parseInt(input, 10);
1366        }
1367
1368        input = locale.weekdaysParse(input);
1369        if (typeof input === 'number') {
1370            return input;
1371        }
1372
1373        return null;
1374    }
1375
1376    function parseIsoWeekday(input, locale) {
1377        if (typeof input === 'string') {
1378            return locale.weekdaysParse(input) % 7 || 7;
1379        }
1380        return isNaN(input) ? null : input;
1381    }
1382
1383    // LOCALES
1384
1385    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
1386    function localeWeekdays(m, format) {
1387        if (!m) {
1388            return isArray(this._weekdays) ? this._weekdays :
1389                this._weekdays['standalone'];
1390        }
1391        return isArray(this._weekdays) ? this._weekdays[m.day()] :
1392            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
1393    }
1394
1395    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
1396    function localeWeekdaysShort(m) {
1397        return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
1398    }
1399
1400    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
1401    function localeWeekdaysMin(m) {
1402        return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
1403    }
1404
1405    function handleStrictParse$1(weekdayName, format, strict) {
1406        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
1407        if (!this._weekdaysParse) {
1408            this._weekdaysParse = [];
1409            this._shortWeekdaysParse = [];
1410            this._minWeekdaysParse = [];
1411
1412            for (i = 0; i < 7; ++i) {
1413                mom = createUTC([2000, 1]).day(i);
1414                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
1415                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
1416                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
1417            }
1418        }
1419
1420        if (strict) {
1421            if (format === 'dddd') {
1422                ii = indexOf$1.call(this._weekdaysParse, llc);
1423                return ii !== -1 ? ii : null;
1424            } else if (format === 'ddd') {
1425                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
1426                return ii !== -1 ? ii : null;
1427            } else {
1428                ii = indexOf$1.call(this._minWeekdaysParse, llc);
1429                return ii !== -1 ? ii : null;
1430            }
1431        } else {
1432            if (format === 'dddd') {
1433                ii = indexOf$1.call(this._weekdaysParse, llc);
1434                if (ii !== -1) {
1435                    return ii;
1436                }
1437                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
1438                if (ii !== -1) {
1439                    return ii;
1440                }
1441                ii = indexOf$1.call(this._minWeekdaysParse, llc);
1442                return ii !== -1 ? ii : null;
1443            } else if (format === 'ddd') {
1444                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
1445                if (ii !== -1) {
1446                    return ii;
1447                }
1448                ii = indexOf$1.call(this._weekdaysParse, llc);
1449                if (ii !== -1) {
1450                    return ii;
1451                }
1452                ii = indexOf$1.call(this._minWeekdaysParse, llc);
1453                return ii !== -1 ? ii : null;
1454            } else {
1455                ii = indexOf$1.call(this._minWeekdaysParse, llc);
1456                if (ii !== -1) {
1457                    return ii;
1458                }
1459                ii = indexOf$1.call(this._weekdaysParse, llc);
1460                if (ii !== -1) {
1461                    return ii;
1462                }
1463                ii = indexOf$1.call(this._shortWeekdaysParse, llc);
1464                return ii !== -1 ? ii : null;
1465            }
1466        }
1467    }
1468
1469    function localeWeekdaysParse(weekdayName, format, strict) {
1470        var i, mom, regex;
1471
1472        if (this._weekdaysParseExact) {
1473            return handleStrictParse$1.call(this, weekdayName, format, strict);
1474        }
1475
1476        if (!this._weekdaysParse) {
1477            this._weekdaysParse = [];
1478            this._minWeekdaysParse = [];
1479            this._shortWeekdaysParse = [];
1480            this._fullWeekdaysParse = [];
1481        }
1482
1483        for (i = 0; i < 7; i++) {
1484            // make the regex if we don't have it already
1485
1486            mom = createUTC([2000, 1]).day(i);
1487            if (strict && !this._fullWeekdaysParse[i]) {
1488                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
1489                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
1490                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
1491            }
1492            if (!this._weekdaysParse[i]) {
1493                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
1494                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
1495            }
1496            // test the regex
1497            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
1498                return i;
1499            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
1500                return i;
1501            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
1502                return i;
1503            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
1504                return i;
1505            }
1506        }
1507    }
1508
1509    // MOMENTS
1510
1511    function getSetDayOfWeek(input) {
1512        if (!this.isValid()) {
1513            return input != null ? this : NaN;
1514        }
1515        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1516        if (input != null) {
1517            input = parseWeekday(input, this.localeData());
1518            return this.add(input - day, 'd');
1519        } else {
1520            return day;
1521        }
1522    }
1523
1524    function getSetLocaleDayOfWeek(input) {
1525        if (!this.isValid()) {
1526            return input != null ? this : NaN;
1527        }
1528        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
1529        return input == null ? weekday : this.add(input - weekday, 'd');
1530    }
1531
1532    function getSetISODayOfWeek(input) {
1533        if (!this.isValid()) {
1534            return input != null ? this : NaN;
1535        }
1536
1537        // behaves the same as moment#day except
1538        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
1539        // as a setter, sunday should belong to the previous week.
1540
1541        if (input != null) {
1542            var weekday = parseIsoWeekday(input, this.localeData());
1543            return this.day(this.day() % 7 ? weekday : weekday - 7);
1544        } else {
1545            return this.day() || 7;
1546        }
1547    }
1548
1549    var defaultWeekdaysRegex = matchWord;
1550    function weekdaysRegex(isStrict) {
1551        if (this._weekdaysParseExact) {
1552            if (!hasOwnProp(this, '_weekdaysRegex')) {
1553                computeWeekdaysParse.call(this);
1554            }
1555            if (isStrict) {
1556                return this._weekdaysStrictRegex;
1557            } else {
1558                return this._weekdaysRegex;
1559            }
1560        } else {
1561            if (!hasOwnProp(this, '_weekdaysRegex')) {
1562                this._weekdaysRegex = defaultWeekdaysRegex;
1563            }
1564            return this._weekdaysStrictRegex && isStrict ?
1565                this._weekdaysStrictRegex : this._weekdaysRegex;
1566        }
1567    }
1568
1569    var defaultWeekdaysShortRegex = matchWord;
1570    function weekdaysShortRegex(isStrict) {
1571        if (this._weekdaysParseExact) {
1572            if (!hasOwnProp(this, '_weekdaysRegex')) {
1573                computeWeekdaysParse.call(this);
1574            }
1575            if (isStrict) {
1576                return this._weekdaysShortStrictRegex;
1577            } else {
1578                return this._weekdaysShortRegex;
1579            }
1580        } else {
1581            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
1582                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
1583            }
1584            return this._weekdaysShortStrictRegex && isStrict ?
1585                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
1586        }
1587    }
1588
1589    var defaultWeekdaysMinRegex = matchWord;
1590    function weekdaysMinRegex(isStrict) {
1591        if (this._weekdaysParseExact) {
1592            if (!hasOwnProp(this, '_weekdaysRegex')) {
1593                computeWeekdaysParse.call(this);
1594            }
1595            if (isStrict) {
1596                return this._weekdaysMinStrictRegex;
1597            } else {
1598                return this._weekdaysMinRegex;
1599            }
1600        } else {
1601            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
1602                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
1603            }
1604            return this._weekdaysMinStrictRegex && isStrict ?
1605                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
1606        }
1607    }
1608
1609
1610    function computeWeekdaysParse() {
1611        function cmpLenRev(a, b) {
1612            return b.length - a.length;
1613        }
1614
1615        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
1616            i, mom, minp, shortp, longp;
1617        for (i = 0; i < 7; i++) {
1618            // make the regex if we don't have it already
1619            mom = createUTC([2000, 1]).day(i);
1620            minp = this.weekdaysMin(mom, '');
1621            shortp = this.weekdaysShort(mom, '');
1622            longp = this.weekdays(mom, '');
1623            minPieces.push(minp);
1624            shortPieces.push(shortp);
1625            longPieces.push(longp);
1626            mixedPieces.push(minp);
1627            mixedPieces.push(shortp);
1628            mixedPieces.push(longp);
1629        }
1630        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
1631        // will match the longer piece.
1632        minPieces.sort(cmpLenRev);
1633        shortPieces.sort(cmpLenRev);
1634        longPieces.sort(cmpLenRev);
1635        mixedPieces.sort(cmpLenRev);
1636        for (i = 0; i < 7; i++) {
1637            shortPieces[i] = regexEscape(shortPieces[i]);
1638            longPieces[i] = regexEscape(longPieces[i]);
1639            mixedPieces[i] = regexEscape(mixedPieces[i]);
1640        }
1641
1642        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1643        this._weekdaysShortRegex = this._weekdaysRegex;
1644        this._weekdaysMinRegex = this._weekdaysRegex;
1645
1646        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1647        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1648        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
1649    }
1650
1651    // FORMATTING
1652
1653    function hFormat() {
1654        return this.hours() % 12 || 12;
1655    }
1656
1657    function kFormat() {
1658        return this.hours() || 24;
1659    }
1660
1661    addFormatToken('H', ['HH', 2], 0, 'hour');
1662    addFormatToken('h', ['hh', 2], 0, hFormat);
1663    addFormatToken('k', ['kk', 2], 0, kFormat);
1664
1665    addFormatToken('hmm', 0, 0, function () {
1666        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
1667    });
1668
1669    addFormatToken('hmmss', 0, 0, function () {
1670        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
1671            zeroFill(this.seconds(), 2);
1672    });
1673
1674    addFormatToken('Hmm', 0, 0, function () {
1675        return '' + this.hours() + zeroFill(this.minutes(), 2);
1676    });
1677
1678    addFormatToken('Hmmss', 0, 0, function () {
1679        return '' + this.hours() + zeroFill(this.minutes(), 2) +
1680            zeroFill(this.seconds(), 2);
1681    });
1682
1683    function meridiem(token, lowercase) {
1684        addFormatToken(token, 0, 0, function () {
1685            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
1686        });
1687    }
1688
1689    meridiem('a', true);
1690    meridiem('A', false);
1691
1692    // ALIASES
1693
1694    addUnitAlias('hour', 'h');
1695
1696    // PRIORITY
1697    addUnitPriority('hour', 13);
1698
1699    // PARSING
1700
1701    function matchMeridiem(isStrict, locale) {
1702        return locale._meridiemParse;
1703    }
1704
1705    addRegexToken('a', matchMeridiem);
1706    addRegexToken('A', matchMeridiem);
1707    addRegexToken('H', match1to2);
1708    addRegexToken('h', match1to2);
1709    addRegexToken('k', match1to2);
1710    addRegexToken('HH', match1to2, match2);
1711    addRegexToken('hh', match1to2, match2);
1712    addRegexToken('kk', match1to2, match2);
1713
1714    addRegexToken('hmm', match3to4);
1715    addRegexToken('hmmss', match5to6);
1716    addRegexToken('Hmm', match3to4);
1717    addRegexToken('Hmmss', match5to6);
1718
1719    addParseToken(['H', 'HH'], HOUR);
1720    addParseToken(['k', 'kk'], function (input, array, config) {
1721        var kInput = toInt(input);
1722        array[HOUR] = kInput === 24 ? 0 : kInput;
1723    });
1724    addParseToken(['a', 'A'], function (input, array, config) {
1725        config._isPm = config._locale.isPM(input);
1726        config._meridiem = input;
1727    });
1728    addParseToken(['h', 'hh'], function (input, array, config) {
1729        array[HOUR] = toInt(input);
1730        getParsingFlags(config).bigHour = true;
1731    });
1732    addParseToken('hmm', function (input, array, config) {
1733        var pos = input.length - 2;
1734        array[HOUR] = toInt(input.substr(0, pos));
1735        array[MINUTE] = toInt(input.substr(pos));
1736        getParsingFlags(config).bigHour = true;
1737    });
1738    addParseToken('hmmss', function (input, array, config) {
1739        var pos1 = input.length - 4;
1740        var pos2 = input.length - 2;
1741        array[HOUR] = toInt(input.substr(0, pos1));
1742        array[MINUTE] = toInt(input.substr(pos1, 2));
1743        array[SECOND] = toInt(input.substr(pos2));
1744        getParsingFlags(config).bigHour = true;
1745    });
1746    addParseToken('Hmm', function (input, array, config) {
1747        var pos = input.length - 2;
1748        array[HOUR] = toInt(input.substr(0, pos));
1749        array[MINUTE] = toInt(input.substr(pos));
1750    });
1751    addParseToken('Hmmss', function (input, array, config) {
1752        var pos1 = input.length - 4;
1753        var pos2 = input.length - 2;
1754        array[HOUR] = toInt(input.substr(0, pos1));
1755        array[MINUTE] = toInt(input.substr(pos1, 2));
1756        array[SECOND] = toInt(input.substr(pos2));
1757    });
1758
1759    // LOCALES
1760
1761    function localeIsPM(input) {
1762        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
1763        // Using charAt should be more compatible.
1764        return ((input + '').toLowerCase().charAt(0) === 'p');
1765    }
1766
1767    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
1768    function localeMeridiem(hours, minutes, isLower) {
1769        if (hours > 11) {
1770            return isLower ? 'pm' : 'PM';
1771        } else {
1772            return isLower ? 'am' : 'AM';
1773        }
1774    }
1775
1776
1777    // MOMENTS
1778
1779    // Setting the hour should keep the time, because the user explicitly
1780    // specified which hour he wants. So trying to maintain the same hour (in
1781    // a new timezone) makes sense. Adding/subtracting hours does not follow
1782    // this rule.
1783    var getSetHour = makeGetSet('Hours', true);
1784
1785    // months
1786    // week
1787    // weekdays
1788    // meridiem
1789    var baseConfig = {
1790        calendar: defaultCalendar,
1791        longDateFormat: defaultLongDateFormat,
1792        invalidDate: defaultInvalidDate,
1793        ordinal: defaultOrdinal,
1794        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
1795        relativeTime: defaultRelativeTime,
1796
1797        months: defaultLocaleMonths,
1798        monthsShort: defaultLocaleMonthsShort,
1799
1800        week: defaultLocaleWeek,
1801
1802        weekdays: defaultLocaleWeekdays,
1803        weekdaysMin: defaultLocaleWeekdaysMin,
1804        weekdaysShort: defaultLocaleWeekdaysShort,
1805
1806        meridiemParse: defaultLocaleMeridiemParse
1807    };
1808
1809    // internal storage for locale config files
1810    var locales = {};
1811    var localeFamilies = {};
1812    var globalLocale;
1813
1814    function normalizeLocale(key) {
1815        return key ? key.toLowerCase().replace('_', '-') : key;
1816    }
1817
1818    // pick the locale from the array
1819    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
1820    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
1821    function chooseLocale(names) {
1822        var i = 0, j, next, locale, split;
1823
1824        while (i < names.length) {
1825            split = normalizeLocale(names[i]).split('-');
1826            j = split.length;
1827            next = normalizeLocale(names[i + 1]);
1828            next = next ? next.split('-') : null;
1829            while (j > 0) {
1830                locale = loadLocale(split.slice(0, j).join('-'));
1831                if (locale) {
1832                    return locale;
1833                }
1834                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
1835                    //the next array item is better than a shallower substring of this one
1836                    break;
1837                }
1838                j--;
1839            }
1840            i++;
1841        }
1842        return null;
1843    }
1844
1845    function loadLocale(name) {
1846        var oldLocale = null;
1847        // TODO: Find a better way to register and load all the locales in Node
1848        if (!locales[name] && (typeof module !== 'undefined') &&
1849            module && module.exports) {
1850            try {
1851                oldLocale = globalLocale._abbr;
1852                require('./locale/' + name);
1853                // because defineLocale currently also sets the global locale, we
1854                // want to undo that for lazy loaded locales
1855                getSetGlobalLocale(oldLocale);
1856            } catch (e) { }
1857        }
1858        return locales[name];
1859    }
1860
1861    // This function will load locale and then set the global locale.  If
1862    // no arguments are passed in, it will simply return the current global
1863    // locale key.
1864    function getSetGlobalLocale(key, values) {
1865        var data;
1866        if (key) {
1867            if (isUndefined(values)) {
1868                data = getLocale(key);
1869            }
1870            else {
1871                data = defineLocale(key, values);
1872            }
1873
1874            if (data) {
1875                // moment.duration._locale = moment._locale = data;
1876                globalLocale = data;
1877            }
1878        }
1879
1880        return globalLocale._abbr;
1881    }
1882
1883    function defineLocale(name, config) {
1884        if (config !== null) {
1885            var parentConfig = baseConfig;
1886            config.abbr = name;
1887            if (locales[name] != null) {
1888                deprecateSimple('defineLocaleOverride',
1889                    'use moment.updateLocale(localeName, config) to change ' +
1890                    'an existing locale. moment.defineLocale(localeName, ' +
1891                    'config) should only be used for creating a new locale ' +
1892                    'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
1893                parentConfig = locales[name]._config;
1894            } else if (config.parentLocale != null) {
1895                if (locales[config.parentLocale] != null) {
1896                    parentConfig = locales[config.parentLocale]._config;
1897                } else {
1898                    if (!localeFamilies[config.parentLocale]) {
1899                        localeFamilies[config.parentLocale] = [];
1900                    }
1901                    localeFamilies[config.parentLocale].push({
1902                        name: name,
1903                        config: config
1904                    });
1905                    return null;
1906                }
1907            }
1908            locales[name] = new Locale(mergeConfigs(parentConfig, config));
1909
1910            if (localeFamilies[name]) {
1911                localeFamilies[name].forEach(function (x) {
1912                    defineLocale(x.name, x.config);
1913                });
1914            }
1915
1916            // backwards compat for now: also set the locale
1917            // make sure we set the locale AFTER all child locales have been
1918            // created, so we won't end up with the child locale set.
1919            getSetGlobalLocale(name);
1920
1921
1922            return locales[name];
1923        } else {
1924            // useful for testing
1925            delete locales[name];
1926            return null;
1927        }
1928    }
1929
1930    function updateLocale(name, config) {
1931        if (config != null) {
1932            var locale, parentConfig = baseConfig;
1933            // MERGE
1934            if (locales[name] != null) {
1935                parentConfig = locales[name]._config;
1936            }
1937            config = mergeConfigs(parentConfig, config);
1938            locale = new Locale(config);
1939            locale.parentLocale = locales[name];
1940            locales[name] = locale;
1941
1942            // backwards compat for now: also set the locale
1943            getSetGlobalLocale(name);
1944        } else {
1945            // pass null for config to unupdate, useful for tests
1946            if (locales[name] != null) {
1947                if (locales[name].parentLocale != null) {
1948                    locales[name] = locales[name].parentLocale;
1949                } else if (locales[name] != null) {
1950                    delete locales[name];
1951                }
1952            }
1953        }
1954        return locales[name];
1955    }
1956
1957    // returns locale data
1958    function getLocale(key) {
1959        var locale;
1960
1961        if (key && key._locale && key._locale._abbr) {
1962            key = key._locale._abbr;
1963        }
1964
1965        if (!key) {
1966            return globalLocale;
1967        }
1968
1969        if (!isArray(key)) {
1970            //short-circuit everything else
1971            locale = loadLocale(key);
1972            if (locale) {
1973                return locale;
1974            }
1975            key = [key];
1976        }
1977
1978        return chooseLocale(key);
1979    }
1980
1981    function listLocales() {
1982        return keys$1(locales);
1983    }
1984
1985    function checkOverflow(m) {
1986        var overflow;
1987        var a = m._a;
1988
1989        if (a && getParsingFlags(m).overflow === -2) {
1990            overflow =
1991                a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
1992                    a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
1993                        a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
1994                            a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
1995                                a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
1996                                    a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
1997                                        -1;
1998
1999            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
2000                overflow = DATE;
2001            }
2002            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
2003                overflow = WEEK;
2004            }
2005            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
2006                overflow = WEEKDAY;
2007            }
2008
2009            getParsingFlags(m).overflow = overflow;
2010        }
2011
2012        return m;
2013    }
2014
2015    // iso 8601 regex
2016    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
2017    var extendedIsoRegex = /^\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)?)?$/;
2018    var basicIsoRegex = /^\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)?)?$/;
2019
2020    var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
2021
2022    var isoDates = [
2023        ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
2024        ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
2025        ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
2026        ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
2027        ['YYYY-DDD', /\d{4}-\d{3}/],
2028        ['YYYY-MM', /\d{4}-\d\d/, false],
2029        ['YYYYYYMMDD', /[+-]\d{10}/],
2030        ['YYYYMMDD', /\d{8}/],
2031        // YYYYMM is NOT allowed by the standard
2032        ['GGGG[W]WWE', /\d{4}W\d{3}/],
2033        ['GGGG[W]WW', /\d{4}W\d{2}/, false],
2034        ['YYYYDDD', /\d{7}/]
2035    ];
2036
2037    // iso time formats and regexes
2038    var isoTimes = [
2039        ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
2040        ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
2041        ['HH:mm:ss', /\d\d:\d\d:\d\d/],
2042        ['HH:mm', /\d\d:\d\d/],
2043        ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
2044        ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
2045        ['HHmmss', /\d\d\d\d\d\d/],
2046        ['HHmm', /\d\d\d\d/],
2047        ['HH', /\d\d/]
2048    ];
2049
2050    var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
2051
2052    // date from iso format
2053    function configFromISO(config) {
2054        var i, l,
2055            string = config._i,
2056            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
2057            allowTime, dateFormat, timeFormat, tzFormat;
2058
2059        if (match) {
2060            getParsingFlags(config).iso = true;
2061
2062            for (i = 0, l = isoDates.length; i < l; i++) {
2063                if (isoDates[i][1].exec(match[1])) {
2064                    dateFormat = isoDates[i][0];
2065                    allowTime = isoDates[i][2] !== false;
2066                    break;
2067                }
2068            }
2069            if (dateFormat == null) {
2070                config._isValid = false;
2071                return;
2072            }
2073            if (match[3]) {
2074                for (i = 0, l = isoTimes.length; i < l; i++) {
2075                    if (isoTimes[i][1].exec(match[3])) {
2076                        // match[2] should be 'T' or space
2077                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
2078                        break;
2079                    }
2080                }
2081                if (timeFormat == null) {
2082                    config._isValid = false;
2083                    return;
2084                }
2085            }
2086            if (!allowTime && timeFormat != null) {
2087                config._isValid = false;
2088                return;
2089            }
2090            if (match[4]) {
2091                if (tzRegex.exec(match[4])) {
2092                    tzFormat = 'Z';
2093                } else {
2094                    config._isValid = false;
2095                    return;
2096                }
2097            }
2098            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
2099            configFromStringAndFormat(config);
2100        } else {
2101            config._isValid = false;
2102        }
2103    }
2104
2105    // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
2106    var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;
2107
2108    // date and time from ref 2822 format
2109    function configFromRFC2822(config) {
2110        var string, match, dayFormat,
2111            dateFormat, timeFormat, tzFormat;
2112        var timezones = {
2113            ' GMT': ' +0000',
2114            ' EDT': ' -0400',
2115            ' EST': ' -0500',
2116            ' CDT': ' -0500',
2117            ' CST': ' -0600',
2118            ' MDT': ' -0600',
2119            ' MST': ' -0700',
2120            ' PDT': ' -0700',
2121            ' PST': ' -0800'
2122        };
2123        var military = 'YXWVUTSRQPONZABCDEFGHIKLM';
2124        var timezone, timezoneIndex;
2125
2126        string = config._i
2127            .replace(/\([^\)]*\)|[\n\t]/g, ' ') // Remove comments and folding whitespace
2128            .replace(/(\s\s+)/g, ' ') // Replace multiple-spaces with a single space
2129            .replace(/^\s|\s$/g, ''); // Remove leading and trailing spaces
2130        match = basicRfcRegex.exec(string);
2131
2132        if (match) {
2133            dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';
2134            dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');
2135            timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');
2136
2137            // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
2138            if (match[1]) { // day of week given
2139                var momentDate = new Date(match[2]);
2140                var momentDay = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][momentDate.getDay()];
2141
2142                if (match[1].substr(0, 3) !== momentDay) {
2143                    getParsingFlags(config).weekdayMismatch = true;
2144                    config._isValid = false;
2145                    return;
2146                }
2147            }
2148
2149            switch (match[5].length) {
2150                case 2: // military
2151                    if (timezoneIndex === 0) {
2152                        timezone = ' +0000';
2153                    } else {
2154                        timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;
2155                        timezone = ((timezoneIndex < 0) ? ' -' : ' +') +
2156                            (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';
2157                    }
2158                    break;
2159                case 4: // Zone
2160                    timezone = timezones[match[5]];
2161                    break;
2162                default: // UT or +/-9999
2163                    timezone = timezones[' GMT'];
2164            }
2165            match[5] = timezone;
2166            config._i = match.splice(1).join('');
2167            tzFormat = ' ZZ';
2168            config._f = dayFormat + dateFormat + timeFormat + tzFormat;
2169            configFromStringAndFormat(config);
2170            getParsingFlags(config).rfc2822 = true;
2171        } else {
2172            config._isValid = false;
2173        }
2174    }
2175
2176    // date from iso format or fallback
2177    function configFromString(config) {
2178        var matched = aspNetJsonRegex.exec(config._i);
2179
2180        if (matched !== null) {
2181            config._d = new Date(+matched[1]);
2182            return;
2183        }
2184
2185        configFromISO(config);
2186        if (config._isValid === false) {
2187            delete config._isValid;
2188        } else {
2189            return;
2190        }
2191
2192        configFromRFC2822(config);
2193        if (config._isValid === false) {
2194            delete config._isValid;
2195        } else {
2196            return;
2197        }
2198
2199        // Final attempt, use Input Fallback
2200        hooks.createFromInputFallback(config);
2201    }
2202
2203    hooks.createFromInputFallback = deprecate(
2204        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
2205        'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
2206        'discouraged and will be removed in an upcoming major release. Please refer to ' +
2207        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
2208        function (config) {
2209            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
2210        }
2211    );
2212
2213    // Pick the first defined of two or three arguments.
2214    function defaults(a, b, c) {
2215        if (a != null) {
2216            return a;
2217        }
2218        if (b != null) {
2219            return b;
2220        }
2221        return c;
2222    }
2223
2224    function currentDateArray(config) {
2225        // hooks is actually the exported moment object
2226        var nowValue = new Date(hooks.now());
2227        if (config._useUTC) {
2228            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
2229        }
2230        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
2231    }
2232
2233    // convert an array to a date.
2234    // the array should mirror the parameters below
2235    // note: all values past the year are optional and will default to the lowest possible value.
2236    // [year, month, day , hour, minute, second, millisecond]
2237    function configFromArray(config) {
2238        var i, date, input = [], currentDate, yearToUse;
2239
2240        if (config._d) {
2241            return;
2242        }
2243
2244        currentDate = currentDateArray(config);
2245
2246        //compute day of the year from weeks and weekdays
2247        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
2248            dayOfYearFromWeekInfo(config);
2249        }
2250
2251        //if the day of the year is set, figure out what it is
2252        if (config._dayOfYear != null) {
2253            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
2254
2255            if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
2256                getParsingFlags(config)._overflowDayOfYear = true;
2257            }
2258
2259            date = createUTCDate(yearToUse, 0, config._dayOfYear);
2260            config._a[MONTH] = date.getUTCMonth();
2261            config._a[DATE] = date.getUTCDate();
2262        }
2263
2264        // Default to current date.
2265        // * if no year, month, day of month are given, default to today
2266        // * if day of month is given, default month and year
2267        // * if month is given, default only year
2268        // * if year is given, don't default anything
2269        for (i = 0; i < 3 && config._a[i] == null; ++i) {
vendor: 29,529 bytes, lines 2270-3164
2270            config._a[i] = input[i] = currentDate[i];
2271        }
2272
2273        // Zero out whatever was not defaulted, including time
2274        for (; i < 7; i++) {
2275            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
2276        }
2277
2278        // Check for 24:00:00.000
2279        if (config._a[HOUR] === 24 &&
2280            config._a[MINUTE] === 0 &&
2281            config._a[SECOND] === 0 &&
2282            config._a[MILLISECOND] === 0) {
2283            config._nextDay = true;
2284            config._a[HOUR] = 0;
2285        }
2286
2287        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
2288        // Apply timezone offset from input. The actual utcOffset can be changed
2289        // with parseZone.
2290        if (config._tzm != null) {
2291            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
2292        }
2293
2294        if (config._nextDay) {
2295            config._a[HOUR] = 24;
2296        }
2297    }
2298
2299    function dayOfYearFromWeekInfo(config) {
2300        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
2301
2302        w = config._w;
2303        if (w.GG != null || w.W != null || w.E != null) {
2304            dow = 1;
2305            doy = 4;
2306
2307            // TODO: We need to take the current isoWeekYear, but that depends on
2308            // how we interpret now (local, utc, fixed offset). So create
2309            // a now version of current config (take local/utc/offset flags, and
2310            // create now).
2311            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
2312            week = defaults(w.W, 1);
2313            weekday = defaults(w.E, 1);
2314            if (weekday < 1 || weekday > 7) {
2315                weekdayOverflow = true;
2316            }
2317        } else {
2318            dow = config._locale._week.dow;
2319            doy = config._locale._week.doy;
2320
2321            var curWeek = weekOfYear(createLocal(), dow, doy);
2322
2323            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
2324
2325            // Default to current week.
2326            week = defaults(w.w, curWeek.week);
2327
2328            if (w.d != null) {
2329                // weekday -- low day numbers are considered next week
2330                weekday = w.d;
2331                if (weekday < 0 || weekday > 6) {
2332                    weekdayOverflow = true;
2333                }
2334            } else if (w.e != null) {
2335                // local weekday -- counting starts from begining of week
2336                weekday = w.e + dow;
2337                if (w.e < 0 || w.e > 6) {
2338                    weekdayOverflow = true;
2339                }
2340            } else {
2341                // default to begining of week
2342                weekday = dow;
2343            }
2344        }
2345        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
2346            getParsingFlags(config)._overflowWeeks = true;
2347        } else if (weekdayOverflow != null) {
2348            getParsingFlags(config)._overflowWeekday = true;
2349        } else {
2350            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
2351            config._a[YEAR] = temp.year;
2352            config._dayOfYear = temp.dayOfYear;
2353        }
2354    }
2355
2356    // constant that refers to the ISO standard
2357    hooks.ISO_8601 = function () { };
2358
2359    // constant that refers to the RFC 2822 form
2360    hooks.RFC_2822 = function () { };
2361
2362    // date from string and format string
2363    function configFromStringAndFormat(config) {
2364        // TODO: Move this to another part of the creation flow to prevent circular deps
2365        if (config._f === hooks.ISO_8601) {
2366            configFromISO(config);
2367            return;
2368        }
2369        if (config._f === hooks.RFC_2822) {
2370            configFromRFC2822(config);
2371            return;
2372        }
2373        config._a = [];
2374        getParsingFlags(config).empty = true;
2375
2376        // This array is used to make a Date, either with `new Date` or `Date.UTC`
2377        var string = '' + config._i,
2378            i, parsedInput, tokens, token, skipped,
2379            stringLength = string.length,
2380            totalParsedInputLength = 0;
2381
2382        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
2383
2384        for (i = 0; i < tokens.length; i++) {
2385            token = tokens[i];
2386            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
2387            // console.log('token', token, 'parsedInput', parsedInput,
2388            //         'regex', getParseRegexForToken(token, config));
2389            if (parsedInput) {
2390                skipped = string.substr(0, string.indexOf(parsedInput));
2391                if (skipped.length > 0) {
2392                    getParsingFlags(config).unusedInput.push(skipped);
2393                }
2394                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
2395                totalParsedInputLength += parsedInput.length;
2396            }
2397            // don't parse if it's not a known token
2398            if (formatTokenFunctions[token]) {
2399                if (parsedInput) {
2400                    getParsingFlags(config).empty = false;
2401                }
2402                else {
2403                    getParsingFlags(config).unusedTokens.push(token);
2404                }
2405                addTimeToArrayFromToken(token, parsedInput, config);
2406            }
2407            else if (config._strict && !parsedInput) {
2408                getParsingFlags(config).unusedTokens.push(token);
2409            }
2410        }
2411
2412        // add remaining unparsed input length to the string
2413        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
2414        if (string.length > 0) {
2415            getParsingFlags(config).unusedInput.push(string);
2416        }
2417
2418        // clear _12h flag if hour is <= 12
2419        if (config._a[HOUR] <= 12 &&
2420            getParsingFlags(config).bigHour === true &&
2421            config._a[HOUR] > 0) {
2422            getParsingFlags(config).bigHour = undefined;
2423        }
2424
2425        getParsingFlags(config).parsedDateParts = config._a.slice(0);
2426        getParsingFlags(config).meridiem = config._meridiem;
2427        // handle meridiem
2428        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
2429
2430        configFromArray(config);
2431        checkOverflow(config);
2432    }
2433
2434
2435    function meridiemFixWrap(locale, hour, meridiem) {
2436        var isPm;
2437
2438        if (meridiem == null) {
2439            // nothing to do
2440            return hour;
2441        }
2442        if (locale.meridiemHour != null) {
2443            return locale.meridiemHour(hour, meridiem);
2444        } else if (locale.isPM != null) {
2445            // Fallback
2446            isPm = locale.isPM(meridiem);
2447            if (isPm && hour < 12) {
2448                hour += 12;
2449            }
2450            if (!isPm && hour === 12) {
2451                hour = 0;
2452            }
2453            return hour;
2454        } else {
2455            // this is not supposed to happen
2456            return hour;
2457        }
2458    }
2459
2460    // date from string and array of format strings
2461    function configFromStringAndArray(config) {
2462        var tempConfig,
2463            bestMoment,
2464
2465            scoreToBeat,
2466            i,
2467            currentScore;
2468
2469        if (config._f.length === 0) {
2470            getParsingFlags(config).invalidFormat = true;
2471            config._d = new Date(NaN);
2472            return;
2473        }
2474
2475        for (i = 0; i < config._f.length; i++) {
2476            currentScore = 0;
2477            tempConfig = copyConfig({}, config);
2478            if (config._useUTC != null) {
2479                tempConfig._useUTC = config._useUTC;
2480            }
2481            tempConfig._f = config._f[i];
2482            configFromStringAndFormat(tempConfig);
2483
2484            if (!isValid(tempConfig)) {
2485                continue;
2486            }
2487
2488            // if there is any input that was not parsed add a penalty for that format
2489            currentScore += getParsingFlags(tempConfig).charsLeftOver;
2490
2491            //or tokens
2492            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
2493
2494            getParsingFlags(tempConfig).score = currentScore;
2495
2496            if (scoreToBeat == null || currentScore < scoreToBeat) {
2497                scoreToBeat = currentScore;
2498                bestMoment = tempConfig;
2499            }
2500        }
2501
2502        extend(config, bestMoment || tempConfig);
2503    }
2504
2505    function configFromObject(config) {
2506        if (config._d) {
2507            return;
2508        }
2509
2510        var i = normalizeObjectUnits(config._i);
2511        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
2512            return obj && parseInt(obj, 10);
2513        });
2514
2515        configFromArray(config);
2516    }
2517
2518    function createFromConfig(config) {
2519        var res = new Moment(checkOverflow(prepareConfig(config)));
2520        if (res._nextDay) {
2521            // Adding is smart enough around DST
2522            res.add(1, 'd');
2523            res._nextDay = undefined;
2524        }
2525
2526        return res;
2527    }
2528
2529    function prepareConfig(config) {
2530        var input = config._i,
2531            format = config._f;
2532
2533        config._locale = config._locale || getLocale(config._l);
2534
2535        if (input === null || (format === undefined && input === '')) {
2536            return createInvalid({ nullInput: true });
2537        }
2538
2539        if (typeof input === 'string') {
2540            config._i = input = config._locale.preparse(input);
2541        }
2542
2543        if (isMoment(input)) {
2544            return new Moment(checkOverflow(input));
2545        } else if (isDate(input)) {
2546            config._d = input;
2547        } else if (isArray(format)) {
2548            configFromStringAndArray(config);
2549        } else if (format) {
2550            configFromStringAndFormat(config);
2551        } else {
2552            configFromInput(config);
2553        }
2554
2555        if (!isValid(config)) {
2556            config._d = null;
2557        }
2558
2559        return config;
2560    }
2561
2562    function configFromInput(config) {
2563        var input = config._i;
2564        if (isUndefined(input)) {
2565            config._d = new Date(hooks.now());
2566        } else if (isDate(input)) {
2567            config._d = new Date(input.valueOf());
2568        } else if (typeof input === 'string') {
2569            configFromString(config);
2570        } else if (isArray(input)) {
2571            config._a = map(input.slice(0), function (obj) {
2572                return parseInt(obj, 10);
2573            });
2574            configFromArray(config);
2575        } else if (isObject(input)) {
2576            configFromObject(config);
2577        } else if (isNumber(input)) {
2578            // from milliseconds
2579            config._d = new Date(input);
2580        } else {
2581            hooks.createFromInputFallback(config);
2582        }
2583    }
2584
2585    function createLocalOrUTC(input, format, locale, strict, isUTC) {
2586        var c = {};
2587
2588        if (locale === true || locale === false) {
2589            strict = locale;
2590            locale = undefined;
2591        }
2592
2593        if ((isObject(input) && isObjectEmpty(input)) ||
2594            (isArray(input) && input.length === 0)) {
2595            input = undefined;
2596        }
2597        // object construction must be done this way.
2598        // https://github.com/moment/moment/issues/1423
2599        c._isAMomentObject = true;
2600        c._useUTC = c._isUTC = isUTC;
2601        c._l = locale;
2602        c._i = input;
2603        c._f = format;
2604        c._strict = strict;
2605
2606        return createFromConfig(c);
2607    }
2608
2609    function createLocal(input, format, locale, strict) {
2610        return createLocalOrUTC(input, format, locale, strict, false);
2611    }
2612
2613    var prototypeMin = deprecate(
2614        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
2615        function () {
2616            var other = createLocal.apply(null, arguments);
2617            if (this.isValid() && other.isValid()) {
2618                return other < this ? this : other;
2619            } else {
2620                return createInvalid();
2621            }
2622        }
2623    );
2624
2625    var prototypeMax = deprecate(
2626        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
2627        function () {
2628            var other = createLocal.apply(null, arguments);
2629            if (this.isValid() && other.isValid()) {
2630                return other > this ? this : other;
2631            } else {
2632                return createInvalid();
2633            }
2634        }
2635    );
2636
2637    // Pick a moment m from moments so that m[fn](other) is true for all
2638    // other. This relies on the function fn to be transitive.
2639    //
2640    // moments should either be an array of moment objects or an array, whose
2641    // first element is an array of moment objects.
2642    function pickBy(fn, moments) {
2643        var res, i;
2644        if (moments.length === 1 && isArray(moments[0])) {
2645            moments = moments[0];
2646        }
2647        if (!moments.length) {
2648            return createLocal();
2649        }
2650        res = moments[0];
2651        for (i = 1; i < moments.length; ++i) {
2652            if (!moments[i].isValid() || moments[i][fn](res)) {
2653                res = moments[i];
2654            }
2655        }
2656        return res;
2657    }
2658
2659    // TODO: Use [].sort instead?
2660    function min() {
2661        var args = [].slice.call(arguments, 0);
2662
2663        return pickBy('isBefore', args);
2664    }
2665
2666    function max() {
2667        var args = [].slice.call(arguments, 0);
2668
2669        return pickBy('isAfter', args);
2670    }
2671
2672    var now = function () {
2673        return Date.now ? Date.now() : +(new Date());
2674    };
2675
2676    var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
2677
2678    function isDurationValid(m) {
2679        for (var key in m) {
2680            if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
2681                return false;
2682            }
2683        }
2684
2685        var unitHasDecimal = false;
2686        for (var i = 0; i < ordering.length; ++i) {
2687            if (m[ordering[i]]) {
2688                if (unitHasDecimal) {
2689                    return false; // only allow non-integers for smallest unit
2690                }
2691                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
2692                    unitHasDecimal = true;
2693                }
2694            }
2695        }
2696
2697        return true;
2698    }
2699
2700    function isValid$1() {
2701        return this._isValid;
2702    }
2703
2704    function createInvalid$1() {
2705        return createDuration(NaN);
2706    }
2707
2708    function Duration(duration) {
2709        var normalizedInput = normalizeObjectUnits(duration),
2710            years = normalizedInput.year || 0,
2711            quarters = normalizedInput.quarter || 0,
2712            months = normalizedInput.month || 0,
2713            weeks = normalizedInput.week || 0,
2714            days = normalizedInput.day || 0,
2715            hours = normalizedInput.hour || 0,
2716            minutes = normalizedInput.minute || 0,
2717            seconds = normalizedInput.second || 0,
2718            milliseconds = normalizedInput.millisecond || 0;
2719
2720        this._isValid = isDurationValid(normalizedInput);
2721
2722        // representation for dateAddRemove
2723        this._milliseconds = +milliseconds +
2724            seconds * 1e3 + // 1000
2725            minutes * 6e4 + // 1000 * 60
2726            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
2727        // Because of dateAddRemove treats 24 hours as different from a
2728        // day when working around DST, we need to store them separately
2729        this._days = +days +
2730            weeks * 7;
2731        // It is impossible translate months into days without knowing
2732        // which months you are are talking about, so we have to store
2733        // it separately.
2734        this._months = +months +
2735            quarters * 3 +
2736            years * 12;
2737
2738        this._data = {};
2739
2740        this._locale = getLocale();
2741
2742        this._bubble();
2743    }
2744
2745    function isDuration(obj) {
2746        return obj instanceof Duration;
2747    }
2748
2749    function absRound(number) {
2750        if (number < 0) {
2751            return Math.round(-1 * number) * -1;
2752        } else {
2753            return Math.round(number);
2754        }
2755    }
2756
2757    // FORMATTING
2758
2759    function offset(token, separator) {
2760        addFormatToken(token, 0, 0, function () {
2761            var offset = this.utcOffset();
2762            var sign = '+';
2763            if (offset < 0) {
2764                offset = -offset;
2765                sign = '-';
2766            }
2767            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
2768        });
2769    }
2770
2771    offset('Z', ':');
2772    offset('ZZ', '');
2773
2774    // PARSING
2775
2776    addRegexToken('Z', matchShortOffset);
2777    addRegexToken('ZZ', matchShortOffset);
2778    addParseToken(['Z', 'ZZ'], function (input, array, config) {
2779        config._useUTC = true;
2780        config._tzm = offsetFromString(matchShortOffset, input);
2781    });
2782
2783    // HELPERS
2784
2785    // timezone chunker
2786    // '+10:00' > ['10',  '00']
2787    // '-1530'  > ['-15', '30']
2788    var chunkOffset = /([\+\-]|\d\d)/gi;
2789
2790    function offsetFromString(matcher, string) {
2791        var matches = (string || '').match(matcher);
2792
2793        if (matches === null) {
2794            return null;
2795        }
2796
2797        var chunk = matches[matches.length - 1] || [];
2798        var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
2799        var minutes = +(parts[1] * 60) + toInt(parts[2]);
2800
2801        return minutes === 0 ?
2802            0 :
2803            parts[0] === '+' ? minutes : -minutes;
2804    }
2805
2806    // Return a moment from input, that is local/utc/zone equivalent to model.
2807    function cloneWithOffset(input, model) {
2808        var res, diff;
2809        if (model._isUTC) {
2810            res = model.clone();
2811            diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
2812            // Use low-level api, because this fn is low-level api.
2813            res._d.setTime(res._d.valueOf() + diff);
2814            hooks.updateOffset(res, false);
2815            return res;
2816        } else {
2817            return createLocal(input).local();
2818        }
2819    }
2820
2821    function getDateOffset(m) {
2822        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
2823        // https://github.com/moment/moment/pull/1871
2824        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
2825    }
2826
2827    // HOOKS
2828
2829    // This function will be called whenever a moment is mutated.
2830    // It is intended to keep the offset in sync with the timezone.
2831    hooks.updateOffset = function () { };
2832
2833    // MOMENTS
2834
2835    // keepLocalTime = true means only change the timezone, without
2836    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
2837    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
2838    // +0200, so we adjust the time as needed, to be valid.
2839    //
2840    // Keeping the time actually adds/subtracts (one hour)
2841    // from the actual represented time. That is why we call updateOffset
2842    // a second time. In case it wants us to change the offset again
2843    // _changeInProgress == true case, then we have to adjust, because
2844    // there is no such time in the given timezone.
2845    function getSetOffset(input, keepLocalTime, keepMinutes) {
2846        var offset = this._offset || 0,
2847            localAdjust;
2848        if (!this.isValid()) {
2849            return input != null ? this : NaN;
2850        }
2851        if (input != null) {
2852            if (typeof input === 'string') {
2853                input = offsetFromString(matchShortOffset, input);
2854                if (input === null) {
2855                    return this;
2856                }
2857            } else if (Math.abs(input) < 16 && !keepMinutes) {
2858                input = input * 60;
2859            }
2860            if (!this._isUTC && keepLocalTime) {
2861                localAdjust = getDateOffset(this);
2862            }
2863            this._offset = input;
2864            this._isUTC = true;
2865            if (localAdjust != null) {
2866                this.add(localAdjust, 'm');
2867            }
2868            if (offset !== input) {
2869                if (!keepLocalTime || this._changeInProgress) {
2870                    addSubtract(this, createDuration(input - offset, 'm'), 1, false);
2871                } else if (!this._changeInProgress) {
2872                    this._changeInProgress = true;
2873                    hooks.updateOffset(this, true);
2874                    this._changeInProgress = null;
2875                }
2876            }
2877            return this;
2878        } else {
2879            return this._isUTC ? offset : getDateOffset(this);
2880        }
2881    }
2882
2883    function getSetZone(input, keepLocalTime) {
2884        if (input != null) {
2885            if (typeof input !== 'string') {
2886                input = -input;
2887            }
2888
2889            this.utcOffset(input, keepLocalTime);
2890
2891            return this;
2892        } else {
2893            return -this.utcOffset();
2894        }
2895    }
2896
2897    function setOffsetToUTC(keepLocalTime) {
2898        return this.utcOffset(0, keepLocalTime);
2899    }
2900
2901    function setOffsetToLocal(keepLocalTime) {
2902        if (this._isUTC) {
2903            this.utcOffset(0, keepLocalTime);
2904            this._isUTC = false;
2905
2906            if (keepLocalTime) {
2907                this.subtract(getDateOffset(this), 'm');
2908            }
2909        }
2910        return this;
2911    }
2912
2913    function setOffsetToParsedOffset() {
2914        if (this._tzm != null) {
2915            this.utcOffset(this._tzm, false, true);
2916        } else if (typeof this._i === 'string') {
2917            var tZone = offsetFromString(matchOffset, this._i);
2918            if (tZone != null) {
2919                this.utcOffset(tZone);
2920            }
2921            else {
2922                this.utcOffset(0, true);
2923            }
2924        }
2925        return this;
2926    }
2927
2928    function hasAlignedHourOffset(input) {
2929        if (!this.isValid()) {
2930            return false;
2931        }
2932        input = input ? createLocal(input).utcOffset() : 0;
2933
2934        return (this.utcOffset() - input) % 60 === 0;
2935    }
2936
2937    function isDaylightSavingTime() {
2938        return (
2939            this.utcOffset() > this.clone().month(0).utcOffset() ||
2940            this.utcOffset() > this.clone().month(5).utcOffset()
2941        );
2942    }
2943
2944    function isDaylightSavingTimeShifted() {
2945        if (!isUndefined(this._isDSTShifted)) {
2946            return this._isDSTShifted;
2947        }
2948
2949        var c = {};
2950
2951        copyConfig(c, this);
2952        c = prepareConfig(c);
2953
2954        if (c._a) {
2955            var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
2956            this._isDSTShifted = this.isValid() &&
2957                compareArrays(c._a, other.toArray()) > 0;
2958        } else {
2959            this._isDSTShifted = false;
2960        }
2961
2962        return this._isDSTShifted;
2963    }
2964
2965    function isLocal() {
2966        return this.isValid() ? !this._isUTC : false;
2967    }
2968
2969    function isUtcOffset() {
2970        return this.isValid() ? this._isUTC : false;
2971    }
2972
2973    function isUtc() {
2974        return this.isValid() ? this._isUTC && this._offset === 0 : false;
2975    }
2976
2977    // ASP.NET json date format regex
2978    var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
2979
2980    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
2981    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
2982    // and further modified to allow for strings containing both week and day
2983    var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;
2984
2985    function createDuration(input, key) {
2986        var duration = input,
2987            // matching against regexp is expensive, do it on demand
2988            match = null,
2989            sign,
2990            ret,
2991            diffRes;
2992
2993        if (isDuration(input)) {
2994            duration = {
2995                ms: input._milliseconds,
2996                d: input._days,
2997                M: input._months
2998            };
2999        } else if (isNumber(input)) {
3000            duration = {};
3001            if (key) {
3002                duration[key] = input;
3003            } else {
3004                duration.milliseconds = input;
3005            }
3006        } else if (!!(match = aspNetRegex.exec(input))) {
3007            sign = (match[1] === '-') ? -1 : 1;
3008            duration = {
3009                y: 0,
3010                d: toInt(match[DATE]) * sign,
3011                h: toInt(match[HOUR]) * sign,
3012                m: toInt(match[MINUTE]) * sign,
3013                s: toInt(match[SECOND]) * sign,
3014                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
3015            };
3016        } else if (!!(match = isoRegex.exec(input))) {
3017            sign = (match[1] === '-') ? -1 : 1;
3018            duration = {
3019                y: parseIso(match[2], sign),
3020                M: parseIso(match[3], sign),
3021                w: parseIso(match[4], sign),
3022                d: parseIso(match[5], sign),
3023                h: parseIso(match[6], sign),
3024                m: parseIso(match[7], sign),
3025                s: parseIso(match[8], sign)
3026            };
3027        } else if (duration == null) {// checks for null or undefined
3028            duration = {};
3029        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
3030            diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
3031
3032            duration = {};
3033            duration.ms = diffRes.milliseconds;
3034            duration.M = diffRes.months;
3035        }
3036
3037        ret = new Duration(duration);
3038
3039        if (isDuration(input) && hasOwnProp(input, '_locale')) {
3040            ret._locale = input._locale;
3041        }
3042
3043        return ret;
3044    }
3045
3046    createDuration.fn = Duration.prototype;
3047    createDuration.invalid = createInvalid$1;
3048
3049    function parseIso(inp, sign) {
3050        // We'd normally use ~~inp for this, but unfortunately it also
3051        // converts floats to ints.
3052        // inp may be undefined, so careful calling replace on it.
3053        var res = inp && parseFloat(inp.replace(',', '.'));
3054        // apply sign while we're at it
3055        return (isNaN(res) ? 0 : res) * sign;
3056    }
3057
3058    function positiveMomentsDifference(base, other) {
3059        var res = { milliseconds: 0, months: 0 };
3060
3061        res.months = other.month() - base.month() +
3062            (other.year() - base.year()) * 12;
3063        if (base.clone().add(res.months, 'M').isAfter(other)) {
3064            --res.months;
3065        }
3066
3067        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
3068
3069        return res;
3070    }
3071
3072    function momentsDifference(base, other) {
3073        var res;
3074        if (!(base.isValid() && other.isValid())) {
3075            return { milliseconds: 0, months: 0 };
3076        }
3077
3078        other = cloneWithOffset(other, base);
3079        if (base.isBefore(other)) {
3080            res = positiveMomentsDifference(base, other);
3081        } else {
3082            res = positiveMomentsDifference(other, base);
3083            res.milliseconds = -res.milliseconds;
3084            res.months = -res.months;
3085        }
3086
3087        return res;
3088    }
3089
3090    // TODO: remove 'name' arg after deprecation is removed
3091    function createAdder(direction, name) {
3092        return function (val, period) {
3093            var dur, tmp;
3094            //invert the arguments, but complain about it
3095            if (period !== null && !isNaN(+period)) {
3096                deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
3097                    'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
3098                tmp = val; val = period; period = tmp;
3099            }
3100
3101            val = typeof val === 'string' ? +val : val;
3102            dur = createDuration(val, period);
3103            addSubtract(this, dur, direction);
3104            return this;
3105        };
3106    }
3107
3108    function addSubtract(mom, duration, isAdding, updateOffset) {
3109        var milliseconds = duration._milliseconds,
3110            days = absRound(duration._days),
3111            months = absRound(duration._months);
3112
3113        if (!mom.isValid()) {
3114            // No op
3115            return;
3116        }
3117
3118        updateOffset = updateOffset == null ? true : updateOffset;
3119
3120        if (milliseconds) {
3121            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
3122        }
3123        if (days) {
3124            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
3125        }
3126        if (months) {
3127            setMonth(mom, get(mom, 'Month') + months * isAdding);
3128        }
3129        if (updateOffset) {
3130            hooks.updateOffset(mom, days || months);
3131        }
3132    }
3133
3134    var add = createAdder(1, 'add');
3135    var subtract = createAdder(-1, 'subtract');
3136
3137    function getCalendarFormat(myMoment, now) {
3138        var diff = myMoment.diff(now, 'days', true);
3139        return diff < -6 ? 'sameElse' :
3140            diff < -1 ? 'lastWeek' :
3141                diff < 0 ? 'lastDay' :
3142                    diff < 1 ? 'sameDay' :
3143                        diff < 2 ? 'nextDay' :
3144                            diff < 7 ? 'nextWeek' : 'sameElse';
3145    }
3146
3147    function calendar$1(time, formats) {
3148        // We want to compare the start of today, vs this.
3149        // Getting start-of-today depends on whether we're local/utc/offset or not.
3150        var now = time || createLocal(),
3151            sod = cloneWithOffset(now, this).startOf('day'),
3152            format = hooks.calendarFormat(this, sod) || 'sameElse';
3153
3154        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
3155
3156        return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
3157    }
3158
3159    function clone() {
3160        return new Moment(this);
3161    }
3162
3163    function isAfter(input, units) {
3164        var localInput = isMoment(input) ? input : createLocal(input);
3165        if (!(this.isValid() && localInput.isValid())) {
3166            return false;
3167        }
3168        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
3169        if (units === 'millisecond') {
3170            return this.valueOf() > localInput.valueOf();
3171        } else {
3172            return localInput.valueOf() < this.clone().startOf(units).valueOf();
3173        }
3174    }
3175
3176    function isBefore(input, units) {
3177        var localInput = isMoment(input) ? input : createLocal(input);
3178        if (!(this.isValid() && localInput.isValid())) {
3179            return false;
3180        }
3181        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
3182        if (units === 'millisecond') {
3183            return this.valueOf() < localInput.valueOf();
3184        } else {
3185            return this.clone().endOf(units).valueOf() < localInput.valueOf();
3186        }
3187    }
3188
3189    function isBetween(from, to, units, inclusivity) {
3190        inclusivity = inclusivity || '()';
3191        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
3192            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
3193    }
3194
3195    function isSame(input, units) {
3196        var localInput = isMoment(input) ? input : createLocal(input),
3197            inputMs;
3198        if (!(this.isValid() && localInput.isValid())) {
3199            return false;
3200        }
3201        units = normalizeUnits(units || 'millisecond');
3202        if (units === 'millisecond') {
3203            return this.valueOf() === localInput.valueOf();
3204        } else {
3205            inputMs = localInput.valueOf();
3206            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
3207        }
3208    }
3209
3210    function isSameOrAfter(input, units) {
3211        return this.isSame(input, units) || this.isAfter(input, units);
3212    }
3213
3214    function isSameOrBefore(input, units) {
3215        return this.isSame(input, units) || this.isBefore(input, units);
3216    }
3217
3218    function diff(input, units, asFloat) {
3219        var that,
3220            zoneDelta,
3221            delta, output;
3222
3223        if (!this.isValid()) {
3224            return NaN;
3225        }
3226
3227        that = cloneWithOffset(input, this);
3228
3229        if (!that.isValid()) {
3230            return NaN;
3231        }
3232
3233        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
3234
3235        units = normalizeUnits(units);
3236
3237        if (units === 'year' || units === 'month' || units === 'quarter') {
3238            output = monthDiff(this, that);
3239            if (units === 'quarter') {
3240                output = output / 3;
3241            } else if (units === 'year') {
3242                output = output / 12;
3243            }
3244        } else {
3245            delta = this - that;
3246            output = units === 'second' ? delta / 1e3 : // 1000
3247                units === 'minute' ? delta / 6e4 : // 1000 * 60
3248                    units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
3249                        units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
3250                            units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
3251                                delta;
3252        }
3253        return asFloat ? output : absFloor(output);
3254    }
3255
3256    function monthDiff(a, b) {
3257        // difference in months
3258        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
3259            // b is in (anchor - 1 month, anchor + 1 month)
3260            anchor = a.clone().add(wholeMonthDiff, 'months'),
3261            anchor2, adjust;
3262
3263        if (b - anchor < 0) {
3264            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
3265            // linear across the month
3266            adjust = (b - anchor) / (anchor - anchor2);
3267        } else {
3268            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
3269            // linear across the month
3270            adjust = (b - anchor) / (anchor2 - anchor);
3271        }
3272
3273        //check for negative zero, return zero if negative zero
3274        return -(wholeMonthDiff + adjust) || 0;
3275    }
3276
3277    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
3278    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
3279
3280    function toString() {
3281        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
3282    }
3283
3284    function toISOString() {
3285        if (!this.isValid()) {
3286            return null;
3287        }
3288        var m = this.clone().utc();
3289        if (m.year() < 0 || m.year() > 9999) {
3290            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
3291        }
3292        if (isFunction(Date.prototype.toISOString)) {
3293            // native implementation is ~50x faster, use it when we can
3294            return this.toDate().toISOString();
3295        }
3296        return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
3297    }
3298
3299    /**
3300     * Return a human readable representation of a moment that can
3301     * also be evaluated to get a new moment which is the same
3302     *
3303     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
3304     */
3305    function inspect() {
3306        if (!this.isValid()) {
3307            return 'moment.invalid(/* ' + this._i + ' */)';
3308        }
3309        var func = 'moment';
3310        var zone = '';
3311        if (!this.isLocal()) {
3312            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
3313            zone = 'Z';
3314        }
3315        var prefix = '[' + func + '("]';
3316        var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
3317        var datetime = '-MM-DD[T]HH:mm:ss.SSS';
3318        var suffix = zone + '[")]';
3319
3320        return this.format(prefix + year + datetime + suffix);
3321    }
3322
3323    function format(inputString) {
3324        if (!inputString) {
3325            inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
3326        }
3327        var output = formatMoment(this, inputString);
3328        return this.localeData().postformat(output);
3329    }
3330
3331    function from(time, withoutSuffix) {
3332        if (this.isValid() &&
3333            ((isMoment(time) && time.isValid()) ||
3334                createLocal(time).isValid())) {
3335            return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix);
3336        } else {
3337            return this.localeData().invalidDate();
3338        }
3339    }
3340
3341    function fromNow(withoutSuffix) {
3342        return this.from(createLocal(), withoutSuffix);
3343    }
3344
3345    function to(time, withoutSuffix) {
3346        if (this.isValid() &&
3347            ((isMoment(time) && time.isValid()) ||
3348                createLocal(time).isValid())) {
3349            return createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix);
3350        } else {
3351            return this.localeData().invalidDate();
3352        }
3353    }
3354
3355    function toNow(withoutSuffix) {
3356        return this.to(createLocal(), withoutSuffix);
3357    }
3358
3359    // If passed a locale key, it will set the locale for this
3360    // instance.  Otherwise, it will return the locale configuration
3361    // variables for this instance.
3362    function locale(key) {
3363        var newLocaleData;
3364
3365        if (key === undefined) {
3366            return this._locale._abbr;
3367        } else {
3368            newLocaleData = getLocale(key);
3369            if (newLocaleData != null) {
3370                this._locale = newLocaleData;
3371            }
3372            return this;
3373        }
3374    }
3375
3376    var lang = deprecate(
3377        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
3378        function (key) {
3379            if (key === undefined) {
3380                return this.localeData();
3381            } else {
3382                return this.locale(key);
3383            }
3384        }
3385    );
3386
3387    function localeData() {
3388        return this._locale;
3389    }
3390
3391    function startOf(units) {
3392        units = normalizeUnits(units);
3393        // the following switch intentionally omits break keywords
3394        // to utilize falling through the cases.
3395        switch (units) {
3396            case 'year':
3397                this.month(0);
3398            /* falls through */
3399            case 'quarter':
3400            case 'month':
3401                this.date(1);
3402            /* falls through */
3403            case 'week':
3404            case 'isoWeek':
3405            case 'day':
3406            case 'date':
3407                this.hours(0);
3408            /* falls through */
3409            case 'hour':
3410                this.minutes(0);
3411            /* falls through */
3412            case 'minute':
3413                this.seconds(0);
3414            /* falls through */
3415            case 'second':
3416                this.milliseconds(0);
3417        }
3418
3419        // weeks are a special case
3420        if (units === 'week') {
3421            this.weekday(0);
3422        }
3423        if (units === 'isoWeek') {
3424            this.isoWeekday(1);
3425        }
3426
3427        // quarters are also special
3428        if (units === 'quarter') {
3429            this.month(Math.floor(this.month() / 3) * 3);
3430        }
3431
3432        return this;
3433    }
3434
3435    function endOf(units) {
3436        units = normalizeUnits(units);
3437        if (units === undefined || units === 'millisecond') {
3438            return this;
3439        }
3440
3441        // 'date' is an alias for 'day', so it should be considered as such.
3442        if (units === 'date') {
3443            units = 'day';
3444        }
3445
3446        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
3447    }
3448
3449    function valueOf() {
3450        return this._d.valueOf() - ((this._offset || 0) * 60000);
3451    }
3452
3453    function unix() {
3454        return Math.floor(this.valueOf() / 1000);
3455    }
3456
3457    function toDate() {
3458        return new Date(this.valueOf());
3459    }
3460
3461    function toArray() {
3462        var m = this;
3463        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
3464    }
3465
3466    function toObject() {
3467        var m = this;
3468        return {
3469            years: m.year(),
3470            months: m.month(),
3471            date: m.date(),
3472            hours: m.hours(),
3473            minutes: m.minutes(),
3474            seconds: m.seconds(),
3475            milliseconds: m.milliseconds()
3476        };
3477    }
3478
3479    function toJSON() {
3480        // new Date(NaN).toJSON() === null
3481        return this.isValid() ? this.toISOString() : null;
3482    }
3483
3484    function isValid$2() {
3485        return isValid(this);
3486    }
3487
3488    function parsingFlags() {
3489        return extend({}, getParsingFlags(this));
3490    }
3491
vendor: 30,025 bytes, lines 3492-4525
3492    function invalidAt() {
3493        return getParsingFlags(this).overflow;
3494    }
3495
3496    function creationData() {
3497        return {
3498            input: this._i,
3499            format: this._f,
3500            locale: this._locale,
3501            isUTC: this._isUTC,
3502            strict: this._strict
3503        };
3504    }
3505
3506    // FORMATTING
3507
3508    addFormatToken(0, ['gg', 2], 0, function () {
3509        return this.weekYear() % 100;
3510    });
3511
3512    addFormatToken(0, ['GG', 2], 0, function () {
3513        return this.isoWeekYear() % 100;
3514    });
3515
3516    function addWeekYearFormatToken(token, getter) {
3517        addFormatToken(0, [token, token.length], 0, getter);
3518    }
3519
3520    addWeekYearFormatToken('gggg', 'weekYear');
3521    addWeekYearFormatToken('ggggg', 'weekYear');
3522    addWeekYearFormatToken('GGGG', 'isoWeekYear');
3523    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
3524
3525    // ALIASES
3526
3527    addUnitAlias('weekYear', 'gg');
3528    addUnitAlias('isoWeekYear', 'GG');
3529
3530    // PRIORITY
3531
3532    addUnitPriority('weekYear', 1);
3533    addUnitPriority('isoWeekYear', 1);
3534
3535
3536    // PARSING
3537
3538    addRegexToken('G', matchSigned);
3539    addRegexToken('g', matchSigned);
3540    addRegexToken('GG', match1to2, match2);
3541    addRegexToken('gg', match1to2, match2);
3542    addRegexToken('GGGG', match1to4, match4);
3543    addRegexToken('gggg', match1to4, match4);
3544    addRegexToken('GGGGG', match1to6, match6);
3545    addRegexToken('ggggg', match1to6, match6);
3546
3547    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
3548        week[token.substr(0, 2)] = toInt(input);
3549    });
3550
3551    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
3552        week[token] = hooks.parseTwoDigitYear(input);
3553    });
3554
3555    // MOMENTS
3556
3557    function getSetWeekYear(input) {
3558        return getSetWeekYearHelper.call(this,
3559            input,
3560            this.week(),
3561            this.weekday(),
3562            this.localeData()._week.dow,
3563            this.localeData()._week.doy);
3564    }
3565
3566    function getSetISOWeekYear(input) {
3567        return getSetWeekYearHelper.call(this,
3568            input, this.isoWeek(), this.isoWeekday(), 1, 4);
3569    }
3570
3571    function getISOWeeksInYear() {
3572        return weeksInYear(this.year(), 1, 4);
3573    }
3574
3575    function getWeeksInYear() {
3576        var weekInfo = this.localeData()._week;
3577        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
3578    }
3579
3580    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
3581        var weeksTarget;
3582        if (input == null) {
3583            return weekOfYear(this, dow, doy).year;
3584        } else {
3585            weeksTarget = weeksInYear(input, dow, doy);
3586            if (week > weeksTarget) {
3587                week = weeksTarget;
3588            }
3589            return setWeekAll.call(this, input, week, weekday, dow, doy);
3590        }
3591    }
3592
3593    function setWeekAll(weekYear, week, weekday, dow, doy) {
3594        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
3595            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
3596
3597        this.year(date.getUTCFullYear());
3598        this.month(date.getUTCMonth());
3599        this.date(date.getUTCDate());
3600        return this;
3601    }
3602
3603    // FORMATTING
3604
3605    addFormatToken('Q', 0, 'Qo', 'quarter');
3606
3607    // ALIASES
3608
3609    addUnitAlias('quarter', 'Q');
3610
3611    // PRIORITY
3612
3613    addUnitPriority('quarter', 7);
3614
3615    // PARSING
3616
3617    addRegexToken('Q', match1);
3618    addParseToken('Q', function (input, array) {
3619        array[MONTH] = (toInt(input) - 1) * 3;
3620    });
3621
3622    // MOMENTS
3623
3624    function getSetQuarter(input) {
3625        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
3626    }
3627
3628    // FORMATTING
3629
3630    addFormatToken('D', ['DD', 2], 'Do', 'date');
3631
3632    // ALIASES
3633
3634    addUnitAlias('date', 'D');
3635
3636    // PRIOROITY
3637    addUnitPriority('date', 9);
3638
3639    // PARSING
3640
3641    addRegexToken('D', match1to2);
3642    addRegexToken('DD', match1to2, match2);
3643    addRegexToken('Do', function (isStrict, locale) {
3644        // TODO: Remove "ordinalParse" fallback in next major release.
3645        return isStrict ?
3646            (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
3647            locale._dayOfMonthOrdinalParseLenient;
3648    });
3649
3650    addParseToken(['D', 'DD'], DATE);
3651    addParseToken('Do', function (input, array) {
3652        array[DATE] = toInt(input.match(match1to2)[0], 10);
3653    });
3654
3655    // MOMENTS
3656
3657    var getSetDayOfMonth = makeGetSet('Date', true);
3658
3659    // FORMATTING
3660
3661    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
3662
3663    // ALIASES
3664
3665    addUnitAlias('dayOfYear', 'DDD');
3666
3667    // PRIORITY
3668    addUnitPriority('dayOfYear', 4);
3669
3670    // PARSING
3671
3672    addRegexToken('DDD', match1to3);
3673    addRegexToken('DDDD', match3);
3674    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
3675        config._dayOfYear = toInt(input);
3676    });
3677
3678    // HELPERS
3679
3680    // MOMENTS
3681
3682    function getSetDayOfYear(input) {
3683        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
3684        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
3685    }
3686
3687    // FORMATTING
3688
3689    addFormatToken('m', ['mm', 2], 0, 'minute');
3690
3691    // ALIASES
3692
3693    addUnitAlias('minute', 'm');
3694
3695    // PRIORITY
3696
3697    addUnitPriority('minute', 14);
3698
3699    // PARSING
3700
3701    addRegexToken('m', match1to2);
3702    addRegexToken('mm', match1to2, match2);
3703    addParseToken(['m', 'mm'], MINUTE);
3704
3705    // MOMENTS
3706
3707    var getSetMinute = makeGetSet('Minutes', false);
3708
3709    // FORMATTING
3710
3711    addFormatToken('s', ['ss', 2], 0, 'second');
3712
3713    // ALIASES
3714
3715    addUnitAlias('second', 's');
3716
3717    // PRIORITY
3718
3719    addUnitPriority('second', 15);
3720
3721    // PARSING
3722
3723    addRegexToken('s', match1to2);
3724    addRegexToken('ss', match1to2, match2);
3725    addParseToken(['s', 'ss'], SECOND);
3726
3727    // MOMENTS
3728
3729    var getSetSecond = makeGetSet('Seconds', false);
3730
3731    // FORMATTING
3732
3733    addFormatToken('S', 0, 0, function () {
3734        return ~~(this.millisecond() / 100);
3735    });
3736
3737    addFormatToken(0, ['SS', 2], 0, function () {
3738        return ~~(this.millisecond() / 10);
3739    });
3740
3741    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
3742    addFormatToken(0, ['SSSS', 4], 0, function () {
3743        return this.millisecond() * 10;
3744    });
3745    addFormatToken(0, ['SSSSS', 5], 0, function () {
3746        return this.millisecond() * 100;
3747    });
3748    addFormatToken(0, ['SSSSSS', 6], 0, function () {
3749        return this.millisecond() * 1000;
3750    });
3751    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
3752        return this.millisecond() * 10000;
3753    });
3754    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
3755        return this.millisecond() * 100000;
3756    });
3757    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
3758        return this.millisecond() * 1000000;
3759    });
3760
3761
3762    // ALIASES
3763
3764    addUnitAlias('millisecond', 'ms');
3765
3766    // PRIORITY
3767
3768    addUnitPriority('millisecond', 16);
3769
3770    // PARSING
3771
3772    addRegexToken('S', match1to3, match1);
3773    addRegexToken('SS', match1to3, match2);
3774    addRegexToken('SSS', match1to3, match3);
3775
3776    var token;
3777    for (token = 'SSSS'; token.length <= 9; token += 'S') {
3778        addRegexToken(token, matchUnsigned);
3779    }
3780
3781    function parseMs(input, array) {
3782        array[MILLISECOND] = toInt(('0.' + input) * 1000);
3783    }
3784
3785    for (token = 'S'; token.length <= 9; token += 'S') {
3786        addParseToken(token, parseMs);
3787    }
3788    // MOMENTS
3789
3790    var getSetMillisecond = makeGetSet('Milliseconds', false);
3791
3792    // FORMATTING
3793
3794    addFormatToken('z', 0, 0, 'zoneAbbr');
3795    addFormatToken('zz', 0, 0, 'zoneName');
3796
3797    // MOMENTS
3798
3799    function getZoneAbbr() {
3800        return this._isUTC ? 'UTC' : '';
3801    }
3802
3803    function getZoneName() {
3804        return this._isUTC ? 'Coordinated Universal Time' : '';
3805    }
3806
3807    var proto = Moment.prototype;
3808
3809    proto.add = add;
3810    proto.calendar = calendar$1;
3811    proto.clone = clone;
3812    proto.diff = diff;
3813    proto.endOf = endOf;
3814    proto.format = format;
3815    proto.from = from;
3816    proto.fromNow = fromNow;
3817    proto.to = to;
3818    proto.toNow = toNow;
3819    proto.get = stringGet;
3820    proto.invalidAt = invalidAt;
3821    proto.isAfter = isAfter;
3822    proto.isBefore = isBefore;
3823    proto.isBetween = isBetween;
3824    proto.isSame = isSame;
3825    proto.isSameOrAfter = isSameOrAfter;
3826    proto.isSameOrBefore = isSameOrBefore;
3827    proto.isValid = isValid$2;
3828    proto.lang = lang;
3829    proto.locale = locale;
3830    proto.localeData = localeData;
3831    proto.max = prototypeMax;
3832    proto.min = prototypeMin;
3833    proto.parsingFlags = parsingFlags;
3834    proto.set = stringSet;
3835    proto.startOf = startOf;
3836    proto.subtract = subtract;
3837    proto.toArray = toArray;
3838    proto.toObject = toObject;
3839    proto.toDate = toDate;
3840    proto.toISOString = toISOString;
3841    proto.inspect = inspect;
3842    proto.toJSON = toJSON;
3843    proto.toString = toString;
3844    proto.unix = unix;
3845    proto.valueOf = valueOf;
3846    proto.creationData = creationData;
3847
3848    // Year
3849    proto.year = getSetYear;
3850    proto.isLeapYear = getIsLeapYear;
3851
3852    // Week Year
3853    proto.weekYear = getSetWeekYear;
3854    proto.isoWeekYear = getSetISOWeekYear;
3855
3856    // Quarter
3857    proto.quarter = proto.quarters = getSetQuarter;
3858
3859    // Month
3860    proto.month = getSetMonth;
3861    proto.daysInMonth = getDaysInMonth;
3862
3863    // Week
3864    proto.week = proto.weeks = getSetWeek;
3865    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
3866    proto.weeksInYear = getWeeksInYear;
3867    proto.isoWeeksInYear = getISOWeeksInYear;
3868
3869    // Day
3870    proto.date = getSetDayOfMonth;
3871    proto.day = proto.days = getSetDayOfWeek;
3872    proto.weekday = getSetLocaleDayOfWeek;
3873    proto.isoWeekday = getSetISODayOfWeek;
3874    proto.dayOfYear = getSetDayOfYear;
3875
3876    // Hour
3877    proto.hour = proto.hours = getSetHour;
3878
3879    // Minute
3880    proto.minute = proto.minutes = getSetMinute;
3881
3882    // Second
3883    proto.second = proto.seconds = getSetSecond;
3884
3885    // Millisecond
3886    proto.millisecond = proto.milliseconds = getSetMillisecond;
3887
3888    // Offset
3889    proto.utcOffset = getSetOffset;
3890    proto.utc = setOffsetToUTC;
3891    proto.local = setOffsetToLocal;
3892    proto.parseZone = setOffsetToParsedOffset;
3893    proto.hasAlignedHourOffset = hasAlignedHourOffset;
3894    proto.isDST = isDaylightSavingTime;
3895    proto.isLocal = isLocal;
3896    proto.isUtcOffset = isUtcOffset;
3897    proto.isUtc = isUtc;
3898    proto.isUTC = isUtc;
3899
3900    // Timezone
3901    proto.zoneAbbr = getZoneAbbr;
3902    proto.zoneName = getZoneName;
3903
3904    // Deprecations
3905    proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
3906    proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
3907    proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
3908    proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
3909    proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
3910
3911    function createUnix(input) {
3912        return createLocal(input * 1000);
3913    }
3914
3915    function createInZone() {
3916        return createLocal.apply(null, arguments).parseZone();
3917    }
3918
3919    function preParsePostFormat(string) {
3920        return string;
3921    }
3922
3923    var proto$1 = Locale.prototype;
3924
3925    proto$1.calendar = calendar;
3926    proto$1.longDateFormat = longDateFormat;
3927    proto$1.invalidDate = invalidDate;
3928    proto$1.ordinal = ordinal;
3929    proto$1.preparse = preParsePostFormat;
3930    proto$1.postformat = preParsePostFormat;
3931    proto$1.relativeTime = relativeTime;
3932    proto$1.pastFuture = pastFuture;
3933    proto$1.set = set;
3934
3935    // Month
3936    proto$1.months = localeMonths;
3937    proto$1.monthsShort = localeMonthsShort;
3938    proto$1.monthsParse = localeMonthsParse;
3939    proto$1.monthsRegex = monthsRegex;
3940    proto$1.monthsShortRegex = monthsShortRegex;
3941
3942    // Week
3943    proto$1.week = localeWeek;
3944    proto$1.firstDayOfYear = localeFirstDayOfYear;
3945    proto$1.firstDayOfWeek = localeFirstDayOfWeek;
3946
3947    // Day of Week
3948    proto$1.weekdays = localeWeekdays;
3949    proto$1.weekdaysMin = localeWeekdaysMin;
3950    proto$1.weekdaysShort = localeWeekdaysShort;
3951    proto$1.weekdaysParse = localeWeekdaysParse;
3952
3953    proto$1.weekdaysRegex = weekdaysRegex;
3954    proto$1.weekdaysShortRegex = weekdaysShortRegex;
3955    proto$1.weekdaysMinRegex = weekdaysMinRegex;
3956
3957    // Hours
3958    proto$1.isPM = localeIsPM;
3959    proto$1.meridiem = localeMeridiem;
3960
3961    function get$1(format, index, field, setter) {
3962        var locale = getLocale();
3963        var utc = createUTC().set(setter, index);
3964        return locale[field](utc, format);
3965    }
3966
3967    function listMonthsImpl(format, index, field) {
3968        if (isNumber(format)) {
3969            index = format;
3970            format = undefined;
3971        }
3972
3973        format = format || '';
3974
3975        if (index != null) {
3976            return get$1(format, index, field, 'month');
3977        }
3978
3979        var i;
3980        var out = [];
3981        for (i = 0; i < 12; i++) {
3982            out[i] = get$1(format, i, field, 'month');
3983        }
3984        return out;
3985    }
3986
3987    // ()
3988    // (5)
3989    // (fmt, 5)
3990    // (fmt)
3991    // (true)
3992    // (true, 5)
3993    // (true, fmt, 5)
3994    // (true, fmt)
3995    function listWeekdaysImpl(localeSorted, format, index, field) {
3996        if (typeof localeSorted === 'boolean') {
3997            if (isNumber(format)) {
3998                index = format;
3999                format = undefined;
4000            }
4001
4002            format = format || '';
4003        } else {
4004            format = localeSorted;
4005            index = format;
4006            localeSorted = false;
4007
4008            if (isNumber(format)) {
4009                index = format;
4010                format = undefined;
4011            }
4012
4013            format = format || '';
4014        }
4015
4016        var locale = getLocale(),
4017            shift = localeSorted ? locale._week.dow : 0;
4018
4019        if (index != null) {
4020            return get$1(format, (index + shift) % 7, field, 'day');
4021        }
4022
4023        var i;
4024        var out = [];
4025        for (i = 0; i < 7; i++) {
4026            out[i] = get$1(format, (i + shift) % 7, field, 'day');
4027        }
4028        return out;
4029    }
4030
4031    function listMonths(format, index) {
4032        return listMonthsImpl(format, index, 'months');
4033    }
4034
4035    function listMonthsShort(format, index) {
4036        return listMonthsImpl(format, index, 'monthsShort');
4037    }
4038
4039    function listWeekdays(localeSorted, format, index) {
4040        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
4041    }
4042
4043    function listWeekdaysShort(localeSorted, format, index) {
4044        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
4045    }
4046
4047    function listWeekdaysMin(localeSorted, format, index) {
4048        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
4049    }
4050
4051    getSetGlobalLocale('en', {
4052        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
4053        ordinal: function (number) {
4054            var b = number % 10,
4055                output = (toInt(number % 100 / 10) === 1) ? 'th' :
4056                    (b === 1) ? 'st' :
4057                        (b === 2) ? 'nd' :
4058                            (b === 3) ? 'rd' : 'th';
4059            return number + output;
4060        }
4061    });
4062
4063    // Side effect imports
4064    hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
4065    hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
4066
4067    var mathAbs = Math.abs;
4068
4069    function abs() {
4070        var data = this._data;
4071
4072        this._milliseconds = mathAbs(this._milliseconds);
4073        this._days = mathAbs(this._days);
4074        this._months = mathAbs(this._months);
4075
4076        data.milliseconds = mathAbs(data.milliseconds);
4077        data.seconds = mathAbs(data.seconds);
4078        data.minutes = mathAbs(data.minutes);
4079        data.hours = mathAbs(data.hours);
4080        data.months = mathAbs(data.months);
4081        data.years = mathAbs(data.years);
4082
4083        return this;
4084    }
4085
4086    function addSubtract$1(duration, input, value, direction) {
4087        var other = createDuration(input, value);
4088
4089        duration._milliseconds += direction * other._milliseconds;
4090        duration._days += direction * other._days;
4091        duration._months += direction * other._months;
4092
4093        return duration._bubble();
4094    }
4095
4096    // supports only 2.0-style add(1, 's') or add(duration)
4097    function add$1(input, value) {
4098        return addSubtract$1(this, input, value, 1);
4099    }
4100
4101    // supports only 2.0-style subtract(1, 's') or subtract(duration)
4102    function subtract$1(input, value) {
4103        return addSubtract$1(this, input, value, -1);
4104    }
4105
4106    function absCeil(number) {
4107        if (number < 0) {
4108            return Math.floor(number);
4109        } else {
4110            return Math.ceil(number);
4111        }
4112    }
4113
4114    function bubble() {
4115        var milliseconds = this._milliseconds;
4116        var days = this._days;
4117        var months = this._months;
4118        var data = this._data;
4119        var seconds, minutes, hours, years, monthsFromDays;
4120
4121        // if we have a mix of positive and negative values, bubble down first
4122        // check: https://github.com/moment/moment/issues/2166
4123        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
4124            (milliseconds <= 0 && days <= 0 && months <= 0))) {
4125            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
4126            days = 0;
4127            months = 0;
4128        }
4129
4130        // The following code bubbles up values, see the tests for
4131        // examples of what that means.
4132        data.milliseconds = milliseconds % 1000;
4133
4134        seconds = absFloor(milliseconds / 1000);
4135        data.seconds = seconds % 60;
4136
4137        minutes = absFloor(seconds / 60);
4138        data.minutes = minutes % 60;
4139
4140        hours = absFloor(minutes / 60);
4141        data.hours = hours % 24;
4142
4143        days += absFloor(hours / 24);
4144
4145        // convert days to months
4146        monthsFromDays = absFloor(daysToMonths(days));
4147        months += monthsFromDays;
4148        days -= absCeil(monthsToDays(monthsFromDays));
4149
4150        // 12 months -> 1 year
4151        years = absFloor(months / 12);
4152        months %= 12;
4153
4154        data.days = days;
4155        data.months = months;
4156        data.years = years;
4157
4158        return this;
4159    }
4160
4161    function daysToMonths(days) {
4162        // 400 years have 146097 days (taking into account leap year rules)
4163        // 400 years have 12 months === 4800
4164        return days * 4800 / 146097;
4165    }
4166
4167    function monthsToDays(months) {
4168        // the reverse of daysToMonths
4169        return months * 146097 / 4800;
4170    }
4171
4172    function as(units) {
4173        if (!this.isValid()) {
4174            return NaN;
4175        }
4176        var days;
4177        var months;
4178        var milliseconds = this._milliseconds;
4179
4180        units = normalizeUnits(units);
4181
4182        if (units === 'month' || units === 'year') {
4183            days = this._days + milliseconds / 864e5;
4184            months = this._months + daysToMonths(days);
4185            return units === 'month' ? months : months / 12;
4186        } else {
4187            // handle milliseconds separately because of floating point math errors (issue #1867)
4188            days = this._days + Math.round(monthsToDays(this._months));
4189            switch (units) {
4190                case 'week': return days / 7 + milliseconds / 6048e5;
4191                case 'day': return days + milliseconds / 864e5;
4192                case 'hour': return days * 24 + milliseconds / 36e5;
4193                case 'minute': return days * 1440 + milliseconds / 6e4;
4194                case 'second': return days * 86400 + milliseconds / 1000;
4195                // Math.floor prevents floating point math errors here
4196                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
4197                default: throw new Error('Unknown unit ' + units);
4198            }
4199        }
4200    }
4201
4202    // TODO: Use this.as('ms')?
4203    function valueOf$1() {
4204        if (!this.isValid()) {
4205            return NaN;
4206        }
4207        return (
4208            this._milliseconds +
4209            this._days * 864e5 +
4210            (this._months % 12) * 2592e6 +
4211            toInt(this._months / 12) * 31536e6
4212        );
4213    }
4214
4215    function makeAs(alias) {
4216        return function () {
4217            return this.as(alias);
4218        };
4219    }
4220
4221    var asMilliseconds = makeAs('ms');
4222    var asSeconds = makeAs('s');
4223    var asMinutes = makeAs('m');
4224    var asHours = makeAs('h');
4225    var asDays = makeAs('d');
4226    var asWeeks = makeAs('w');
4227    var asMonths = makeAs('M');
4228    var asYears = makeAs('y');
4229
4230    function get$2(units) {
4231        units = normalizeUnits(units);
4232        return this.isValid() ? this[units + 's']() : NaN;
4233    }
4234
4235    function makeGetter(name) {
4236        return function () {
4237            return this.isValid() ? this._data[name] : NaN;
4238        };
4239    }
4240
4241    var milliseconds = makeGetter('milliseconds');
4242    var seconds = makeGetter('seconds');
4243    var minutes = makeGetter('minutes');
4244    var hours = makeGetter('hours');
4245    var days = makeGetter('days');
4246    var months = makeGetter('months');
4247    var years = makeGetter('years');
4248
4249    function weeks() {
4250        return absFloor(this.days() / 7);
4251    }
4252
4253    var round = Math.round;
4254    var thresholds = {
4255        ss: 44,         // a few seconds to seconds
4256        s: 45,         // seconds to minute
4257        m: 45,         // minutes to hour
4258        h: 22,         // hours to day
4259        d: 26,         // days to month
4260        M: 11          // months to year
4261    };
4262
4263    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
4264    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
4265        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
4266    }
4267
4268    function relativeTime$1(posNegDuration, withoutSuffix, locale) {
4269        var duration = createDuration(posNegDuration).abs();
4270        var seconds = round(duration.as('s'));
4271        var minutes = round(duration.as('m'));
4272        var hours = round(duration.as('h'));
4273        var days = round(duration.as('d'));
4274        var months = round(duration.as('M'));
4275        var years = round(duration.as('y'));
4276
4277        var a = seconds <= thresholds.ss && ['s', seconds] ||
4278            seconds < thresholds.s && ['ss', seconds] ||
4279            minutes <= 1 && ['m'] ||
4280            minutes < thresholds.m && ['mm', minutes] ||
4281            hours <= 1 && ['h'] ||
4282            hours < thresholds.h && ['hh', hours] ||
4283            days <= 1 && ['d'] ||
4284            days < thresholds.d && ['dd', days] ||
4285            months <= 1 && ['M'] ||
4286            months < thresholds.M && ['MM', months] ||
4287            years <= 1 && ['y'] || ['yy', years];
4288
4289        a[2] = withoutSuffix;
4290        a[3] = +posNegDuration > 0;
4291        a[4] = locale;
4292        return substituteTimeAgo.apply(null, a);
4293    }
4294
4295    // This function allows you to set the rounding function for relative time strings
4296    function getSetRelativeTimeRounding(roundingFunction) {
4297        if (roundingFunction === undefined) {
4298            return round;
4299        }
4300        if (typeof (roundingFunction) === 'function') {
4301            round = roundingFunction;
4302            return true;
4303        }
4304        return false;
4305    }
4306
4307    // This function allows you to set a threshold for relative time strings
4308    function getSetRelativeTimeThreshold(threshold, limit) {
4309        if (thresholds[threshold] === undefined) {
4310            return false;
4311        }
4312        if (limit === undefined) {
4313            return thresholds[threshold];
4314        }
4315        thresholds[threshold] = limit;
4316        if (threshold === 's') {
4317            thresholds.ss = limit - 1;
4318        }
4319        return true;
4320    }
4321
4322    function humanize(withSuffix) {
4323        if (!this.isValid()) {
4324            return this.localeData().invalidDate();
4325        }
4326
4327        var locale = this.localeData();
4328        var output = relativeTime$1(this, !withSuffix, locale);
4329
4330        if (withSuffix) {
4331            output = locale.pastFuture(+this, output);
4332        }
4333
4334        return locale.postformat(output);
4335    }
4336
4337    var abs$1 = Math.abs;
4338
4339    function toISOString$1() {
4340        // for ISO strings we do not use the normal bubbling rules:
4341        //  * milliseconds bubble up until they become hours
4342        //  * days do not bubble at all
4343        //  * months bubble up until they become years
4344        // This is because there is no context-free conversion between hours and days
4345        // (think of clock changes)
4346        // and also not between days and months (28-31 days per month)
4347        if (!this.isValid()) {
4348            return this.localeData().invalidDate();
4349        }
4350
4351        var seconds = abs$1(this._milliseconds) / 1000;
4352        var days = abs$1(this._days);
4353        var months = abs$1(this._months);
4354        var minutes, hours, years;
4355
4356        // 3600 seconds -> 60 minutes -> 1 hour
4357        minutes = absFloor(seconds / 60);
4358        hours = absFloor(minutes / 60);
4359        seconds %= 60;
4360        minutes %= 60;
4361
4362        // 12 months -> 1 year
4363        years = absFloor(months / 12);
4364        months %= 12;
4365
4366
4367        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
4368        var Y = years;
4369        var M = months;
4370        var D = days;
4371        var h = hours;
4372        var m = minutes;
4373        var s = seconds;
4374        var total = this.asSeconds();
4375
4376        if (!total) {
4377            // this is the same as C#'s (Noda) and python (isodate)...
4378            // but not other JS (goog.date)
4379            return 'P0D';
4380        }
4381
4382        return (total < 0 ? '-' : '') +
4383            'P' +
4384            (Y ? Y + 'Y' : '') +
4385            (M ? M + 'M' : '') +
4386            (D ? D + 'D' : '') +
4387            ((h || m || s) ? 'T' : '') +
4388            (h ? h + 'H' : '') +
4389            (m ? m + 'M' : '') +
4390            (s ? s + 'S' : '');
4391    }
4392
4393    var proto$2 = Duration.prototype;
4394
4395    proto$2.isValid = isValid$1;
4396    proto$2.abs = abs;
4397    proto$2.add = add$1;
4398    proto$2.subtract = subtract$1;
4399    proto$2.as = as;
4400    proto$2.asMilliseconds = asMilliseconds;
4401    proto$2.asSeconds = asSeconds;
4402    proto$2.asMinutes = asMinutes;
4403    proto$2.asHours = asHours;
4404    proto$2.asDays = asDays;
4405    proto$2.asWeeks = asWeeks;
4406    proto$2.asMonths = asMonths;
4407    proto$2.asYears = asYears;
4408    proto$2.valueOf = valueOf$1;
4409    proto$2._bubble = bubble;
4410    proto$2.get = get$2;
4411    proto$2.milliseconds = milliseconds;
4412    proto$2.seconds = seconds;
4413    proto$2.minutes = minutes;
4414    proto$2.hours = hours;
4415    proto$2.days = days;
4416    proto$2.weeks = weeks;
4417    proto$2.months = months;
4418    proto$2.years = years;
4419    proto$2.humanize = humanize;
4420    proto$2.toISOString = toISOString$1;
4421    proto$2.toString = toISOString$1;
4422    proto$2.toJSON = toISOString$1;
4423    proto$2.locale = locale;
4424    proto$2.localeData = localeData;
4425
4426    // Deprecations
4427    proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
4428    proto$2.lang = lang;
4429
4430    // Side effect imports
4431
4432    // FORMATTING
4433
4434    addFormatToken('X', 0, 0, 'unix');
4435    addFormatToken('x', 0, 0, 'valueOf');
4436
4437    // PARSING
4438
4439    addRegexToken('x', matchSigned);
4440    addRegexToken('X', matchTimestamp);
4441    addParseToken('X', function (input, array, config) {
4442        config._d = new Date(parseFloat(input, 10) * 1000);
4443    });
4444    addParseToken('x', function (input, array, config) {
4445        config._d = new Date(toInt(input));
4446    });
4447
4448    // Side effect imports
4449
4450    //! moment.js
4451    //! version : 2.18.1
4452    //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4453    //! license : MIT
4454    //! momentjs.com
4455
4456    hooks.version = '2.18.1';
4457
4458    setHookCallback(createLocal);
4459
4460    hooks.fn = proto;
4461    hooks.min = min;
4462    hooks.max = max;
4463    hooks.now = now;
4464    hooks.utc = createUTC;
4465    hooks.unix = createUnix;
4466    hooks.months = listMonths;
4467    hooks.isDate = isDate;
4468    hooks.locale = getSetGlobalLocale;
4469    hooks.invalid = createInvalid;
4470    hooks.duration = createDuration;
4471    hooks.isMoment = isMoment;
4472    hooks.weekdays = listWeekdays;
4473    hooks.parseZone = createInZone;
4474    hooks.localeData = getLocale;
4475    hooks.isDuration = isDuration;
4476    hooks.monthsShort = listMonthsShort;
4477    hooks.weekdaysMin = listWeekdaysMin;
4478    hooks.defineLocale = defineLocale;
4479    hooks.updateLocale = updateLocale;
4480    hooks.locales = listLocales;
4481    hooks.weekdaysShort = listWeekdaysShort;
4482    hooks.normalizeUnits = normalizeUnits;
4483    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
4484    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
4485    hooks.calendarFormat = getCalendarFormat;
4486    hooks.prototype = proto;
4487
4488    //! moment.js locale configuration
4489    //! locale : Afrikaans [af]
4490    //! author : Werner Mollentze : https://github.com/wernerm
4491
4492    hooks.defineLocale('af', {
4493        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
4494        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
4495        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
4496        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
4497        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
4498        meridiemParse: /vm|nm/i,
4499        isPM: function (input) {
4500            return /^nm$/i.test(input);
4501        },
4502        meridiem: function (hours, minutes, isLower) {
4503            if (hours < 12) {
4504                return isLower ? 'vm' : 'VM';
4505            } else {
4506                return isLower ? 'nm' : 'NM';
4507            }
4508        },
4509        longDateFormat: {
4510            LT: 'HH:mm',
4511            LTS: 'HH:mm:ss',
4512            L: 'DD/MM/YYYY',
4513            LL: 'D MMMM YYYY',
4514            LLL: 'D MMMM YYYY HH:mm',
4515            LLLL: 'dddd, D MMMM YYYY HH:mm'
4516        },
4517        calendar: {
4518            sameDay: '[Vandag om] LT',
4519            nextDay: '[Môre om] LT',
4520            nextWeek: 'dddd [om] LT',
4521            lastDay: '[Gister om] LT',
4522            lastWeek: '[Laas] dddd [om] LT',
4523            sameElse: 'L'
4524        },
4525        relativeTime: {
4526            future: 'oor %s',
4527            past: '%s gelede',
4528            s: '\'n paar sekondes',
4529            m: '\'n minuut',
4530            mm: '%d minute',
4531            h: '\'n uur',
4532            hh: '%d ure',
4533            d: '\'n dag',
4534            dd: '%d dae',
4535            M: '\'n maand',
4536            MM: '%d maande',
4537            y: '\'n jaar',
4538            yy: '%d jaar'
4539        },
4540        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
4541        ordinal: function (number) {
4542            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
4543        },
4544        week: {
4545            dow: 1, // Maandag is die eerste dag van die week.
4546            doy: 4  // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
4547        }
4548    });
4549
4550    //! moment.js locale configuration
4551    //! locale : Arabic (Algeria) [ar-dz]
4552    //! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
4553
4554    hooks.defineLocale('ar-dz', {
4555        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4556        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4557        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4558        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
4559        weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
4560        weekdaysParseExact: true,
4561        longDateFormat: {
4562            LT: 'HH:mm',
4563            LTS: 'HH:mm:ss',
4564            L: 'DD/MM/YYYY',
4565            LL: 'D MMMM YYYY',
4566            LLL: 'D MMMM YYYY HH:mm',
4567            LLLL: 'dddd D MMMM YYYY HH:mm'
4568        },
4569        calendar: {
4570            sameDay: '[اليوم على الساعة] LT',
4571            nextDay: '[غدا على الساعة] LT',
4572            nextWeek: 'dddd [على الساعة] LT',
4573            lastDay: '[أمس على الساعة] LT',
4574            lastWeek: 'dddd [على الساعة] LT',
4575            sameElse: 'L'
4576        },
4577        relativeTime: {
4578            future: 'في %s',
4579            past: 'منذ %s',
4580            s: 'ثوان',
4581            m: 'دقيقة',
4582            mm: '%d دقائق',
4583            h: 'ساعة',
4584            hh: '%d ساعات',
4585            d: 'يوم',
4586            dd: '%d أيام',
4587            M: 'شهر',
4588            MM: '%d أشهر',
4589            y: 'سنة',
4590            yy: '%d سنوات'
4591        },
4592        week: {
4593            dow: 0, // Sunday is the first day of the week.
4594            doy: 4  // The week that contains Jan 1st is the first week of the year.
4595        }
4596    });
4597
4598    //! moment.js locale configuration
4599    //! locale : Arabic (Kuwait) [ar-kw]
4600    //! author : Nusret Parlak: https://github.com/nusretparlak
4601
4602    hooks.defineLocale('ar-kw', {
4603        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
4604        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
4605        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4606        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
4607        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
4608        weekdaysParseExact: true,
4609        longDateFormat: {
4610            LT: 'HH:mm',
4611            LTS: 'HH:mm:ss',
4612            L: 'DD/MM/YYYY',
4613            LL: 'D MMMM YYYY',
4614            LLL: 'D MMMM YYYY HH:mm',
4615            LLLL: 'dddd D MMMM YYYY HH:mm'
4616        },
4617        calendar: {
4618            sameDay: '[اليوم على الساعة] LT',
4619            nextDay: '[غدا على الساعة] LT',
4620            nextWeek: 'dddd [على الساعة] LT',
4621            lastDay: '[أمس على الساعة] LT',
4622            lastWeek: 'dddd [على الساعة] LT',
4623            sameElse: 'L'
4624        },
4625        relativeTime: {
4626            future: 'في %s',
4627            past: 'منذ %s',
4628            s: 'ثوان',
4629            m: 'دقيقة',
4630            mm: '%d دقائق',
4631            h: 'ساعة',
4632            hh: '%d ساعات',
4633            d: 'يوم',
4634            dd: '%d أيام',
4635            M: 'شهر',
4636            MM: '%d أشهر',
4637            y: 'سنة',
4638            yy: '%d سنوات'
4639        },
4640        week: {
4641            dow: 0, // Sunday is the first day of the week.
4642            doy: 12  // The week that contains Jan 1st is the first week of the year.
4643        }
4644    });
4645
4646    //! moment.js locale configuration
4647    //! locale : Arabic (Lybia) [ar-ly]
4648    //! author : Ali Hmer: https://github.com/kikoanis
4649
4650    var symbolMap = {
4651        '1': '1',
4652        '2': '2',
4653        '3': '3',
4654        '4': '4',
4655        '5': '5',
4656        '6': '6',
4657        '7': '7',
4658        '8': '8',
4659        '9': '9',
4660        '0': '0'
4661    };
4662    var pluralForm = function (n) {
4663        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
4664    };
4665    var plurals = {
4666        s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
4667        m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
4668        h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
4669        d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
4670        M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
4671        y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
4672    };
4673    var pluralize = function (u) {
4674        return function (number, withoutSuffix, string, isFuture) {
4675            var f = pluralForm(number),
4676                str = plurals[u][pluralForm(number)];
4677            if (f === 2) {
4678                str = str[withoutSuffix ? 0 : 1];
4679            }
4680            return str.replace(/%d/i, number);
4681        };
4682    };
4683    var months$1 = [
4684        'يناير',
4685        'فبراير',
4686        'مارس',
4687        'أبريل',
4688        'مايو',
4689        'يونيو',
4690        'يوليو',
4691        'أغسطس',
4692        'سبتمبر',
4693        'أكتوبر',
4694        'نوفمبر',
4695        'ديسمبر'
4696    ];
4697
4698    hooks.defineLocale('ar-ly', {
4699        months: months$1,
4700        monthsShort: months$1,
4701        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4702        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
4703        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
4704        weekdaysParseExact: true,
4705        longDateFormat: {
4706            LT: 'HH:mm',
4707            LTS: 'HH:mm:ss',
4708            L: 'D/\u200FM/\u200FYYYY',
4709            LL: 'D MMMM YYYY',
4710            LLL: 'D MMMM YYYY HH:mm',
4711            LLLL: 'dddd D MMMM YYYY HH:mm'
4712        },
4713        meridiemParse: /ص|م/,
4714        isPM: function (input) {
4715            return 'م' === input;
4716        },
4717        meridiem: function (hour, minute, isLower) {
4718            if (hour < 12) {
4719                return 'ص';
4720            } else {
4721                return 'م';
4722            }
4723        },
4724        calendar: {
4725            sameDay: '[اليوم عند الساعة] LT',
4726            nextDay: '[غدًا عند الساعة] LT',
4727            nextWeek: 'dddd [عند الساعة] LT',
4728            lastDay: '[أمس عند الساعة] LT',
4729            lastWeek: 'dddd [عند الساعة] LT',
4730            sameElse: 'L'
4731        },
4732        relativeTime: {
4733            future: 'بعد %s',
4734            past: 'منذ %s',
4735            s: pluralize('s'),
4736            m: pluralize('m'),
4737            mm: pluralize('m'),
4738            h: pluralize('h'),
4739            hh: pluralize('h'),
4740            d: pluralize('d'),
4741            dd: pluralize('d'),
4742            M: pluralize('M'),
4743            MM: pluralize('M'),
4744            y: pluralize('y'),
4745            yy: pluralize('y')
4746        },
4747        preparse: function (string) {
4748            return string.replace(/\u200f/g, '').replace(/،/g, ',');
4749        },
4750        postformat: function (string) {
4751            return string.replace(/\d/g, function (match) {
4752                return symbolMap[match];
4753            }).replace(/,/g, '،');
4754        },
4755        week: {
4756            dow: 6, // Saturday is the first day of the week.
4757            doy: 12  // The week that contains Jan 1st is the first week of the year.
4758        }
4759    });
4760
4761    //! moment.js locale configuration
4762    //! locale : Arabic (Morocco) [ar-ma]
4763    //! author : ElFadili Yassine : https://github.com/ElFadiliY
4764    //! author : Abdel Said : https://github.com/abdelsaid
4765
4766    hooks.defineLocale('ar-ma', {
4767        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
4768        monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
4769        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4770        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
4771        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
4772        weekdaysParseExact: true,
4773        longDateFormat: {
4774            LT: 'HH:mm',
4775            LTS: 'HH:mm:ss',
4776            L: 'DD/MM/YYYY',
4777            LL: 'D MMMM YYYY',
4778            LLL: 'D MMMM YYYY HH:mm',
4779            LLLL: 'dddd D MMMM YYYY HH:mm'
4780        },
4781        calendar: {
4782            sameDay: '[اليوم على الساعة] LT',
4783            nextDay: '[غدا على الساعة] LT',
4784            nextWeek: 'dddd [على الساعة] LT',
4785            lastDay: '[أمس على الساعة] LT',
4786            lastWeek: 'dddd [على الساعة] LT',
4787            sameElse: 'L'
4788        },
4789        relativeTime: {
4790            future: 'في %s',
4791            past: 'منذ %s',
4792            s: 'ثوان',
4793            m: 'دقيقة',
4794            mm: '%d دقائق',
4795            h: 'ساعة',
4796            hh: '%d ساعات',
4797            d: 'يوم',
4798            dd: '%d أيام',
4799            M: 'شهر',
4800            MM: '%d أشهر',
4801            y: 'سنة',
4802            yy: '%d سنوات'
4803        },
4804        week: {
4805            dow: 6, // Saturday is the first day of the week.
4806            doy: 12  // The week that contains Jan 1st is the first week of the year.
4807        }
4808    });
4809
4810    //! moment.js locale configuration
4811    //! locale : Arabic (Saudi Arabia) [ar-sa]
4812    //! author : Suhail Alkowaileet : https://github.com/xsoh
4813
4814    var symbolMap$1 = {
4815        '1': 'Ù¡',
4816        '2': 'Ù¢',
4817        '3': 'Ù£',
4818        '4': 'Ù¤',
4819        '5': 'Ù¥',
4820        '6': 'Ù¦',
4821        '7': 'Ù§',
4822        '8': 'Ù¨',
4823        '9': 'Ù©',
4824        '0': 'Ù '
4825    };
4826    var numberMap = {
4827        'Ù¡': '1',
4828        'Ù¢': '2',
4829        'Ù£': '3',
4830        'Ù¤': '4',
4831        'Ù¥': '5',
4832        'Ù¦': '6',
4833        'Ù§': '7',
4834        'Ù¨': '8',
4835        'Ù©': '9',
4836        'Ù ': '0'
4837    };
4838
4839    hooks.defineLocale('ar-sa', {
4840        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4841        monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4842        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4843        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
4844        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
4845        weekdaysParseExact: true,
4846        longDateFormat: {
4847            LT: 'HH:mm',
4848            LTS: 'HH:mm:ss',
4849            L: 'DD/MM/YYYY',
4850            LL: 'D MMMM YYYY',
4851            LLL: 'D MMMM YYYY HH:mm',
4852            LLLL: 'dddd D MMMM YYYY HH:mm'
4853        },
4854        meridiemParse: /ص|م/,
4855        isPM: function (input) {
4856            return 'م' === input;
4857        },
4858        meridiem: function (hour, minute, isLower) {
4859            if (hour < 12) {
4860                return 'ص';
4861            } else {
4862                return 'م';
4863            }
4864        },
4865        calendar: {
4866            sameDay: '[اليوم على الساعة] LT',
4867            nextDay: '[غدا على الساعة] LT',
4868            nextWeek: 'dddd [على الساعة] LT',
4869            lastDay: '[أمس على الساعة] LT',
4870            lastWeek: 'dddd [على الساعة] LT',
4871            sameElse: 'L'
4872        },
4873        relativeTime: {
4874            future: 'في %s',
4875            past: 'منذ %s',
4876            s: 'ثوان',
4877            m: 'دقيقة',
4878            mm: '%d دقائق',
4879            h: 'ساعة',
4880            hh: '%d ساعات',
4881            d: 'يوم',
4882            dd: '%d أيام',
4883            M: 'شهر',
4884            MM: '%d أشهر',
4885            y: 'سنة',
4886            yy: '%d سنوات'
4887        },
4888        preparse: function (string) {
4889            return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
4890                return numberMap[match];
4891            }).replace(/،/g, ',');
4892        },
4893        postformat: function (string) {
4894            return string.replace(/\d/g, function (match) {
4895                return symbolMap$1[match];
4896            }).replace(/,/g, '،');
4897        },
4898        week: {
4899            dow: 0, // Sunday is the first day of the week.
4900            doy: 6  // The week that contains Jan 1st is the first week of the year.
4901        }
4902    });
4903
4904    //! moment.js locale configuration
4905    //! locale  :  Arabic (Tunisia) [ar-tn]
4906    //! author : Nader Toukabri : https://github.com/naderio
4907
4908    hooks.defineLocale('ar-tn', {
4909        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4910        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
4911        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
4912        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
4913        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
4914        weekdaysParseExact: true,
4915        longDateFormat: {
4916            LT: 'HH:mm',
4917            LTS: 'HH:mm:ss',
4918            L: 'DD/MM/YYYY',
4919            LL: 'D MMMM YYYY',
4920            LLL: 'D MMMM YYYY HH:mm',
4921            LLLL: 'dddd D MMMM YYYY HH:mm'
4922        },
4923        calendar: {
4924            sameDay: '[اليوم على الساعة] LT',
4925            nextDay: '[غدا على الساعة] LT',
4926            nextWeek: 'dddd [على الساعة] LT',
4927            lastDay: '[أمس على الساعة] LT',
4928            lastWeek: 'dddd [على الساعة] LT',
4929            sameElse: 'L'
4930        },
4931        relativeTime: {
4932            future: 'في %s',
4933            past: 'منذ %s',
4934            s: 'ثوان',
4935            m: 'دقيقة',
4936            mm: '%d دقائق',
4937            h: 'ساعة',
4938            hh: '%d ساعات',
4939            d: 'يوم',
4940            dd: '%d أيام',
4941            M: 'شهر',
4942            MM: '%d أشهر',
4943            y: 'سنة',
4944            yy: '%d سنوات'
4945        },
4946        week: {
4947            dow: 1, // Monday is the first day of the week.
4948            doy: 4 // The week that contains Jan 4th is the first week of the year.
4949        }
4950    });
4951
4952    //! moment.js locale configuration
4953    //! locale : Arabic [ar]
4954    //! author : Abdel Said: https://github.com/abdelsaid
4955    //! author : Ahmed Elkhatib
4956    //! author : forabi https://github.com/forabi
4957
4958    var symbolMap$2 = {
4959        '1': 'Ù¡',
4960        '2': 'Ù¢',
4961        '3': 'Ù£',
4962        '4': 'Ù¤',
4963        '5': 'Ù¥',
4964        '6': 'Ù¦',
4965        '7': 'Ù§',
4966        '8': 'Ù¨',
4967        '9': 'Ù©',
4968        '0': 'Ù '
4969    };
4970    var numberMap$1 = {
4971        'Ù¡': '1',
4972        'Ù¢': '2',
4973        'Ù£': '3',
4974        'Ù¤': '4',
4975        'Ù¥': '5',
4976        'Ù¦': '6',
4977        'Ù§': '7',
4978        'Ù¨': '8',
4979        'Ù©': '9',
4980        'Ù ': '0'
4981    };
4982    var pluralForm$1 = function (n) {
4983        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
4984    };
4985    var plurals$1 = {
4986        s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
4987        m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
4988        h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
4989        d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
4990        M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
4991        y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
4992    };
4993    var pluralize$1 = function (u) {
4994        return function (number, withoutSuffix, string, isFuture) {
4995            var f = pluralForm$1(number),
4996                str = plurals$1[u][pluralForm$1(number)];
4997            if (f === 2) {
4998                str = str[withoutSuffix ? 0 : 1];
4999            }
5000            return str.replace(/%d/i, number);
5001        };
5002    };
5003    var months$2 = [
5004        'كانون الثاني يناير',
5005        'شباط فبراير',
5006        'آذار مارس',
5007        'نيسان أبريل',
5008        'أيار مايو',
5009        'حزيران يونيو',
5010        'تموز يوليو',
5011        'آب أغسطس',
5012        'أيلول سبتمبر',
5013        'تشرين الأول أكتوبر',
5014        'تشرين الثاني نوفمبر',
5015        'كانون الأول ديسمبر'
5016    ];
5017
5018    hooks.defineLocale('ar', {
5019        months: months$2,
5020        monthsShort: months$2,
5021        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
5022        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
5023        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
5024        weekdaysParseExact: true,
5025        longDateFormat: {
5026            LT: 'HH:mm',
5027            LTS: 'HH:mm:ss',
5028            L: 'D/\u200FM/\u200FYYYY',
5029            LL: 'D MMMM YYYY',
5030            LLL: 'D MMMM YYYY HH:mm',
5031            LLLL: 'dddd D MMMM YYYY HH:mm'
5032        },
5033        meridiemParse: /ص|م/,
5034        isPM: function (input) {
5035            return 'م' === input;
5036        },
5037        meridiem: function (hour, minute, isLower) {
5038            if (hour < 12) {
5039                return 'ص';
5040            } else {
5041                return 'م';
5042            }
5043        },
5044        calendar: {
5045            sameDay: '[اليوم عند الساعة] LT',
5046            nextDay: '[غدًا عند الساعة] LT',
5047            nextWeek: 'dddd [عند الساعة] LT',
5048            lastDay: '[أمس عند الساعة] LT',
5049            lastWeek: 'dddd [عند الساعة] LT',
5050            sameElse: 'L'
5051        },
5052        relativeTime: {
5053            future: 'بعد %s',
5054            past: 'منذ %s',
5055            s: pluralize$1('s'),
5056            m: pluralize$1('m'),
5057            mm: pluralize$1('m'),
5058            h: pluralize$1('h'),
5059            hh: pluralize$1('h'),
5060            d: pluralize$1('d'),
5061            dd: pluralize$1('d'),
5062            M: pluralize$1('M'),
5063            MM: pluralize$1('M'),
5064            y: pluralize$1('y'),
5065            yy: pluralize$1('y')
5066        },
5067        preparse: function (string) {
5068            return string.replace(/\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
5069                return numberMap$1[match];
5070            }).replace(/،/g, ',');
5071        },
5072        postformat: function (string) {
5073            return string.replace(/\d/g, function (match) {
5074                return symbolMap$2[match];
5075            }).replace(/,/g, '،');
5076        },
5077        week: {
5078            dow: 6, // Saturday is the first day of the week.
5079            doy: 12  // The week that contains Jan 1st is the first week of the year.
5080        }
5081    });
5082
5083    //! moment.js locale configuration
5084    //! locale : Azerbaijani [az]
5085    //! author : topchiyev : https://github.com/topchiyev
5086
5087    var suffixes = {
5088        1: '-inci',
5089        5: '-inci',
5090        8: '-inci',
5091        70: '-inci',
5092        80: '-inci',
5093        2: '-nci',
5094        7: '-nci',
5095        20: '-nci',
5096        50: '-nci',
5097        3: '-üncü',
5098        4: '-üncü',
5099        100: '-üncü',
5100        6: '-ncı',
5101        9: '-uncu',
5102        10: '-uncu',
5103        30: '-uncu',
5104        60: '-ıncı',
5105        90: '-ıncı'
5106    };
5107
5108    hooks.defineLocale('az', {
5109        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),
5110        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
5111        weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),
5112        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
5113        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
5114        weekdaysParseExact: true,
5115        longDateFormat: {
5116            LT: 'HH:mm',
5117            LTS: 'HH:mm:ss',
5118            L: 'DD.MM.YYYY',
5119            LL: 'D MMMM YYYY',
5120            LLL: 'D MMMM YYYY HH:mm',
5121            LLLL: 'dddd, D MMMM YYYY HH:mm'
5122        },
5123        calendar: {
5124            sameDay: '[bugün saat] LT',
5125            nextDay: '[sabah saat] LT',
5126            nextWeek: '[gələn həftə] dddd [saat] LT',
5127            lastDay: '[dünən] LT',
5128            lastWeek: '[keçən həftə] dddd [saat] LT',
5129            sameElse: 'L'
5130        },
5131        relativeTime: {
5132            future: '%s sonra',
5133            past: '%s əvvəl',
5134            s: 'birneçə saniyyə',
5135            m: 'bir dəqiqə',
5136            mm: '%d dəqiqə',
5137            h: 'bir saat',
5138            hh: '%d saat',
5139            d: 'bir gün',
5140            dd: '%d gün',
5141            M: 'bir ay',
5142            MM: '%d ay',
5143            y: 'bir il',
5144            yy: '%d il'
5145        },
5146        meridiemParse: /gecə|səhər|gündüz|axşam/,
5147        isPM: function (input) {
5148            return /^(gündüz|axşam)$/.test(input);
5149        },
5150        meridiem: function (hour, minute, isLower) {
5151            if (hour < 4) {
5152                return 'gecə';
5153            } else if (hour < 12) {
5154                return 'səhər';
5155            } else if (hour < 17) {
5156                return 'gündüz';
5157            } else {
5158                return 'axşam';
5159            }
5160        },
5161        dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
5162        ordinal: function (number) {
5163            if (number === 0) {  // special case for zero
5164                return number + '-ıncı';
5165            }
5166            var a = number % 10,
5167                b = number % 100 - a,
5168                c = number >= 100 ? 100 : null;
5169            return number + (suffixes[a] || suffixes[b] || suffixes[c]);
5170        },
5171        week: {
5172            dow: 1, // Monday is the first day of the week.
5173            doy: 7  // The week that contains Jan 1st is the first week of the year.
5174        }
5175    });
5176
5177    //! moment.js locale configuration
5178    //! locale : Belarusian [be]
5179    //! author : Dmitry Demidov : https://github.com/demidov91
5180    //! author: Praleska: http://praleska.pro/
5181    //! Author : Menelion Elensúle : https://github.com/Oire
5182
5183    function plural(word, num) {
5184        var forms = word.split('_');
5185        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
5186    }
5187    function relativeTimeWithPlural(number, withoutSuffix, key) {
5188        var format = {
5189            'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
5190            'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
5191            'dd': 'дзень_дні_дзён',
5192            'MM': 'месяц_месяцы_месяцаў',
5193            'yy': 'год_гады_гадоў'
5194        };
5195        if (key === 'm') {
5196            return withoutSuffix ? 'хвіліна' : 'хвіліну';
5197        }
5198        else if (key === 'h') {
5199            return withoutSuffix ? 'гадзіна' : 'гадзіну';
5200        }
5201        else {
5202            return number + ' ' + plural(format[key], +number);
5203        }
5204    }
5205
5206    hooks.defineLocale('be', {
5207        months: {
5208            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),
5209            standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')
5210        },
5211        monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
5212        weekdays: {
5213            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),
5214            standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
5215            isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/
5216        },
5217        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
5218        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
5219        longDateFormat: {
5220            LT: 'HH:mm',
5221            LTS: 'HH:mm:ss',
5222            L: 'DD.MM.YYYY',
5223            LL: 'D MMMM YYYY г.',
5224            LLL: 'D MMMM YYYY г., HH:mm',
5225            LLLL: 'dddd, D MMMM YYYY г., HH:mm'
5226        },
5227        calendar: {
5228            sameDay: '[Сёння ў] LT',
5229            nextDay: '[Заўтра ў] LT',
5230            lastDay: '[Учора ў] LT',
5231            nextWeek: function () {
5232                return '[У] dddd [ў] LT';
5233            },
5234            lastWeek: function () {
5235                switch (this.day()) {
5236                    case 0:
5237                    case 3:
5238                    case 5:
5239                    case 6:
5240                        return '[У мінулую] dddd [ў] LT';
5241                    case 1:
5242                    case 2:
5243                    case 4:
5244                        return '[У мінулы] dddd [ў] LT';
5245                }
5246            },
5247            sameElse: 'L'
5248        },
5249        relativeTime: {
5250            future: 'праз %s',
5251            past: '%s таму',
5252            s: 'некалькі секунд',
5253            m: relativeTimeWithPlural,
5254            mm: relativeTimeWithPlural,
5255            h: relativeTimeWithPlural,
5256            hh: relativeTimeWithPlural,
5257            d: 'дзень',
5258            dd: relativeTimeWithPlural,
5259            M: 'месяц',
5260            MM: relativeTimeWithPlural,
5261            y: 'год',
5262            yy: relativeTimeWithPlural
5263        },
5264        meridiemParse: /ночы|раніцы|дня|вечара/,
5265        isPM: function (input) {
5266            return /^(дня|вечара)$/.test(input);
5267        },
5268        meridiem: function (hour, minute, isLower) {
5269            if (hour < 4) {
5270                return 'ночы';
5271            } else if (hour < 12) {
5272                return 'раніцы';
5273            } else if (hour < 17) {
5274                return 'дня';
5275            } else {
5276                return 'вечара';
5277            }
5278        },
5279        dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
5280        ordinal: function (number, period) {
5281            switch (period) {
5282                case 'M':
5283                case 'd':
5284                case 'DDD':
5285                case 'w':
5286                case 'W':
5287                    return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';
5288                case 'D':
5289                    return number + '-га';
5290                default:
5291                    return number;
5292            }
5293        },
5294        week: {
5295            dow: 1, // Monday is the first day of the week.
5296            doy: 7  // The week that contains Jan 1st is the first week of the year.
5297        }
5298    });
5299
5300    //! moment.js locale configuration
5301    //! locale : Bulgarian [bg]
5302    //! author : Krasen Borisov : https://github.com/kraz
5303
5304    hooks.defineLocale('bg', {
5305        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
5306        monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
5307        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
5308        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
5309        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
5310        longDateFormat: {
5311            LT: 'H:mm',
5312            LTS: 'H:mm:ss',
5313            L: 'D.MM.YYYY',
5314            LL: 'D MMMM YYYY',
5315            LLL: 'D MMMM YYYY H:mm',
5316            LLLL: 'dddd, D MMMM YYYY H:mm'
5317        },
5318        calendar: {
5319            sameDay: '[Днес в] LT',
5320            nextDay: '[Утре в] LT',
5321            nextWeek: 'dddd [в] LT',
5322            lastDay: '[Вчера в] LT',
5323            lastWeek: function () {
5324                switch (this.day()) {
5325                    case 0:
5326                    case 3:
5327                    case 6:
5328                        return '[В изминалата] dddd [в] LT';
5329                    case 1:
5330                    case 2:
5331                    case 4:
5332                    case 5:
5333                        return '[В изминалия] dddd [в] LT';
5334                }
5335            },
5336            sameElse: 'L'
5337        },
5338        relativeTime: {
5339            future: 'след %s',
5340            past: 'преди %s',
5341            s: 'няколко секунди',
5342            m: 'минута',
5343            mm: '%d минути',
5344            h: 'час',
5345            hh: '%d часа',
5346            d: 'ден',
5347            dd: '%d дни',
5348            M: 'месец',
5349            MM: '%d месеца',
5350            y: 'година',
5351            yy: '%d години'
5352        },
5353        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
5354        ordinal: function (number) {
5355            var lastDigit = number % 10,
5356                last2Digits = number % 100;
5357            if (number === 0) {
5358                return number + '-ев';
5359            } else if (last2Digits === 0) {
5360                return number + '-ен';
5361            } else if (last2Digits > 10 && last2Digits < 20) {
5362                return number + '-ти';
5363            } else if (lastDigit === 1) {
5364                return number + '-ви';
5365            } else if (lastDigit === 2) {
5366                return number + '-ри';
5367            } else if (lastDigit === 7 || lastDigit === 8) {
5368                return number + '-ми';
5369            } else {
5370                return number + '-ти';
5371            }
5372        },
5373        week: {
5374            dow: 1, // Monday is the first day of the week.
5375            doy: 7  // The week that contains Jan 1st is the first week of the year.
5376        }
5377    });
5378
5379    //! moment.js locale configuration
5380    //! locale : Bengali [bn]
5381    //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
5382
5383    var symbolMap$3 = {
5384        '1': 'à§§',
5385        '2': '২',
5386        '3': 'à§©',
5387        '4': '৪',
5388        '5': 'à§«',
5389        '6': '৬',
5390        '7': 'à§­',
5391        '8': 'à§®',
5392        '9': '৯',
5393        '0': '০'
5394    };
5395    var numberMap$2 = {
5396        'à§§': '1',
5397        '২': '2',
5398        'à§©': '3',
5399        '৪': '4',
5400        'à§«': '5',
5401        '৬': '6',
5402        'à§­': '7',
5403        'à§®': '8',
5404        '৯': '9',
5405        '০': '0'
5406    };
5407
5408    hooks.defineLocale('bn', {
5409        months: 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
5410        monthsShort: 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
5411        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
5412        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
5413        weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
5414        longDateFormat: {
5415            LT: 'A h:mm সময়',
5416            LTS: 'A h:mm:ss সময়',
5417            L: 'DD/MM/YYYY',
5418            LL: 'D MMMM YYYY',
5419            LLL: 'D MMMM YYYY, A h:mm সময়',
5420            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'
5421        },
5422        calendar: {
5423            sameDay: '[আজ] LT',
5424            nextDay: '[আগামীকাল] LT',
5425            nextWeek: 'dddd, LT',
5426            lastDay: '[গতকাল] LT',
5427            lastWeek: '[গত] dddd, LT',
5428            sameElse: 'L'
5429        },
5430        relativeTime: {
5431            future: '%s পরে',
5432            past: '%s আগে',
5433            s: 'কয়েক সেকেন্ড',
5434            m: 'এক মিনিট',
5435            mm: '%d মিনিট',
5436            h: 'এক ঘন্টা',
5437            hh: '%d ঘন্টা',
5438            d: 'এক দিন',
5439            dd: '%d দিন',
5440            M: 'এক মাস',
5441            MM: '%d মাস',
5442            y: 'এক বছর',
5443            yy: '%d বছর'
5444        },
5445        preparse: function (string) {
5446            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
5447                return numberMap$2[match];
5448            });
5449        },
5450        postformat: function (string) {
5451            return string.replace(/\d/g, function (match) {
5452                return symbolMap$3[match];
5453            });
5454        },
5455        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
5456        meridiemHour: function (hour, meridiem) {
5457            if (hour === 12) {
5458                hour = 0;
5459            }
5460            if ((meridiem === 'রাত' && hour >= 4) ||
5461                (meridiem === 'দুপুর' && hour < 5) ||
5462                meridiem === 'বিকাল') {
5463                return hour + 12;
5464            } else {
5465                return hour;
5466            }
5467        },
5468        meridiem: function (hour, minute, isLower) {
5469            if (hour < 4) {
5470                return 'রাত';
5471            } else if (hour < 10) {
5472                return 'সকাল';
5473            } else if (hour < 17) {
5474                return 'দুপুর';
5475            } else if (hour < 20) {
5476                return 'বিকাল';
5477            } else {
5478                return 'রাত';
5479            }
5480        },
5481        week: {
5482            dow: 0, // Sunday is the first day of the week.
5483            doy: 6  // The week that contains Jan 1st is the first week of the year.
5484        }
5485    });
5486
5487    //! moment.js locale configuration
5488    //! locale : Tibetan [bo]
5489    //! author : Thupten N. Chakrishar : https://github.com/vajradog
5490
5491    var symbolMap$4 = {
5492        '1': '༡',
5493        '2': '༢',
5494        '3': '༣',
5495        '4': '༤',
5496        '5': '༥',
5497        '6': '༦',
5498        '7': '༧',
5499        '8': '༨',
5500        '9': '༩',
5501        '0': '༠'
5502    };
5503    var numberMap$3 = {
5504        '༡': '1',
5505        '༢': '2',
5506        '༣': '3',
5507        '༤': '4',
5508        '༥': '5',
5509        '༦': '6',
5510        '༧': '7',
5511        '༨': '8',
5512        '༩': '9',
5513        '༠': '0'
5514    };
5515
5516    hooks.defineLocale('bo', {
5517        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
5518        monthsShort: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
5519        weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
5520        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
5521        weekdaysMin: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
5522        longDateFormat: {
5523            LT: 'A h:mm',
5524            LTS: 'A h:mm:ss',
5525            L: 'DD/MM/YYYY',
5526            LL: 'D MMMM YYYY',
5527            LLL: 'D MMMM YYYY, A h:mm',
5528            LLLL: 'dddd, D MMMM YYYY, A h:mm'
5529        },
5530        calendar: {
5531            sameDay: '[དི་རིང] LT',
5532            nextDay: '[སང་ཉིན] LT',
5533            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
5534            lastDay: '[ཁ་སང] LT',
5535            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
5536            sameElse: 'L'
5537        },
5538        relativeTime: {
5539            future: '%s ལ་',
5540            past: '%s སྔན་ལ',
5541            s: 'ལམ་སང',
5542            m: 'སྐར་མ་གཅིག',
5543            mm: '%d སྐར་མ',
5544            h: 'ཆུ་ཚོད་གཅིག',
5545            hh: '%d ཆུ་ཚོད',
5546            d: 'ཉིན་གཅིག',
5547            dd: '%d ཉིན་',
5548            M: 'ཟླ་བ་གཅིག',
5549            MM: '%d ཟླ་བ',
5550            y: 'ལོ་གཅིག',
5551            yy: '%d ལོ'
5552        },
5553        preparse: function (string) {
5554            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
5555                return numberMap$3[match];
5556            });
5557        },
5558        postformat: function (string) {
5559            return string.replace(/\d/g, function (match) {
5560                return symbolMap$4[match];
5561            });
5562        },
5563        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
5564        meridiemHour: function (hour, meridiem) {
5565            if (hour === 12) {
5566                hour = 0;
5567            }
5568            if ((meridiem === 'མཚན་མོ' && hour >= 4) ||
5569                (meridiem === 'ཉིན་གུང' && hour < 5) ||
5570                meridiem === 'དགོང་དà½
5570‚') {
5571                return hour + 12;
5572            } else {
5573                return hour;
5574            }
5575        },
5576        meridiem: function (hour, minute, isLower) {
5577            if (hour < 4) {
5578                return 'མཚན་མོ';
5579            } else if (hour < 10) {
5580                return 'ཞོགས་ཀས';
5581            } else if (hour < 17) {
5582                return 'ཉིན་གུང';
5583            } else if (hour < 20) {
5584                return 'དགོང་དག';
5585            } else {
5586                return 'མཚན་མོ';
5587            }
5588        },
5589        week: {
5590            dow: 0, // Sunday is the first day of the week.
5591            doy: 6  // The week that contains Jan 1st is the first week of the year.
5592        }
5593    });
5594
5595    //! moment.js locale configuration
5596    //! locale : Breton [br]
5597    //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
5598
5599    function relativeTimeWithMutation(number, withoutSuffix, key) {
5600        var format = {
5601            'mm': 'munutenn',
5602            'MM': 'miz',
5603            'dd': 'devezh'
5604        };
5605        return number + ' ' + mutation(format[key], number);
5606    }
5607    function specialMutationForYears(number) {
5608        switch (lastNumber(number)) {
5609            case 1:
5610            case 3:
5611            case 4:
5612            case 5:
5613            case 9:
5614                return number + ' bloaz';
5615            default:
5616                return number + ' vloaz';
5617        }
5618    }
5619    function lastNumber(number) {
5620        if (number > 9) {
5621            return lastNumber(number % 10);
5622        }
5623        return number;
5624    }
5625    function mutation(text, number) {
5626        if (number === 2) {
5627            return softMutation(text);
5628        }
5629        return text;
5630    }
5631    function softMutation(text) {
5632        var mutationTable = {
5633            'm': 'v',
5634            'b': 'v',
5635            'd': 'z'
5636        };
5637        if (mutationTable[text.charAt(0)] === undefined) {
5638            return text;
5639        }
5640        return mutationTable[text.charAt(0)] + text.substring(1);
5641    }
5642
5643    hooks.defineLocale('br', {
5644        months: 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
5645        monthsShort: 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
5646        weekdays: 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
5647        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
5648        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
5649        weekdaysParseExact: true,
5650        longDateFormat: {
5651            LT: 'h[e]mm A',
5652            LTS: 'h[e]mm:ss A',
5653            L: 'DD/MM/YYYY',
5654            LL: 'D [a viz] MMMM YYYY',
5655            LLL: 'D [a viz] MMMM YYYY h[e]mm A',
5656            LLLL: 'dddd, D [a viz] MMMM YYYY h[e]mm A'
5657        },
5658        calendar: {
5659            sameDay: '[Hiziv da] LT',
5660            nextDay: '[Warc\'hoazh da] LT',
5661            nextWeek: 'dddd [da] LT',
5662            lastDay: '[Dec\'h da] LT',
5663            lastWeek: 'dddd [paset da] LT',
5664            sameElse: 'L'
5665        },
5666        relativeTime: {
5667            future: 'a-benn %s',
5668            past: '%s \'zo',
5669            s: 'un nebeud segondennoù',
5670            m: 'ur vunutenn',
5671            mm: relativeTimeWithMutation,
5672            h: 'un eur',
5673            hh: '%d eur',
5674            d: 'un devezh',
5675            dd: relativeTimeWithMutation,
5676            M: 'ur miz',
5677            MM: relativeTimeWithMutation,
5678            y: 'ur bloaz',
5679            yy: specialMutationForYears
5680        },
5681        dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
5682        ordinal: function (number) {
5683            var output = (number === 1) ? 'añ' : 'vet';
5684            return number + output;
5685        },
5686        week: {
5687            dow: 1, // Monday is the first day of the week.
5688            doy: 4  // The week that contains Jan 4th is the first week of the year.
5689        }
5690    });
5691
5692    //! moment.js locale configuration
5693    //! locale : Bosnian [bs]
5694    //! author : Nedim Cholich : https://github.com/frontyard
5695    //! based on (hr) translation by Bojan Marković
5696
5697    function translate(number, withoutSuffix, key) {
5698        var result = number + ' ';
5699        switch (key) {
5700            case 'm':
5701                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
5702            case 'mm':
5703                if (number === 1) {
5704                    result += 'minuta';
5705                } else if (number === 2 || number === 3 || number === 4) {
5706                    result += 'minute';
5707                } else {
5708                    result += 'minuta';
5709                }
5710                return result;
5711            case 'h':
5712                return withoutSuffix ? 'jedan sat' : 'jednog sata';
5713            case 'hh':
5714                if (number === 1) {
5715                    result += 'sat';
5716                } else if (number === 2 || number === 3 || number === 4) {
5717                    result += 'sata';
5718                } else {
5719                    result += 'sati';
5720                }
5721                return result;
5722            case 'dd':
5723                if (number === 1) {
5724                    result += 'dan';
5725                } else {
5726                    result += 'dana';
5727                }
5728                return result;
5729            case 'MM':
5730                if (number === 1) {
5731                    result += 'mjesec';
5732                } else if (number === 2 || number === 3 || number === 4) {
5733                    result += 'mjeseca';
5734                } else {
5735                    result += 'mjeseci';
5736                }
5737                return result;
5738            case 'yy':
5739                if (number === 1) {
5740                    result += 'godina';
5741                } else if (number === 2 || number === 3 || number === 4) {
5742                    result += 'godine';
5743                } else {
5744                    result += 'godina';
5745                }
5746                return result;
5747        }
5748    }
5749
5750    hooks.defineLocale('bs', {
5751        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
5752        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
5753        monthsParseExact: true,
5754        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
5755        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
5756        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
5757        weekdaysParseExact: true,
5758        longDateFormat: {
5759            LT: 'H:mm',
5760            LTS: 'H:mm:ss',
5761            L: 'DD.MM.YYYY',
5762            LL: 'D. MMMM YYYY',
5763            LLL: 'D. MMMM YYYY H:mm',
5764            LLLL: 'dddd, D. MMMM YYYY H:mm'
5765        },
5766        calendar: {
5767            sameDay: '[danas u] LT',
5768            nextDay: '[sutra u] LT',
5769            nextWeek: function () {
5770                switch (this.day()) {
5771                    case 0:
5772                        return '[u] [nedjelju] [u] LT';
5773                    case 3:
5774                        return '[u] [srijedu] [u] LT';
5775                    case 6:
5776                        return '[u] [subotu] [u] LT';
5777                    case 1:
5778                    case 2:
5779                    case 4:
5780                    case 5:
5781                        return '[u] dddd [u] LT';
5782                }
5783            },
5784            lastDay: '[jučer u] LT',
5785            lastWeek: function () {
5786                switch (this.day()) {
5787                    case 0:
5788                    case 3:
5789                        return '[prošlu] dddd [u] LT';
5790                    case 6:
5791                        return '[prošle] [subote] [u] LT';
5792                    case 1:
5793                    case 2:
5794                    case 4:
5795                    case 5:
5796                        return '[prošli] dddd [u] LT';
5797                }
5798            },
5799            sameElse: 'L'
5800        },
5801        relativeTime: {
5802            future: 'za %s',
5803            past: 'prije %s',
5804            s: 'par sekundi',
5805            m: translate,
5806            mm: translate,
5807            h: translate,
5808            hh: translate,
5809            d: 'dan',
5810            dd: translate,
5811            M: 'mjesec',
5812            MM: translate,
5813            y: 'godinu',
5814            yy: translate
5815        },
5816        dayOfMonthOrdinalParse: /\d{1,2}\./,
5817        ordinal: '%d.',
5818        week: {
5819            dow: 1, // Monday is the first day of the week.
5820            doy: 7  // The week that contains Jan 1st is the first week of the year.
5821        }
5822    });
5823
5824    //! moment.js locale configuration
5825    //! locale : Catalan [ca]
5826    //! author : Juan G. Hurtado : https://github.com/juanghurtado
5827
5828    hooks.defineLocale('ca', {
5829        months: {
5830            standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
5831            format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
5832            isFormat: /D[oD]?(\s)+MMMM/
5833        },
5834        monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
5835        monthsParseExact: true,
5836        weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
5837        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
5838        weekdaysMin: 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
5839        weekdaysParseExact: true,
5840        longDateFormat: {
5841            LT: 'H:mm',
5842            LTS: 'H:mm:ss',
5843            L: 'DD/MM/YYYY',
5844            LL: '[el] D MMMM [de] YYYY',
5845            ll: 'D MMM YYYY',
5846            LLL: '[el] D MMMM [de] YYYY [a les] H:mm',
5847            lll: 'D MMM YYYY, H:mm',
5848            LLLL: '[el] dddd D MMMM [de] YYYY [a les] H:mm',
5849            llll: 'ddd D MMM YYYY, H:mm'
5850        },
5851        calendar: {
5852            sameDay: function () {
5853                return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
5854            },
5855            nextDay: function () {
5856                return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
5857            },
5858            nextWeek: function () {
5859                return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
5860            },
5861            lastDay: function () {
5862                return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
5863            },
5864            lastWeek: function () {
5865                return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
5866            },
5867            sameElse: 'L'
5868        },
5869        relativeTime: {
5870            future: 'd\'aquí %s',
5871            past: 'fa %s',
5872            s: 'uns segons',
5873            m: 'un minut',
5874            mm: '%d minuts',
5875            h: 'una hora',
5876            hh: '%d hores',
5877            d: 'un dia',
5878            dd: '%d dies',
5879            M: 'un mes',
5880            MM: '%d mesos',
5881            y: 'un any',
5882            yy: '%d anys'
5883        },
5884        dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
5885        ordinal: function (number, period) {
5886            var output = (number === 1) ? 'r' :
5887                (number === 2) ? 'n' :
5888                    (number === 3) ? 'r' :
5889                        (number === 4) ? 't' : 'è';
5890            if (period === 'w' || period === 'W') {
5891                output = 'a';
5892            }
5893            return number + output;
5894        },
5895        week: {
5896            dow: 1, // Monday is the first day of the week.
5897            doy: 4  // The week that contains Jan 4th is the first week of the year.
5898        }
5899    });
5900
5901    //! moment.js locale configuration
5902    //! locale : Czech [cs]
5903    //! author : petrbela : https://github.com/petrbela
5904
5905    var months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.
5905split('_');
5906    var monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
5907    function plural$1(n) {
5908        return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
5909    }
5910    function translate$1(number, withoutSuffix, key, isFuture) {
5911        var result = number + ' ';
5912        switch (key) {
5913            case 's':  // a few seconds / in a few seconds / a few seconds ago
5914                return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
5915            case 'm':  // a minute / in a minute / a minute ago
5916                return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
5917            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
5918                if (withoutSuffix || isFuture) {
5919                    return result + (plural$1(number) ? 'minuty' : 'minut');
5920                } else {
5921                    return result + 'minutami';
5922                }
5923                break;
5924            case 'h':  // an hour / in an hour / an hour ago
5925                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
5926            case 'hh': // 9 hours / in 9 hours / 9 hours ago
5927                if (withoutSuffix || isFuture) {
5928                    return result + (plural$1(number) ? 'hodiny' : 'hodin');
5929                } else {
5930                    return result + 'hodinami';
5931                }
5932                break;
5933            case 'd':  // a day / in a day / a day ago
5934                return (withoutSuffix || isFuture) ? 'den' : 'dnem';
5935            case 'dd': // 9 days / in 9 days / 9 days ago
5936                if (withoutSuffix || isFuture) {
5937                    return result + (plural$1(number) ? 'dny' : 'dní');
5938                } else {
5939                    return result + 'dny';
5940                }
5941                break;
5942            case 'M':  // a month / in a month / a month ago
5943                return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
5944            case 'MM': // 9 months / in 9 months / 9 months ago
5945                if (withoutSuffix || isFuture) {
5946                    return result + (plural$1(number) ? 'měsíce' : 'měsíců');
5947                } else {
5948                    return result + 'měsíci';
5949                }
5950                break;
5951            case 'y':  // a year / in a year / a year ago
5952                return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
5953            case 'yy': // 9 years / in 9 years / 9 years ago
5954                if (withoutSuffix || isFuture) {
5955                    return result + (plural$1(number) ? 'roky' : 'let');
5956                } else {
5957                    return result + 'lety';
5958                }
5959                break;
5960        }
5961    }
5962
5963    hooks.defineLocale('cs', {
5964        months: months$3,
5965        monthsShort: monthsShort,
5966        monthsParse: (function (months, monthsShort) {
5967            var i, _monthsParse = [];
5968            for (i = 0; i < 12; i++) {
5969                // use custom parser to solve problem with July (červenec)
5970                _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
5971            }
5972            return _monthsParse;
5973        }(months$3, monthsShort)),
5974        shortMonthsParse: (function (monthsShort) {
5975            var i, _shortMonthsParse = [];
5976            for (i = 0; i < 12; i++) {
5977                _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
5978            }
5979            return _shortMonthsParse;
5980        }(monthsShort)),
5981        longMonthsParse: (function (months) {
5982            var i, _longMonthsParse = [];
5983            for (i = 0; i < 12; i++) {
5984                _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
5985            }
5986            return _longMonthsParse;
5987        }(months$3)),
5988        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
5989        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
5990        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
5991        longDateFormat: {
5992            LT: 'H:mm',
5993            LTS: 'H:mm:ss',
5994            L: 'DD.MM.YYYY',
5995            LL: 'D. MMMM YYYY',
5996            LLL: 'D. MMMM YYYY H:mm',
5997            LLLL: 'dddd D. MMMM YYYY H:mm',
5998            l: 'D. M. YYYY'
5999        },
6000        calendar: {
6001            sameDay: '[dnes v] LT',
6002            nextDay: '[zítra v] LT',
6003            nextWeek: function () {
6004                switch (this.day()) {
6005                    case 0:
6006                        return '[v neděli v] LT';
6007                    case 1:
6008                    case 2:
6009                        return '[v] dddd [v] LT';
6010                    case 3:
6011                        return '[ve středu v] LT';
6012                    case 4:
6013                        return '[ve čtvrtek v] LT';
6014                    case 5:
6015                        return '[v pátek v] LT';
6016                    case 6:
6017                        return '[v sobotu v] LT';
6018                }
6019            },
6020            lastDay: '[včera v] LT',
6021            lastWeek: function () {
6022                switch (this.day()) {
6023                    case 0:
6024                        return '[minulou neděli v] LT';
6025                    case 1:
6026                    case 2:
6027                        return '[minulé] dddd [v] LT';
6028                    case 3:
6029                        return '[minulou středu v] LT';
6030                    case 4:
6031                    case 5:
6032                        return '[minulý] dddd [v] LT';
6033                    case 6:
6034                        return '[minulou sobotu v] LT';
6035                }
6036            },
6037            sameElse: 'L'
6038        },
6039        relativeTime: {
6040            future: 'za %s',
6041            past: 'před %s',
6042            s: translate$1,
6043            m: translate$1,
6044            mm: translate$1,
6045            h: translate$1,
6046            hh: translate$1,
6047            d: translate$1,
6048            dd: translate$1,
6049            M: translate$1,
6050            MM: translate$1,
6051            y: translate$1,
6052            yy: translate$1
6053        },
6054        dayOfMonthOrdinalParse: /\d{1,2}\./,
6055        ordinal: '%d.',
6056        week: {
6057            dow: 1, // Monday is the first day of the week.
6058            doy: 4  // The week that contains Jan 4th is the first week of the year.
6059        }
6060    });
6061
6062    //! moment.js locale configuration
6063    //! locale : Chuvash [cv]
6064    //! author : Anatoly Mironov : https://github.com/mirontoli
6065
6066    hooks.defineLocale('cv', {
6067        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
6068        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
6069        weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
6070        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
6071        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
6072        longDateFormat: {
6073            LT: 'HH:mm',
6074            LTS: 'HH:mm:ss',
6075            L: 'DD-MM-YYYY',
6076            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
6077            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
6078            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
6079        },
6080        calendar: {
6081            sameDay: '[Паян] LT [сехетре]',
6082            nextDay: '[Ыран] LT [сехетре]',
6083            lastDay: '[Ӗнер] LT [сехетре]',
6084            nextWeek: '[Ҫитес] dddd LT [сехетре]',
6085            lastWeek: '[Иртнӗ] dddd LT [сехетре]',
6086            sameElse: 'L'
6087        },
6088        relativeTime: {
6089            future: function (output) {
6090                var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
6091                return output + affix;
6092            },
6093            past: '%s каялла',
6094            s: 'пӗр-ик ҫеккунт',
6095            m: 'пӗр минут',
6096            mm: '%d минут',
6097            h: 'пӗр сехет',
6098            hh: '%d сехет',
6099            d: 'пӗр кун',
6100            dd: '%d кун',
6101            M: 'пӗр уйӑх',
6102            MM: '%d уйӑх',
6103            y: 'пӗр ҫул',
6104            yy: '%d ҫул'
6105        },
6106        dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
6107        ordinal: '%d-мӗш',
6108        week: {
6109            dow: 1, // Monday is the first day of the week.
6110            doy: 7  // The week that contains Jan 1st is the first week of the year.
6111        }
6112    });
6113
6114    //! moment.js locale configuration
6115    //! locale : Welsh [cy]
6116    //! author : Robert Allen : https://github.com/robgallen
6117    //! author : https://github.com/ryangreaves
6118
6119    hooks.defineLocale('cy', {
6120        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
6121        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
6122        weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
6123        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
6124        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
6125        weekdaysParseExact: true,
6126        // time formats are the same as en-gb
6127        longDateFormat: {
6128            LT: 'HH:mm',
6129            LTS: 'HH:mm:ss',
6130            L: 'DD/MM/YYYY',
6131            LL: 'D MMMM YYYY',
6132            LLL: 'D MMMM YYYY HH:mm',
6133            LLLL: 'dddd, D MMMM YYYY HH:mm'
6134        },
6135        calendar: {
6136            sameDay: '[Heddiw am] LT',
6137            nextDay: '[Yfory am] LT',
6138            nextWeek: 'dddd [am] LT',
6139            lastDay: '[Ddoe am] LT',
6140            lastWeek: 'dddd [diwethaf am] LT',
6141            sameElse: 'L'
6142        },
6143        relativeTime: {
6144            future: 'mewn %s',
6145            past: '%s yn ôl',
6146            s: 'ychydig eiliadau',
6147            m: 'munud',
6148            mm: '%d munud',
6149            h: 'awr',
6150            hh: '%d awr',
6151            d: 'diwrnod',
6152            dd: '%d diwrnod',
6153            M: 'mis',
6154            MM: '%d mis',
6155            y: 'blwyddyn',
6156            yy: '%d flynedd'
6157        },
6158        dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
6159        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
6160        ordinal: function (number) {
6161            var b = number,
6162                output = '',
6163                lookup = [
6164                    '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
6165                    'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
6166                ];
6167            if (b > 20) {
6168                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
6169                    output = 'fed'; // not 30ain, 70ain or 90ain
6170                } else {
6171                    output = 'ain';
6172                }
6173            } else if (b > 0) {
6174                output = lookup[b];
6175            }
6176            return number + output;
6177        },
6178        week: {
6179            dow: 1, // Monday is the first day of the week.
6180            doy: 4  // The week that contains Jan 4th is the first week of the year.
6181        }
6182    });
6183
6184    //! moment.js locale configuration
6185    //! locale : Danish [da]
6186    //! author : Ulrik Nielsen : https://github.com/mrbase
6187
6188    hooks.defineLocale('da', {
6189        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
6190        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
6191        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
6192        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
6193        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
6194        longDateFormat: {
6195            LT: 'HH:mm',
6196            LTS: 'HH:mm:ss',
6197            L: 'DD/MM/YYYY',
6198            LL: 'D. MMMM YYYY',
6199            LLL: 'D. MMMM YYYY HH:mm',
6200            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
6201        },
6202        calendar: {
6203            sameDay: '[i dag kl.] LT',
6204            nextDay: '[i morgen kl.] LT',
6205            nextWeek: 'på dddd [kl.] LT',
6206            lastDay: '[i går kl.] LT',
6207            lastWeek: '[i] dddd[s kl.] LT',
6208            sameElse: 'L'
6209        },
6210        relativeTime: {
6211            future: 'om %s',
6212            past: '%s siden',
6213            s: 'få sekunder',
6214            m: 'et minut',
6215            mm: '%d minutter',
6216            h: 'en time',
6217            hh: '%d timer',
6218            d: 'en dag',
6219            dd: '%d dage',
6220            M: 'en måned',
6221            MM: '%d måneder',
6222            y: 'et år',
6223            yy: '%d år'
6224        },
6225        dayOfMonthOrdinalParse: /\d{1,2}\./,
6226        ordinal: '%d.',
6227        week: {
6228            dow: 1, // Monday is the first day of the week.
6229            doy: 4  // The week that contains Jan 4th is the first week of the year.
6230        }
6231    });
6232
6233    //! moment.js locale configuration
6234    //! locale : German (Austria) [de-at]
6235    //! author : lluchs : https://github.com/lluchs
6236    //! author: Menelion Elensúle: https://github.com/Oire
6237    //! author : Martin Groller : https://github.com/MadMG
6238    //! author : Mikolaj Dadela : https://github.com/mik01aj
6239
6240    function processRelativeTime(number, withoutSuffix, key, isFuture) {
6241        var format = {
6242            'm': ['eine Minute', 'einer Minute'],
6243            'h': ['eine Stunde', 'einer Stunde'],
6244            'd': ['ein Tag', 'einem Tag'],
6245            'dd': [number + ' Tage', number + ' Tagen'],
6246            'M': ['ein Monat', 'einem Monat'],
6247            'MM': [number + ' Monate', number + ' Monaten'],
6248            'y': ['ein Jahr', 'einem Jahr'],
6249            'yy': [number + ' Jahre', number + ' Jahren']
6250        };
6251        return withoutSuffix ? format[key][0] : format[key][1];
6252    }
6253
6254    hooks.defineLocale('de-at', {
6255        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
6256        monthsShort: 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
6257        monthsParseExact: true,
6258        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
6259        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
6260        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
6261        weekdaysParseExact: true,
6262        longDateFormat: {
6263            LT: 'HH:mm',
6264            LTS: 'HH:mm:ss',
6265            L: 'DD.MM.YYYY',
6266            LL: 'D. MMMM YYYY',
6267            LLL: 'D. MMMM YYYY HH:mm',
6268            LLLL: 'dddd, D. MMMM YYYY HH:mm'
6269        },
6270        calendar: {
6271            sameDay: '[heute um] LT [Uhr]',
6272            sameElse: 'L',
6273            nextDay: '[morgen um] LT [Uhr]',
6274            nextWeek: 'dddd [um] LT [Uhr]',
6275            lastDay: '[gestern um] LT [Uhr]',
6276            lastWeek: '[letzten] dddd [um] LT [Uhr]'
6277        },
6278        relativeTime: {
6279            future: 'in %s',
6280            past: 'vor %s',
6281            s: 'ein paar Sekunden',
6282            m: processRelativeTime,
6283            mm: '%d Minuten',
6284            h: processRelativeTime,
6285            hh: '%d Stunden',
6286            d: processRelativeTime,
6287            dd: processRelativeTime,
6288            M: processRelativeTime,
6289            MM: processRelativeTime,
6290            y: processRelativeTime,
6291            yy: processRelativeTime
6292        },
6293        dayOfMonthOrdinalParse: /\d{1,2}\./,
6294        ordinal: '%d.',
6295        week: {
6296            dow: 1, // Monday is the first day of the week.
6297            doy: 4  // The week that contains Jan 4th is the first week of the year.
6298        }
6299    });
6300
6301    //! moment.js locale configuration
6302    //! locale : German (Switzerland) [de-ch]
6303    //! author : sschueller : https://github.com/sschueller
6304
6305    // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
6306
6307    function processRelativeTime$1(number, withoutSuffix, key, isFuture) {
6308        var format = {
6309            'm': ['eine Minute', 'einer Minute'],
6310            'h': ['eine Stunde', 'einer Stunde'],
6311            'd': ['ein Tag', 'einem Tag'],
6312            'dd': [number + ' Tage', number + ' Tagen'],
6313            'M': ['ein Monat', 'einem Monat'],
6314            'MM': [number + ' Monate', number + ' Monaten'],
6315            'y': ['ein Jahr', 'einem Jahr'],
6316            'yy': [number + ' Jahre', number + ' Jahren']
6317        };
6318        return withoutSuffix ? format[key][0] : format[key][1];
6319    }
6320
6321    hooks.defineLocale('de-ch', {
6322        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
6323        monthsShort: 'Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),
6324        monthsParseExact: true,
6325        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
6326        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
6327        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
6328        weekdaysParseExact: true,
6329        longDateFormat: {
6330            LT: 'HH.mm',
6331            LTS: 'HH.mm.ss',
6332            L: 'DD.MM.YYYY',
6333            LL: 'D. MMMM YYYY',
6334            LLL: 'D. MMMM YYYY HH.mm',
6335            LLLL: 'dddd, D. MMMM YYYY HH.mm'
6336        },
6337        calendar: {
6338            sameDay: '[heute um] LT [Uhr]',
6339            sameElse: 'L',
6340            nextDay: '[morgen um] LT [Uhr]',
6341            nextWeek: 'dddd [um] LT [Uhr]',
6342            lastDay: '[gestern um] LT [Uhr]',
6343            lastWeek: '[letzten] dddd [um] LT [Uhr]'
6344        },
6345        relativeTime: {
6346            future: 'in %s',
6347            past: 'vor %s',
6348            s: 'ein paar Sekunden',
6349            m: processRelativeTime$1,
6350            mm: '%d Minuten',
6351            h: processRelativeTime$1,
6352            hh: '%d Stunden',
6353            d: processRelativeTime$1,
6354            dd: processRelativeTime$1,
6355            M: processRelativeTime$1,
6356            MM: processRelativeTime$1,
6357            y: processRelativeTime$1,
6358            yy: processRelativeTime$1
6359        },
6360        dayOfMonthOrdinalParse: /\d{1,2}\./,
6361        ordinal: '%d.',
6362        week: {
6363            dow: 1, // Monday is the first day of the week.
6364            doy: 4  // The week that contains Jan 4th is the first week of the year.
6365        }
6366    });
6367
6368    //! moment.js locale configuration
6369    //! locale : German [de]
6370    //! author : lluchs : https://github.com/lluchs
6371    //! author: Menelion Elensúle: https://github.com/Oire
6372    //! author : Mikolaj Dadela : https://github.com/mik01aj
6373
6374    function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
6375        var format = {
6376            'm': ['eine Minute', 'einer Minute'],
6377            'h': ['eine Stunde', 'einer Stunde'],
6378            'd': ['ein Tag', 'einem Tag'],
6379            'dd': [number + ' Tage', number + ' Tagen'],
6380            'M': ['ein Monat', 'einem Monat'],
6381            'MM': [number + ' Monate', number + ' Monaten'],
6382            'y': ['ein Jahr', 'einem Jahr'],
6383            'yy': [number + ' Jahre', number + ' Jahren']
6384        };
6385        return withoutSuffix ? format[key][0] : format[key][1];
6386    }
6387
6388    hooks.defineLocale('de', {
6389        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
6390        monthsShort: 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
6391        monthsParseExact: true,
6392        weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
6393        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
6394        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
6395        weekdaysParseExact: true,
6396        longDateFormat: {
6397            LT: 'HH:mm',
6398            LTS: 'HH:mm:ss',
6399            L: 'DD.MM.YYYY',
6400            LL: 'D. MMMM YYYY',
6401            LLL: 'D. MMMM YYYY HH:mm',
6402            LLLL: 'dddd, D. MMMM YYYY HH:mm'
6403        },
6404        calendar: {
6405            sameDay: '[heute um] LT [Uhr]',
6406            sameElse: 'L',
6407            nextDay: '[morgen um] LT [Uhr]',
6408            nextWeek: 'dddd [um] LT [Uhr]',
6409            lastDay: '[gestern um] LT [Uhr]',
6410            lastWeek: '[letzten] dddd [um] LT [Uhr]'
6411        },
6412        relativeTime: {
6413            future: 'in %s',
6414            past: 'vor %s',
6415            s: 'ein paar Sekunden',
6416            m: processRelativeTime$2,
6417            mm: '%d Minuten',
6418            h: processRelativeTime$2,
6419            hh: '%d Stunden',
6420            d: processRelativeTime$2,
6421            dd: processRelativeTime$2,
6422            M: processRelativeTime$2,
6423            MM: processRelativeTime$2,
6424            y: processRelativeTime$2,
6425            yy: processRelativeTime$2
6426        },
6427        dayOfMonthOrdinalParse: /\d{1,2}\./,
6428        ordinal: '%d.',
6429        week: {
6430            dow: 1, // Monday is the first day of the week.
6431            doy: 4  // The week that contains Jan 4th is the first week of the year.
6432        }
6433    });
6434
6435    //! moment.js locale configuration
6436    //! locale : Maldivian [dv]
6437    //! author : Jawish Hameed : https://github.com/jawish
6438
6439    var months$4 = [
6440        'ޖެނުއަރީ',
6441        'ފެބްރުއަރީ',
6442        'މާރިޗު',
6443        'އޭޕްރީލު',
6444        'މޭ',
6445        'ޖޫން',
6446        'ޖުލައި',
6447        'އޯގަސްޓު',
6448        'ސެޕްޓެމްބަރު',
6449        'އޮކްޓޯބަރު',
6450        'ނޮވެމްބަރު',
6451        'ޑިސެމްބަރު'
6452    ];
6453    var weekdays = [
6454        'އާދިއްތަ',
6455        'ހޯމަ',
6456        'އަންގާރަ',
6457        'ބުދަ',
6458        'ބުރާސްފަތި',
6459        'ހުކުރު',
6460        'ހޮނިހިރު'
6461    ];
6462
6463    hooks.defineLocale('dv', {
6464        months: months$4,
6465        monthsShort: months$4,
6466        weekdays: weekdays,
6467        weekdaysShort: weekdays,
6468        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
6469        longDateFormat: {
6470
6471            LT: 'HH:mm',
6472            LTS: 'HH:mm:ss',
6473            L: 'D/M/YYYY',
6474            LL: 'D MMMM YYYY',
6475            LLL: 'D MMMM YYYY HH:mm',
6476            LLLL: 'dddd D MMMM YYYY HH:mm'
6477        },
6478        meridiemParse: /މކ|މފ/,
6479        isPM: function (input) {
6480            return 'މފ' === input;
6481        },
6482        meridiem: function (hour, minute, isLower) {
6483            if (hour < 12) {
6484                return 'މކ';
6485            } else {
6486                return 'މފ';
6487            }
6488        },
6489        calendar: {
6490            sameDay: '[މިއަދު] LT',
6491            nextDay: '[މާދަމާ] LT',
6492            nextWeek: 'dddd LT',
6493            lastDay: '[އިއްޔެ] LT',
6494            lastWeek: '[ފާއިތުވި] dddd LT',
6495            sameElse: 'L'
6496        },
6497        relativeTime: {
6498            future: 'ތެރޭގައި %s',
6499            past: 'ކުރިން %s',
6500            s: 'ސިކުންތުކޮޅެއް',
6501            m: 'މިނިޓެއް',
6502            mm: 'މިނިޓު %d',
6503            h: 'ގަޑިއިރެއް',
6504            hh: 'ގަޑިއިރު %d',
6505            d: 'ދުވަހެއް',
6506            dd: 'ދުވަސް %d',
6507            M: 'މަހެއް',
6508            MM: 'މަސް %d',
6509            y: 'އަހަރެއް',
6510            yy: 'އަހަރު %d'
6511        },
6512        preparse: function (string) {
6513            return string.replace(/،/g, ',');
6514        },
6515        postformat: function (string) {
6516            return string.replace(/,/g, '،');
6517        },
6518        week: {
6519            dow: 7,  // Sunday is the first day of the week.
6520            doy: 12  // The week that contains Jan 1st is the first week of the year.
6521        }
6522    });
6523
6524    //! moment.js locale configuration
6525    //! locale : Greek [el]
6526    //! author : Aggelos Karalias : https://github.com/mehiel
6527
6528    hooks.defineLocale('el', {
6529        monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
6530        monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
6531        months: function (momentToFormat, format) {
6532            if (!momentToFormat) {
6533                return this._monthsNominativeEl;
6534            } else if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
6535                return this._monthsGenitiveEl[momentToFormat.month()];
6536            } else {
6537                return this._monthsNominativeEl[momentToFormat.month()];
6538            }
6539        },
6540        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
6541        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
6542        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
6543        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
6544        meridiem: function (hours, minutes, isLower) {
6545            if (hours > 11) {
6546                return isLower ? 'μμ' : 'ΜΜ';
6547            } else {
6548                return isLower ? 'πμ' : 'ΠΜ';
6549            }
6550        },
6551        isPM: function (input) {
6552            return ((input + '').toLowerCase()[0] === 'μ');
6553        },
6554        meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
6555        longDateFormat: {
6556            LT: 'h:mm A',
6557            LTS: 'h:mm:ss A',
6558            L: 'DD/MM/YYYY',
6559            LL: 'D MMMM YYYY',
6560            LLL: 'D MMMM YYYY h:mm A',
6561            LLLL: 'dddd, D MMMM YYYY h:mm A'
6562        },
6563        calendarEl: {
6564            sameDay: '[Σήμερα {}] LT',
6565            nextDay: '[Αύριο {}] LT',
6566            nextWeek: 'dddd [{}] LT',
6567            lastDay: '[Χθες {}] LT',
6568            lastWeek: function () {
6569                switch (this.day()) {
6570                    case 6:
6571                        return '[το προηγούμενο] dddd [{}] LT';
6572                    default:
6573                        return '[την προηγούμενη] dddd [{}] LT';
6574                }
6575            },
6576            sameElse: 'L'
6577        },
6578        calendar: function (key, mom) {
6579            var output = this._calendarEl[key],
6580                hours = mom && mom.hours();
6581            if (isFunction(output)) {
6582                output = output.apply(mom);
6583            }
6584            return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));
6585        },
6586        relativeTime: {
6587            future: 'σε %s',
6588            past: '%s πριν',
6589            s: 'λίγα δευτερόλεπτα',
6590            m: 'ένα λεπτό',
6591            mm: '%d λεπτά',
6592            h: 'μία ώρα',
6593            hh: '%d ώρες',
6594            d: 'μία μέρα',
6595            dd: '%d μέρες',
6596            M: 'ένας μήνας',
6597            MM: '%d μήνες',
6598            y: 'ένας χρόνος',
6599            yy: '%d χρόνια'
6600        },
6601        dayOfMonthOrdinalParse: /\d{1,2}η/,
6602        ordinal: '%dη',
6603        week: {
6604            dow: 1, // Monday is the first day of the week.
6605            doy: 4  // The week that contains Jan 4st is the first week of the year.
6606        }
6607    });
6608
6609    //! moment.js locale configuration
6610    //! locale : English (Australia) [en-au]
6611    //! author : Jared Morse : https://github.com/jarcoal
6612
6613    hooks.defineLocale('en-au', {
6614        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6615        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6616        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6617        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6618        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6619        longDateFormat: {
6620            LT: 'h:mm A',
6621            LTS: 'h:mm:ss A',
6622            L: 'DD/MM/YYYY',
6623            LL: 'D MMMM YYYY',
6624            LLL: 'D MMMM YYYY h:mm A',
6625            LLLL: 'dddd, D MMMM YYYY h:mm A'
6626        },
6627        calendar: {
6628            sameDay: '[Today at] LT',
6629            nextDay: '[Tomorrow at] LT',
6630            nextWeek: 'dddd [at] LT',
6631            lastDay: '[Yesterday at] LT',
6632            lastWeek: '[Last] dddd [at] LT',
6633            sameElse: 'L'
6634        },
6635        relativeTime: {
6636            future: 'in %s',
6637            past: '%s ago',
6638            s: 'a few seconds',
6639            m: 'a minute',
6640            mm: '%d minutes',
6641            h: 'an hour',
6642            hh: '%d hours',
6643            d: 'a day',
6644            dd: '%d days',
6645            M: 'a month',
6646            MM: '%d months',
6647            y: 'a year',
6648            yy: '%d years'
6649        },
6650        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6651        ordinal: function (number) {
6652            var b = number % 10,
6653                output = (~~(number % 100 / 10) === 1) ? 'th' :
6654                    (b === 1) ? 'st' :
6655                        (b === 2) ? 'nd' :
6656                            (b === 3) ? 'rd' : 'th';
6657            return number + output;
6658        },
6659        week: {
6660            dow: 1, // Monday is the first day of the week.
6661            doy: 4  // The week that contains Jan 4th is the first week of the year.
6662        }
6663    });
6664
6665    //! moment.js locale configuration
6666    //! locale : English (Canada) [en-ca]
6667    //! author : Jonathan Abourbih : https://github.com/jonbca
6668
6669    hooks.defineLocale('en-ca', {
6670        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6671        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6672        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6673        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6674        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6675        longDateFormat: {
6676            LT: 'h:mm A',
6677            LTS: 'h:mm:ss A',
6678            L: 'YYYY-MM-DD',
6679            LL: 'MMMM D, YYYY',
6680            LLL: 'MMMM D, YYYY h:mm A',
6681            LLLL: 'dddd, MMMM D, YYYY h:mm A'
6682        },
6683        calendar: {
6684            sameDay: '[Today at] LT',
6685            nextDay: '[Tomorrow at] LT',
6686            nextWeek: 'dddd [at] LT',
6687            lastDay: '[Yesterday at] LT',
6688            lastWeek: '[Last] dddd [at] LT',
6689            sameElse: 'L'
6690        },
6691        relativeTime: {
6692            future: 'in %s',
6693            past: '%s ago',
6694            s: 'a few seconds',
6695            m: 'a minute',
6696            mm: '%d minutes',
6697            h: 'an hour',
6698            hh: '%d hours',
6699            d: 'a day',
6700            dd: '%d days',
6701            M: 'a month',
6702            MM: '%d months',
6703            y: 'a year',
6704            yy: '%d years'
6705        },
6706        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6707        ordinal: function (number) {
6708            var b = number % 10,
6709                output = (~~(number % 100 / 10) === 1) ? 'th' :
6710                    (b === 1) ? 'st' :
6711                        (b === 2) ? 'nd' :
6712                            (b === 3) ? 'rd' : 'th';
6713            return number + output;
6714        }
6715    });
6716
6717    //! moment.js locale configuration
6718    //! locale : English (United Kingdom) [en-gb]
6719    //! author : Chris Gedrim : https://github.com/chrisgedrim
6720
6721    hooks.defineLocale('en-gb', {
6722        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6723        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6724        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6725        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6726        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6727        longDateFormat: {
6728            LT: 'HH:mm',
6729            LTS: 'HH:mm:ss',
6730            L: 'DD/MM/YYYY',
6731            LL: 'D MMMM YYYY',
6732            LLL: 'D MMMM YYYY HH:mm',
6733            LLLL: 'dddd, D MMMM YYYY HH:mm'
6734        },
6735        calendar: {
6736            sameDay: '[Today at] LT',
6737            nextDay: '[Tomorrow at] LT',
6738            nextWeek: 'dddd [at] LT',
6739            lastDay: '[Yesterday at] LT',
6740            lastWeek: '[Last] dddd [at] LT',
6741            sameElse: 'L'
6742        },
6743        relativeTime: {
6744            future: 'in %s',
6745            past: '%s ago',
6746            s: 'a few seconds',
6747            m: 'a minute',
6748            mm: '%d minutes',
6749            h: 'an hour',
6750            hh: '%d hours',
6751            d: 'a day',
6752            dd: '%d days',
6753            M: 'a month',
6754            MM: '%d months',
6755            y: 'a year',
6756            yy: '%d years'
6757        },
6758        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6759        ordinal: function (number) {
6760            var b = number % 10,
6761                output = (~~(number % 100 / 10) === 1) ? 'th' :
6762                    (b === 1) ? 'st' :
6763                        (b === 2) ? 'nd' :
6764                            (b === 3) ? 'rd' : 'th';
6765            return number + output;
6766        },
6767        week: {
6768            dow: 1, // Monday is the first day of the week.
6769            doy: 4  // The week that contains Jan 4th is the first week of the year.
6770        }
6771    });
6772
6773    //! moment.js locale configuration
6774    //! locale : English (Ireland) [en-ie]
6775    //! author : Chris Cartlidge : https://github.com/chriscartlidge
6776
6777    hooks.defineLocale('en-ie', {
6778        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6779        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6780        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6781        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6782        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6783        longDateFormat: {
6784            LT: 'HH:mm',
6785            LTS: 'HH:mm:ss',
6786            L: 'DD-MM-YYYY',
6787            LL: 'D MMMM YYYY',
6788            LLL: 'D MMMM YYYY HH:mm',
6789            LLLL: 'dddd D MMMM YYYY HH:mm'
6790        },
6791        calendar: {
6792            sameDay: '[Today at] LT',
6793            nextDay: '[Tomorrow at] LT',
6794            nextWeek: 'dddd [at] LT',
6795            lastDay: '[Yesterday at] LT',
6796            lastWeek: '[Last] dddd [at] LT',
6797            sameElse: 'L'
6798        },
6799        relativeTime: {
6800            future: 'in %s',
6801            past: '%s ago',
6802            s: 'a few seconds',
6803            m: 'a minute',
6804            mm: '%d minutes',
6805            h: 'an hour',
6806            hh: '%d hours',
6807            d: 'a day',
6808            dd: '%d days',
6809            M: 'a month',
6810            MM: '%d months',
6811            y: 'a year',
6812            yy: '%d years'
6813        },
6814        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6815        ordinal: function (number) {
6816            var b = number % 10,
6817                output = (~~(number % 100 / 10) === 1) ? 'th' :
6818                    (b === 1) ? 'st' :
6819                        (b === 2) ? 'nd' :
6820                            (b === 3) ? 'rd' : 'th';
6821            return number + output;
6822        },
6823        week: {
6824            dow: 1, // Monday is the first day of the week.
6825            doy: 4  // The week that contains Jan 4th is the first week of the year.
6826        }
6827    });
6828
6829    //! moment.js locale configuration
6830    //! locale : English (General) [en]
6831    //! author : Chris Cartlidge : https://github.com/chriscartlidge
6832
6833    hooks.defineLocale('en', {
6834        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6835        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6836        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6837        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6838        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6839        longDateFormat: {
6840            LT: 'HH:mm',
6841            LTS: 'HH:mm:ss',
6842            L: 'DD-MM-YYYY',
6843            LL: 'D MMMM YYYY',
6844            LLL: 'D MMMM YYYY HH:mm',
6845            LLLL: 'dddd D MMMM YYYY HH:mm'
6846        },
6847        calendar: {
6848            sameDay: '[Today at] LT',
6849            nextDay: '[Tomorrow at] LT',
6850            nextWeek: 'dddd [at] LT',
6851            lastDay: '[Yesterday at] LT',
6852            lastWeek: '[Last] dddd [at] LT',
6853            sameElse: 'L'
6854        },
6855        relativeTime: {
6856            future: 'in %s',
6857            past: '%s ago',
6858            s: 'a few seconds',
6859            m: 'a minute',
6860            mm: '%d minutes',
6861            h: 'an hour',
6862            hh: '%d hours',
6863            d: 'a day',
6864            dd: '%d days',
6865            M: 'a month',
6866            MM: '%d months',
6867            y: 'a year',
6868            yy: '%d years'
6869        },
6870        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6871        ordinal: function (number) {
6872            var b = number % 10,
6873                output = (~~(number % 100 / 10) === 1) ? 'th' :
6874                    (b === 1) ? 'st' :
6875                        (b === 2) ? 'nd' :
6876                            (b === 3) ? 'rd' : 'th';
6877            return number + output;
6878        },
6879        week: {
6880            dow: 1, // Monday is the first day of the week.
6881            doy: 4  // The week that contains Jan 4th is the first week of the year.
6882        }
6883    });
6884
6885    //! moment.js locale configuration
6886    //! locale : English (New Zealand) [en-nz]
6887    //! author : Luke McGregor : https://github.com/lukemcgregor
6888
6889    hooks.defineLocale('en-nz', {
6890        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
6891        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6892        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
6893        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6894        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6895        longDateFormat: {
6896            LT: 'h:mm A',
6897            LTS: 'h:mm:ss A',
6898            L: 'DD/MM/YYYY',
6899            LL: 'D MMMM YYYY',
6900            LLL: 'D MMMM YYYY h:mm A',
6901            LLLL: 'dddd, D MMMM YYYY h:mm A'
6902        },
6903        calendar: {
6904            sameDay: '[Today at] LT',
6905            nextDay: '[Tomorrow at] LT',
6906            nextWeek: 'dddd [at] LT',
6907            lastDay: '[Yesterday at] LT',
6908            lastWeek: '[Last] dddd [at] LT',
6909            sameElse: 'L'
6910        },
6911        relativeTime: {
6912            future: 'in %s',
6913            past: '%s ago',
6914            s: 'a few seconds',
6915            m: 'a minute',
6916            mm: '%d minutes',
6917            h: 'an hour',
6918            hh: '%d hours',
6919            d: 'a day',
6920            dd: '%d days',
6921            M: 'a month',
6922            MM: '%d months',
6923            y: 'a year',
6924            yy: '%d years'
6925        },
6926        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6927        ordinal: function (number) {
6928            var b = number % 10,
6929                output = (~~(number % 100 / 10) === 1) ? 'th' :
6930                    (b === 1) ? 'st' :
6931                        (b === 2) ? 'nd' :
6932                            (b === 3) ? 'rd' : 'th';
6933            return number + output;
6934        },
6935        week: {
6936            dow: 1, // Monday is the first day of the week.
6937            doy: 4  // The week that contains Jan 4th is the first week of the year.
6938        }
6939    });
6940
6941    //! moment.js locale configuration
6942    //! locale : Esperanto [eo]
6943    //! author : Colin Dean : https://github.com/colindean
6944    //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
6945    //! comment : miestasmia corrected the translation by colindean
6946
6947    hooks.defineLocale('eo', {
6948        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aÅ­gusto_septembro_oktobro_novembro_decembro'.split('_'),
6949        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aÅ­g_sep_okt_nov_dec'.split('_'),
6950        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
6951        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
6952        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
6953        longDateFormat: {
6954            LT: 'HH:mm',
6955            LTS: 'HH:mm:ss',
6956            L: 'YYYY-MM-DD',
6957            LL: 'D[-a de] MMMM, YYYY',
6958            LLL: 'D[-a de] MMMM, YYYY HH:mm',
6959            LLLL: 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
6960        },
6961        meridiemParse: /[ap]\.t\.m/i,
6962        isPM: function (input) {
6963            return input.charAt(0).toLowerCase() === 'p';
6964        },
6965        meridiem: function (hours, minutes, isLower) {
6966            if (hours > 11) {
6967                return isLower ? 'p.t.m.' : 'P.T.M.';
6968            } else {
6969                return isLower ? 'a.t.m.' : 'A.T.M.';
6970            }
6971        },
6972        calendar: {
6973            sameDay: '[HodiaÅ­ je] LT',
6974            nextDay: '[MorgaÅ­ je] LT',
6975            nextWeek: 'dddd [je] LT',
6976            lastDay: '[HieraÅ­ je] LT',
6977            lastWeek: '[pasinta] dddd [je] LT',
6978            sameElse: 'L'
6979        },
6980        relativeTime: {
6981            future: 'post %s',
6982            past: 'antaÅ­ %s',
6983            s: 'sekundoj',
6984            m: 'minuto',
6985            mm: '%d minutoj',
6986            h: 'horo',
6987            hh: '%d horoj',
6988            d: 'tago',//ne 'diurno', ĉar estas uzita por proksimumo
6989            dd: '%d tagoj',
6990            M: 'monato',
6991            MM: '%d monatoj',
6992            y: 'jaro',
6993            yy: '%d jaroj'
6994        },
6995        dayOfMonthOrdinalParse: /\d{1,2}a/,
6996        ordinal: '%da',
6997        week: {
6998            dow: 1, // Monday is the first day of the week.
6999            doy: 7  // The week that contains Jan 1st is the first week of the year.
7000        }
7001    });
7002
7003    //! moment.js locale configuration
7004    //! locale : Spanish (Dominican Republic) [es-do]
7005
7006    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
7007    var monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
7008
7009    hooks.defineLocale('es-do', {
7010        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
7011        monthsShort: function (m, format) {
7012            if (!m) {
7013                return monthsShortDot;
7014            } else if (/-MMM-/.test(format)) {
7015                return monthsShort$1[m.month()];
7016            } else {
7017                return monthsShortDot[m.month()];
7018            }
7019        },
7020        monthsParseExact: true,
7021        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
7022        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
7023        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
7024        weekdaysParseExact: true,
7025        longDateFormat: {
7026            LT: 'h:mm A',
7027            LTS: 'h:mm:ss A',
7028            L: 'DD/MM/YYYY',
7029            LL: 'D [de] MMMM [de] YYYY',
7030            LLL: 'D [de] MMMM [de] YYYY h:mm A',
7031            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
7032        },
7033        calendar: {
7034            sameDay: function () {
7035                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7036            },
7037            nextDay: function () {
7038                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7039            },
7040            nextWeek: function () {
7041                return 'dddd [a la' + ((this
7041.hours() !== 1) ? 's' : '') + '] LT';
7042            },
7043            lastDay: function () {
7044                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7045            },
7046            lastWeek: function () {
7047                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7048            },
7049            sameElse: 'L'
7050        },
7051        relativeTime: {
7052            future: 'en %s',
7053            past: 'hace %s',
7054            s: 'unos segundos',
7055            m: 'un minuto',
7056            mm: '%d minutos',
7057            h: 'una hora',
7058            hh: '%d horas',
7059            d: 'un día',
7060            dd: '%d días',
7061            M: 'un mes',
7062            MM: '%d meses',
7063            y: 'un año',
7064            yy: '%d años'
7065        },
7066        dayOfMonthOrdinalParse: /\d{1,2}º/,
7067        ordinal: '%dº',
7068        week: {
7069            dow: 1, // Monday is the first day of the week.
7070            doy: 4  // The week that contains Jan 4th is the first week of the year.
7071        }
7072    });
7073
7074    //! moment.js locale configuration
7075    //! locale : Spanish [es]
7076    //! author : Julio Napurí : https://github.com/julionc
7077
7078    var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
7079    var monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
7080
7081    hooks.defineLocale('es', {
7082        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
7083        monthsShort: function (m, format) {
7084            if (!m) {
7085                return monthsShortDot$1;
7086            } else if (/-MMM-/.test(format)) {
7087                return monthsShort$2[m.month()];
7088            } else {
7089                return monthsShortDot$1[m.month()];
7090            }
7091        },
7092        monthsParseExact: true,
7093        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
7094        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
7095        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
7096        weekdaysParseExact: true,
7097        longDateFormat: {
7098            LT: 'H:mm',
7099            LTS: 'H:mm:ss',
7100            L: 'DD/MM/YYYY',
7101            LL: 'D [de] MMMM [de] YYYY',
7102            LLL: 'D [de] MMMM [de] YYYY H:mm',
7103            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
7104        },
7105        calendar: {
7106            sameDay: function () {
7107                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7108            },
7109            nextDay: function () {
7110                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7111            },
7112            nextWeek: function () {
7113                return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7114            },
7115            lastDay: function () {
7116                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7117            },
7118            lastWeek: function () {
7119                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
7120            },
7121            sameElse: 'L'
7122        },
7123        relativeTime: {
7124            future: 'en %s',
7125            past: 'hace %s',
7126            s: 'unos segundos',
7127            m: 'un minuto',
7128            mm: '%d minutos',
7129            h: 'una hora',
7130            hh: '%d horas',
7131            d: 'un día',
7132            dd: '%d días',
7133            M: 'un mes',
7134            MM: '%d meses',
7135            y: 'un año',
7136            yy: '%d años'
7137        },
7138        dayOfMonthOrdinalParse: /\d{1,2}º/,
7139        ordinal: '%dº',
7140        week: {
7141            dow: 1, // Monday is the first day of the week.
7142            doy: 4  // The week that contains Jan 4th is the first week of the year.
7143        }
7144    });
7145
7146    //! moment.js locale configuration
7147    //! locale : Estonian [et]
7148    //! author : Henry Kehlmann : https://github.com/madhenry
7149    //! improvements : Illimar Tambek : https://github.com/ragulka
7150
7151    function processRelativeTime$3(number, withoutSuffix, key, isFuture) {
7152        var format = {
7153            's': ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
7154            'm': ['ühe minuti', 'üks minut'],
7155            'mm': [number + ' minuti', number + ' minutit'],
7156            'h': ['ühe tunni', 'tund aega', 'üks tund'],
7157            'hh': [number + ' tunni', number + ' tundi'],
7158            'd': ['ühe päeva', 'üks päev'],
7159            'M': ['kuu aja', 'kuu aega', 'üks kuu'],
7160            'MM': [number + ' kuu', number + ' kuud'],
7161            'y': ['ühe aasta', 'aasta', 'üks aasta'],
7162            'yy': [number + ' aasta', number + ' aastat']
7163        };
7164        if (withoutSuffix) {
7165            return format[key][2] ? format[key][2] : format[key][1];
7166        }
7167        return isFuture ? format[key][0] : format[key][1];
7168    }
7169
7170    hooks.defineLocale('et', {
7171        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
7172        monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
7173        weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
7174        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
7175        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
7176        longDateFormat: {
7177            LT: 'H:mm',
7178            LTS: 'H:mm:ss',
7179            L: 'DD.MM.YYYY',
7180            LL: 'D. MMMM YYYY',
7181            LLL: 'D. MMMM YYYY H:mm',
7182            LLLL: 'dddd, D. MMMM YYYY H:mm'
7183        },
7184        calendar: {
7185            sameDay: '[Täna,] LT',
7186            nextDay: '[Homme,] LT',
7187            nextWeek: '[Järgmine] dddd LT',
7188            lastDay: '[Eile,] LT',
7189            lastWeek: '[Eelmine] dddd LT',
7190            sameElse: 'L'
7191        },
7192        relativeTime: {
7193            future: '%s pärast',
7194            past: '%s tagasi',
7195            s: processRelativeTime$3,
7196            m: processRelativeTime$3,
7197            mm: processRelativeTime$3,
7198            h: processRelativeTime$3,
7199            hh: processRelativeTime$3,
7200            d: processRelativeTime$3,
7201            dd: '%d päeva',
7202            M: processRelativeTime$3,
7203            MM: processRelativeTime$3,
7204            y: processRelativeTime$3,
7205            yy: processRelativeTime$3
7206        },
7207        dayOfMonthOrdinalParse: /\d{1,2}\./,
7208        ordinal: '%d.',
7209        week: {
7210            dow: 1, // Monday is the first day of the week.
7211            doy: 4  // The week that contains Jan 4th is the first week of the year.
7212        }
7213    });
7214
7215    //! moment.js locale configuration
7216    //! locale : Basque [eu]
7217    //! author : Eneko Illarramendi : https://github.com/eillarra
7218
7219    hooks.defineLocale('eu', {
7220        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
7221        monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
7222        monthsParseExact: true,
7223        weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
7224        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
7225        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
7226        weekdaysParseExact: true,
7227        longDateFormat: {
7228            LT: 'HH:mm',
7229            LTS: 'HH:mm:ss',
7230            L: 'YYYY-MM-DD',
7231            LL: 'YYYY[ko] MMMM[ren] D[a]',
7232            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
7233            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
7234            l: 'YYYY-M-D',
7235            ll: 'YYYY[ko] MMM D[a]',
7236            lll: 'YYYY[ko] MMM D[a] HH:mm',
7237            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm'
7238        },
7239        calendar: {
7240            sameDay: '[gaur] LT[etan]',
7241            nextDay: '[bihar] LT[etan]',
7242            nextWeek: 'dddd LT[etan]',
7243            lastDay: '[atzo] LT[etan]',
7244            lastWeek: '[aurreko] dddd LT[etan]',
7245            sameElse: 'L'
7246        },
7247        relativeTime: {
7248            future: '%s barru',
7249            past: 'duela %s',
7250            s: 'segundo batzuk',
7251            m: 'minutu bat',
7252            mm: '%d minutu',
7253            h: 'ordu bat',
7254            hh: '%d ordu',
7255            d: 'egun bat',
7256            dd: '%d egun',
7257            M: 'hilabete bat',
7258            MM: '%d hilabete',
7259            y: 'urte bat',
7260            yy: '%d urte'
7261        },
7262        dayOfMonthOrdinalParse: /\d{1,2}\./,
7263        ordinal: '%d.',
7264        week: {
7265            dow: 1, // Monday is the first day of the week.
7266            doy: 7  // The week that contains Jan 1st is the first week of the year.
7267        }
7268    });
7269
7270    //! moment.js locale configuration
7271    //! locale : Persian [fa]
7272    //! author : Ebrahim Byagowi : https://github.com/ebraminio
7273
7274    var symbolMap$5 = {
7275        '1': 'Û±',
7276        '2': 'Û²',
7277        '3': 'Û³',
7278        '4': 'Û´',
7279        '5': 'Ûµ',
7280        '6': 'Û¶',
7281        '7': 'Û·',
7282        '8': 'Û¸',
7283        '9': 'Û¹',
7284        '0': 'Û°'
7285    };
7286    var numberMap$4 = {
7287        'Û±': '1',
7288        'Û²': '2',
7289        'Û³': '3',
7290        'Û´': '4',
7291        'Ûµ': '5',
7292        'Û¶': '6',
7293        'Û·': '7',
7294        'Û¸': '8',
7295        'Û¹': '9',
7296        'Û°': '0'
7297    };
7298
7299    hooks.defineLocale('fa', {
7300        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
7301        monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
7302        weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
7303        weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
7304        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
7305        weekdaysParseExact: true,
7306        longDateFormat: {
7307            LT: 'HH:mm',
7308            LTS: 'HH:mm:ss',
7309            L: 'DD/MM/YYYY',
7310            LL: 'D MMMM YYYY',
7311            LLL: 'D MMMM YYYY HH:mm',
7312            LLLL: 'dddd, D MMMM YYYY HH:mm'
7313        },
7314        meridiemParse: /قبل از ظهر|بعد از ظهر/,
7315        isPM: function (input) {
7316            return /بعد از ظهر/.test(input);
7317        },
7318        meridiem: function (hour, minute, isLower) {
7319            if (hour < 12) {
7320                return 'قبل از ظهر';
7321            } else {
7322                return 'بعد از ظهر';
7323            }
7324        },
7325        calendar: {
7326            sameDay: '[امروز ساعت] LT',
7327            nextDay: '[فردا ساعت] LT',
7328            nextWeek: 'dddd [ساعت] LT',
7329            lastDay: '[دیروز ساعت] LT',
7330            lastWeek: 'dddd [پیش] [ساعت] LT',
7331            sameElse: 'L'
7332        },
7333        relativeTime: {
7334            future: 'در %s',
7335            past: '%s پیش',
7336            s: 'چند ثانیه',
7337            m: 'یک دقیقه',
7338            mm: '%d دقیقه',
7339            h: 'یک ساعت',
7340            hh: '%d ساعت',
7341            d: 'یک روز',
7342            dd: '%d روز',
7343            M: 'یک ماه',
7344            MM: '%d ماه',
7345            y: 'یک سال',
7346            yy: '%d سال'
7347        },
7348        preparse: function (string) {
7349            return string.replace(/[Û°-Û¹]/g, function (match) {
7350                return numberMap$4[match];
7351            }).replace(/،/g, ',');
7352        },
7353        postformat: function (string) {
7354            return string.replace(/\d/g, function (match) {
7355                return symbolMap$5[match];
7356            }).replace(/,/g, '،');
7357        },
7358        dayOfMonthOrdinalParse: /\d{1,2}م/,
7359        ordinal: '%dم',
7360        week: {
7361            dow: 6, // Saturday is the first day of the week.
7362            doy: 12 // The week that contains Jan 1st is the first week of the year.
7363        }
7364    });
7365
7366    //! moment.js locale configuration
7367    //! locale : Finnish [fi]
7368    //! author : Tarmo Aidantausta : https://github.com/bleadof
7369
7370    var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
7371    var numbersFuture = [
7372        'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
7373        numbersPast[7], numbersPast[8], numbersPast[9]
7374    ];
7375    function translate$2(number, withoutSuffix, key, isFuture) {
7376        var result = '';
7377        switch (key) {
7378            case 's':
7379                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
7380            case 'm':
7381                return isFuture ? 'minuutin' : 'minuutti';
7382            case 'mm':
7383                result = isFuture ? 'minuutin' : 'minuuttia';
7384                break;
7385            case 'h':
7386                return isFuture ? 'tunnin' : 'tunti';
7387            case 'hh':
7388                result = isFuture ? 'tunnin' : 'tuntia';
7389                break;
7390            case 'd':
7391                return isFuture ? 'päivän' : 'päivä';
7392            case 'dd':
7393                result = isFuture ? 'päivän' : 'päivää';
7394                break;
7395            case 'M':
7396                return isFuture ? 'kuukauden' : 'kuukausi';
7397            case 'MM':
7398                result = isFuture ? 'kuukauden' : 'kuukautta';
7399                break;
7400            case 'y':
7401                return isFuture ? 'vuoden' : 'vuosi';
7402            case 'yy':
7403                result = isFuture ? 'vuoden' : 'vuotta';
7404                break;
7405        }
7406        result = verbalNumber(number, isFuture) + ' ' + result;
7407        return result;
7408    }
7409    function verbalNumber(number, isFuture) {
7410        return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
7411    }
7412
7413    hooks.defineLocale('fi', {
7414        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
7415        monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
7416        weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
7417        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
7418        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
7419        longDateFormat: {
7420            LT: 'HH.mm',
7421            LTS: 'HH.mm.ss',
7422            L: 'DD.MM.YYYY',
7423            LL: 'Do MMMM[ta] YYYY',
7424            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
7425            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
7426            l: 'D.M.YYYY',
7427            ll: 'Do MMM YYYY',
7428            lll: 'Do MMM YYYY, [klo] HH.mm',
7429            llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
7430        },
7431        calendar: {
7432            sameDay: '[tänään] [klo] LT',
7433            nextDay: '[huomenna] [klo] LT',
7434            nextWeek: 'dddd [klo] LT',
7435            lastDay: '[eilen] [klo] LT',
7436            lastWeek: '[viime] dddd[na] [klo] LT',
7437            sameElse: 'L'
7438        },
7439        relativeTime: {
7440            future: '%s päästä',
7441            past: '%s sitten',
7442            s: translate$2,
7443            m: translate$2,
7444            mm: translate$2,
7445            h: translate$2,
7446            hh: translate$2,
7447            d: translate$2,
7448            dd: translate$2,
7449            M: translate$2,
7450            MM: translate$2,
7451            y: translate$2,
7452            yy: translate$2
7453        },
7454        dayOfMonthOrdinalParse: /\d{1,2}\./,
7455        ordinal: '%d.',
7456        week: {
7457            dow: 1, // Monday is the first day of the week.
7458            doy: 4  // The week that contains Jan 4th is the first week of the year.
7459        }
7460    });
7461
7462    //! moment.js locale configuration
7463    //! locale : Faroese [fo]
7464    //! author : Ragnar Johannesen : https://github.com/ragnar123
7465
7466    hooks.defineLocale('fo', {
7467        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
7468        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
7469        weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
7470        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
7471        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
7472        longDateFormat: {
7473            LT: 'HH:mm',
7474            LTS: 'HH:mm:ss',
7475            L: 'DD/MM/YYYY',
7476            LL: 'D MMMM YYYY',
7477            LLL: 'D MMMM YYYY HH:mm',
7478            LLLL: 'dddd D. MMMM, YYYY HH:mm'
7479        },
7480        calendar: {
7481            sameDay: '[Í dag kl.] LT',
7482            nextDay: '[Í morgin kl.] LT',
7483            nextWeek: 'dddd [kl.] LT',
7484            lastDay: '[Í gjár kl.] LT',
7485            lastWeek: '[síðstu] dddd [kl] LT',
7486            sameElse: 'L'
7487        },
7488        relativeTime: {
7489            future: 'um %s',
7490            past: '%s síðani',
7491            s: 'fá sekund',
7492            m: 'ein minutt',
7493            mm: '%d minuttir',
7494            h: 'ein tími',
7495            hh: '%d tímar',
7496            d: 'ein dagur',
7497            dd: '%d dagar',
7498            M: 'ein mánaði',
7499            MM: '%d mánaðir',
7500            y: 'eitt ár',
7501            yy: '%d ár'
7502        },
7503        dayOfMonthOrdinalParse: /\d{1,2}\./,
7504        ordinal: '%d.',
7505        week: {
7506            dow: 1, // Monday is the first day of the week.
7507            doy: 4  // The week that contains Jan 4th is the first week of the year.
7508        }
7509    });
7510
7511    //! moment.js locale configuration
7512    //! locale : French (Canada) [fr-ca]
7513    //! author : Jonathan Abourbih : https://github.com/jonbca
7514
7515    hooks.defineLocale('fr-ca', {
7516        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
7517        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
7518        monthsParseExact: true,
7519        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
7520        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
7521        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
7522        weekdaysParseExact: true,
7523        longDateFormat: {
7524            LT: 'HH:mm',
7525            LTS: 'HH:mm:ss',
7526            L: 'YYYY-MM-DD',
7527            LL: 'D MMMM YYYY',
7528            LLL: 'D MMMM YYYY HH:mm',
7529            LLLL: 'dddd D MMMM YYYY HH:mm'
7530        },
7531        calendar: {
7532            sameDay: '[Aujourd’hui à] LT',
7533            nextDay: '[Demain à] LT',
7534            nextWeek: 'dddd [à] LT',
7535            lastDay: '[Hier à] LT',
7536            lastWeek: 'dddd [dernier à] LT',
7537            sameElse: 'L'
7538        },
7539        relativeTime: {
7540            future: 'dans %s',
7541            past: 'il y a %s',
7542            s: 'quelques secondes',
7543            m: 'une minute',
7544            mm: '%d minutes',
7545            h: 'une heure',
7546            hh: '%d heures',
7547            d: 'un jour',
7548            dd: '%d jours',
7549            M: 'un mois',
7550            MM: '%d mois',
7551            y: 'un an',
7552            yy: '%d ans'
7553        },
7554        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
7555        ordinal: function (number, period) {
7556            switch (period) {
7557                // Words with masculine grammatical gender: mois, trimestre, jour
7558                default:
7559                case 'M':
7560                case 'Q':
7561                case 'D':
7562                case 'DDD':
7563                case 'd':
7564                    return number + (number === 1 ? 'er' : 'e');
7565
7566                // Words with feminine grammatical gender: semaine
7567                case 'w':
7568                case 'W':
7569                    return number + (number === 1 ? 're' : 'e');
7570            }
7571        }
7572    });
7573
7574    //! moment.js locale configuration
7575    //! locale : French (Switzerland) [fr-ch]
7576    //! author : Gaspard Bucher : https://github.com/gaspard
7577
7578    hooks.defineLocale('fr-ch', {
7579        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
7580        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
7581        monthsParseExact: true,
7582        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
7583        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
7584        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
7585        weekdaysParseExact: true,
7586        longDateFormat: {
7587            LT: 'HH:mm',
7588            LTS: 'HH:mm:ss',
7589            L: 'DD.MM.YYYY',
7590            LL: 'D MMMM YYYY',
7591            LLL: 'D MMMM YYYY HH:mm',
7592            LLLL: 'dddd D MMMM YYYY HH:mm'
7593        },
7594        calendar: {
7595            sameDay: '[Aujourd’hui à] LT',
7596            nextDay: '[Demain à] LT',
7597            nextWeek: 'dddd [à] LT',
7598            lastDay: '[Hier à] LT',
7599            lastWeek: 'dddd [dernier à] LT',
7600            sameElse: 'L'
7601        },
7602        relativeTime: {
7603            future: 'dans %s',
7604            past: 'il y a %s',
7605            s: 'quelques secondes',
7606            m: 'une minute',
7607            mm: '%d minutes',
7608            h: 'une heure',
7609            hh: '%d heures',
7610            d: 'un jour',
7611            dd: '%d jours',
7612            M: 'un mois',
7613            MM: '%d mois',
7614            y: 'un an',
7615            yy: '%d ans'
7616        },
7617        dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
7618        ordinal: function (number, period) {
7619            switch (period) {
7620                // Words with masculine grammatical gender: mois, trimestre, jour
7621                default:
7622                case 'M':
7623                case 'Q':
7624                case 'D':
7625                case 'DDD':
7626                case 'd':
7627                    return number + (number === 1 ? 'er' : 'e');
7628
7629                // Words with feminine grammatical gender: semaine
7630                case 'w':
7631                case 'W':
7632                    return number + (number === 1 ? 're' : 'e');
7633            }
7634        },
7635        week: {
7636            dow: 1, // Monday is the first day of the week.
7637            doy: 4  // The week that contains Jan 4th is the first week of the year.
7638        }
7639    });
7640
7641    //! moment.js locale configuration
7642    //! locale : French [fr]
7643    //! author : John Fischer : https://github.com/jfroffice
7644
7645    hooks.defineLocale('fr', {
7646        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
7647        monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
7648        monthsParseExact: true,
7649        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
7650        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
7651        weekdaysMin: 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
7652        weekdaysParseExact: true,
7653        longDateFormat: {
7654            LT: 'HH:mm',
7655            LTS: 'HH:mm:ss',
7656            L: 'DD/MM/YYYY',
7657            LL: 'D MMMM YYYY',
7658            LLL: 'D MMMM YYYY HH:mm',
7659            LLLL: 'dddd D MMMM YYYY HH:mm'
7660        },
7661        calendar: {
7662            sameDay: '[Aujourd’hui à] LT',
7663            nextDay: '[Demain à] LT',
7664            nextWeek: 'dddd [à] LT',
7665            lastDay: '[Hier à] LT',
7666            lastWeek: 'dddd [dernier à] LT',
7667            sameElse: 'L'
7668        },
7669        relativeTime: {
7670            future: 'dans %s',
7671            past: 'il y a %s',
7672            s: 'quelques secondes',
7673            m: 'une minute',
7674            mm: '%d minutes',
7675            h: 'une heure',
7676            hh: '%d heures',
7677            d: 'un jour',
7678            dd: '%d jours',
7679            M: 'un mois',
7680            MM: '%d mois',
7681            y: 'un an',
7682            yy: '%d ans'
7683        },
7684        dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
7685        ordinal: function (number, period) {
7686            switch (period) {
7687                // TODO: Return 'e' when day of month > 1. Move this case inside
7688                // block for masculine words below.
7689                // See https://github.com/moment/moment/issues/3375
7690                case 'D':
7691                    return number + (number === 1 ? 'er' : '');
7692
7693                // Words with masculine grammatical gender: mois, trimestre, jour
7694                default:
7695                case 'M':
7696                case 'Q':
7697                case 'DDD':
7698                case 'd':
7699                    return number + (number === 1 ? 'er' : 'e');
7700
7701                // Words with feminine grammatical gender: semaine
7702                case 'w':
7703                case 'W':
7704                    return number + (number === 1 ? 're' : 'e');
7705            }
7706        },
7707        week: {
7708            dow: 1, // Monday is the first day of the week.
7709            doy: 4  // The week that contains Jan 4th is the first week of the year.
7710        }
7711    });
7712
7713    //! moment.js locale configuration
7714    //! locale : Frisian [fy]
7715    //! author : Robin van der Vliet : https://github.com/robin0van0der0v
7716
7717    var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');
7718    var monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
7719
7720    hooks.defineLocale('fy', {
7721        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
7722        monthsShort: function (m, format) {
7723            if (!m) {
7724                return monthsShortWithDots;
7725            } else if (/-MMM-/.test(format)) {
7726                return monthsShortWithoutDots[m.month()];
7727            } else {
7728                return monthsShortWithDots[m.month()];
7729            }
7730        },
7731        monthsParseExact: true,
7732        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
7733        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
7734        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
7735        weekdaysParseExact: true,
7736        longDateFormat: {
7737            LT: 'HH:mm',
7738            LTS: 'HH:mm:ss',
7739            L: 'DD-MM-YYYY',
7740            LL: 'D MMMM YYYY',
7741            LLL: 'D MMMM YYYY HH:mm',
7742            LLLL: 'dddd D MMMM YYYY HH:mm'
7743        },
7744        calendar: {
7745            sameDay: '[hjoed om] LT',
7746            nextDay: '[moarn om] LT',
7747            nextWeek: 'dddd [om] LT',
7748            lastDay: '[juster om] LT',
7749            lastWeek: '[ôfrûne] dddd [om] LT',
7750            sameElse: 'L'
7751        },
7752        relativeTime: {
7753            future: 'oer %s',
7754            past: '%s lyn',
7755            s: 'in pear sekonden',
7756            m: 'ien minút',
7757            mm: '%d minuten',
7758            h: 'ien oere',
7759            hh: '%d oeren',
7760            d: 'ien dei',
7761            dd: '%d dagen',
7762            M: 'ien moanne',
7763            MM: '%d moannen',
7764            y: 'ien jier',
7765            yy: '%d jierren'
7766        },
7767        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
7768        ordinal: function (number) {
7769            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
7770        },
7771        week: {
7772            dow: 1, // Monday is the first day of the week.
7773            doy: 4  // The week that contains Jan 4th is the first week of the year.
7774        }
7775    });
7776
7777    //! moment.js locale configuration
7778    //! locale : Scottish Gaelic [gd]
7779    //! author : Jon Ashdown : https://github.com/jonashdown
7780
7781    var months$5 = [
7782        'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'
7783    ];
7784
7785    var monthsShort$3 = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];
7786
7787    var weekdays$1 = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];
7788
7789    var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];
7790
7791    var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
7792
7793    hooks.defineLocale('gd', {
7794        months: months$5,
7795        monthsShort: monthsShort$3,
7796        monthsParseExact: true,
7797        weekdays: weekdays$1,
7798        weekdaysShort: weekdaysShort,
7799        weekdaysMin: weekdaysMin,
7800        longDateFormat: {
7801            LT: 'HH:mm',
7802            LTS: 'HH:mm:ss',
7803            L: 'DD/MM/YYYY',
7804            LL: 'D MMMM YYYY',
7805            LLL: 'D MMMM YYYY HH:mm',
7806            LLLL: 'dddd, D MMMM YYYY HH:mm'
7807        },
7808        calendar: {
7809            sameDay: '[An-diugh aig] LT',
7810            nextDay: '[A-màireach aig] LT',
7811            nextWeek: 'dddd [aig] LT',
7812            lastDay: '[An-dè aig] LT',
7813            lastWeek: 'dddd [seo chaidh] [aig] LT',
7814            sameElse: 'L'
7815        },
7816        relativeTime: {
7817            future: 'ann an %s',
7818            past: 'bho chionn %s',
7819            s: 'beagan diogan',
7820            m: 'mionaid',
7821            mm: '%d mionaidean',
7822            h: 'uair',
7823            hh: '%d uairean',
7824            d: 'latha',
7825            dd: '%d latha',
7826            M: 'mìos',
7827            MM: '%d mìosan',
7828            y: 'bliadhna',
7829            yy: '%d bliadhna'
7830        },
7831        dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
7832        ordinal: function (number) {
7833            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
7834            return number + output;
7835        },
7836        week: {
7837            dow: 1, // Monday is the first day of the week.
7838            doy: 4  // The week that contains Jan 4th is the first week of the year.
7839        }
7840    });
7841
7842    //! moment.js locale configuration
7843    //! locale : Galician [gl]
7844    //! author : Juan G. Hurtado : https://github.com/juanghurtado
7845
7846    hooks.defineLocale('gl', {
7847        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
7848        monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),
7849        monthsParseExact: true,
7850        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
7851        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
7852        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
7853        weekdaysParseExact: true,
7854        longDateFormat: {
7855            LT: 'H:mm',
7856            LTS: 'H:mm:ss',
7857            L: 'DD/MM/YYYY',
7858            LL: 'D [de] MMMM [de] YYYY',
7859            LLL: 'D [de] MMMM [de] YYYY H:mm',
7860            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
7861        },
7862        calendar: {
7863            sameDay: function () {
7864                return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
7865            },
7866            nextDay: function () {
7867                return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
7868            },
7869            nextWeek: function () {
7870                return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
7871            },
7872            lastDay: function () {
7873                return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
7874            },
7875            lastWeek: function () {
7876                return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
7877            },
7878            sameElse: 'L'
7879        },
7880        relativeTime: {
7881            future: function (str) {
7882                if (str.indexOf('un') === 0) {
7883                    return 'n' + str;
7884                }
7885                return 'en ' + str;
7886            },
7887            past: 'hai %s',
7888            s: 'uns segundos',
7889            m: 'un minuto',
7890            mm: '%d minutos',
7891            h: 'unha hora',
7892            hh: '%d horas',
7893            d: 'un día',
7894            dd: '%d días',
7895            M: 'un mes',
7896            MM: '%d meses',
7897            y: 'un ano',
7898            yy: '%d anos'
7899        },
7900        dayOfMonthOrdinalParse: /\d{1,2}º/,
7901        ordinal: '%dº',
7902        week: {
7903            dow: 1, // Monday is the first day of the week.
7904            doy: 4  // The week that contains Jan 4th is the first week of the year.
7905        }
7906    });
7907
7908    //! moment.js locale configuration
7909    //! locale : Konkani Latin script [gom-latn]
7910    //! author : The Discoverer : https://github.com/WikiDiscoverer
7911
7912    function processRelativeTime$4(number, withoutSuffix, key, isFuture) {
7913        var format = {
7914            's': ['thodde secondanim', 'thodde second'],
7915            'm': ['eka mintan', 'ek minute'],
7916            'mm': [number + ' mintanim', number + ' mintam'],
7917            'h': ['eka horan', 'ek hor'],
7918            'hh': [number + ' horanim', number + ' hor'],
7919            'd': ['eka disan', 'ek dis'],
7920            'dd': [number + ' disanim', number + ' dis'],
7921            'M': ['eka mhoinean', 'ek mhoino'],
7922            'MM': [number + ' mhoineanim', number + ' mhoine'],
7923            'y': ['eka vorsan', 'ek voros'],
7924            'yy': [number + ' vorsanim', number + ' vorsam']
7925        };
7926        return withoutSuffix ? format[key][0] : format[key][1];
7927    }
7928
7929    hooks.defineLocale('gom-latn', {
7930        months: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
7931        monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
7932        monthsParseExact: true,
7933        weekdays: 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
7934        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
7935        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
7936        weekdaysParseExact: true,
7937        longDateFormat: {
7938            LT: 'A h:mm [vazta]',
7939            LTS: 'A h:mm:ss [vazta]',
7940            L: 'DD-MM-YYYY',
7941            LL: 'D MMMM YYYY',
7942            LLL: 'D MMMM YYYY A h:mm [vazta]',
7943            LLLL: 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
7944            llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
7945        },
7946        calendar: {
7947            sameDay: '[Aiz] LT',
7948            nextDay: '[Faleam] LT',
7949            nextWeek: '[Ieta to] dddd[,] LT',
7950            lastDay: '[Kal] LT',
7951            lastWeek: '[Fatlo] dddd[,] LT',
7952            sameElse: 'L'
7953        },
7954        relativeTime: {
7955            future: '%s',
7956            past: '%s adim',
7957            s: processRelativeTime$4,
7958            m: processRelativeTime$4,
7959            mm: processRelativeTime$4,
7960            h: processRelativeTime$4,
7961            hh: processRelativeTime$4,
7962            d: processRelativeTime$4,
7963            dd: processRelativeTime$4,
7964            M: processRelativeTime$4,
7965            MM: processRelativeTime$4,
7966            y: processRelativeTime$4,
7967            yy: processRelativeTime$4
7968        },
7969        dayOfMonthOrdinalParse: /\d{1,2}(er)/,
7970        ordinal: function (number, period) {
7971            switch (period) {
7972                // the ordinal 'er' only applies to day of the month
7973                case 'D':
7974                    return number + 'er';
7975                default:
7976                case 'M':
7977                case 'Q':
7978                case 'DDD':
7979                case 'd':
7980                case 'w':
7981                case 'W':
7982                    return number;
7983            }
7984        },
7985        week: {
7986            dow: 1, // Monday is the first day of the week.
7987            doy: 4  // The week that contains Jan 4th is the first week of the year.
7988        },
7989        meridiemParse: /rati|sokalli|donparam|sanje/,
7990        meridiemHour: function (hour, meridiem) {
7991            if (hour === 12) {
7992                hour = 0;
7993            }
7994            if (meridiem === 'rati') {
7995                return hour < 4 ? hour : hour + 12;
7996            } else if (meridiem === 'sokalli') {
7997                return hour;
7998            } else if (meridiem === 'donparam') {
7999                return hour > 12 ? hour : hour + 12;
8000            } else if (meridiem === 'sanje') {
8001                return hour + 12;
8002            }
8003        },
8004        meridiem: function (hour, minute, isLower) {
8005            if (hour < 4) {
8006                return 'rati';
8007            } else if (hour < 12) {
8008                return 'sokalli';
8009            } else if (hour < 16) {
8010                return 'donparam';
8011            } else if (hour < 20) {
8012                return 'sanje';
8013            } else {
8014                return 'rati';
8015            }
8016        }
8017    });
8018
8019    //! moment.js locale configuration
8020    //! locale : Hebrew [he]
8021    //! author : Tomer Cohen : https://github.com/tomer
8022    //! author : Moshe Simantov : https://github.com/DevelopmentIL
8023    //! author : Tal Ater : https://github.com/TalAter
8024
8025    hooks.defineLocale('he', {
8026        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
8027        monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
8028        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
8029        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
8030        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
8031        longDateFormat: {
8032            LT: 'HH:mm',
8033            LTS: 'HH:mm:ss',
8034            L: 'DD/MM/YYYY',
8035            LL: 'D [ב]MMMM YYYY',
8036            LLL: 'D [ב]MMMM YYYY HH:mm',
8037            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
8038            l: 'D/M/YYYY',
8039            ll: 'D MMM YYYY',
8040            lll: 'D MMM YYYY HH:mm',
8041            llll: 'ddd, D MMM YYYY HH:mm'
8042        },
8043        calendar: {
8044            sameDay: '[היום ב־]LT',
8045            nextDay: '[מחר ב־]LT',
8046            nextWeek: 'dddd [בשעה] LT',
8047            lastDay: '[אתמול ב־]LT',
8048            lastWeek: '[ביום] dddd [האחרון בשעה] LT',
8049            sameElse: 'L'
8050        },
8051        relativeTime: {
8052            future: 'בעוד %s',
8053            past: 'לפני %s',
8054            s: 'מספר שניות',
8055            m: 'דקה',
8056            mm: '%d דקות',
8057            h: 'שעה',
8058            hh: function (number) {
8059                if (number === 2) {
8060                    return 'שעתיים';
8061                }
8062                return number + ' שעות';
8063            },
8064            d: 'יום',
8065            dd: function (number) {
8066                if (number === 2) {
8067                    return 'יומיים';
8068                }
8069                return number + ' ימים';
8070            },
8071            M: 'חודש',
8072            MM: function (number) {
8073                if (number === 2) {
8074                    return 'חודשיים';
8075                }
8076                return number + ' חודשים';
8077            },
8078            y: 'שנה',
8079            yy: function (number) {
8080                if (number === 2) {
8081                    return 'שנתיים';
8082                } else if (number % 10 === 0 && number !== 10) {
8083                    return number + ' שנה';
8084                }
8085                return number + ' שנים';
8086            }
8087        },
8088        meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
8089        isPM: function (input) {
8090            return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
8091        },
8092        meridiem: function (hour, minute, isLower) {
8093            if (hour < 5) {
8094                return 'לפנות בוקר';
8095            } else if (hour < 10) {
8096                return 'בבוקר';
8097            } else if (hour < 12) {
8098                return isLower ? 'לפנה"צ' : 'לפני הצהריים';
8099            } else if (hour < 18) {
8100                return isLower ? 'אחה"צ' : 'אחרי הצהריים';
8101            } else {
8102                return 'בערב';
8103            }
8104        }
8105    });
8106
8107    //! moment.js locale configuration
8108    //! locale : Hindi [hi]
8109    //! author : Mayank Singhal : https://github.com/mayanksinghal
8110
8111    var symbolMap$6 = {
8112        '1': '१',
8113        '2': '२',
8114        '3': '३',
8115        '4': '४',
8116        '5': '५',
8117        '6': '६',
8118        '7': '७',
8119        '8': '८',
8120        '9': '९',
8121        '0': '०'
8122    };
8123    var numberMap$5 = {
8124        '१': '1',
8125        '२': '2',
8126        '३': '3',
8127        '४': '4',
8128        '५': '5',
8129        '६': '6',
8130        '७': '7',
8131        '८': '8',
8132        '९': '9',
8133        '०': '0'
8134    };
8135
8136    hooks.defineLocale('hi', {
8137        months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
8138        monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
8139        monthsParseExact: true,
8140        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
8141        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
8142        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
8143        longDateFormat: {
8144            LT: 'A h:mm बजे',
8145            LTS: 'A h:mm:ss बजे',
8146            L: 'DD/MM/YYYY',
8147            LL: 'D MMMM YYYY',
8148            LLL: 'D MMMM YYYY, A h:mm बजे',
8149            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
8150        },
8151        calendar: {
8152            sameDay: '[आज] LT',
8153            nextDay: '[कल] LT',
8154            nextWeek: 'dddd, LT',
8155            lastDay: '[कल] LT',
8156            lastWeek: '[पिछले] dddd, LT',
8157            sameElse: 'L'
8158        },
8159        relativeTime: {
8160            future: '%s में',
8161            past: '%s पहले',
8162            s: 'कुछ ही क्षण',
8163            m: 'एक मिनट',
8164            mm: '%d मिनट',
8165            h: 'एक घंटा',
8166            hh: '%d घंटे',
8167            d: 'एक दिन',
8168            dd: '%d दिन',
8169            M: 'एक महीने',
8170            MM: '%d महीने',
8171            y: 'एक वर्ष',
8172            yy: '%d वर्ष'
8173        },
8174        preparse: function (string) {
8175            return string.replace(/[१२३४५६७८९०]/g, function (match) {
8176                return numberMap$5[match];
8177            });
8178        },
8179        postformat: function (string) {
8180            return string.replace(/\d/g, function (match) {
8181                return symbolMap$6[match];
8182            });
8183        },
8184        // Hindi notation for meridiems are quite fuzzy in practice. While there exists
8185        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
8186        meridiemParse: /रात|सुबह|दोपहर|शाम/,
8187        meridiemHour: function (hour, meridiem) {
8188            if (hour === 12) {
8189                hour = 0;
8190            }
8191            if (meridiem === 'रात') {
8192                return hour < 4 ? hour : hour + 12;
8193            } else if (meridiem === 'सुबह') {
8194                return hour;
8195            } else if (meridiem === 'दोपहर') {
8196                return hour >= 10 ? hour : hour + 12;
8197            } else if (meridiem === 'शाम') {
8198                return hour + 12;
8199            }
8200        },
8201        meridiem: function (hour, minute, isLower) {
8202            if (hour < 4) {
8203                return 'रात';
8204            } else if (hour < 10) {
8205                return 'सुबह';
8206            } else if (hour < 17) {
8207                return 'दोपहर';
8208            } else if (hour < 20) {
8209                return 'शाम';
8210            } else {
8211                return 'रात';
8212            }
8213        },
8214        week: {
8215            dow: 0, // Sunday is the first day of the week.
8216            doy: 6  // The week that contains Jan 1st is the first week of the year.
8217        }
8218    });
8219
8220    //! moment.js locale configuration
8221    //! locale : Croatian [hr]
8222    //! author : Bojan Marković : https://github.com/bmarkovic
8223
8224    function translate$3(number, withoutSuffix, key) {
8225        var result = number + ' ';
8226        switch (key) {
8227            case 'm':
8228                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
8229            case 'mm':
8230                if (number === 1) {
8231                    result += 'minuta';
8232                } else if (number === 2 || number === 3 || number === 4) {
8233                    result += 'minute';
8234                } else {
8235                    result += 'minuta';
8236                }
8237                return result;
8238            case 'h':
8239                return withoutSuffix ? 'jedan sat' : 'jednog sata';
8240            case 'hh':
8241                if (number === 1) {
8242                    result += 'sat';
8243                } else if (number === 2 || number === 3 || number === 4) {
8244                    result += 'sata';
8245                } else {
8246                    result += 'sati';
8247                }
8248                return result;
8249            case 'dd':
8250                if (number === 1) {
8251                    result += 'dan';
8252                } else {
8253                    result += 'dana';
8254                }
8255                return result;
8256            case 'MM':
8257                if (number === 1) {
8258                    result += 'mjesec';
8259                } else if (number === 2 || number === 3 || number === 4) {
8260                    result += 'mjeseca';
8261                } else {
8262                    result += 'mjeseci';
8263                }
8264                return result;
8265            case 'yy':
8266                if (number === 1) {
8267                    result += 'godina';
8268                } else if (number === 2 || number === 3 || number === 4) {
8269                    result += 'godine';
8270                } else {
8271                    result += 'godina';
8272                }
8273                return result;
8274        }
8275    }
8276
8277    hooks.defineLocale('hr', {
8278        months: {
8279            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
8280            standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
8281        },
8282        monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
8283        monthsParseExact: true,
8284        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
8285        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
8286        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
8287        weekdaysParseExact: true,
8288        longDateFormat: {
8289            LT: 'H:mm',
8290            LTS: 'H:mm:ss',
8291            L: 'DD.MM.YYYY',
8292            LL: 'D. MMMM YYYY',
8293            LLL: 'D. MMMM YYYY H:mm',
8294            LLLL: 'dddd, D. MMMM YYYY H:mm'
8295        },
8296        calendar: {
8297            sameDay: '[danas u] LT',
8298            nextDay: '[sutra u] LT',
8299            nextWeek: function () {
8300                switch (this.day()) {
8301                    case 0:
8302                        return '[u] [nedjelju] [u] LT';
8303                    case 3:
8304                        return '[u] [srijedu] [u] LT';
8305                    case 6:
8306                        return '[u] [subotu] [u] LT';
8307                    case 1:
8308                    case 2:
8309                    case 4:
8310                    case 5:
8311                        return '[u] dddd [u] LT';
8312                }
8313            },
8314            lastDay: '[jučer u] LT',
8315            lastWeek: function () {
8316                switch (this.day()) {
8317                    case 0:
8318                    case 3:
8319                        return '[prošlu] dddd [u] LT';
8320                    case 6:
8321                        return '[prošle] [subote] [u] LT';
8322                    case 1:
8323                    case 2:
8324                    case 4:
8325                    case 5:
8326                        return '[prošli] dddd [u] LT';
8327                }
8328            },
8329            sameElse: 'L'
8330        },
8331        relativeTime: {
8332            future: 'za %s',
8333            past: 'prije %s',
8334            s: 'par sekundi',
8335            m: translate$3,
8336            mm: translate$3,
8337            h: translate$3,
8338            hh: translate$3,
8339            d: 'dan',
8340            dd: translate$3,
8341            M: 'mjesec',
8342            MM: translate$3,
8343            y: 'godinu',
8344            yy: translate$3
8345        },
8346        dayOfMonthOrdinalParse: /\d{1,2}\./,
8347        ordinal: '%d.',
8348        week: {
8349            dow: 1, // Monday is the first day of the week.
8350            doy: 7  // The week that contains Jan 1st is the first week of the year.
8351        }
8352    });
8353
8354    //! moment.js locale configuration
8355    //! locale : Hungarian [hu]
8356    //! author : Adam Brunner : https://github.com/adambrunner
8357
8358    var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
8359    function translate$4(number, withoutSuffix, key, isFuture) {
8360        var num = number,
8361            suffix;
8362        switch (key) {
8363            case 's':
8364                return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
8365            case 'm':
8366                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
8367            case 'mm':
8368                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
8369            case 'h':
8370                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
8371            case 'hh':
8372                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
8373            case 'd':
8374                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
8375            case 'dd':
8376                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
8377            case 'M':
8378                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
8379            case 'MM':
8380                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
8381            case 'y':
8382                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
8383            case 'yy':
8384                return num + (isFuture || withoutSuffix ? ' év' : ' éve');
8385        }
8386        return '';
8387    }
8388    function week(isFuture) {
8389        return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
8390    }
8391
8392    hooks.defineLocale('hu', {
8393        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
8394        monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
8395        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
8396        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
8397        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
8398        longDateFormat: {
8399            LT: 'H:mm',
8400            LTS: 'H:mm:ss',
8401            L: 'YYYY.MM.DD.',
8402            LL: 'YYYY. MMMM D.',
8403            LLL: 'YYYY. MMMM D. H:mm',
8404            LLLL: 'YYYY. MMMM D., dddd H:mm'
8405        },
8406        meridiemParse: /de|du/i,
8407        isPM: function (input) {
8408            return input.charAt(1).toLowerCase() === 'u';
8409        },
8410        meridiem: function (hours, minutes, isLower) {
8411            if (hours < 12) {
8412                return isLower === true ? 'de' : 'DE';
8413            } else {
8414                return isLower === true ? 'du' : 'DU';
8415            }
8416        },
8417        calendar: {
8418            sameDay: '[ma] LT[-kor]',
8419            nextDay: '[holnap] LT[-kor]',
8420            nextWeek: function () {
8421                return week.call(this, true);
8422            },
8423            lastDay: '[tegnap] LT[-kor]',
8424            lastWeek: function () {
8425                return week.call(this, false);
8426            },
8427            sameElse: 'L'
8428        },
8429        relativeTime: {
8430            future: '%s múlva',
8431            past: '%s',
8432            s: translate$4,
8433            m: translate$4,
8434            mm: translate$4,
8435            h: translate$4,
8436            hh: translate$4,
8437            d: translate$4,
8438            dd: translate$4,
8439            M: translate$4,
8440            MM: translate$4,
8441            y: translate$4,
8442            yy: translate$4
8443        },
8444        dayOfMonthOrdinalParse: /\d{1,2}\./,
8445        ordinal: '%d.',
8446        week: {
8447            dow: 1, // Monday is the first day of the week.
8448            doy: 4  // The week that contains Jan 4th is the first week of the year.
8449        }
8450    });
8451
8452    //! moment.js locale configuration
8453    //! locale : Armenian [hy-am]
8454    //! author : Armendarabyan : https://github.com/armendarabyan
8455
8456    hooks.defineLocale('hy-am', {
8457        months: {
8458            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),
8459            standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')
8460        },
8461        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
8462        weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),
8463        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
8464        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
8465        longDateFormat: {
8466            LT: 'HH:mm',
8467            LTS: 'HH:mm:ss',
8468            L: 'DD.MM.YYYY',
8469            LL: 'D MMMM YYYY Õ©.',
8470            LLL: 'D MMMM YYYY Õ©., HH:mm',
8471            LLLL: 'dddd, D MMMM YYYY Õ©., HH:mm'
8472        },
8473        calendar: {
8474            sameDay: '[այսօր] LT',
8475            nextDay: '[Õ¾Õ¡Õ²Õ¨] LT',
8476            lastDay: '[երեկ] LT',
8477            nextWeek: function () {
8478                return 'dddd [օրը ժամը] LT';
8479            },
8480            lastWeek: function () {
8481                return '[անցած] dddd [օրը ժամը] LT';
8482            },
8483            sameElse: 'L'
8484        },
8485        relativeTime: {
8486            future: '%s Õ°Õ¥Õ¿Õ¸',
8487            past: '%s Õ¡Õ¼Õ¡Õ»',
8488            s: 'մի քանի վայրկյան',
8489            m: 'րոպե',
8490            mm: '%d րոպե',
8491            h: 'ÕªÕ¡Õ´',
8492            hh: '%d ÕªÕ¡Õ´',
8493            d: 'օր',
8494            dd: '%d օր',
8495            M: 'Õ¡Õ´Õ«Õ½',
8496            MM: '%d Õ¡Õ´Õ«Õ½',
8497            y: 'տարի',
8498            yy: '%d տարի'
8499        },
8500        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
8501        isPM: function (input) {
8502            return /^(ցերեկվա|երեկոյան)$/.test(input);
8503        },
8504        meridiem: function (hour) {
8505            if (hour < 4) {
8506                return 'գիշերվա';
8507            } else if (hour < 12) {
8508                return 'Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡';
8509            } else if (hour < 17) {
8510                return 'ցերեկվա';
8511            } else {
8512                return 'երեկոյան';
8513            }
8514        },
8515        dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
8516        ordinal: function (number, period) {
8517            switch (period) {
8518                case 'DDD':
8519                case 'w':
8520                case 'W':
8521                case 'DDDo':
8522                    if (number === 1) {
8523                        return number + '-Õ«Õ¶';
8524                    }
8525                    return number + '-րդ';
8526                default:
8527                    return number;
8528            }
8529        },
8530        week: {
8531            dow: 1, // Monday is the first day of the week.
8532            doy: 7  // The week that contains Jan 1st is the first week of the year.
8533        }
8534    });
8535
8536    //! moment.js locale configuration
8537    //! locale : Indonesian [id]
8538    //! author : Mohammad Satrio Utomo : https://github.com/tyok
8539    //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
8540
8541    hooks.defineLocale('id', {
8542        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
8543        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
8544        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
8545        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
8546        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
8547        longDateFormat: {
8548            LT: 'HH.mm',
8549            LTS: 'HH.mm.ss',
8550            L: 'DD/MM/YYYY',
8551            LL: 'D MMMM YYYY',
8552            LLL: 'D MMMM YYYY [pukul] HH.mm',
8553            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
8554        },
8555        meridiemParse: /pagi|siang|sore|malam/,
8556        meridiemHour: function (hour, meridiem) {
8557            if (hour === 12) {
8558                hour = 0;
8559            }
8560            if (meridiem === 'pagi') {
8561                return hour;
8562            } else if (meridiem === 'siang') {
8563                return hour >= 11 ? hour : hour + 12;
8564            } else if (meridiem === 'sore' || meridiem === 'malam') {
8565                return hour + 12;
8566            }
8567        },
8568        meridiem: function (hours, minutes, isLower) {
8569            if (hours < 11) {
8570                return 'pagi';
8571            } else if (hours < 15) {
8572                return 'siang';
8573            } else if (hours < 19) {
8574                return 'sore';
8575            } else {
8576                return 'malam';
8577            }
8578        },
8579        calendar: {
8580            sameDay: '[Hari ini pukul] LT',
8581            nextDay: '[Besok pukul] LT',
8582            nextWeek: 'dddd [pukul] LT',
8583            lastDay: '[Kemarin pukul] LT',
8584            lastWeek: 'dddd [lalu pukul] LT',
8585            sameElse: 'L'
8586        },
8587        relativeTime: {
8588            future: 'dalam %s',
8589            past: '%s yang lalu',
8590            s: 'beberapa detik',
8591            m: 'semenit',
8592            mm: '%d menit',
8593            h: 'sejam',
8594            hh: '%d jam',
8595            d: 'sehari',
8596            dd: '%d hari',
8597            M: 'sebulan',
8598            MM: '%d bulan',
8599            y: 'setahun',
8600            yy: '%d tahun'
8601        },
8602        week: {
8603            dow: 1, // Monday is the first day of the week.
8604            doy: 7  // The week that contains Jan 1st is the first week of the year.
8605        }
8606    });
8607
8608    //! moment.js locale configuration
8609    //! locale : Icelandic [is]
8610    //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
8611
8612    function plural$2(n) {
8613        if (n % 100 === 11) {
8614            return true;
8615        } else if (n % 10 === 1) {
8616            return false;
vendor: 4,174 bytes, lines 8617-8725
8617        }
8618        return true;
8619    }
8620    function translate$5(number, withoutSuffix, key, isFuture) {
8621        var result = number + ' ';
8622        switch (key) {
8623            case 's':
8624                return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
8625            case 'm':
8626                return withoutSuffix ? 'mínúta' : 'mínútu';
8627            case 'mm':
8628                if (plural$2(number)) {
8629                    return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
8630                } else if (withoutSuffix) {
8631                    return result + 'mínúta';
8632                }
8633                return result + 'mínútu';
8634            case 'hh':
8635                if (plural$2(number)) {
8636                    return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
8637                }
8638                return result + 'klukkustund';
8639            case 'd':
8640                if (withoutSuffix) {
8641                    return 'dagur';
8642                }
8643                return isFuture ? 'dag' : 'degi';
8644            case 'dd':
8645                if (plural$2(number)) {
8646                    if (withoutSuffix) {
8647                        return result + 'dagar';
8648                    }
8649                    return result + (isFuture ? 'daga' : 'dögum');
8650                } else if (withoutSuffix) {
8651                    return result + 'dagur';
8652                }
8653                return result + (isFuture ? 'dag' : 'degi');
8654            case 'M':
8655                if (withoutSuffix) {
8656                    return 'mánuður';
8657                }
8658                return isFuture ? 'mánuð' : 'mánuði';
8659            case 'MM':
8660                if (plural$2(number)) {
8661                    if (withoutSuffix) {
8662                        return result + 'mánuðir';
8663                    }
8664                    return result + (isFuture ? 'mánuði' : 'mánuðum');
8665                } else if (withoutSuffix) {
8666                    return result + 'mánuður';
8667                }
8668                return result + (isFuture ? 'mánuð' : 'mánuði');
8669            case 'y':
8670                return withoutSuffix || isFuture ? 'ár' : 'ári';
8671            case 'yy':
8672                if (plural$2(number)) {
8673                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
8674                }
8675                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
8676        }
8677    }
8678
8679    hooks.defineLocale('is', {
8680        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
8681        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
8682        weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
8683        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
8684        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
8685        longDateFormat: {
8686            LT: 'H:mm',
8687            LTS: 'H:mm:ss',
8688            L: 'DD.MM.YYYY',
8689            LL: 'D. MMMM YYYY',
8690            LLL: 'D. MMMM YYYY [kl.] H:mm',
8691            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm'
8692        },
8693        calendar: {
8694            sameDay: '[í dag kl.] LT',
8695            nextDay: '[á morgun kl.] LT',
8696            nextWeek: 'dddd [kl.] LT',
8697            lastDay: '[í gær kl.] LT',
8698            lastWeek: '[síðasta] dddd [kl.] LT',
8699            sameElse: 'L'
8700        },
8701        relativeTime: {
8702            future: 'eftir %s',
8703            past: 'fyrir %s síðan',
8704            s: translate$5,
8705            m: translate$5,
8706            mm: translate$5,
8707            h: 'klukkustund',
8708            hh: translate$5,
8709            d: translate$5,
8710            dd: translate$5,
8711            M: translate$5,
8712            MM: translate$5,
8713            y: translate$5,
8714            yy: translate$5
8715        },
8716        dayOfMonthOrdinalParse: /\d{1,2}\./,
8717        ordinal: '%d.',
8718        week: {
8719            dow: 1, // Monday is the first day of the week.
8720            doy: 4  // The week that contains Jan 4th is the first week of the year.
8721        }
8722    });
8723
8724    //! moment.js locale configuration
8725    //! locale : Italian [it]
8726    //! author : Lorenzo : https://github.com/aliem
8727    //! author: Mattia Larentis: https://github.com/nostalgiaz
8728
8729    hooks.defineLocale('it', {
8730        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
8731        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
8732        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
8733        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
8734        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
8735        longDateFormat: {
8736            LT: 'HH:mm',
8737            LTS: 'HH:mm:ss',
8738            L: 'DD/MM/YYYY',
8739            LL: 'D MMMM YYYY',
8740            LLL: 'D MMMM YYYY HH:mm',
8741            LLLL: 'dddd, D MMMM YYYY HH:mm'
8742        },
8743        calendar: {
8744            sameDay: '[Oggi alle] LT',
8745            nextDay: '[Domani alle] LT',
8746            nextWeek: 'dddd [alle] LT',
8747            lastDay: '[Ieri alle] LT',
8748            lastWeek: function () {
8749                switch (this.day()) {
8750                    case 0:
8751                        return '[la scorsa] dddd [alle] LT';
8752                    default:
8753                        return '[lo scorso] dddd [alle] LT';
8754                }
8755            },
8756            sameElse: 'L'
8757        },
8758        relativeTime: {
8759            future: function (s) {
8760                return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
8761            },
8762            past: '%s fa',
8763            s: 'alcuni secondi',
8764            m: 'un minuto',
8765            mm: '%d minuti',
8766            h: 'un\'ora',
8767            hh: '%d ore',
8768            d: 'un giorno',
8769            dd: '%d giorni',
8770            M: 'un mese',
8771            MM: '%d mesi',
8772            y: 'un anno',
8773            yy: '%d anni'
8774        },
8775        dayOfMonthOrdinalParse: /\d{1,2}º/,
8776        ordinal: '%dº',
8777        week: {
8778            dow: 1, // Monday is the first day of the week.
8779            doy: 4  // The week that contains Jan 4th is the first week of the year.
8780        }
8781    });
8782
8783    //! moment.js locale configuration
8784    //! locale : Japanese [ja]
8785    //! author : LI Long : https://github.com/baryon
8786
8787    hooks.defineLocale('ja', {
8788        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
8789        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
8790        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
8791        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
8792        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
8793        longDateFormat: {
8794            LT: 'HH:mm',
8795            LTS: 'HH:mm:ss',
8796            L: 'YYYY/MM/DD',
8797            LL: 'YYYY年M月D日',
8798            LLL: 'YYYY年M月D日 HH:mm',
8799            LLLL: 'YYYY年M月D日 HH:mm dddd',
8800            l: 'YYYY/MM/DD',
8801            ll: 'YYYY年M月D日',
8802            lll: 'YYYY年M月D日 HH:mm',
8803            llll: 'YYYY年M月D日 HH:mm dddd'
8804        },
8805        meridiemParse: /午前|午後/i,
8806        isPM: function (input) {
8807            return input === '午後';
8808        },
8809        meridiem: function (hour, minute, isLower) {
8810            if (hour < 12) {
8811                return '午前';
8812            } else {
8813                return '午後';
8814            }
8815        },
8816        calendar: {
8817            sameDay: '[今日] LT',
8818            nextDay: '[明日] LT',
8819            nextWeek: '[来週]dddd LT',
8820            lastDay: '[昨日] LT',
8821            lastWeek: '[前週]dddd LT',
8822            sameElse: 'L'
8823        },
8824        dayOfMonthOrdinalParse: /\d{1,2}日/,
8825        ordinal: function (number, period) {
8826            switch (period) {
8827                case 'd':
8828                case 'D':
8829                case 'DDD':
8830                    return number + '日';
8831                default:
8832                    return number;
8833            }
8834        },
8835        relativeTime: {
8836            future: '%s後',
8837            past: '%s前',
8838            s: '数秒',
8839            m: '1分',
8840            mm: '%d分',
8841            h: '1時間',
8842            hh: '%d時間',
8843            d: '1日',
8844            dd: '%d日',
8845            M: '1ヶ月',
8846            MM: '%dヶ月',
8847            y: '1å¹´',
8848            yy: '%då¹´'
8849        }
8850    });
8851
8852    //! moment.js locale configuration
8853    //! locale : Javanese [jv]
8854    //! author : Rony Lantip : https://github.com/lantip
8855    //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
8856
8857    hooks.defineLocale('jv', {
8858        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),
8859        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
8860        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
8861        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
8862        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
8863        longDateFormat: {
8864            LT: 'HH.mm',
8865            LTS: 'HH.mm.ss',
8866            L: 'DD/MM/YYYY',
8867            LL: 'D MMMM YYYY',
8868            LLL: 'D MMMM YYYY [pukul] HH.mm',
8869            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
8870        },
8871        meridiemParse: /enjing|siyang|sonten|ndalu/,
8872        meridiemHour: function (hour, meridiem) {
8873            if (hour === 12) {
8874                hour = 0;
8875            }
8876            if (meridiem === 'enjing') {
8877                return hour;
8878            } else if (meridiem === 'siyang') {
8879                return hour >= 11 ? hour : hour + 12;
8880            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
8881                return hour + 12;
8882            }
8883        },
8884        meridiem: function (hours, minutes, isLower) {
8885            if (hours < 11) {
8886                return 'enjing';
8887            } else if (hours < 15) {
8888                return 'siyang';
8889            } else if (hours < 19) {
8890                return 'sonten';
8891            } else {
8892                return 'ndalu';
8893            }
8894        },
8895        calendar: {
8896            sameDay: '[Dinten puniko pukul] LT',
8897            nextDay: '[Mbenjang pukul] LT',
8898            nextWeek: 'dddd [pukul] LT',
8899            lastDay: '[Kala wingi pukul] LT',
8900            lastWeek: 'dddd [kepengker pukul] LT',
8901            sameElse: 'L'
8902        },
8903        relativeTime: {
8904            future: 'wonten ing %s',
8905            past: '%s ingkang kepengker',
8906            s: 'sawetawis detik',
8907            m: 'setunggal menit',
8908            mm: '%d menit',
8909            h: 'setunggal jam',
8910            hh: '%d jam',
8911            d: 'sedinten',
8912            dd: '%d dinten',
8913            M: 'sewulan',
8914            MM: '%d wulan',
8915            y: 'setaun',
8916            yy: '%d taun'
8917        },
8918        week: {
8919            dow: 1, // Monday is the first day of the week.
8920            doy: 7  // The week that contains Jan 1st is the first week of the year.
8921        }
8922    });
8923
8924    //! moment.js locale configuration
8925    //! locale : Georgian [ka]
8926    //! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
8927
8928    hooks.defineLocale('ka', {
8929        months: {
8930            standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
8931            format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
8932        },
8933        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
8934        weekdays: {
8935            standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.
8935split('_'),
8936            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),
8937            isFormat: /(წინა|შემდეგ)/
8938        },
8939        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
8940        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
8941        longDateFormat: {
8942            LT: 'h:mm A',
8943            LTS: 'h:mm:ss A',
8944            L: 'DD/MM/YYYY',
8945            LL: 'D MMMM YYYY',
8946            LLL: 'D MMMM YYYY h:mm A',
8947            LLLL: 'dddd, D MMMM YYYY h:mm A'
8948        },
8949        calendar: {
8950            sameDay: '[დღეს] LT[-ზე]',
8951            nextDay: '[ხვალ] LT[-ზე]',
8952            lastDay: '[გუშინ] LT[-ზე]',
8953            nextWeek: '[შემდეგ] dddd LT[-ზე]',
8954            lastWeek: '[წინა] dddd LT-ზე',
8955            sameElse: 'L'
8956        },
8957        relativeTime: {
8958            future: function (s) {
8959                return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
8960                    s.replace(/ი$/, 'ში') :
8961                    s + 'ში';
8962            },
8963            past: function (s) {
8964                if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
8965                    return s.replace(/(ი|ე)$/, 'ის უკან');
8966                }
8967                if ((/წელი/).test(s)) {
8968                    return s.replace(/წელი$/, 'წლის უკან');
8969                }
8970            },
8971            s: 'რამდენიმე წამი',
8972            m: 'წუთი',
8973            mm: '%d წუთი',
8974            h: 'საათი',
8975            hh: '%d საათი',
8976            d: 'დღე',
8977            dd: '%d დღე',
8978            M: 'თვე',
8979            MM: '%d თვე',
8980            y: 'წელი',
8981            yy: '%d წელი'
8982        },
8983        dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
8984        ordinal: function (number) {
8985            if (number === 0) {
8986                return number;
8987            }
8988            if (number === 1) {
8989                return number + '-ლი';
8990            }
8991            if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
8992                return 'მე-' + number;
8993            }
8994            return number + '-ე';
8995        },
8996        week: {
8997            dow: 1,
8998            doy: 7
8999        }
9000    });
9001
9002    //! moment.js locale configuration
9003    //! locale : Kazakh [kk]
9004    //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
9005
9006    var suffixes$1 = {
9007        0: '-ші',
9008        1: '-ші',
9009        2: '-ші',
9010        3: '-ші',
9011        4: '-ші',
9012        5: '-ші',
9013        6: '-шы',
9014        7: '-ші',
9015        8: '-ші',
9016        9: '-шы',
9017        10: '-шы',
9018        20: '-шы',
9019        30: '-шы',
9020        40: '-шы',
9021        50: '-ші',
9022        60: '-шы',
9023        70: '-ші',
9024        80: '-ші',
9025        90: '-шы',
9026        100: '-ші'
9027    };
9028
9029    hooks.defineLocale('kk', {
9030        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),
9031        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
9032        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),
9033        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
9034        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
9035        longDateFormat: {
9036            LT: 'HH:mm',
9037            LTS: 'HH:mm:ss',
9038            L: 'DD.MM.YYYY',
9039            LL: 'D MMMM YYYY',
9040            LLL: 'D MMMM YYYY HH:mm',
9041            LLLL: 'dddd, D MMMM YYYY HH:mm'
9042        },
9043        calendar: {
9044            sameDay: '[Бүгін сағат] LT',
9045            nextDay: '[Ертең сағат] LT',
9046            nextWeek: 'dddd [сағат] LT',
9047            lastDay: '[Кеше сағат] LT',
9048            lastWeek: '[Өткен аптаның] dddd [сағат] LT',
9049            sameElse: 'L'
9050        },
9051        relativeTime: {
9052            future: '%s ішінде',
9053            past: '%s бұрын',
9054            s: 'бірнеше секунд',
9055            m: 'бір минут',
9056            mm: '%d минут',
9057            h: 'бір сағат',
9058            hh: '%d сағат',
9059            d: 'бір күн',
9060            dd: '%d күн',
9061            M: 'бір ай',
9062            MM: '%d ай',
9063            y: 'бір жыл',
9064            yy: '%d жыл'
9065        },
9066        dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
9067        ordinal: function (number) {
9068            var a = number % 10,
9069                b = number >= 100 ? 100 : null;
9070            return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]);
9071        },
9072        week: {
9073            dow: 1, // Monday is the first day of the week.
9074            doy: 7  // The week that contains Jan 1st is the first week of the year.
9075        }
9076    });
9077
9078    //! moment.js locale configuration
9079    //! locale : Cambodian [km]
9080    //! author : Kruy Vanna : https://github.com/kruyvanna
9081
9082    hooks.defineLocale('km', {
9083        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
9084        monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
9085        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
9086        weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
9087        weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
9088        longDateFormat: {
9089            LT: 'HH:mm',
9090            LTS: 'HH:mm:ss',
9091            L: 'DD/MM/YYYY',
9092            LL: 'D MMMM YYYY',
9093            LLL: 'D MMMM YYYY HH:mm',
9094            LLLL: 'dddd, D MMMM YYYY HH:mm'
9095        },
9096        calendar: {
9097            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
9098            nextDay: '[ស្អែក ម៉ោង] LT',
9099            nextWeek: 'dddd [ម៉ោង] LT',
9100            lastDay: '[ម្សិលមិញ ម៉ោង] LT',
9101            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
9102            sameElse: 'L'
9103        },
9104        relativeTime: {
9105            future: '%sទៀត',
9106            past: '%sមុន',
9107            s: 'ប៉ុន្មានវិនាទី',
9108            m: 'មួយនាទី',
9109            mm: '%d នាទី',
9110            h: 'មួយម៉ោង',
9111            hh: '%d ម៉ោង',
9112            d: 'មួយថ្ងៃ',
9113            dd: '%d ថ្ងៃ',
9114            M: 'មួយខែ',
9115            MM: '%d ខែ',
9116            y: 'មួយឆ្នាំ',
9117            yy: '%d ឆ្នាំ'
9118        },
9119        week: {
9120            dow: 1, // Monday is the first day of the week.
9121            doy: 4 // The week that contains Jan 4th is the first week of the year.
9122        }
9123    });
9124
9125    //! moment.js locale configuration
9126    //! locale : Kannada [kn]
9127    //! author : Rajeev Naik : https://github.com/rajeevnaikte
9128
9129    var symbolMap$7 = {
9130        '1': 'à³§',
9131        '2': '೨',
9132        '3': '೩',
9133        '4': '೪',
9134        '5': '೫',
9135        '6': '೬',
9136        '7': 'à³­',
9137        '8': 'à³®',
9138        '9': '೯',
9139        '0': '೦'
9140    };
9141    var numberMap$6 = {
9142        'à³§': '1',
9143        '೨': '2',
9144        '೩': '3',
9145        '೪': '4',
9146        '೫': '5',
9147        '೬': '6',
9148        'à³­': '7',
9149        'à³®': '8',
9150        '೯': '9',
9151        '೦': '0'
9152    };
9153
9154    hooks.defineLocale('kn', {
9155        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
9156        monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
9157        monthsParseExact: true,
9158        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
9159        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
9160        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
9161        longDateFormat: {
9162            LT: 'A h:mm',
9163            LTS: 'A h:mm:ss',
9164            L: 'DD/MM/YYYY',
9165            LL: 'D MMMM YYYY',
9166            LLL: 'D MMMM YYYY, A h:mm',
9167            LLLL: 'dddd, D MMMM YYYY, A h:mm'
9168        },
9169        calendar: {
9170            sameDay: '[ಇಂದು] LT',
9171            nextDay: '[ನಾಳೆ] LT',
9172            nextWeek: 'dddd, LT',
9173            lastDay: '[ನಿನ್ನೆ] LT',
9174            lastWeek: '[ಕೊನೆಯ] dddd, LT',
9175            sameElse: 'L'
9176        },
9177        relativeTime: {
9178            future: '%s ನಂತರ',
9179            past: '%s ಹಿಂದೆ',
9180            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
9181            m: 'ಒಂದು ನಿಮಿಷ',
9182            mm: '%d ನಿಮಿಷ',
9183            h: 'ಒಂದು ಗಂಟೆ',
9184            hh: '%d ಗಂಟೆ',
9185            d: 'ಒಂದು ದಿನ',
9186            dd: '%d ದಿನ',
9187            M: 'ಒಂದು ತಿಂಗಳು',
9188            MM: '%d ತಿಂಗಳು',
9189            y: 'ಒಂದು ವರ್ಷ',
9190            yy: '%d ವರ್ಷ'
9191        },
9192        preparse: function (string) {
9193            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
9194                return numberMap$6[match];
9195            });
9196        },
9197        postformat: function (string) {
9198            return string.replace(/\d/g, function (match) {
9199                return symbolMap$7[match];
9200            });
9201        },
9202        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
9203        meridiemHour: function (hour, meridiem) {
9204            if (hour === 12) {
9205                hour = 0;
9206            }
9207            if (meridiem === 'ರಾತ್ರಿ') {
9208                return hour < 4 ? hour : hour + 12;
9209            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
9210                return hour;
9211            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
9212                return hour >= 10 ? hour : hour + 12;
9213            } else if (meridiem === 'ಸಂಜೆ') {
9214                return hour + 12;
9215            }
9216        },
9217        meridiem: function (hour, minute, isLower) {
9218            if (hour < 4) {
9219                return 'ರಾತ್ರಿ';
9220            } else if (hour < 10) {
9221                return 'ಬೆಳಿಗ್ಗೆ';
9222            } else if (hour < 17) {
9223                return 'ಮಧ್ಯಾಹ್ನ';
9224            } else if (hour < 20) {
9225                return 'ಸಂಜೆ';
9226            } else {
9227                return 'ರಾತ್ರಿ';
9228            }
9229        },
9230        dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
9231        ordinal: function (number) {
9232            return number + 'ನೇ';
9233        },
9234        week: {
9235            dow: 0, // Sunday is the first day of the week.
9236            doy: 6  // The week that contains Jan 1st is the first week of the year.
9237        }
9238    });
9239
9240    //! moment.js locale configuration
9241    //! locale : Korean [ko]
9242    //! author : Kyungwook, Park : https://github.com/kyungw00k
9243    //! author : Jeeeyul Lee <[email protected]>
9244
9245    hooks.defineLocale('ko', {
9246        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
9247        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
9248        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
9249        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
9250        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
9251        longDateFormat: {
9252            LT: 'A h:mm',
9253            LTS: 'A h:mm:ss',
9254            L: 'YYYY.MM.DD',
9255            LL: 'YYYY년 MMMM D일',
9256            LLL: 'YYYY년 MMMM D일 A h:mm',
9257            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
9258            l: 'YYYY.MM.DD',
9259            ll: 'YYYY년 MMMM D일',
9260            lll: 'YYYY년 MMMM D일 A h:mm',
9261            llll: 'YYYY년 MMMM D일 dddd A h:mm'
9262        },
9263        calendar: {
9264            sameDay: '오늘 LT',
9265            nextDay: '내일 LT',
9266            nextWeek: 'dddd LT',
9267            lastDay: '어제 LT',
9268            lastWeek: '지난주 dddd LT',
9269            sameElse: 'L'
9270        },
9271        relativeTime: {
9272            future: '%s 후',
9273            past: '%s 전',
9274            s: '몇 초',
9275            ss: '%d초',
9276            m: '1분',
9277            mm: '%d분',
9278            h: '한 시간',
9279            hh: '%d시간',
9280            d: '하루',
9281            dd: '%d일',
9282            M: '한 달',
9283            MM: '%d달',
9284            y: '일 년',
9285            yy: '%d년'
9286        },
9287        dayOfMonthOrdinalParse: /\d{1,2}일/,
9288        ordinal: '%d일',
9289        meridiemParse: /오전|오후/,
9290        isPM: function (token) {
9291            return token === '오후';
9292        },
9293        meridiem: function (hour, minute, isUpper) {
9294            return hour < 12 ? '오전' : '오후';
9295        }
9296    });
9297
9298    //! moment.js locale configuration
9299    //! locale : Kyrgyz [ky]
9300    //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
9301
9302
9303    var suffixes$2 = {
9304        0: '-чү',
9305        1: '-чи',
9306        2: '-чи',
9307        3: '-чү',
9308        4: '-чү',
9309        5: '-чи',
9310        6: '-чы',
9311        7: '-чи',
9312        8: '-чи',
9313        9: '-чу',
9314        10: '-чу',
9315        20: '-чы',
9316        30: '-чу',
9317        40: '-чы',
9318        50: '-чү',
9319        60: '-чы',
9320        70: '-чи',
9321        80: '-чи',
9322        90: '-чу',
9323        100: '-чү'
9324    };
9325
9326    hooks.defineLocale('ky', {
9327        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
9328        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
9329        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),
9330        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
9331        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
9332        longDateFormat: {
9333            LT: 'HH:mm',
9334            LTS: 'HH:mm:ss',
9335            L: 'DD.MM.YYYY',
9336            LL: 'D MMMM YYYY',
9337            LLL: 'D MMMM YYYY HH:mm',
9338            LLLL: 'dddd, D MMMM YYYY HH:mm'
9339        },
9340        calendar: {
9341            sameDay: '[Бүгүн саат] LT',
9342            nextDay: '[Эртең саат] LT',
9343            nextWeek: 'dddd [саат] LT',
9344            lastDay: '[Кече саат] LT',
9345            lastWeek: '[Өткен аптанын] dddd [күнү] [саат] LT',
9346            sameElse: 'L'
9347        },
9348        relativeTime: {
9349            future: '%s ичинде',
9350            past: '%s мурун',
9351            s: 'бирнече секунд',
9352            m: 'бир мүнөт',
9353            mm: '%d мүнөт',
9354            h: 'бир саат',
9355            hh: '%d саат',
9356            d: 'бир күн',
9357            dd: '%d күн',
9358            M: 'бир ай',
9359            MM: '%d ай',
9360            y: 'бир жыл',
9361            yy: '%d жыл'
9362        },
9363        dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
9364        ordinal: function (number) {
9365            var a = number % 10,
9366                b = number >= 100 ? 100 : null;
9367            return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]);
9368        },
9369        week: {
9370            dow: 1, // Monday is the first day of the week.
9371            doy: 7  // The week that contains Jan 1st is the first week of the year.
9372        }
9373    });
9374
9375    //! moment.js locale configuration
9376    //! locale : Luxembourgish [lb]
9377    //! author : mweimerskirch : https://github.com/mweimerskirch
9378    //! author : David Raison : https://github.com/kwisatz
9379
9380    function processRelativeTime$5(number, withoutSuffix, key, isFuture) {
9381        var format = {
9382            'm': ['eng Minutt', 'enger Minutt'],
9383            'h': ['eng Stonn', 'enger Stonn'],
9384            'd': ['een Dag', 'engem Dag'],
9385            'M': ['ee Mount', 'engem Mount'],
9386            'y': ['ee Joer', 'engem Joer']
9387        };
9388        return withoutSuffix ? format[key][0] : format[key][1];
9389    }
9390    function processFutureTime(string) {
9391        var number = string.substr(0, string.indexOf(' '));
9392        if (eifelerRegelAppliesToNumber(number)) {
9393            return 'a ' + string;
9394        }
9395        return 'an ' + string;
9396    }
9397    function processPastTime(string) {
9398        var number = string.substr(0, string.indexOf(' '));
9399        if (eifelerRegelAppliesToNumber(number)) {
9400            return 'viru ' + string;
9401        }
9402        return 'virun ' + string;
9403    }
9404    /**
9405     * Returns true if the word before the given number loses the '-n' ending.
9406     * e.g. 'an 10 Deeg' but 'a 5 Deeg'
9407     *
9408     * @param number {integer}
9409     * @returns {boolean}
9410     */
9411    function eifelerRegelAppliesToNumber(number) {
9412        number = parseInt(number, 10);
9413        if (isNaN(number)) {
9414            return false;
9415        }
9416        if (number < 0) {
9417            // Negative Number --> always true
9418            return true;
9419        } else if (number < 10) {
9420            // Only 1 digit
9421            if (4 <= number && number <= 7) {
9422                return true;
9423            }
9424            return false;
9425        } else if (number < 100) {
9426            // 2 digits
9427            var lastDigit = number % 10, firstDigit = number / 10;
9428            if (lastDigit === 0) {
9429                return eifelerRegelAppliesToNumber(firstDigit);
9430            }
9431            return eifelerRegelAppliesToNumber(lastDigit);
9432        } else if (number < 10000) {
9433            // 3 or 4 digits --> recursively check first digit
9434            while (number >= 10) {
9435                number = number / 10;
9436            }
9437            return eifelerRegelAppliesToNumber(number);
9438        } else {
9439            // Anything larger than 4 digits: recursively check first n-3 digits
9440            number = number / 1000;
9441            return eifelerRegelAppliesToNumber(number);
9442        }
9443    }
9444
9445    hooks.defineLocale('lb', {
9446        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
9447        monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
9448        monthsParseExact: true,
9449        weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),
9450        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
9451        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
9452        weekdaysParseExact: true,
9453        longDateFormat: {
9454            LT: 'H:mm [Auer]',
9455            LTS: 'H:mm:ss [Auer]',
9456            L: 'DD.MM.YYYY',
9457            LL: 'D. MMMM YYYY',
9458            LLL: 'D. MMMM YYYY H:mm [Auer]',
9459            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'
9460        },
9461        calendar: {
9462            sameDay: '[Haut um] LT',
9463            sameElse: 'L',
9464            nextDay: '[Muer um] LT',
9465            nextWeek: 'dddd [um] LT',
9466            lastDay: '[Gëschter um] LT',
9467            lastWeek: function () {
9468                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
9469                switch (this.day()) {
9470                    case 2:
9471                    case 4:
9472                        return '[Leschten] dddd [um] LT';
9473                    default:
9474                        return '[Leschte] dddd [um] LT';
9475                }
9476            }
9477        },
9478        relativeTime: {
9479            future: processFutureTime,
9480            past: processPastTime,
9481            s: 'e puer Sekonnen',
9482            m: processRelativeTime$5,
9483            mm: '%d Minutten',
9484            h: processRelativeTime$5,
9485            hh: '%d Stonnen',
9486            d: processRelativeTime$5,
9487            dd: '%d Deeg',
9488            M: processRelativeTime$5,
9489            MM: '%d Méint',
9490            y: processRelativeTime$5,
9491            yy: '%d Joer'
9492        },
9493        dayOfMonthOrdinalParse: /\d{1,2}\./,
9494        ordinal: '%d.',
9495        week: {
9496            dow: 1, // Monday is the first day of the week.
9497            doy: 4  // The week that contains Jan 4th is the first week of the year.
9498        }
9499    });
9500
9501    //! moment.js locale configuration
9502    //! locale : Lao [lo]
9503    //! author : Ryan Hart : https://github.com/ryanhart2
9504
9505    hooks.defineLocale('lo', {
9506        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
9507        monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
9508        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
9509        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
9510        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
9511        weekdaysParseExact: true,
9512        longDateFormat: {
9513            LT: 'HH:mm',
9514            LTS: 'HH:mm:ss',
9515            L: 'DD/MM/YYYY',
9516            LL: 'D MMMM YYYY',
9517            LLL: 'D MMMM YYYY HH:mm',
9518            LLLL: 'ວັນdddd D MMMM YYYY HH:mm'
9519        },
9520        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
9521        isPM: function (input) {
9522            return input === 'ຕອນແລງ';
9523        },
9524        meridiem: function (hour, minute, isLower) {
9525            if (hour < 12) {
9526                return 'ຕອນເຊົ້າ';
9527            } else {
9528                return 'ຕອນແລງ';
9529            }
9530        },
9531        calendar: {
9532            sameDay: '[ມື້ນີ້ເວລາ] LT',
9533            nextDay: '[ມື້ອື່ນເວລາ] LT',
9534            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
9535            lastDay: '[ມື້ວານນີ້ເວລາ] LT',
9536            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
9537            sameElse: 'L'
9538        },
9539        relativeTime: {
9540            future: 'ອີກ %s',
9541            past: '%sຜ່ານມາ',
9542            s: 'ບໍ່ເທົ່າໃດວິນາທີ',
9543            m: '1 ນາທີ',
9544            mm: '%d ນາທີ',
9545            h: '1 ຊົ່ວໂມງ',
9546            hh: '%d ຊົ່ວໂມງ',
9547            d: '1 ມື້',
9548            dd: '%d ມື້',
9549            M: '1 ເດືອນ',
9550            MM: '%d ເດືອນ',
9551            y: '1 ປີ',
9552            yy: '%d ປີ'
9553        },
9554        dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
9555        ordinal: function (number) {
9556            return 'ທີ່' + number;
9557        }
9558    });
9559
9560    //! moment.js locale configuration
9561    //! locale : Lithuanian [lt]
9562    //! author : Mindaugas Mozūras : https://github.com/mmozuras
9563
9564    var units = {
9565        'm': 'minutė_minutės_minutę',
9566        'mm': 'minutės_minučių_minutes',
9567        'h': 'valanda_valandos_valandą',
9568        'hh': 'valandos_valandų_valandas',
9569        'd': 'diena_dienos_dieną',
9570        'dd': 'dienos_dienų_dienas',
9571        'M': 'mėnuo_mėnesio_mėnesį',
9572        'MM': 'mėnesiai_mėnesių_mėnesius',
9573        'y': 'metai_metų_metus',
9574        'yy': 'metai_metų_metus'
9575    };
9576    function translateSeconds(number, withoutSuffix, key, isFuture) {
9577        if (withoutSuffix) {
9578            return 'kelios sekundės';
9579        } else {
9580            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
9581        }
9582    }
9583    function translateSingular(number, withoutSuffix, key, isFuture) {
9584        return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
9585    }
9586    function special(number) {
9587        return number % 10 === 0 || (number > 10 && number < 20);
9588    }
9589    function forms(key) {
9590        return units[key].split('_');
9591    }
9592    function translate$6(number, withoutSuffix, key, isFuture) {
9593        var result = number + ' ';
9594        if (number === 1) {
9595            return result + translateSingular(number, withoutSuffix, key[0], isFuture);
9596        } else if (withoutSuffix) {
9597            return result + (special(number) ? forms(key)[1] : forms(key)[0]);
9598        } else {
9599            if (isFuture) {
9600                return result + forms(key)[1];
9601            } else {
9602                return result + (special(number) ? forms(key)[1] : forms(key)[2]);
9603            }
9604        }
9605    }
9606    hooks.defineLocale('lt', {
9607        months: {
9608            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
9609            standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
9610            isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
9611        },
9612        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
9613        weekdays: {
9614            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
9615            standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
9616            isFormat: /dddd HH:mm/
9617        },
9618        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
9619        weekdaysMin: 'S_P_A_T_K_Pn_Å '.split('_'),
9620        weekdaysParseExact: true,
9621        longDateFormat: {
9622            LT: 'HH:mm',
9623            LTS: 'HH:mm:ss',
9624            L: 'YYYY-MM-DD',
9625            LL: 'YYYY [m.] MMMM D [d.]',
9626            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
9627            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
9628            l: 'YYYY-MM-DD',
9629            ll: 'YYYY [m.] MMMM D [d.]',
9630            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
9631            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
9632        },
9633        calendar: {
9634            sameDay: '[Å iandien] LT',
9635            nextDay: '[Rytoj] LT',
9636            nextWeek: 'dddd LT',
9637            lastDay: '[Vakar] LT',
9638            lastWeek: '[Praėjusį] dddd LT',
9639            sameElse: 'L'
9640        },
9641        relativeTime: {
9642            future: 'po %s',
9643            past: 'prieš %s',
9644            s: translateSeconds,
9645            m: translateSingular,
9646            mm: translate$6,
9647            h: translateSingular,
9648            hh: translate$6,
9649            d: translateSingular,
9650            dd: translate$6,
9651            M: translateSingular,
9652            MM: translate$6,
9653            y: translateSingular,
9654            yy: translate$6
9655        },
9656        dayOfMonthOrdinalParse: /\d{1,2}-oji/,
9657        ordinal: function (number) {
9658            return number + '-oji';
9659        },
9660        week: {
9661            dow: 1, // Monday is the first day of the week.
9662            doy: 4  // The week that contains Jan 4th is the first week of the year.
9663        }
9664    });
9665
9666    //! moment.js locale configuration
9667    //! locale : Latvian [lv]
9668    //! author : Kristaps Karlsons : https://github.com/skakri
9669    //! author : Jānis Elmeris : https://github.com/JanisE
9670
9671    var units$1 = {
9672        'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
9673        'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
9674        'h': 'stundas_stundām_stunda_stundas'.split('_'),
9675        'hh': 'stundas_stundām_stunda_stundas'.split('_'),
9676        'd': 'dienas_dienām_diena_dienas'.split('_'),
9677        'dd': 'dienas_dienām_diena_dienas'.split('_'),
9678        'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
9679        'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
9680        'y': 'gada_gadiem_gads_gadi'.split('_'),
9681        'yy': 'gada_gadiem_gads_gadi'.split('_')
9682    };
9683    /**
9684     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
9685     */
9686    function format$1(forms, number, withoutSuffix) {
9687        if (withoutSuffix) {
9688            // E.g. "21 minūte", "3 minūtes".
9689            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
9690        } else {
9691            // E.g. "21 minūtes" as in "pēc 21 minūtes".
9692            // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
9693            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
9694        }
9695    }
9696    function relativeTimeWithPlural$1(number, withoutSuffix, key) {
9697        return number + ' ' + format$1(units$1[key], number, withoutSuffix);
9698    }
9699    function relativeTimeWithSingular(number, withoutSuffix, key) {
9700        return format$1(units$1[key], number, withoutSuffix);
9701    }
9702    function relativeSeconds(number, withoutSuffix) {
9703        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
9704    }
9705
9706    hooks.defineLocale('lv', {
9707        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
9708        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
9709        weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
9710        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
9711        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
9712        weekdaysParseExact: true,
9713        longDateFormat: {
9714            LT: 'HH:mm',
9715            LTS: 'HH:mm:ss',
9716            L: 'DD.MM.YYYY.',
9717            LL: 'YYYY. [gada] D. MMMM',
9718            LLL: 'YYYY. [gada] D. MMMM, HH:mm',
9719            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'
9720        },
9721        calendar: {
9722            sameDay: '[Å odien pulksten] LT',
9723            nextDay: '[Rīt pulksten] LT',
9724            nextWeek: 'dddd [pulksten] LT',
9725            lastDay: '[Vakar pulksten] LT',
9726            lastWeek: '[Pagājušā] dddd [pulksten] LT',
9727            sameElse: 'L'
9728        },
9729        relativeTime: {
9730            future: 'pēc %s',
9731            past: 'pirms %s',
9732            s: relativeSeconds,
9733            m: relativeTimeWithSingular,
9734            mm: relativeTimeWithPlural$1,
9735            h: relativeTimeWithSingular,
9736            hh: relativeTimeWithPlural$1,
9737            d: relativeTimeWithSingular,
9738            dd: relativeTimeWithPlural$1,
9739            M: relativeTimeWithSingular,
9740            MM: relativeTimeWithPlural$1,
9741            y: relativeTimeWithSingular,
9742            yy: relativeTimeWithPlural$1
9743        },
9744        dayOfMonthOrdinalParse: /\d{1,2}\./,
9745        ordinal: '%d.',
9746        week: {
9747            dow: 1, // Monday is the first day of the week.
9748            doy: 4  // The week that contains Jan 4th is the first week of the year.
9749        }
9750    });
9751
9752    //! moment.js locale configuration
9753    //! locale : Montenegrin [me]
9754    //! author : Miodrag Nikač <[email protected]> : https://github.com/miodragnikac
9755
9756    var translator = {
9757        words: { //Different grammatical cases
9758            m: ['jedan minut', 'jednog minuta'],
9759            mm: ['minut', 'minuta', 'minuta'],
9760            h: ['jedan sat', 'jednog sata'],
9761            hh: ['sat', 'sata', 'sati'],
9762            dd: ['dan', 'dana', 'dana'],
9763            MM: ['mjesec', 'mjeseca', 'mjeseci'],
9764            yy: ['godina', 'godine', 'godina']
9765        },
9766        correctGrammaticalCase: function (number, wordKey) {
9767            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
9768        },
9769        translate: function (number, withoutSuffix, key) {
9770            var wordKey = translator.words[key];
9771            if (key.length === 1) {
9772                return withoutSuffix ? wordKey[0] : wordKey[1];
9773            } else {
9774                return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
9775            }
9776        }
9777    };
9778
9779    hooks.defineLocale('me', {
9780        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
9781        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
9782        monthsParseExact: true,
9783        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
9784        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
9785        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
9786        weekdaysParseExact: true,
9787        longDateFormat: {
9788            LT: 'H:mm',
9789            LTS: 'H:mm:ss',
9790            L: 'DD.MM.YYYY',
9791            LL: 'D. MMMM YYYY',
9792            LLL: 'D. MMMM YYYY H:mm',
9793            LLLL: 'dddd, D. MMMM YYYY H:mm'
9794        },
9795        calendar: {
9796            sameDay: '[danas u] LT',
9797            nextDay: '[sjutra u] LT',
9798
9799            nextWeek: function () {
9800                switch (this.day()) {
9801                    case 0:
9802                        return '[u] [nedjelju] [u] LT';
9803                    case 3:
9804                        return '[u] [srijedu] [u] LT';
9805                    case 6:
9806                        return '[u] [subotu] [u] LT';
9807                    case 1:
9808                    case 2:
9809                    case 4:
9810                    case 5:
9811                        return '[u] dddd [u] LT';
9812                }
9813            },
9814            lastDay: '[juče u] LT',
9815            lastWeek: function () {
9816                var lastWeekDays = [
9817                    '[prošle] [nedjelje] [u] LT',
9818                    '[prošlog] [ponedjeljka] [u] LT',
9819                    '[prošlog] [utorka] [u] LT',
9820                    '[prošle] [srijede] [u] LT',
9821                    '[prošlog] [četvrtka] [u] LT',
9822                    '[prošlog] [petka] [u] LT',
9823                    '[prošle] [subote] [u] LT'
9824                ];
9825                return lastWeekDays[this.day()];
9826            },
9827            sameElse: 'L'
9828        },
9829        relativeTime: {
9830            future: 'za %s',
9831            past: 'prije %s',
9832            s: 'nekoliko sekundi',
9833            m: translator.translate,
9834            mm: translator.translate,
9835            h: translator.translate,
9836            hh: translator.translate,
9837            d: 'dan',
9838            dd: translator.translate,
9839            M: 'mjesec',
9840            MM: translator.translate,
9841            y: 'godinu',
9842            yy: translator.translate
9843        },
9844        dayOfMonthOrdinalParse: /\d{1,2}\./,
9845        ordinal: '%d.',
9846        week: {
9847            dow: 1, // Monday is the first day of the week.
9848            doy: 7  // The week that contains Jan 1st is the first week of the year.
9849        }
9850    });
9851
9852    //! moment.js locale configuration
9853    //! locale : Maori [mi]
9854    //! author : John Corrigan <[email protected]> : https://github.com/johnideal
9855
9856    hooks.defineLocale('mi', {
9857        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),
9858        monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),
9859        monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
9860        monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
9861        monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
9862        monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
9863        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
9864        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
9865        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
9866        longDateFormat: {
9867            LT: 'HH:mm',
9868            LTS: 'HH:mm:ss',
9869            L: 'DD/MM/YYYY',
9870            LL: 'D MMMM YYYY',
9871            LLL: 'D MMMM YYYY [i] HH:mm',
9872            LLLL: 'dddd, D MMMM YYYY [i] HH:mm'
9873        },
9874        calendar: {
9875            sameDay: '[i teie mahana, i] LT',
9876            nextDay: '[apopo i] LT',
9877            nextWeek: 'dddd [i] LT',
9878            lastDay: '[inanahi i] LT',
9879            lastWeek: 'dddd [whakamutunga i] LT',
9880            sameElse: 'L'
9881        },
9882        relativeTime: {
9883            future: 'i roto i %s',
9884            past: '%s i mua',
9885            s: 'te hēkona ruarua',
9886            m: 'he meneti',
9887            mm: '%d meneti',
9888            h: 'te haora',
9889            hh: '%d haora',
9890            d: 'he ra',
9891            dd: '%d ra',
9892            M: 'he marama',
9893            MM: '%d marama',
9894            y: 'he tau',
9895            yy: '%d tau'
9896        },
9897        dayOfMonthOrdinalParse: /\d{1,2}º/,
9898        ordinal: '%dº',
9899        week: {
9900            dow: 1, // Monday is the first day of the week.
9901            doy: 4  // The week that contains Jan 4th is the first week of the year.
9902        }
9903    });
9904
9905    //! moment.js locale configuration
9906    //! locale : Macedonian [mk]
9907    //! author : Borislav Mickov : https://github.com/B0k0
9908
9909    hooks.defineLocale('mk', {
9910        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
9911        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
9912        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
9913        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
9914        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
9915        longDateFormat: {
9916            LT: 'H:mm',
9917            LTS: 'H:mm:ss',
9918            L: 'D.MM.YYYY',
9919            LL: 'D MMMM YYYY',
9920            LLL: 'D MMMM YYYY H:mm',
9921            LLLL: 'dddd, D MMMM YYYY H:mm'
9922        },
9923        calendar: {
9924            sameDay: '[Денес во] LT',
9925            nextDay: '[Утре во] LT',
9926            nextWeek: '[Во] dddd [во] LT',
9927            lastDay: '[Вчера во] LT',
9928            lastWeek: function () {
9929                switch (this.day()) {
9930                    case 0:
9931                    case 3:
9932                    case 6:
9933                        return '[Изминатата] dddd [во] LT';
9934                    case 1:
9935                    case 2:
9936                    case 4:
9937                    case 5:
9938                        return '[Изминатиот] dddd [во] LT';
9939                }
9940            },
9941            sameElse: 'L'
9942        },
9943        relativeTime: {
9944            future: 'после %s',
9945            past: 'пред %s',
9946            s: 'неколку секунди',
9947            m: 'минута',
9948            mm: '%d минути',
9949            h: 'час',
9950            hh: '%d часа',
9951            d: 'ден',
9952            dd: '%d дена',
9953            M: 'месец',
9954            MM: '%d месеци',
9955            y: 'година',
9956            yy: '%d години'
9957        },
9958        dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
9959        ordinal: function (number) {
9960            var lastDigit = number % 10,
9961                last2Digits = number % 100;
9962            if (number === 0) {
9963                return number + '-ев';
9964            } else if (last2Digits === 0) {
9965                return number + '-ен';
9966            } else if (last2Digits > 10 && last2Digits < 20) {
9967                return number + '-ти';
9968            } else if (lastDigit === 1) {
9969                return number + '-ви';
9970            } else if (lastDigit === 2) {
9971                return number + '-ри';
9972            } else if (lastDigit === 7 || lastDigit === 8) {
9973                return number + '-ми';
9974            } else {
9975                return number + '-ти';
9976            }
9977        },
9978        week: {
9979            dow: 1, // Monday is the first day of the week.
9980            doy: 7  // The week that contains Jan 1st is the first week of the year.
9981        }
9982    });
9983
9984    //! moment.js locale configuration
9985    //! locale : Malayalam [ml]
9986    //! author : Floyd Pink : https://github.com/floydpink
9987
9988    hooks.defineLocale('ml', {
9989        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ചà
9989µ_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),
9990        monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),
9991        monthsParseExact: true,
9992        weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),
9993        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
9994        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
9995        longDateFormat: {
9996            LT: 'A h:mm -നു',
9997            LTS: 'A h:mm:ss -നു',
9998            L: 'DD/MM/YYYY',
9999            LL: 'D MMMM YYYY',
10000            LLL: 'D MMMM YYYY, A h:mm -നു',
10001            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു'
10002        },
10003        calendar: {
10004            sameDay: '[ഇന്ന്] LT',
10005            nextDay: '[നാളെ] LT',
10006            nextWeek: 'dddd, LT',
10007            lastDay: '[ഇന്നലെ] LT',
10008            lastWeek: '[കഴിഞ്ഞ] dddd, LT',
10009            sameElse: 'L'
10010        },
10011        relativeTime: {
10012            future: '%s കഴിഞ്ഞ്',
10013            past: '%s മുൻപ്',
10014            s: 'അൽപ നിമിഷങ്ങൾ',
10015            m: 'ഒരു മിനിറ്റ്',
10016            mm: '%d മിനിറ്റ്',
10017            h: 'ഒരു മണിക്കൂർ',
10018            hh: '%d മണിക്കൂർ',
10019            d: 'ഒരു ദിവസം',
10020            dd: '%d ദിവസം',
10021            M: 'ഒരു മാസം',
10022            MM: '%d മാസം',
10023            y: 'ഒരു വർഷം',
10024            yy: '%d വർഷം'
10025        },
10026        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
10027        meridiemHour: function (hour, meridiem) {
10028            if (hour === 12) {
10029                hour = 0;
10030            }
10031            if ((meridiem === 'രാത്രി' && hour >= 4) ||
10032                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
10033                meridiem === 'വൈകുന്നേരം') {
10034                return hour + 12;
10035            } else {
10036                return hour;
10037            }
10038        },
10039        meridiem: function (hour, minute, isLower) {
10040            if (hour < 4) {
10041                return 'രാത്രി';
10042            } else if (hour < 12) {
10043                return 'രാവിലെ';
10044            } else if (hour < 17) {
10045                return 'ഉച്ച കഴിഞ്ഞ്';
10046            } else if (hour < 20) {
10047                return 'വൈകുന്നേരം';
10048            } else {
10049                return 'രാത്രി';
10050            }
10051        }
10052    });
10053
10054    //! moment.js locale configuration
10055    //! locale : Marathi [mr]
10056    //! author : Harshad Kale : https://github.com/kalehv
10057    //! author : Vivek Athalye : https://github.com/vnathalye
10058
10059    var symbolMap$8 = {
10060        '1': '१',
10061        '2': '२',
10062        '3': '३',
10063        '4': '४',
10064        '5': '५',
10065        '6': '६',
10066        '7': '७',
10067        '8': '८',
10068        '9': '९',
10069        '0': '०'
10070    };
10071    var numberMap$7 = {
10072        '१': '1',
10073        '२': '2',
10074        '३': '3',
10075        '४': '4',
10076        '५': '5',
10077        '६': '6',
10078        '७': '7',
10079        '८': '8',
10080        '९': '9',
10081        '०': '0'
10082    };
10083
10084    function relativeTimeMr(number, withoutSuffix, string, isFuture) {
10085        var output = '';
10086        if (withoutSuffix) {
10087            switch (string) {
10088                case 's': output = 'काही सेकंद'; break;
10089                case 'm': output = 'एक मिनिट'; break;
10090                case 'mm': output = '%d मिनिटे'; break;
10091                case 'h': output = 'एक तास'; break;
10092                case 'hh': output = '%d तास'; break;
10093                case 'd': output = 'एक दिवस'; break;
10094                case 'dd': output = '%d दिवस'; break;
10095                case 'M': output = 'एक महिना'; break;
10096                case 'MM': output = '%d महिने'; break;
10097                case 'y': output = 'एक वर्ष'; break;
10098                case 'yy': output = '%d वर्षे'; break;
10099            }
10100        }
10101        else {
10102            switch (string) {
10103                case 's': output = 'काही सेकंदाà
vendor: 4,164 bytes, lines 10103-10191
10103¤‚'; break;
10104                case 'm': output = 'एका मिनिटा'; break;
10105                case 'mm': output = '%d मिनिटां'; break;
10106                case 'h': output = 'एका तासा'; break;
10107                case 'hh': output = '%d तासां'; break;
10108                case 'd': output = 'एका दिवसा'; break;
10109                case 'dd': output = '%d दिवसां'; break;
10110                case 'M': output = 'एका महिन्या'; break;
10111                case 'MM': output = '%d महिन्यां'; break;
10112                case 'y': output = 'एका वर्षा'; break;
10113                case 'yy': output = '%d वर्षां'; break;
10114            }
10115        }
10116        return output.replace(/%d/i, number);
10117    }
10118
10119    hooks.defineLocale('mr', {
10120        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),
10121        monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
10122        monthsParseExact: true,
10123        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
10124        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
10125        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
10126        longDateFormat: {
10127            LT: 'A h:mm वाजता',
10128            LTS: 'A h:mm:ss वाजता',
10129            L: 'DD/MM/YYYY',
10130            LL: 'D MMMM YYYY',
10131            LLL: 'D MMMM YYYY, A h:mm वाजता',
10132            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता'
10133        },
10134        calendar: {
10135            sameDay: '[आज] LT',
10136            nextDay: '[उद्या] LT',
10137            nextWeek: 'dddd, LT',
10138            lastDay: '[काल] LT',
10139            lastWeek: '[मागील] dddd, LT',
10140            sameElse: 'L'
10141        },
10142        relativeTime: {
10143            future: '%sमध्ये',
10144            past: '%sपूर्वी',
10145            s: relativeTimeMr,
10146            m: relativeTimeMr,
10147            mm: relativeTimeMr,
10148            h: relativeTimeMr,
10149            hh: relativeTimeMr,
10150            d: relativeTimeMr,
10151            dd: relativeTimeMr,
10152            M: relativeTimeMr,
10153            MM: relativeTimeMr,
10154            y: relativeTimeMr,
10155            yy: relativeTimeMr
10156        },
10157        preparse: function (string) {
10158            return string.replace(/[१२३४५६७८९०]/g, function (match) {
10159                return numberMap$7[match];
10160            });
10161        },
10162        postformat: function (string) {
10163            return string.replace(/\d/g, function (match) {
10164                return symbolMap$8[match];
10165            });
10166        },
10167        meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
10168        meridiemHour: function (hour, meridiem) {
10169            if (hour === 12) {
10170                hour = 0;
10171            }
10172            if (meridiem === 'रात्री') {
10173                return hour < 4 ? hour : hour + 12;
10174            } else if (meridiem === 'सकाळी') {
10175                return hour;
10176            } else if (meridiem === 'दुपारी') {
10177                return hour >= 10 ? hour : hour + 12;
10178            } else if (meridiem === 'सायंकाळी') {
10179                return hour + 12;
10180            }
10181        },
10182        meridiem: function (hour, minute, isLower) {
10183            if (hour < 4) {
10184                return 'रात्री';
10185            } else if (hour < 10) {
10186                return 'सकाळी';
10187            } else if (hour < 17) {
10188                return 'दुपारी';
10189            } else if (hour < 20) {
10190                return 'सायंकाळी';
10191            } else {
10192                return 'रात्री';
10193            }
10194        },
10195        week: {
10196            dow: 0, // Sunday is the first day of the week.
10197            doy: 6  // The week that contains Jan 1st is the first week of the year.
10198        }
10199    });
10200
10201    //! moment.js locale configuration
10202    //! locale : Malay [ms-my]
10203    //! note : DEPRECATED, the correct one is [ms]
10204    //! author : Weldan Jamili : https://github.com/weldan
10205
10206    hooks.defineLocale('ms-my', {
10207        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
10208        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
10209        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
10210        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
10211        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
10212        longDateFormat: {
10213            LT: 'HH.mm',
10214            LTS: 'HH.mm.ss',
10215            L: 'DD/MM/YYYY',
10216            LL: 'D MMMM YYYY',
10217            LLL: 'D MMMM YYYY [pukul] HH.mm',
10218            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
10219        },
10220        meridiemParse: /pagi|tengahari|petang|malam/,
10221        meridiemHour: function (hour, meridiem) {
10222            if (hour === 12) {
10223                hour = 0;
10224            }
10225            if (meridiem === 'pagi') {
10226                return hour;
10227            } else if (meridiem === 'tengahari') {
10228                return hour >= 11 ? hour : hour + 12;
10229            } else if (meridiem === 'petang' || meridiem === 'malam') {
10230                return hour + 12;
10231            }
10232        },
10233        meridiem: function (hours, minutes, isLower) {
10234            if (hours < 11) {
10235                return 'pagi';
10236            } else if (hours < 15) {
10237                return 'tengahari';
10238            } else if (hours < 19) {
10239                return 'petang';
10240            } else {
10241                return 'malam';
10242            }
10243        },
10244        calendar: {
10245            sameDay: '[Hari ini pukul] LT',
10246            nextDay: '[Esok pukul] LT',
10247            nextWeek: 'dddd [pukul] LT',
10248            lastDay: '[Kelmarin pukul] LT',
10249            lastWeek: 'dddd [lepas pukul] LT',
10250            sameElse: 'L'
10251        },
10252        relativeTime: {
10253            future: 'dalam %s',
10254            past: '%s yang lepas',
10255            s: 'beberapa saat',
10256            m: 'seminit',
10257            mm: '%d minit',
10258            h: 'sejam',
10259            hh: '%d jam',
10260            d: 'sehari',
10261            dd: '%d hari',
10262            M: 'sebulan',
10263            MM: '%d bulan',
10264            y: 'setahun',
10265            yy: '%d tahun'
10266        },
10267        week: {
10268            dow: 1, // Monday is the first day of the week.
10269            doy: 7  // The week that contains Jan 1st is the first week of the year.
10270        }
10271    });
10272
10273    //! moment.js locale configuration
10274    //! locale : Malay [ms]
10275    //! author : Weldan Jamili : https://github.com/weldan
10276
10277    hooks.defineLocale('ms', {
10278        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
10279        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
10280        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
10281        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
10282        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
10283        longDateFormat: {
10284            LT: 'HH.mm',
10285            LTS: 'HH.mm.ss',
10286            L: 'DD/MM/YYYY',
10287            LL: 'D MMMM YYYY',
10288            LLL: 'D MMMM YYYY [pukul] HH.mm',
10289            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
10290        },
10291        meridiemParse: /pagi|tengahari|petang|malam/,
10292        meridiemHour: function (hour, meridiem) {
10293            if (hour === 12) {
10294                hour = 0;
10295            }
10296            if (meridiem === 'pagi') {
10297                return hour;
10298            } else if (meridiem === 'tengahari') {
10299                return hour >= 11 ? hour : hour + 12;
10300            } else if (meridiem === 'petang' || meridiem === 'malam') {
10301                return hour + 12;
10302            }
10303        },
10304        meridiem: function (hours, minutes, isLower) {
10305            if (hours < 11) {
10306                return 'pagi';
10307            } else if (hours < 15) {
10308                return 'tengahari';
10309            } else if (hours < 19) {
10310                return 'petang';
10311            } else {
10312                return 'malam';
10313            }
10314        },
10315        calendar: {
10316            sameDay: '[Hari ini pukul] LT',
10317            nextDay: '[Esok pukul] LT',
10318            nextWeek: 'dddd [pukul] LT',
10319            lastDay: '[Kelmarin pukul] LT',
10320            lastWeek: 'dddd [lepas pukul] LT',
10321            sameElse: 'L'
10322        },
10323        relativeTime: {
10324            future: 'dalam %s',
10325            past: '%s yang lepas',
10326            s: 'beberapa saat',
10327            m: 'seminit',
10328            mm: '%d minit',
10329            h: 'sejam',
10330            hh: '%d jam',
10331            d: 'sehari',
10332            dd: '%d hari',
10333            M: 'sebulan',
10334            MM: '%d bulan',
10335            y: 'setahun',
10336            yy: '%d tahun'
10337        },
10338        week: {
10339            dow: 1, // Monday is the first day of the week.
10340            doy: 7  // The week that contains Jan 1st is the first week of the year.
10341        }
10342    });
10343
10344    //! moment.js locale configuration
10345    //! locale : Burmese [my]
10346    //! author : Squar team, mysquar.com
10347    //! author : David Rossellat : https://github.com/gholadr
10348    //! author : Tin Aung Lin : https://github.com/thanyawzinmin
10349
10350    var symbolMap$9 = {
10351        '1': '၁',
10352        '2': '၂',
10353        '3': '၃',
10354        '4': '၄',
10355        '5': '၅',
10356        '6': '၆',
10357        '7': '၇',
10358        '8': '၈',
10359        '9': '၉',
10360        '0': '၀'
10361    };
10362    var numberMap$8 = {
10363        '၁': '1',
10364        '၂': '2',
10365        '၃': '3',
10366        '၄': '4',
10367        '၅': '5',
10368        '၆': '6',
10369        '၇': '7',
10370        '၈': '8',
10371        '၉': '9',
10372        '၀': '0'
10373    };
10374
10375    hooks.defineLocale('my', {
10376        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
10377        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
10378        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
10379        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
10380        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
10381
10382        longDateFormat: {
10383            LT: 'HH:mm',
10384            LTS: 'HH:mm:ss',
10385            L: 'DD/MM/YYYY',
10386            LL: 'D MMMM YYYY',
10387            LLL: 'D MMMM YYYY HH:mm',
10388            LLLL: 'dddd D MMMM YYYY HH:mm'
10389        },
10390        calendar: {
10391            sameDay: '[ယနေ.] LT [မှာ]',
10392            nextDay: '[မနက်ဖြန်] LT [မှာ]',
10393            nextWeek: 'dddd LT [မှာ]',
10394            lastDay: '[မနေ.က] LT [မှာ]',
10395            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
10396            sameElse: 'L'
10397        },
10398        relativeTime: {
10399            future: 'လာမည့် %s မှာ',
10400            past: 'လွန်ခဲ့သော %s က',
10401            s: 'စက္ကန်.အနည်းငယ်',
10402            m: 'တစ်မိနစ်',
10403            mm: '%d မိနစ်',
10404            h: 'တစ်နာရီ',
10405            hh: '%d နာရီ',
10406            d: 'တစ်ရက်',
10407            dd: '%d ရက်',
10408            M: 'တစ်လ',
10409            MM: '%d လ',
10410            y: 'တစ်နှစ်',
10411            yy: '%d နှစ်'
10412        },
10413        preparse: function (string) {
10414            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
10415                return numberMap$8[match];
10416            });
10417        },
10418        postformat: function (string) {
10419            return string.replace(/\d/g, function (match) {
10420                return symbolMap$9[match];
10421            });
10422        },
10423        week: {
10424            dow: 1, // Monday is the first day of the week.
10425            doy: 4 // The week that contains Jan 1st is the first week of the year.
10426        }
10427    });
10428
10429    //! moment.js locale configuration
10430    //! locale : Norwegian Bokmål [nb]
10431    //! authors : Espen Hovlandsdal : https://github.com/rexxars
10432    //!           Sigurd Gartmann : https://github.com/sigurdga
10433
10434    hooks.defineLocale('nb', {
10435        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
10436        monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
10437        monthsParseExact: true,
10438        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
10439        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
10440        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
10441        weekdaysParseExact: true,
10442        longDateFormat: {
10443            LT: 'HH:mm',
10444            LTS: 'HH:mm:ss',
10445            L: 'DD.MM.YYYY',
10446            LL: 'D. MMMM YYYY',
10447            LLL: 'D. MMMM YYYY [kl.] HH:mm',
10448            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
10449        },
10450        calendar: {
10451            sameDay: '[i dag kl.] LT',
10452            nextDay: '[i morgen kl.] LT',
10453            nextWeek: 'dddd [kl.] LT',
10454            lastDay: '[i går kl.] LT',
10455            lastWeek: '[forrige] dddd [kl.] LT',
10456            sameElse: 'L'
10457        },
10458        relativeTime: {
10459            future: 'om %s',
10460            past: '%s siden',
10461            s: 'noen sekunder',
10462            m: 'ett minutt',
10463            mm: '%d minutter',
10464            h: 'en time',
10465            hh: '%d timer',
10466            d: 'en dag',
10467            dd: '%d dager',
10468            M: 'en måned',
10469            MM: '%d måneder',
10470            y: 'ett år',
10471            yy: '%d år'
10472        },
10473        dayOfMonthOrdinalParse: /\d{1,2}\./,
10474        ordinal: '%d.',
10475        week: {
10476            dow: 1, // Monday is the first day of the week.
10477            doy: 4  // The week that contains Jan 4th is the first week of the year.
10478        }
10479    });
10480
10481    //! moment.js locale configuration
10482    //! locale : Nepalese [ne]
10483    //! author : suvash : https://github.com/suvash
10484
10485    var symbolMap$10 = {
10486        '1': '१',
10487        '2': '२',
10488        '3': '३',
10489        '4': '४',
10490        '5': '५',
10491        '6': '६',
10492        '7': '७',
10493        '8': '८',
10494        '9': '९',
10495        '0': '०'
10496    };
10497    var numberMap$9 = {
10498        '१': '1',
10499        '२': '2',
10500        '३': '3',
10501        '४': '4',
10502        '५': '5',
10503        '६': '6',
10504        '७': '7',
10505        '८': '8',
10506        '९': '9',
10507        '०': '0'
10508    };
10509
10510    hooks.defineLocale('ne', {
10511        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
10512        monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
10513        monthsParseExact: true,
10514        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
10515        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
10516        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
10517        weekdaysParseExact: true,
10518        longDateFormat: {
10519            LT: 'Aको h:mm बजे',
10520            LTS: 'Aको h:mm:ss बजे',
10521            L: 'DD/MM/YYYY',
10522            LL: 'D MMMM YYYY',
10523            LLL: 'D MMMM YYYY, Aको h:mm बजे',
10524            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे'
10525        },
10526        preparse: function (string) {
10527            return string.replace(/[१२३४५६७८९०]/g, function (match) {
10528                return numberMap$9[match];
10529            });
10530        },
10531        postformat: function (string) {
10532            return string.replace(/\d/g, function (match) {
10533                return symbolMap$10[match];
10534            });
10535        },
10536        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
10537        meridiemHour: function (hour, meridiem) {
10538            if (hour === 12) {
10539                hour = 0;
10540            }
10541            if (meridiem === 'राति') {
10542                return hour < 4 ? hour : hour + 12;
10543            } else if (meridiem === 'बिहान') {
10544                return hour;
10545            } else if (meridiem === 'दिउँसो') {
10546                return hour >= 10 ? hour : hour + 12;
10547            } else if (meridiem === 'साँझ') {
10548                return hour + 12;
10549            }
10550        },
10551        meridiem: function (hour, minute, isLower) {
10552            if (hour < 3) {
10553                return 'राति';
10554            } else if (hour < 12) {
10555                return 'बिहान';
10556            } else if (hour < 16) {
10557                return 'दिउँसो';
10558            } else if (hour < 20) {
10559                return 'साँझ';
10560            } else {
10561                return 'राति';
10562            }
10563        },
10564        calendar: {
10565            sameDay: '[आज] LT',
10566            nextDay: '[भोलि] LT',
10567            nextWeek: '[आउँदो] dddd[,] LT',
10568            lastDay: '[हिजो] LT',
10569            lastWeek: '[गएको] dddd[,] LT',
10570            sameElse: 'L'
10571        },
10572        relativeTime: {
10573            future: '%sमा',
10574            past: '%s अगाडि',
10575            s: 'केही क्षण',
10576            m: 'एक मिनेट',
10577            mm: '%d मिनेट',
10578            h: 'एक घण्टा',
10579            hh: '%d घण्टा',
10580            d: 'एक दिन',
10581            dd: '%d दिन',
10582            M: 'एक महिना',
10583            MM: '%d महिना',
10584            y: 'एक बर्ष',
10585            yy: '%d बर्ष'
10586        },
10587        week: {
10588            dow: 0, // Sunday is the first day of the week.
10589            doy: 6  // The week that contains Jan 1st is the first week of the year.
10590        }
10591    });
10592
10593    //! moment.js locale configuration
10594    //! locale : Dutch (Belgium) [nl-be]
10595    //! author : Joris Röling : https://github.com/jorisroling
10596    //! author : Jacob Middag : https://github.com/middagj
10597
10598    var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
10599    var monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
10600
10601    var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
10602    var monthsRegex$1 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
10603
10604    hooks.defineLocale('nl-be', {
10605        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
10606        monthsShort: function (m, format) {
10607            if (!m) {
10608                return monthsShortWithDots$1;
10609            } else if (/-MMM-/.test(format)) {
10610                return monthsShortWithoutDots$1[m.month()];
10611            } else {
10612                return monthsShortWithDots$1[m.month()];
10613            }
10614        },
10615
10616        monthsRegex: monthsRegex$1,
10617        monthsShortRegex: monthsRegex$1,
10618        monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
10619        monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
10620
10621        monthsParse: monthsParse,
10622        longMonthsParse: monthsParse,
10623        shortMonthsParse: monthsParse,
10624
10625        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
10626        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
10627        weekdaysMin: 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),
10628        weekdaysParseExact: true,
10629        longDateFormat: {
10630            LT: 'HH:mm',
10631            LTS: 'HH:mm:ss',
10632            L: 'DD/MM/YYYY',
10633            LL: 'D MMMM YYYY',
10634            LLL: 'D MMMM YYYY HH:mm',
10635            LLLL: 'dddd D MMMM YYYY HH:mm'
10636        },
10637        calendar: {
10638            sameDay: '[vandaag om] LT',
10639            nextDay: '[morgen om] LT',
10640            nextWeek: 'dddd [om] LT',
10641            lastDay: '[gisteren om] LT',
10642            lastWeek: '[afgelopen] dddd [om] LT',
10643            sameElse: 'L'
10644        },
10645        relativeTime: {
10646            future: 'over %s',
10647            past: '%s geleden',
10648            s: 'een paar seconden',
10649            m: 'één minuut',
10650            mm: '%d minuten',
10651            h: 'één uur',
10652            hh: '%d uur',
10653            d: 'één dag',
10654            dd: '%d dagen',
10655            M: 'één maand',
10656            MM: '%d maanden',
10657            y: 'één jaar',
10658            yy: '%d jaar'
10659        },
10660        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
10661        ordinal: function (number) {
10662            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
10663        },
10664        week: {
10665            dow: 1, // Monday is the first day of the week.
10666            doy: 4  // The week that contains Jan 4th is the first week of the year.
10667        }
10668    });
10669
10670    //! moment.js locale configuration
10671    //! locale : Dutch [nl]
10672    //! author : Joris Röling : https://github.com/jorisroling
10673    //! author : Jacob Middag : https://github.com/middagj
10674
10675    var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
10676    var monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
10677
10678    var monthsParse$1 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
10679    var monthsRegex$2 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
10680
10681    hooks.defineLocale('nl', {
10682        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
10683        monthsShort: function (m, format) {
10684            if (!m) {
10685                return monthsShortWithDots$2;
10686            } else if (/-MMM-/.test(format)) {
10687                return monthsShortWithoutDots$2[m.month()];
10688            } else {
10689                return monthsShortWithDots$2[m.month()];
10690            }
10691        },
10692
10693        monthsRegex: monthsRegex$2,
10694        monthsShortRegex: monthsRegex$2,
10695        monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
10696        monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
10697
10698        monthsParse: monthsParse$1,
10699        longMonthsParse: monthsParse$1,
10700        shortMonthsParse: monthsParse$1,
10701
10702        weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
10703        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
10704        weekdaysMin: 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),
10705        weekdaysParseExact: true,
10706        longDateFormat: {
10707            LT: 'HH:mm',
10708            LTS: 'HH:mm:ss',
10709            L: 'DD-MM-YYYY',
10710            LL: 'D MMMM YYYY',
10711            LLL: 'D MMMM YYYY HH:mm',
10712            LLLL: 'dddd D MMMM YYYY HH:mm'
10713        },
10714        calendar: {
10715            sameDay: '[vandaag om] LT',
10716            nextDay: '[morgen om] LT',
10717            nextWeek: 'dddd [om] LT',
10718            lastDay: '[gisteren om] LT',
10719            lastWeek: '[afgelopen] dddd [om] LT',
10720            sameElse: 'L'
10721        },
10722        relativeTime: {
10723            future: 'over %s',
10724            past: '%s geleden',
10725            s: 'een paar seconden',
10726            m: 'één minuut',
10727            mm: '%d minuten',
10728            h: 'één uur',
10729            hh: '%d uur',
10730            d: 'één dag',
10731            dd: '%d dagen',
10732            M: 'één maand',
10733            MM: '%d maanden',
10734            y: 'één jaar',
10735            yy: '%d jaar'
10736        },
10737        dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
10738        ordinal: function (number) {
10739            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
10740        },
10741        week: {
10742            dow: 1, // Monday is the first day of the week.
10743            doy: 4  // The week that contains Jan 4th is the first week of the year.
10744        }
10745    });
10746
10747    //! moment.js locale configuration
10748    //! locale : Nynorsk [nn]
10749    //! author : https://github.com/mechuwind
10750
10751    hooks.defineLocale('nn', {
10752        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
10753        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
10754        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
10755        weekdaysShort: 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
10756        weekdaysMin: 'su_må_ty_on_to_fr_lø'.split('_'),
10757        longDateFormat: {
10758            LT: 'HH:mm',
10759            LTS: 'HH:mm:ss',
10760            L: 'DD.MM.YYYY',
10761            LL: 'D. MMMM YYYY',
10762            LLL: 'D. MMMM YYYY [kl.] H:mm',
10763            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
10764        },
10765        calendar: {
10766            sameDay: '[I dag klokka] LT',
10767            nextDay: '[I morgon klokka] LT',
10768            nextWeek: 'dddd [klokka] LT',
10769            lastDay: '[I går klokka] LT',
10770            lastWeek: '[Føregåande] dddd [klokka] LT',
10771            sameElse: 'L'
10772        },
10773        relativeTime: {
10774            future: 'om %s',
10775            past: '%s sidan',
10776            s: 'nokre sekund',
10777            m: 'eit minutt',
10778            mm: '%d minutt',
10779            h: 'ein time',
10780            hh: '%d timar',
10781            d: 'ein dag',
10782            dd: '%d dagar',
10783            M: 'ein månad',
10784            MM: '%d månader',
10785            y: 'eit år',
10786            yy: '%d år'
10787        },
10788        dayOfMonthOrdinalParse: /\d{1,2}\./,
10789        ordinal: '%d.',
10790        week: {
10791            dow: 1, // Monday is the first day of the week.
10792            doy: 4  // The week that contains Jan 4th is the first week of the year.
10793        }
10794    });
10795
10796    //! moment.js locale configuration
10797    //! locale : Punjabi (India) [pa-in]
10798    //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
10799
10800    var symbolMap$11 = {
10801        '1': 'à©§',
10802        '2': '੨',
10803        '3': 'à©©',
10804        '4': '੪',
10805        '5': 'à©«',
10806        '6': '੬',
10807        '7': 'à©­',
10808        '8': 'à©®',
10809        '9': '੯',
10810        '0': '੦'
10811    };
10812    var numberMap$10 = {
10813        'à©§': '1',
10814        '੨': '2',
10815        'à©©': '3',
10816        '੪': '4',
10817        'à©«': '5',
10818        '੬': '6',
10819        'à©­': '7',
10820        'à©®': '8',
10821        '੯': '9',
10822        '੦': '0'
10823    };
10824
10825    hooks.defineLocale('pa-in', {
10826        // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
10827        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
10828        monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
10829        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
10830        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
10831        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
10832        longDateFormat: {
10833            LT: 'A h:mm ਵਜੇ',
10834            LTS: 'A h:mm:ss ਵਜੇ',
10835            L: 'DD/MM/YYYY',
10836            LL: 'D MMMM YYYY',
10837            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
10838            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
10839        },
10840        calendar: {
10841            sameDay: '[ਅਜ] LT',
10842            nextDay: '[ਕਲ] LT',
10843            nextWeek: 'dddd, LT',
10844            lastDay: '[ਕਲ] LT',
10845            lastWeek: '[ਪਿਛਲੇ] dddd, LT',
10846            sameElse: 'L'
10847        },
10848        relativeTime: {
10849            future: '%s ਵਿੱਚ',
10850            past: '%s ਪਿਛਲੇ',
10851            s: 'ਕੁਝ ਸਕਿੰਟ',
10852            m: 'ਇਕ ਮਿੰਟ',
10853            mm: '%d ਮਿੰਟ',
10854            h: 'ਇੱਕ ਘੰਟਾ',
10855            hh: '%d ਘੰਟੇ',
10856            d: 'ਇੱਕ ਦਿਨ',
10857            dd: '%d ਦਿਨ',
10858            M: 'ਇੱਕ ਮਹੀਨਾ',
10859            MM: '%d ਮਹੀਨੇ',
10860            y: 'ਇੱਕ ਸਾਲ',
10861            yy: '%d ਸਾਲ'
10862        },
10863        preparse: function (string) {
10864            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
10865                return numberMap$10[match];
10866            });
10867        },
10868        postformat: function (string) {
10869            return string.replace(/\d/g, function (match) {
10870                return symbolMap$11[match];
10871            });
10872        },
10873        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
10874        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
10875        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
10876        meridiemHour: function (hour, meridiem) {
10877            if (hour === 12) {
10878                hour = 0;
10879            }
10880            if (meridiem === 'ਰਾਤ') {
10881                return hour < 4 ? hour : hour + 12;
10882            } else if (meridiem === 'ਸਵੇਰ') {
10883                return hour;
10884            } else if (meridiem === 'ਦੁਪਹਿਰ') {
10885                return hour >= 10 ? hour : hour + 12;
10886            } else if (meridiem === 'ਸ਼ਾਮ') {
10887                return hour + 12;
10888            }
10889        },
10890        meridiem: function (hour, minute, isLower) {
10891            if (hour < 4) {
10892                return 'ਰਾਤ';
10893            } else if (hour < 10) {
10894                return 'ਸਵੇਰ';
10895            } else if (hour < 17) {
10896                return 'ਦੁਪਹਿਰ';
10897            } else if (hour < 20) {
10898                return 'ਸ਼ਾਮ';
10899            } else {
10900                return 'ਰਾਤ';
10901            }
10902        },
10903        week: {
10904            dow: 0, // Sunday is the first day of the week.
10905            doy: 6  // The week that contains Jan 1st is the first week of the year.
10906        }
10907    });
10908
10909    //! moment.js locale configuration
10910    //! locale : Polish [pl]
10911    //! author : Rafal Hirsz : https://github.com/evoL
10912
10913    var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
10914    var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
10915    function plural$3(n) {
10916        return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
10917    }
10918    function translate$7(number, withoutSuffix, key) {
10919        var result = number + ' ';
10920        switch (key) {
10921            case 'm':
10922                return withoutSuffix ? 'minuta' : 'minutę';
10923            case 'mm':
10924                return result + (plural$3(number) ? 'minuty' : 'minut');
10925            case 'h':
10926                return withoutSuffix ? 'godzina' : 'godzinę';
10927            case 'hh':
10928                return result + (plural$3(number) ? 'godziny' : 'godzin');
10929            case 'MM':
10930                return result + (plural$3(number) ? 'miesiące' : 'miesięcy');
10931            case 'yy':
10932                return result + (plural$3(number) ? 'lata' : 'lat');
10933        }
10934    }
10935
10936    hooks.defineLocale('pl', {
10937        months: function (momentToFormat, format) {
10938            if (!momentToFormat) {
10939                return monthsNominative;
10940            } else if (format === '') {
10941                // Hack: if format empty we know this is used to generate
10942                // RegExp by moment. Give then back both valid forms of months
10943                // in RegExp ready format.
10944                return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
10945            } else if (/D MMMM/.test(format)) {
10946                return monthsSubjective[momentToFormat.month()];
10947            } else {
10948                return monthsNominative[momentToFormat.month()];
10949            }
10950        },
10951        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
10952        weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
10953        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
10954        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
10955        longDateFormat: {
10956            LT: 'HH:mm',
10957            LTS: 'HH:mm:ss',
10958            L: 'DD.MM.YYYY',
10959            LL: 'D MMMM YYYY',
10960            LLL: 'D MMMM YYYY HH:mm',
10961            LLLL: 'dddd, D MMMM YYYY HH:mm'
10962        },
10963        calendar: {
10964            sameDay: '[Dziś o] LT',
10965            nextDay: '[Jutro o] LT',
10966            nextWeek: '[W] dddd [o] LT',
10967            lastDay: '[Wczoraj o] LT',
10968            lastWeek: function () {
10969                switch (this.day()) {
10970                    case 0:
10971                        return '[W zeszłą niedzielę o] LT';
10972                    case 3:
10973                        return '[W zeszłą środę o] LT';
10974                    case 6:
10975                        return '[W zeszłą sobotę o] LT';
10976                    default:
10977                        return '[W zeszły] dddd [o] LT';
10978                }
10979            },
10980            sameElse: 'L'
10981        },
10982        relativeTime: {
10983            future: 'za %s',
10984            past: '%s temu',
10985            s: 'kilka sekund',
10986            m: translate$7,
10987            mm: translate$7,
10988            h: translate$7,
10989            hh: translate$7,
10990            d: '1 dzień',
10991            dd: '%d dni',
10992            M: 'miesiąc',
10993            MM: translate$7,
10994            y: 'rok',
10995            yy: translate$7
10996        },
10997        dayOfMonthOrdinalParse: /\d{1,2}\./,
10998        ordinal: '%d.',
10999        week: {
11000            dow: 1, // Monday is the first day of the week.
11001            doy: 4  // The week that contains Jan 4th is the first week of the year.
11002        }
11003    });
11004
11005    //! moment.js locale configuration
11006    //! locale : Portuguese (Brazil) [pt-br]
11007    //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
11008
11009    hooks.defineLocale('pt-br', {
11010        months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
11011        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
11012        weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
11013        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
11014        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
11015        weekdaysParseExact: true,
11016        longDateFormat: {
11017            LT: 'HH:mm',
11018            LTS: 'HH:mm:ss',
11019            L: 'DD/MM/YYYY',
11020            LL: 'D [de] MMMM [de] YYYY',
11021            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
11022            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
11023        },
11024        calendar: {
11025            sameDay: '[Hoje às] LT',
11026            nextDay: '[Amanhã às] LT',
11027            nextWeek: 'dddd [às] LT',
11028            lastDay: '[Ontem às] LT',
11029            lastWeek: function () {
11030                return (this.day() === 0 || this.day() === 6) ?
11031                    '[Último] dddd [às] LT' : // Saturday + Sunday
11032                    '[Última] dddd [às] LT'; // Monday - Friday
11033            },
11034            sameElse: 'L'
11035        },
11036        relativeTime: {
11037            future: 'em %s',
11038            past: '%s atrás',
11039            s: 'poucos segundos',
11040            m: 'um minuto',
11041            mm: '%d minutos',
11042            h: 'uma hora',
11043            hh: '%d horas',
11044            d: 'um dia',
11045            dd: '%d dias',
11046            M: 'um mês',
11047            MM: '%d meses',
11048            y: 'um ano',
11049            yy: '%d anos'
11050        },
11051        dayOfMonthOrdinalParse: /\d{1,2}º/,
11052        ordinal: '%dº'
11053    });
11054
11055    //! moment.js locale configuration
11056    //! locale : Portuguese [pt]
11057    //! author : Jefferson : https://github.com/jalex79
11058
11059    hooks.defineLocale('pt', {
11060        months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
11061        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
11062        weekdays: 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
11063        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
11064        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
11065        weekdaysParseExact: true,
11066        longDateFormat: {
11067            LT: 'HH:mm',
11068            LTS: 'HH:mm:ss',
11069            L: 'DD/MM/YYYY',
11070            LL: 'D [de] MMMM [de] YYYY',
11071            LLL: 'D [de] MMMM [de] YYYY HH:mm',
11072            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm'
11073        },
11074        calendar: {
11075            sameDay: '[Hoje às] LT',
11076            nextDay: '[Amanhã às] LT',
11077            nextWeek: 'dddd [às] LT',
11078            lastDay: '[Ontem às] LT',
11079            lastWeek: function () {
11080                return (this.day() === 0 || this.day() === 6) ?
11081                    '[Último] dddd [às] LT' : // Saturday + Sunday
11082                    '[Última] dddd [às] LT'; // Monday - Friday
11083            },
11084            sameElse: 'L'
11085        },
11086        relativeTime: {
11087            future: 'em %s',
11088            past: 'há %s',
11089            s: 'segundos',
11090            m: 'um minuto',
11091            mm: '%d minutos',
11092            h: 'uma hora',
11093            hh: '%d horas',
11094            d: 'um dia',
11095            dd: '%d dias',
11096            M: 'um mês',
11097            MM: '%d meses',
11098            y: 'um ano',
11099            yy: '%d anos'
11100        },
11101        dayOfMonthOrdinalParse: /\d{1,2}º/,
11102        ordinal: '%dº',
11103        week: {
11104            dow: 1, // Monday is the first day of the week.
11105            doy: 4  // The week that contains Jan 4th is the first week of the year.
11106        }
11107    });
11108
11109    //! moment.js locale configuration
11110    //! locale : Romanian [ro]
11111    //! author : Vlad Gurdiga : https://github.com/gurdiga
11112    //! author : Valentin Agachi : https://github.com/avaly
11113
11114    function relativeTimeWithPlural$2(number, withoutSuffix, key) {
11115        var format = {
11116            'mm': 'minute',
11117            'hh': 'ore',
11118            'dd': 'zile',
11119            'MM': 'luni',
11120            'yy': 'ani'
11121        },
11122            separator = ' ';
11123        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
11124            separator = ' de ';
11125        }
11126        return number + separator + format[key];
11127    }
11128
11129    hooks.defineLocale('ro', {
11130        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
11131        monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
11132        monthsParseExact: true,
11133        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
11134        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
11135        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
11136        longDateFormat: {
11137            LT: 'H:mm',
11138            LTS: 'H:mm:ss',
11139            L: 'DD.MM.YYYY',
11140            LL: 'D MMMM YYYY',
11141            LLL: 'D MMMM YYYY H:mm',
11142            LLLL: 'dddd, D MMMM YYYY H:mm'
11143        },
11144        calendar: {
11145            sameDay: '[azi la] LT',
11146            nextDay: '[mâine la] LT',
11147            nextWeek: 'dddd [la] LT',
11148            lastDay: '[ieri la] LT',
11149            lastWeek: '[fosta] dddd [la] LT',
11150            sameElse: 'L'
11151        },
11152        relativeTime: {
11153            future: 'peste %s',
11154            past: '%s în urmă',
11155            s: 'câteva secunde',
11156            m: 'un minut',
11157            mm: relativeTimeWithPlural$2,
11158            h: 'o oră',
11159            hh: relativeTimeWithPlural$2,
11160            d: 'o zi',
11161            dd: relativeTimeWithPlural$2,
11162            M: 'o lună',
11163            MM: relativeTimeWithPlural$2,
11164            y: 'un an',
11165            yy: relativeTimeWithPlural$2
11166        },
11167        week: {
11168            dow: 1, // Monday is the first day of the week.
11169            doy: 7  // The week that contains Jan 1st is the first week of the year.
11170        }
11171    });
11172
11173    //! moment.js locale configuration
11174    //! locale : Russian [ru]
11175    //! author : Viktorminator : https://github.com/Viktorminator
11176    //! Author : Menelion Elensúle : https://github.com/Oire
11177    //! author : Коренберг Марк : https://github.com/socketpair
11178
11179    function plural$4(word, num) {
11180        var forms = word.split('_');
11181        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
11182    }
11183    function relativeTimeWithPlural$3(number, withoutSuffix, key) {
11184        var format = {
11185            'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
11186            'hh': 'час_часа_часов',
11187            'dd': 'день_дня_дней',
11188            'MM': 'месяц_месяца_месяцев',
11189            'yy': 'год_года_лет'
11190        };
11191        if (key === 'm') {
11192            return withoutSuffix ? 'минута' : 'минуту';
11193        }
11194        else {
11195            return number + ' ' + plural$4(format[key], +number);
11196        }
11197    }
11198    var monthsParse$2 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
11199
11200    // http://new.gramota.ru/spravka/rules/139-prop : § 103
11201    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
11202    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
11203    hooks.defineLocale('ru', {
11204        months: {
11205            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
11206            standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
11207        },
11208        monthsShort: {
11209            // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
11210            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
11211            standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
11212        },
11213        weekdays: {
11214            standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
11215            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
11216            isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
11217        },
11218        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
11219        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
11220        monthsParse: monthsParse$2,
11221        longMonthsParse: monthsParse$2,
11222        shortMonthsParse: monthsParse$2,
11223
11224        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
11225        monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
11226
11227        // копия предыдущего
11228        monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
11229
11230        // полные названия с падежами
11231        monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
11232
11233        // Выражение, которое соотвествует только сокращённым формам
11234        monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
11235        longDateFormat: {
11236            LT: 'HH:mm',
11237            LTS: 'HH:mm:ss',
11238            L: 'DD.MM.YYYY',
11239            LL: 'D MMMM YYYY г.',
11240            LLL: 'D MMMM YYYY г., HH:mm',
11241            LLLL: 'dddd, D MMMM YYYY г., HH:mm'
11242        },
11243        calendar: {
11244            sameDay: '[Сегодня в] LT',
11245            nextDay: '[Завтра в] LT',
11246            lastDay: '[Вчера в] LT',
11247            nextWeek: function (now) {
11248                if (now.week() !== this.week()) {
11249                    switch (this.day()) {
11250                        case 0:
11251                            return '[В следующее] dddd [в] LT';
11252                        case 1:
11253                        case 2:
11254                        case 4:
11255                            return '[В следующий] dddd [в] LT';
11256                        case 3:
11257                        case 5:
11258                        case 6:
11259                            return '[В следующую] dddd [в] LT';
11260                    }
11261                } else {
11262                    if (this.day() === 2) {
11263                        return '[Во] dddd [в] LT';
11264                    } else {
11265                        return '[В] dddd [в] LT';
11266                    }
11267                }
11268            },
11269            lastWeek: function (now) {
11270                if (now.week() !== this.week()) {
11271                    switch (this.day()) {
11272                        case 0:
11273                            return '[В прошлое] dddd [в] LT';
11274                        case 1:
11275                        case 2:
11276                        case 4:
11277                            return '[В прошлый] dddd [в] LT';
11278                        case 3:
11279                        case 5:
11280                        case 6:
11281                            return '[В прошлую] dddd [в] LT';
11282                    }
11283                } else {
11284                    if (this.day() === 2) {
11285                        return '[Во] dddd [в] LT';
11286                    } else {
11287                        return '[В] dddd [в] LT';
11288                    }
11289                }
11290            },
11291            sameElse: 'L'
11292        },
11293        relativeTime: {
11294            future: 'через %s',
11295            past: '%s назад',
11296            s: 'несколько секунд',
11297            m: relativeTimeWithPlural$3,
11298            mm: relativeTimeWithPlural$3,
11299            h: 'час',
11300            hh: relativeTimeWithPlural$3,
11301            d: 'день',
11302            dd: relativeTimeWithPlural$3,
11303            M: 'месяц',
11304            MM: relativeTimeWithPlural$3,
11305            y: 'год',
11306            yy: relativeTimeWithPlural$3
11307        },
11308        meridiemParse: /ночи|утра|дня|вечера/i,
11309        isPM: function (input) {
11310            return /^(дня|вечера)$/.test(input);
11311        },
11312        meridiem: function (hour, minute, isLower) {
11313            if (hour < 4) {
11314                return 'ночи';
11315            } else if (hour < 12) {
11316                return 'утра';
11317            } else if (hour < 17) {
11318                return 'дня';
11319            } else {
11320                return 'вечера';
11321            }
11322        },
11323        dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
11324        ordinal: function (number, period) {
11325            switch (period) {
11326                case 'M':
11327                case 'd':
11328                case 'DDD':
11329                    return number + '-й';
11330                case 'D':
11331                    return number + '-го';
11332                case 'w':
11333                case 'W':
11334                    return number + '-я';
11335                default:
11336                    return number;
11337            }
11338        },
11339        week: {
11340            dow: 1, // Monday is the first day of the week.
11341            doy: 7  // The week that contains Jan 1st is the first week of the year.
11342        }
11343    });
11344
11345    //! moment.js locale configuration
11346    //! locale : Sindhi [sd]
11347    //! author : Narain Sagar : https://github.com/narainsagar
11348
11349    var months$6 = [
11350        'جنوري',
11351        'فيبروري',
11352        'مارچ',
11353        'اپريل',
11354        'مئي',
11355        'جون',
11356        'جولاءِ',
11357        'آگسٽ',
11358        'سيپٽمبر',
11359        'آڪٽوبر',
11360        'نومبر',
11361        'ڊسمبر'
11362    ];
11363    var days$1 = [
11364        'آچر',
11365        'سومر',
11366        'اڱارو',
11367        'اربع',
11368        'خميس',
11369        'جمع',
11370        'ڇنڇر'
11371    ];
11372
11373    hooks.defineLocale('sd', {
11374        months: months$6,
11375        monthsShort: months$6,
11376        weekdays: days$1,
11377        weekdaysShort: days$1,
11378        weekdaysMin: days$1,
11379        longDateFormat: {
11380            LT: 'HH:mm',
11381            LTS: 'HH:mm:ss',
11382            L: 'DD/MM/YYYY',
11383            LL: 'D MMMM YYYY',
11384            LLL: 'D MMMM YYYY HH:mm',
11385            LLLL: 'dddd، D MMMM YYYY HH:mm'
11386        },
11387        meridiemParse: /صبح|شام/,
11388        isPM: function (input) {
11389            return 'شام' === input;
11390        },
11391        meridiem: function (hour, minute, isLower) {
11392            if (hour < 12) {
11393                return 'صبح';
11394            }
11395            return 'شام';
11396        },
11397        calendar: {
11398            sameDay: '[اڄ] LT',
11399            nextDay: '[سڀاڻي] LT',
11400            nextWeek: 'dddd [اڳين هفتي تي] LT',
11401            lastDay: '[ڪالهه] LT',
11402            lastWeek: '[گزريل هفتي] dddd [تي] LT',
11403            sameElse: 'L'
11404        },
11405        relativeTime: {
11406            future: '%s پوء',
11407            past: '%s اڳ',
11408            s: 'چند سيڪنڊ',
11409            m: 'هڪ منٽ',
11410            mm: '%d منٽ',
11411            h: 'هڪ ڪلاڪ',
11412            hh: '%d ڪلاڪ',
11413            d: 'هڪ ڏينهن',
11414            dd: '%d ڏينهن',
11415            M: 'هڪ مهينو',
11416            MM: '%d مهينا',
11417            y: 'هڪ سال',
11418            yy: '%d سال'
11419        },
11420        preparse: function (string) {
11421            return string.replace(/،/g, ',');
11422        },
11423        postformat: function (string) {
11424            return string.replace(/,/g, '،');
11425        },
11426        week: {
11427            dow: 1, // Monday is the first day of the week.
11428            doy: 4  // The week that contains Jan 4th is the first week of the year.
11429        }
11430    });
11431
11432    //! moment.js locale configuration
11433    //! locale : Northern Sami [se]
11434    //! authors : BÃ¥rd Rolstad Henriksen : https://github.com/karamell
11435
11436
11437    hooks.defineLocale('se', {
11438        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),
11439        monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
11440        weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),
11441        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
11442        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
11443        longDateFormat: {
11444            LT: 'HH:mm',
11445            LTS: 'HH:mm:ss',
11446            L: 'DD.MM.YYYY',
11447            LL: 'MMMM D. [b.] YYYY',
11448            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
11449            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'
11450        },
11451        calendar: {
11452            sameDay: '[otne ti] LT',
11453            nextDay: '[ihttin ti] LT',
11454            nextWeek: 'dddd [ti] LT',
11455            lastDay: '[ikte ti] LT',
11456            lastWeek: '[ovddit] dddd [ti] LT',
11457            sameElse: 'L'
11458        },
11459        relativeTime: {
11460            future: '%s geažes',
11461            past: 'maŋit %s',
11462            s: 'moadde sekunddat',
11463            m: 'okta minuhta',
11464            mm: '%d minuhtat',
11465            h: 'okta diimmu',
11466            hh: '%d diimmut',
11467            d: 'okta beaivi',
11468            dd: '%d beaivvit',
11469            M: 'okta mánnu',
11470            MM: '%d mánut',
11471            y: 'okta jahki',
11472            yy: '%d jagit'
11473        },
11474        dayOfMonthOrdinalParse: /\d{1,2}\./,
11475        ordinal: '%d.',
11476        week: {
11477            dow: 1, // Monday is the first day of the week.
11478            doy: 4  // The week that contains Jan 4th is the first week of the year.
11479        }
11480    });
11481
11482    //! moment.js locale configuration
11483    //! locale : Sinhalese [si]
11484    //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
11485
11486    /*jshint -W100*/
11487    hooks.defineLocale('si', {
11488        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
11489        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
11490        weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
11491        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
11492        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
11493        weekdaysParseExact: true,
11494        longDateFormat: {
11495            LT: 'a h:mm',
11496            LTS: 'a h:mm:ss',
11497            L: 'YYYY/MM/DD',
11498            LL: 'YYYY MMMM D',
11499            LLL: 'YYYY MMMM D, a h:mm',
11500            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'
11501        },
11502        calendar: {
11503            sameDay: '[අද] LT[ට]',
11504            nextDay: '[හෙට] LT[ට]',
11505            nextWeek: 'dddd LT[à¶§]',
11506            lastDay: '[ඊයේ] LT[ට]',
11507            lastWeek: '[පසුගිය] dddd LT[ට]',
11508            sameElse: 'L'
11509        },
11510        relativeTime: {
11511            future: '%sකින්',
11512            past: '%sකට පෙර',
11513            s: 'තත්පර කිහිපය',
11514            m: 'මිනිත්තුව',
11515            mm: 'මිනිත්තු %d',
11516            h: 'පැය',
11517            hh: 'පැය %d',
11518            d: 'දිනය',
11519            dd: 'දින %d',
11520            M: 'මාසය',
11521            MM: 'මාස %d',
11522            y: 'වසර',
11523            yy: 'වසර %d'
11524        },
11525        dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
11526        ordinal: function (number) {
11527            return number + ' වැනි';
11528        },
11529        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
11530        isPM: function (input) {
11531            return input === 'ප.ව.' || input === 'පස් වරු';
11532        },
11533        meridiem: function (hours, minutes, isLower) {
11534            if (hours > 11) {
11535                return isLower ? 'ප.ව.' : 'පස් වරු';
11536            } else {
11537                return isLower ? 'පෙ.ව.' : 'පෙර වරු';
11538            }
11539        }
11540    });
11541
11542    //! moment.js locale configuration
11543    //! locale : Slovak [sk]
11544    //! author : Martin Minka : https://github.com/k2s
11545    //! based on work of petrbela : https://github.com/petrbela
11546
11547    var months$7 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
11548    var monthsShort$4 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
11549    function plural$5(n) {
11550        return (n > 1) && (n < 5);
11551    }
11552    function translate$8(number, withoutSuffix, key, isFuture) {
11553        var result = number + ' ';
11554        switch (key) {
11555            case 's':  // a few seconds / in a few seconds / a few seconds ago
11556                return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
11557            case 'm':  // a minute / in a minute / a minute ago
11558                return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
11559            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
11560                if (withoutSuffix || isFuture) {
11561                    return result + (plural$5(number) ? 'minúty' : 'minút');
11562                } else {
11563                    return result + 'minútami';
11564                }
11565                break;
11566            case 'h':  // an hour / in an hour / an hour ago
11567                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
11568            case 'hh': // 9 hours / in 9 hours / 9 hours ago
11569                if (withoutSuffix || isFuture) {
11570                    return result + (plural$5(number) ? 'hodiny' : 'hodín');
11571                } else {
11572                    return result + 'hodinami';
11573                }
11574                break;
11575            case 'd':  // a day / in a day / a day ago
11576                return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
11577            case 'dd': // 9 days / in 9 days / 9 days ago
11578                if (withoutSuffix || isFuture) {
11579                    return result + (plural$5(number) ? 'dni' : 'dní');
11580                } else {
11581                    return result + 'dňami';
11582                }
11583                break;
11584            case 'M':  // a month / in a month / a month ago
11585                return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
11586            case 'MM': // 9 months / in 9 months / 9 months ago
11587                if (withoutSuffix || isFuture) {
11588                    return result + (plural$5(number) ? 'mesiace' : 'mesiacov');
11589                } else {
11590                    return result + 'mesiacmi';
11591                }
11592                break;
11593            case 'y':  // a year / in a year / a year ago
11594                return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
11595            case 'yy': // 9 years / in 9 years / 9 years ago
11596                if (withoutSuffix || isFuture) {
11597                    return result + (plural$5(number) ? 'roky' : 'rokov');
11598                } else {
11599                    return result + 'rokmi';
11600                }
11601                break;
11602        }
11603    }
11604
11605    hooks.defineLocale('sk', {
11606        months: months$7,
11607        monthsShort: monthsShort$4,
11608        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
11609        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
11610        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
11611        longDateFormat: {
11612            LT: 'H:mm',
11613            LTS: 'H:mm:ss',
11614            L: 'DD.MM.YYYY',
11615            LL: 'D. MMMM YYYY',
11616            LLL: 'D. MMMM YYYY H:mm',
11617            LLLL: 'dddd D. MMMM YYYY H:mm'
11618        },
11619        calendar: {
11620            sameDay: '[dnes o] LT',
11621            nextDay: '[zajtra o] LT',
11622            nextWeek: function () {
11623                switch (this.day()) {
11624                    case 0:
11625                        return '[v nedeľu o] LT';
11626                    case 1:
11627                    case 2:
11628                        return '[v] dddd [o] LT';
11629                    case 3:
11630                        return '[v stredu o] LT';
11631                    case 4:
11632                        return '[vo štvrtok o] LT';
11633                    case 5:
11634                        return '[v piatok o] LT';
11635                    case 6:
11636                        return '[v sobotu o] LT';
11637                }
11638            },
11639            lastDay: '[včera o] LT',
11640            lastWeek: function () {
11641                switch (this.day()) {
11642                    case 0:
11643                        return '[minulú nedeľu o] LT';
11644                    case 1:
11645                    case 2:
11646                        return '[minulý] dddd [o] LT';
11647                    case 3:
11648                        return '[minulú stredu o] LT';
11649                    case 4:
11650                    case 5:
11651                        return '[minulý] dddd [o] LT';
11652                    case 6:
11653                        return '[minulú sobotu o] LT';
11654                }
11655            },
11656            sameElse: 'L'
11657        },
11658        relativeTime: {
11659            future: 'za %s',
11660            past: 'pred %s',
11661            s: translate$8,
11662            m: translate$8,
11663            mm: translate$8,
11664            h: translate$8,
11665            hh: translate$8,
11666            d: translate$8,
11667            dd: translate$8,
11668            M: translate$8,
11669            MM: translate$8,
11670            y: translate$8,
11671            yy: translate$8
11672        },
11673        dayOfMonthOrdinalParse: /\d{1,2}\./,
11674        ordinal: '%d.',
11675        week: {
11676            dow: 1, // Monday is the first day of the week.
11677            doy: 4  // The week that contains Jan 4th is the first week of the year.
11678        }
11679    });
11680
11681    //! moment.js locale configuration
11682    //! locale : Slovenian [sl]
11683    //! author : Robert Sedovšek : https://github.com/sedovsek
11684
11685    function processRelativeTime$6(number, withoutSuffix, key, isFuture) {
11686        var result = number + ' ';
11687        switch (key) {
11688            case 's':
11689                return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
11690            case 'm':
11691                return withoutSuffix ? 'ena minuta' : 'eno minuto';
11692            case 'mm':
11693                if (number === 1) {
11694                    result += withoutSuffix ? 'minuta' : 'minuto';
11695                } else if (number === 2) {
11696                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
11697                } else if (number < 5) {
11698                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';
11699                } else {
11700                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';
11701                }
11702                return result;
11703            case 'h':
11704                return withoutSuffix ? 'ena ura' : 'eno uro';
11705            case 'hh':
11706                if (number === 1) {
11707                    result += withoutSuffix ? 'ura' : 'uro';
11708                } else if (number === 2) {
11709                    result += withoutSuffix || isFuture ? 'uri' : 'urama';
11710                } else if (number < 5) {
11711                    result += withoutSuffix || isFuture ? 'ure' : 'urami';
11712                } else {
11713                    result += withoutSuffix || isFuture ? 'ur' : 'urami';
11714                }
11715                return result;
11716            case 'd':
11717                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
11718            case 'dd':
11719                if (number === 1) {
11720                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';
11721                } else if (number === 2) {
11722                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
11723                } else {
11724                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
11725                }
11726                return result;
11727            case 'M':
11728                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
11729            case 'MM':
11730                if (number === 1) {
11731                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
11732                } else if (number === 2) {
11733                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
11734                } else if (number < 5) {
11735                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
11736                } else {
11737                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
11738                }
11739                return result;
11740            case 'y':
11741                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
11742            case 'yy':
11743                if (number === 1) {
11744                    result += withoutSuffix || isFuture ? 'leto' : 'letom';
11745                } else if (number === 2) {
11746                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';
11747                } else if (number < 5) {
11748                    result += withoutSuffix || isFuture ? 'leta' : 'leti';
11749                } else {
11750                    result += withoutSuffix || isFuture ? 'let' : 'leti';
11751                }
11752                return result;
11753        }
11754    }
11755
11756    hooks.defineLocale('sl', {
11757        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
11758        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
11759        monthsParseExact: true,
11760        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
11761        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
11762        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
11763        weekdaysParseExact: true,
11764        longDateFormat: {
11765            LT: 'H:mm',
11766            LTS: 'H:mm:ss',
11767            L: 'DD.MM.YYYY',
11768            LL: 'D. MMMM YYYY',
11769            LLL: 'D. MMMM YYYY H:mm',
11770            LLLL: 'dddd, D. MMMM YYYY H:mm'
11771        },
11772        calendar: {
11773            sameDay: '[danes ob] LT',
11774            nextDay: '[jutri ob] LT',
11775
11776            nextWeek: function () {
11777                switch (this.day()) {
11778                    case 0:
11779                        return '[v] [nedeljo] [ob] LT';
11780                    case 3:
11781                        return '[v] [sredo] [ob] LT';
11782                    case 6:
11783                        return '[v] [soboto] [ob] LT';
11784                    case 1:
11785                    case 2:
11786                    case 4:
11787                    case 5:
11788                        return '[v] dddd [ob] LT';
11789                }
11790            },
11791            lastDay: '[včeraj ob] LT',
11792            lastWeek: function () {
11793                switch (this.day()) {
11794                    case 0:
11795                        return '[prejšnjo] [nedeljo] [ob] LT';
11796                    case 3:
11797                        return '[prejšnjo] [sredo] [ob] LT';
11798                    case 6:
11799                        return '[prejšnjo] [soboto] [ob] LT';
11800                    case 1:
11801                    case 2:
11802                    case 4:
11803                    case 5:
11804                        return '[prejšnji] dddd [ob] LT';
11805                }
11806            },
11807            sameElse: 'L'
11808        },
11809        relativeTime: {
11810            future: 'čez %s',
11811            past: 'pred %s',
11812            s: processRelativeTime$6,
11813            m: processRelativeTime$6,
11814            mm: processRelativeTime$6,
11815            h: processRelativeTime$6,
11816            hh: processRelativeTime$6,
11817            d: processRelativeTime$6,
11818            dd: processRelativeTime$6,
11819            M: processRelativeTime$6,
11820            MM: processRelativeTime$6,
11821            y: processRelativeTime$6,
11822            yy: processRelativeTime$6
11823        },
11824        dayOfMonthOrdinalParse: /\d{1,2}\./,
11825        ordinal: '%d.',
11826        week: {
11827            dow: 1, // Monday is the first day of the week.
11828            doy: 7  // The week that contains Jan 1st is the first week of the year.
11829        }
11830    });
11831
11832    //! moment.js locale configuration
11833    //! locale : Albanian [sq]
11834    //! author : Flakërim Ismani : https://github.com/flakerimi
11835    //! author : Menelion Elensúle : https://github.com/Oire
11836    //! author : Oerd Cukalla : https://github.com/oerd
11837
11838    hooks.defineLocale('sq', {
11839        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
11840        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
11841        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
11842        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
11843        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
11844        weekdaysParseExact: true,
11845        meridiemParse: /PD|MD/,
11846        isPM: function (input) {
11847            return input.charAt(0) === 'M';
11848        },
11849        meridiem: function (hours, minutes, isLower) {
11850            return hours < 12 ? 'PD' : 'MD';
11851        },
11852        longDateFormat: {
11853            LT: 'HH:mm',
11854            LTS: 'HH:mm:ss',
11855            L: 'DD/MM/YYYY',
11856            LL: 'D MMMM YYYY',
11857            LLL: 'D MMMM YYYY HH:mm',
11858            LLLL: 'dddd, D MMMM YYYY HH:mm'
11859        },
11860        calendar: {
11861            sameDay: '[Sot në] LT',
11862            nextDay: '[Nesër në] LT',
11863            nextWeek: 'dddd [në] LT',
11864            lastDay: '[Dje në] LT',
11865            lastWeek: 'dddd [e kaluar në] LT',
11866            sameElse: 'L'
11867        },
11868        relativeTime: {
11869            future: 'në %s',
11870            past: '%s më parë',
11871            s: 'disa sekonda',
11872            m: 'një minutë',
11873            mm: '%d minuta',
11874            h: 'një orë',
11875            hh: '%d orë',
11876            d: 'një ditë',
11877            dd: '%d ditë',
11878            M: 'një muaj',
11879            MM: '%d muaj',
11880            y: 'një vit',
11881            yy: '%d vite'
11882        },
11883        dayOfMonthOrdinalParse: /\d{1,2}\./,
11884        ordinal: '%d.',
11885        week: {
11886            dow: 1, // Monday is the first day of the week.
11887            doy: 4  // The week that contains Jan 4th is the first week of the year.
11888        }
11889    });
11890
11891    //! moment.js lo
11891cale configuration
11892    //! locale : Serbian Cyrillic [sr-cyrl]
11893    //! author : Milan Janačković<[email protected]> : https://github.com/milan-j
11894
11895    var translator$1 = {
11896        words: { //Different grammatical cases
11897            m: ['један минут', 'једне минуте'],
11898            mm: ['минут', 'минуте', 'минута'],
11899            h: ['један сат', 'једног сата'],
11900            hh: ['сат', 'сата', 'сати'],
11901            dd: ['дан', 'дана', 'дана'],
11902            MM: ['месец', 'месеца', 'месеци'],
11903            yy: ['година', 'године', 'година']
11904        },
11905        correctGrammaticalCase: function (number, wordKey) {
11906            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
11907        },
11908        translate: function (number, withoutSuffix, key) {
11909            var wordKey = translator$1.words[key];
11910            if (key.length === 1) {
11911                return withoutSuffix ? wordKey[0] : wordKey[1];
11912            } else {
11913                return number + ' ' + translator$1.correctGrammaticalCase(number, wordKey);
11914            }
11915        }
11916    };
11917
11918    hooks.defineLocale('sr-cyrl', {
11919        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),
11920        monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
11921        monthsParseExact: true,
11922        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
11923        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
11924        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
11925        weekdaysParseExact: true,
11926        longDateFormat: {
11927            LT: 'H:mm',
11928            LTS: 'H:mm:ss',
11929            L: 'DD.MM.YYYY',
11930            LL: 'D. MMMM YYYY',
11931            LLL: 'D. MMMM YYYY H:mm',
11932            LLLL: 'dddd, D. MMMM YYYY H:mm'
11933        },
11934        calendar: {
11935            sameDay: '[данас у] LT',
11936            nextDay: '[сутра у] LT',
11937            nextWeek: function () {
11938                switch (this.day()) {
11939                    case 0:
11940                        return '[у] [недељу] [у] LT';
11941                    case 3:
11942                        return '[у] [среду] [у] LT';
11943                    case 6:
11944                        return '[у] [суботу] [у] LT';
11945                    case 1:
11946                    case 2:
11947                    case 4:
11948                    case 5:
11949                        return '[у] dddd [у] LT';
11950                }
11951            },
11952            lastDay: '[јуче у] LT',
11953            lastWeek: function () {
11954                var lastWeekDays = [
11955                    '[прошле] [недеље] [у] LT',
11956                    '[прошлог] [понедељка] [у] LT',
11957                    '[прошлог] [уторка] [у] LT',
11958                    '[прошле] [среде] [у] LT',
11959                    '[прошлог] [четвртка] [у] LT',
11960                    '[прошлог] [петка] [у] LT',
11961                    '[прошле] [суботе] [у] LT'
11962                ];
11963                return lastWeekDays[this.day()];
11964            },
11965            sameElse: 'L'
11966        },
11967        relativeTime: {
11968            future: 'за %s',
11969            past: 'пре %s',
11970            s: 'неколико секунди',
11971            m: translator$1.translate,
11972            mm: translator$1.translate,
11973            h: translator$1.translate,
11974            hh: translator$1.translate,
11975            d: 'дан',
11976            dd: translator$1.translate,
11977            M: 'месец',
11978            MM: translator$1.translate,
11979            y: 'годину',
11980            yy: translator$1.translate
11981        },
11982        dayOfMonthOrdinalParse: /\d{1,2}\./,
11983        ordinal: '%d.',
11984        week: {
11985            dow: 1, // Monday is the first day of the week.
11986            doy: 7  // The week that contains Jan 1st is the first week of the year.
11987        }
11988    });
11989
11990    //! moment.js locale configuration
11991    //! locale : Serbian [sr]
11992    //! author : Milan Janačković<[email protected]> : https://github.com/milan-j
11993
11994    var translator$2 = {
11995        words: { //Different grammatical cases
11996            m: ['jedan minut', 'jedne minute'],
11997            mm: ['minut', 'minute', 'minuta'],
11998            h: ['jedan sat', 'jednog sata'],
11999            hh: ['sat', 'sata', 'sati'],
12000            dd: ['dan', 'dana', 'dana'],
12001            MM: ['mesec', 'meseca', 'meseci'],
12002            yy: ['godina', 'godine', 'godina']
12003        },
12004        correctGrammaticalCase: function (number, wordKey) {
12005            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
12006        },
12007        translate: function (number, withoutSuffix, key) {
12008            var wordKey = translator$2.words[key];
12009            if (key.length === 1) {
12010                return withoutSuffix ? wordKey[0] : wordKey[1];
12011            } else {
12012                return number + ' ' + translator$2.correctGrammaticalCase(number, wordKey);
12013            }
12014        }
12015    };
12016
12017    hooks.defineLocale('sr', {
12018        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
12019        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
12020        monthsParseExact: true,
12021        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
12022        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
12023        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
12024        weekdaysParseExact: true,
12025        longDateFormat: {
12026            LT: 'H:mm',
12027            LTS: 'H:mm:ss',
12028            L: 'DD.MM.YYYY',
12029            LL: 'D. MMMM YYYY',
12030            LLL: 'D. MMMM YYYY H:mm',
12031            LLLL: 'dddd, D. MMMM YYYY H:mm'
12032        },
12033        calendar: {
12034            sameDay: '[danas u] LT',
12035            nextDay: '[sutra u] LT',
12036            nextWeek: function () {
12037                switch (this.day()) {
12038                    case 0:
12039                        return '[u] [nedelju] [u] LT';
12040                    case 3:
12041                        return '[u] [sredu] [u] LT';
12042                    case 6:
12043                        return '[u] [subotu] [u] LT';
12044                    case 1:
12045                    case 2:
12046                    case 4:
12047                    case 5:
12048                        return '[u] dddd [u] LT';
12049                }
12050            },
12051            lastDay: '[juče u] LT',
12052            lastWeek: function () {
12053                var lastWeekDays = [
12054                    '[prošle] [nedelje] [u] LT',
12055                    '[prošlog] [ponedeljka] [u] LT',
12056                    '[prošlog] [utorka] [u] LT',
12057                    '[prošle] [srede] [u] LT',
12058                    '[prošlog] [četvrtka] [u] LT',
12059                    '[prošlog] [petka] [u] LT',
12060                    '[prošle] [subote] [u] LT'
12061                ];
12062                return lastWeekDays[this.day()];
12063            },
12064            sameElse: 'L'
12065        },
12066        relativeTime: {
12067            future: 'za %s',
12068            past: 'pre %s',
12069            s: 'nekoliko sekundi',
12070            m: translator$2.translate,
12071            mm: translator$2.translate,
12072            h: translator$2.translate,
12073            hh: translator$2.translate,
12074            d: 'dan',
12075            dd: translator$2.translate,
12076            M: 'mesec',
12077            MM: translator$2.translate,
12078            y: 'godinu',
12079            yy: translator$2.translate
12080        },
12081        dayOfMonthOrdinalParse: /\d{1,2}\./,
12082        ordinal: '%d.',
12083        week: {
12084            dow: 1, // Monday is the first day of the week.
12085            doy: 7  // The week that contains Jan 1st is the first week of the year.
12086        }
12087    });
12088
12089    //! moment.js locale configuration
12090    //! locale : siSwati [ss]
12091    //! author : Nicolai Davies<[email protected]> : https://github.com/nicolaidavies
12092
12093
12094    hooks.defineLocale('ss', {
12095        months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'),
12096        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
12097        weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),
12098        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
12099        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
12100        weekdaysParseExact: true,
12101        longDateFormat: {
12102            LT: 'h:mm A',
12103            LTS: 'h:mm:ss A',
12104            L: 'DD/MM/YYYY',
12105            LL: 'D MMMM YYYY',
12106            LLL: 'D MMMM YYYY h:mm A',
12107            LLLL: 'dddd, D MMMM YYYY h:mm A'
12108        },
12109        calendar: {
12110            sameDay: '[Namuhla nga] LT',
12111            nextDay: '[Kusasa nga] LT',
12112            nextWeek: 'dddd [nga] LT',
12113            lastDay: '[Itolo nga] LT',
12114            lastWeek: 'dddd [leliphelile] [nga] LT',
12115            sameElse: 'L'
12116        },
12117        relativeTime: {
12118            future: 'nga %s',
12119            past: 'wenteka nga %s',
12120            s: 'emizuzwana lomcane',
12121            m: 'umzuzu',
12122            mm: '%d emizuzu',
12123            h: 'lihora',
12124            hh: '%d emahora',
12125            d: 'lilanga',
12126            dd: '%d emalanga',
12127            M: 'inyanga',
12128            MM: '%d tinyanga',
12129            y: 'umnyaka',
12130            yy: '%d iminyaka'
12131        },
12132        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
12133        meridiem: function (hours, minutes, isLower) {
12134            if (hours < 11) {
12135                return 'ekuseni';
12136            } else if (hours < 15) {
12137                return 'emini';
12138            } else if (hours < 19) {
12139                return 'entsambama';
12140            } else {
12141                return 'ebusuku';
12142            }
12143        },
12144        meridiemHour: function (hour, meridiem) {
12145            if (hour === 12) {
12146                hour = 0;
12147            }
12148            if (meridiem === 'ekuseni') {
12149                return hour;
12150            } else if (meridiem === 'emini') {
12151                return hour >= 11 ? hour : hour + 12;
12152            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
12153                if (hour === 0) {
12154                    return 0;
12155                }
12156                return hour + 12;
12157            }
12158        },
12159        dayOfMonthOrdinalParse: /\d{1,2}/,
12160        ordinal: '%d',
12161        week: {
12162            dow: 1, // Monday is the first day of the week.
12163            doy: 4  // The week that contains Jan 4th is the first week of the year.
12164        }
12165    });
12166
12167    //! moment.js locale configuration
12168    //! locale : Swedish [sv]
12169    //! author : Jens Alm : https://github.com/ulmus
12170
12171    hooks.defineLocale('sv', {
12172        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
12173        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
12174        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
12175        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
12176        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
12177        longDateFormat: {
12178            LT: 'HH:mm',
12179            LTS: 'HH:mm:ss',
12180            L: 'YYYY-MM-DD',
12181            LL: 'D MMMM YYYY',
12182            LLL: 'D MMMM YYYY [kl.] HH:mm',
12183            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
12184            lll: 'D MMM YYYY HH:mm',
12185            llll: 'ddd D MMM YYYY HH:mm'
12186        },
12187        calendar: {
12188            sameDay: '[Idag] LT',
12189            nextDay: '[Imorgon] LT',
12190            lastDay: '[Igår] LT',
12191            nextWeek: '[PÃ¥] dddd LT',
12192            lastWeek: '[I] dddd[s] LT',
12193            sameElse: 'L'
12194        },
12195        relativeTime: {
12196            future: 'om %s',
12197            past: 'för %s sedan',
12198            s: 'några sekunder',
12199            m: 'en minut',
12200            mm: '%d minuter',
12201            h: 'en timme',
12202            hh: '%d timmar',
12203            d: 'en dag',
12204            dd: '%d dagar',
12205            M: 'en månad',
12206            MM: '%d månader',
12207            y: 'ett år',
12208            yy: '%d år'
12209        },
12210        dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
12211        ordinal: function (number) {
12212            var b = number % 10,
12213                output = (~~(number % 100 / 10) === 1) ? 'e' :
12214                    (b === 1) ? 'a' :
12215                        (b === 2) ? 'a' :
12216                            (b === 3) ? 'e' : 'e';
12217            return number + output;
12218        },
12219        week: {
12220            dow: 1, // Monday is the first day of the week.
12221            doy: 4  // The week that contains Jan 4th is the first week of the year.
12222        }
12223    });
12224
12225    //! moment.js locale configuration
12226    //! locale : Swahili [sw]
12227    //! author : Fahad Kassim : https://github.com/fadsel
12228
12229    hooks.defineLocale('sw', {
12230        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
12231        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
12232        weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
12233        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
12234        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
12235        weekdaysParseExact: true,
12236        longDateFormat: {
12237            LT: 'HH:mm',
12238            LTS: 'HH:mm:ss',
12239            L: 'DD.MM.YYYY',
12240            LL: 'D MMMM YYYY',
12241            LLL: 'D MMMM YYYY HH:mm',
12242            LLLL: 'dddd, D MMMM YYYY HH:mm'
12243        },
12244        calendar: {
12245            sameDay: '[leo saa] LT',
12246            nextDay: '[kesho saa] LT',
12247            nextWeek: '[wiki ijayo] dddd [saat] LT',
12248            lastDay: '[jana] LT',
12249            lastWeek: '[wiki iliyopita] dddd [saat] LT',
12250            sameElse: 'L'
12251        },
12252        relativeTime: {
12253            future: '%s baadaye',
12254            past: 'tokea %s',
12255            s: 'hivi punde',
12256            m: 'dakika moja',
12257            mm: 'dakika %d',
12258            h: 'saa limoja',
12259            hh: 'masaa %d',
12260            d: 'siku moja',
12261            dd: 'masiku %d',
12262            M: 'mwezi mmoja',
12263            MM: 'miezi %d',
12264            y: 'mwaka mmoja',
12265            yy: 'miaka %d'
12266        },
12267        week: {
12268            dow: 1, // Monday is the first day of the week.
12269            doy: 7  // The week that contains Jan 1st is the first week of the year.
12270        }
12271    });
12272
12273    //! moment.js locale configuration
12274    //! locale : Tamil [ta]
12275    //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
12276
12277    var symbolMap$12 = {
12278        '1': '௧',
12279        '2': '௨',
12280        '3': '௩',
12281        '4': '௪',
12282        '5': '௫',
12283        '6': '௬',
12284        '7': '௭',
12285        '8': '௮',
12286        '9': '௯',
12287        '0': '௦'
12288    };
12289    var numberMap$11 = {
12290        '௧': '1',
12291        '௨': '2',
12292        '௩': '3',
12293        '௪': '4',
12294        '௫': '5',
12295        '௬': '6',
12296        '௭': '7',
12297        '௮': '8',
12298        '௯': '9',
12299        '௦': '0'
12300    };
12301
12302    hooks.defineLocale('ta', {
12303        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்ப
12303ர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
12304        monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
12305        weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
12306        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
12307        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
12308        longDateFormat: {
12309            LT: 'HH:mm',
12310            LTS: 'HH:mm:ss',
12311            L: 'DD/MM/YYYY',
12312            LL: 'D MMMM YYYY',
12313            LLL: 'D MMMM YYYY, HH:mm',
12314            LLLL: 'dddd, D MMMM YYYY, HH:mm'
12315        },
12316        calendar: {
12317            sameDay: '[இன்று] LT',
12318            nextDay: '[நாளை] LT',
12319            nextWeek: 'dddd, LT',
12320            lastDay: '[நேற்று] LT',
12321            lastWeek: '[கடந்த வாரம்] dddd, LT',
12322            sameElse: 'L'
12323        },
12324        relativeTime: {
12325            future: '%s இல்',
12326            past: '%s முன்',
12327            s: 'ஒரு சில விநாடிகள்',
12328            m: 'ஒரு நிமிடம்',
12329            mm: '%d நிமிடங்கள்',
12330            h: 'ஒரு மணி நேரம்',
12331            hh: '%d மணி நேரம்',
12332            d: 'ஒரு நாள்',
12333            dd: '%d நாட்கள்',
12334            M: 'ஒரு மாதம்',
12335            MM: '%d மாதங்கள்',
12336            y: 'ஒரு வருடம்',
12337            yy: '%d ஆண்டுகள்'
12338        },
12339        dayOfMonthOrdinalParse: /\d{1,2}வது/,
12340        ordinal: function (number) {
12341            return number + 'வது';
12342        },
12343        preparse: function (string) {
12344            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
12345                return numberMap$11[match];
12346            });
12347        },
12348        postformat: function (string) {
12349            return string.replace(/\d/g, function (match) {
12350                return symbolMap$12[match];
12351            });
12352        },
12353        // refer http://ta.wikipedia.org/s/1er1
12354        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
12355        meridiem: function (hour, minute, isLower) {
12356            if (hour < 2) {
12357                return ' யாமம்';
12358            } else if (hour < 6) {
12359                return ' வைகறை';  // வைகறை
12360            } else if (hour < 10) {
12361                return ' காலை'; // காலை
12362            } else if (hour < 14) {
12363                return ' நண்பகல்'; // நண்பகல்
12364            } else if (hour < 18) {
12365                return ' எற்பாடு'; // எற்பாடு
12366            } else if (hour < 22) {
12367                return ' மாலை'; // மாலை
12368            } else {
12369                return ' யாமம்';
12370            }
12371        },
12372        meridiemHour: function (hour, meridiem) {
12373            if (hour === 12) {
12374                hour = 0;
12375            }
12376            if (meridiem === 'யாமம்') {
12377                return hour < 2 ? hour : hour + 12;
12378            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
12379                return hour;
12380            } else if (meridiem === 'நண்பகல்') {
12381                return hour >= 10 ? hour : hour + 12;
12382            } else {
12383                return hour + 12;
12384            }
12385        },
12386        week: {
12387            dow: 0, // Sunday is the first day of the week.
12388            doy: 6  // The week that contains Jan 1st is the first week of the year.
12389        }
12390    });
12391
12392    //! moment.js locale configuration
12393    //! locale : Telugu [te]
12394    //! author : Krishna Chaitanya Thota : https://github.com/kcthota
12395
12396    hooks.defineLocale('te', {
12397        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
12398        monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
12399        monthsParseExact: true,
12400        weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
12401        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
12402        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
12403        longDateFormat: {
12404            LT: 'A h:mm',
12405            LTS: 'A h:mm:ss',
12406            L: 'DD/MM/YYYY',
12407            LL: 'D MMMM YYYY',
12408            LLL: 'D MMMM YYYY, A h:mm',
12409            LLLL: 'dddd, D MMMM YYYY, A h:mm'
12410        },
12411        calendar: {
12412            sameDay: '[నేడు] LT',
12413            nextDay: '[రేపు] LT',
12414            nextWeek: 'dddd, LT',
12415            lastDay: '[నిన్న] LT',
12416            lastWeek: '[గత] dddd, LT',
12417            sameElse: 'L'
12418        },
12419        relativeTime: {
12420            future: '%s లో',
12421            past: '%s క్రితం',
12422            s: 'కొన్ని క్షణాలు',
12423            m: 'ఒక నిమిషం',
12424            mm: '%d నిమిషాలు',
12425            h: 'ఒక గంట',
12426            hh: '%d గంటలు',
12427            d: 'ఒక రోజు',
12428            dd: '%d రోజులు',
12429            M: 'ఒక నెల',
12430            MM: '%d నెలలు',
12431            y: 'ఒక సంవత్సరం',
12432            yy: '%d సంవత్సరాలు'
12433        },
12434        dayOfMonthOrdinalParse: /\d{1,2}à°µ/,
12435        ordinal: '%dà°µ',
12436        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
12437        meridiemHour: function (hour, meridiem) {
12438            if (hour === 12) {
12439                hour = 0;
12440            }
12441            if (meridiem === 'రాత్రి') {
12442                return hour < 4 ? hour : hour + 12;
12443            } else if (meridiem === 'ఉదయం') {
12444                return hour;
12445            } else if (meridiem === 'మధ్యాహ్నం') {
12446                return hour >= 10 ? hour : hour + 12;
12447            } else if (meridiem === 'సాయంత్రం') {
12448                return hour + 12;
12449            }
12450        },
12451        meridiem: function (hour, minute, isLower) {
12452            if (hour < 4) {
12453                return 'రాత్రి';
12454            } else if (hour < 10) {
12455                return 'ఉదయం';
12456            } else if (hour < 17) {
12457                return 'మధ్యాహ్నం';
12458            } else if (hour < 20) {
12459                return 'సాయంత్రం';
12460            } else {
12461                return 'రాత్రి';
12462            }
12463        },
12464        week: {
12465            dow: 0, // Sunday is the first day of the week.
12466            doy: 6  // The week that contains Jan 1st is the first week of the year.
12467        }
12468    });
12469
12470    //! moment.js locale configuration
12471    //! locale : Tetun Dili (East Timor) [tet]
12472    //! author : Joshua Brooks : https://github.com/joshbrooks
12473    //! author : Onorio De J. Afonso : https://github.com/marobo
12474
12475    hooks.defineLocale('tet', {
12476        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),
12477        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),
12478        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),
12479        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),
12480        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),
12481        longDateFormat: {
12482            LT: 'HH:mm',
12483            LTS: 'HH:mm:ss',
12484            L: 'DD/MM/YYYY',
12485            LL: 'D MMMM YYYY',
12486            LLL: 'D MMMM YYYY HH:mm',
12487            LLLL: 'dddd, D MMMM YYYY HH:mm'
12488        },
12489        calendar: {
12490            sameDay: '[Ohin iha] LT',
12491            nextDay: '[Aban iha] LT',
12492            nextWeek: 'dddd [iha] LT',
12493            lastDay: '[Horiseik iha] LT',
12494            lastWeek: 'dddd [semana kotuk] [iha] LT',
12495            sameElse: 'L'
12496        },
12497        relativeTime: {
12498            future: 'iha %s',
12499            past: '%s liuba',
12500            s: 'minutu balun',
12501            m: 'minutu ida',
12502            mm: 'minutus %d',
12503            h: 'horas ida',
12504            hh: 'horas %d',
12505            d: 'loron ida',
12506            dd: 'loron %d',
12507            M: 'fulan ida',
12508            MM: 'fulan %d',
12509            y: 'tinan ida',
12510            yy: 'tinan %d'
12511        },
12512        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
12513        ordinal: function (number) {
12514            var b = number % 10,
12515                output = (~~(number % 100 / 10) === 1) ? 'th' :
12516                    (b === 1) ? 'st' :
12517                        (b === 2) ? 'nd' :
12518                            (b === 3) ? 'rd' : 'th';
12519            return number + output;
12520        },
12521        week: {
12522            dow: 1, // Monday is the first day of the week.
12523            doy: 4  // The week that contains Jan 4th is the first week of the year.
12524        }
12525    });
12526
12527    //! moment.js locale configuration
12528    //! locale : Thai [th]
12529    //! author : Kridsada Thanabulpong : https://github.com/sirn
12530
12531    hooks.defineLocale('th', {
12532        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
12533        monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
12534        monthsParseExact: true,
12535        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.
12535split('_'),
12536        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
12537        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
12538        weekdaysParseExact: true,
12539        longDateFormat: {
12540            LT: 'H:mm',
12541            LTS: 'H:mm:ss',
12542            L: 'DD/MM/YYYY',
12543            LL: 'D MMMM YYYY',
12544            LLL: 'D MMMM YYYY เวลา H:mm',
12545            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
12546        },
12547        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
12548        isPM: function (input) {
12549            return input === 'หลังเที่ยง';
12550        },
12551        meridiem: function (hour, minute, isLower) {
12552            if (hour < 12) {
12553                return 'ก่อนเที่ยง';
12554            } else {
12555                return 'หลังเที่ยง';
12556            }
12557        },
12558        calendar: {
12559            sameDay: '[วันนี้ เวลา] LT',
12560            nextDay: '[พรุ่งนี้ เวลา] LT',
12561            nextWeek: 'dddd[หน้า เวลา] LT',
12562            lastDay: '[เมื่อวานนี้ เวลา] LT',
12563            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
12564            sameElse: 'L'
12565        },
12566        relativeTime: {
12567            future: 'อีก %s',
12568            past: '%sที่แล้ว',
12569            s: 'ไม่กี่วินาที',
12570            m: '1 นาที',
12571            mm: '%d นาที',
12572            h: '1 ชั่วโมง',
12573            hh: '%d ชั่วโมง',
12574            d: '1 วัน',
12575            dd: '%d วัน',
12576            M: '1 เดือน',
12577            MM: '%d เดือน',
12578            y: '1 ปี',
12579            yy: '%d ปี'
12580        }
12581    });
12582
12583    //! moment.js locale configuration
12584    //! locale : Tagalog (Philippines) [tl-ph]
12585    //! author : Dan Hagman : https://github.com/hagmandan
12586
12587    hooks.defineLocale('tl-ph', {
12588        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
12589        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
12590        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
12591        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
12592        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
12593        longDateFormat: {
12594            LT: 'HH:mm',
12595            LTS: 'HH:mm:ss',
12596            L: 'MM/D/YYYY',
12597            LL: 'MMMM D, YYYY',
12598            LLL: 'MMMM D, YYYY HH:mm',
12599            LLLL: 'dddd, MMMM DD, YYYY HH:mm'
12600        },
12601        calendar: {
12602            sameDay: 'LT [ngayong araw]',
12603            nextDay: '[Bukas ng] LT',
12604            nextWeek: 'LT [sa susunod na] dddd',
12605            lastDay: 'LT [kahapon]',
12606            lastWeek: 'LT [noong nakaraang] dddd',
12607            sameElse: 'L'
12608        },
12609        relativeTime: {
12610            future: 'sa loob ng %s',
12611            past: '%s ang nakalipas',
12612            s: 'ilang segundo',
12613            m: 'isang minuto',
12614            mm: '%d minuto',
12615            h: 'isang oras',
12616            hh: '%d oras',
12617            d: 'isang araw',
12618            dd: '%d araw',
12619            M: 'isang buwan',
12620            MM: '%d buwan',
12621            y: 'isang taon',
12622            yy: '%d taon'
12623        },
12624        dayOfMonthOrdinalParse: /\d{1,2}/,
12625        ordinal: function (number) {
12626            return number;
12627        },
12628        week: {
12629            dow: 1, // Monday is the first day of the week.
12630            doy: 4  // The week that contains Jan 4th is the first week of the year.
12631        }
12632    });
12633
12634    //! moment.js locale configuration
12635    //! locale : Klingon [tlh]
12636    //! author : Dominika Kruk : https://github.com/amaranthrose
12637
12638    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
12639
12640    function translateFuture(output) {
12641        var time = output;
12642        time = (output.indexOf('jaj') !== -1) ?
12643            time.slice(0, -3) + 'leS' :
12644            (output.indexOf('jar') !== -1) ?
12645                time.slice(0, -3) + 'waQ' :
12646                (output.indexOf('DIS') !== -1) ?
12647                    time.slice(0, -3) + 'nem' :
12648                    time + ' pIq';
12649        return time;
12650    }
12651
12652    function translatePast(output) {
12653        var time = output;
12654        time = (output.indexOf('jaj') !== -1) ?
12655            time.slice(0, -3) + 'Hu’' :
12656            (output.indexOf('jar') !== -1) ?
12657                time.slice(0, -3) + 'wen' :
12658                (output.indexOf('DIS') !== -1) ?
12659                    time.slice(0, -3) + 'ben' :
12660                    time + ' ret';
12661        return time;
12662    }
12663
12664    function translate$9(number, withoutSuffix, string, isFuture) {
12665        var numberNoun = numberAsNoun(number);
12666        switch (string) {
12667            case 'mm':
12668                return numberNoun + ' tup';
12669            case 'hh':
12670                return numberNoun + ' rep';
12671            case 'dd':
12672                return numberNoun + ' jaj';
12673            case 'MM':
12674                return numberNoun + ' jar';
12675            case 'yy':
12676                return numberNoun + ' DIS';
12677        }
12678    }
12679
12680    function numberAsNoun(number) {
12681        var hundred = Math.floor((number % 1000) / 100),
12682            ten = Math.floor((number % 100) / 10),
12683            one = number % 10,
12684            word = '';
12685        if (hundred > 0) {
12686            word += numbersNouns[hundred] + 'vatlh';
12687        }
12688        if (ten > 0) {
12689            word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
12690        }
12691        if (one > 0) {
12692            word += ((word !== '') ? ' ' : '') + numbersNouns[one];
12693        }
12694        return (word === '') ? 'pagh' : word;
12695    }
12696
12697    hooks.defineLocale('tlh', {
12698        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
12699        monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
12700        monthsParseExact: true,
12701        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
12702        weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
12703        weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
12704        longDateFormat: {
12705            LT: 'HH:mm',
12706            LTS: 'HH:mm:ss',
12707            L: 'DD.MM.YYYY',
12708            LL: 'D MMMM YYYY',
12709            LLL: 'D MMMM YYYY HH:mm',
12710            LLLL: 'dddd, D MMMM YYYY HH:mm'
12711        },
12712        calendar: {
12713            sameDay: '[DaHjaj] LT',
12714            nextDay: '[wa’leS] LT',
12715            nextWeek: 'LLL',
12716            lastDay: '[wa’Hu’] LT',
12717            lastWeek: 'LLL',
12718            sameElse: 'L'
12719        },
12720        relativeTime: {
12721            future: translateFuture,
12722            past: translatePast,
12723            s: 'puS lup',
12724            m: 'wa’ tup',
12725            mm: translate$9,
12726            h: 'wa’ rep',
12727            hh: translate$9,
12728            d: 'wa’ jaj',
12729            dd: translate$9,
12730            M: 'wa’ jar',
12731            MM: translate$9,
12732            y: 'wa’ DIS',
12733            yy: translate$9
12734        },
12735        dayOfMonthOrdinalParse: /\d{1,2}\./,
12736        ordinal: '%d.',
12737        week: {
12738            dow: 1, // Monday is the first day of the week.
12739            doy: 4  // The week that contains Jan 4th is the first week of the year.
12740        }
12741    });
12742
12743    //! moment.js locale configuration
12744    //! locale : Turkish [tr]
12745    //! authors : Erhan Gundogan : https://github.com/erhangundogan,
12746    //!           Burak Yiğit Kaya: https://github.com/BYK
12747
12748    var suffixes$3 = {
12749        1: '\'inci',
12750        5: '\'inci',
12751        8: '\'inci',
12752        70: '\'inci',
12753        80: '\'inci',
12754        2: '\'nci',
12755        7: '\'nci',
12756        20: '\'nci',
12757        50: '\'nci',
12758        3: '\'üncü',
12759        4: '\'üncü',
12760        100: '\'üncü',
12761        6: '\'ncı',
12762        9: '\'uncu',
12763        10: '\'uncu',
12764        30: '\'uncu',
12765        60: '\'ıncı',
12766        90: '\'ıncı'
12767    };
12768
12769    hooks.defineLocale('tr', {
12770        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
12771        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
12772        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
12773        weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
12774        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
12775        longDateFormat: {
12776            LT: 'HH:mm',
12777            LTS: 'HH:mm:ss',
12778            L: 'DD.MM.YYYY',
12779            LL: 'D MMMM YYYY',
12780            LLL: 'D MMMM YYYY HH:mm',
12781            LLLL: 'dddd, D MMMM YYYY HH:mm'
12782        },
12783        calendar: {
12784            sameDay: '[bugün saat] LT',
12785            nextDay: '[yarın saat] LT',
12786            nextWeek: '[haftaya] dddd [saat] LT',
12787            lastDay: '[dün] LT',
12788            lastWeek: '[geçen hafta] dddd [saat] LT',
12789            sameElse: 'L'
12790        },
12791        relativeTime: {
12792            future: '%s sonra',
12793            past: '%s önce',
12794            s: 'birkaç saniye',
12795            m: 'bir dakika',
12796            mm: '%d dakika',
12797            h: 'bir saat',
12798            hh: '%d saat',
12799            d: 'bir gün',
12800            dd: '%d gün',
12801            M: 'bir ay',
12802            MM: '%d ay',
12803            y: 'bir yıl',
12804            yy: '%d yıl'
12805        },
12806        dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
12807        ordinal: function (number) {
12808            if (number === 0) {  // special case for zero
12809                return number + '\'ıncı';
12810            }
12811            var a = number % 10,
12812                b = number % 100 - a,
12813                c = number >= 100 ? 100 : null;
12814            return number + (suffixes$3[a] || suffixes$3[b] || suffixes$3[c]);
12815        },
12816        week: {
12817            dow: 1, // Monday is the first day of the week.
12818            doy: 7  // The week that contains Jan 1st is the first week of the year.
12819        }
12820    });
12821
12822    //! moment.js locale configuration
12823    //! locale : Talossan [tzl]
12824    //! author : Robin van der Vliet : https://github.com/robin0van0der0v
12825    //! author : Iustì Canun
12826
12827    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
12828    // This is currently too difficult (maybe even impossible) to add.
12829    hooks.defineLocale('tzl', {
12830        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
12831        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
12832        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
12833        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
12834        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
12835        longDateFormat: {
12836            LT: 'HH.mm',
12837            LTS: 'HH.mm.ss',
12838            L: 'DD.MM.YYYY',
12839            LL: 'D. MMMM [dallas] YYYY',
12840            LLL: 'D. MMMM [dallas] YYYY HH.mm',
12841            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
12842        },
12843        meridiemParse: /d\'o|d\'a/i,
12844        isPM: function (input) {
12845            return 'd\'o' === input.toLowerCase();
12846        },
12847        meridiem: function (hours, minutes, isLower) {
12848            if (hours > 11) {
12849                return isLower ? 'd\'o' : 'D\'O';
12850            } else {
12851                return isLower ? 'd\'a' : 'D\'A';
12852            }
12853        },
12854        calendar: {
12855            sameDay: '[oxhi à] LT',
12856            nextDay: '[demà à] LT',
12857            nextWeek: 'dddd [à] LT',
12858            lastDay: '[ieiri à] LT',
12859            lastWeek: '[sür el] dddd [lasteu à] LT',
12860            sameElse: 'L'
12861        },
12862        relativeTime: {
12863            future: 'osprei %s',
12864            past: 'ja%s',
12865            s: processRelativeTime$7,
12866            m: processRelativeTime$7,
12867            mm: processRelativeTime$7,
12868            h: processRelativeTime$7,
12869            hh: processRelativeTime$7,
12870            d: processRelativeTime$7,
12871            dd: processRelativeTime$7,
12872            M: processRelativeTime$7,
12873            MM: processRelativeTime$7,
12874            y: processRelativeTime$7,
12875            yy: processRelativeTime$7
12876        },
12877        dayOfMonthOrdinalParse: /\d{1,2}\./,
12878        ordinal: '%d.',
12879        week: {
12880            dow: 1, // Monday is the first day of the week.
12881            doy: 4  // The week that contains Jan 4th is the first week of the year.
12882        }
12883    });
12884
12885    function processRelativeTime$7(number, withoutSuffix, key, isFuture) {
12886        var format = {
12887            's': ['viensas secunds', '\'iensas secunds'],
12888            'm': ['\'n míut', '\'iens míut'],
12889            'mm': [number + ' míuts', '' + number + ' míuts'],
12890            'h': ['\'n þora', '\'iensa þora'],
12891            'hh': [number + ' þoras', '' + number + ' þoras'],
12892            'd': ['\'n ziua', '\'iensa ziua'],
12893            'dd': [number + ' ziuas', '' + number + ' ziuas'],
12894            'M': ['\'n mes', '\'iens mes'],
12895            'MM': [number + ' mesen', '' + number + ' mesen'],
12896            'y': ['\'n ar', '\'iens ar'],
12897            'yy': [number + ' ars', '' + number + ' ars']
12898        };
12899        return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
12900    }
12901
12902    //! moment.js locale configuration
12903    //! locale : Central Atlas Tamazight Latin [tzm-latn]
12904    //! author : Abdel Said : https://github.com/abdelsaid
12905
12906    hooks.defineLocale('tzm-latn', {
12907        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
12908        monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
12909        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
12910        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
12911        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
12912        longDateFormat: {
12913            LT: 'HH:mm',
12914            LTS: 'HH:mm:ss',
12915            L: 'DD/MM/YYYY',
12916            LL: 'D MMMM YYYY',
12917            LLL: 'D MMMM YYYY HH:mm',
12918            LLLL: 'dddd D MMMM YYYY HH:mm'
12919        },
12920        calendar: {
12921            sameDay: '[asdkh g] LT',
12922            nextDay: '[aska g] LT',
12923            nextWeek: 'dddd [g] LT',
12924            lastDay: '[assant g] LT',
12925            lastWeek: 'dddd [g] LT',
12926            sameElse: 'L'
12927        },
12928        relativeTime: {
12929            future: 'dadkh s yan %s',
12930            past: 'yan %s',
12931            s: 'imik',
12932            m: 'minuḍ',
12933            mm: '%d minuḍ',
12934            h: 'saɛa',
12935            hh: '%d tassaɛin',
12936            d: 'ass',
12937            dd: '%d ossan',
12938            M: 'ayowr',
12939            MM: '%d iyyirn',
12940            y: 'asgas',
12941            yy: '%d isgasn'
12942        },
12943        week: {
12944            dow: 6, // Saturday is the first day of the week.
12945            doy: 12  // The week that contains Jan 1st is the first week of the year.
12946        }
12947    });
12948
12949    //! moment.js locale configuration
12950    //! locale : Central Atlas Tamazight [tzm]
12951    //! author : Abdel Said : https://github.com/abdelsaid
12952
12953    hooks.defineLocale('tzm', {
12954        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
12955        monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
12956        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
12957        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
12958        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
12959        longDateFormat: {
12960            LT: 'HH:mm',
12961            LTS: 'HH:mm:ss',
12962            L: 'DD/MM/YYYY',
12963            LL: 'D MMMM YYYY',
12964            LLL: 'D MMMM YYYY HH:mm',
12965            LLLL: 'dddd D MMMM YYYY HH:mm'
12966        },
12967        calendar: {
12968            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
12969            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
12970            nextWeek: 'dddd [â´´] LT',
12971            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
12972            lastWeek: 'dddd [â´´] LT',
12973            sameElse: 'L'
12974        },
12975        relativeTime: {
12976            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
12977            past: 'ⵢⴰⵏ %s',
12978            s: 'ⵉⵎⵉⴽ',
12979            m: 'ⵎⵉⵏⵓⴺ',
12980            mm: '%d ⵎⵉⵏⵓⴺ',
12981            h: 'ⵙⴰⵄⴰ',
12982            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
12983            d: 'ⴰⵙⵙ',
12984            dd: '%d oⵙⵙⴰⵏ',
12985            M: 'ⴰⵢoⵓⵔ',
12986            MM: '%d ⵉⵢⵢⵉⵔⵏ',
12987            y: 'ⴰⵙⴳⴰⵙ',
12988            yy: '%d ⵉⵙⴳⴰⵙⵏ'
12989        },
12990        week: {
12991            dow: 6, // Saturday is the first day of the week.
12992            doy: 12  // The week that contains Jan 1st is the first week of the year.
12993        }
12994    });
12995
12996    //! moment.js locale configuration
12997    //! locale : Ukrainian [uk]
12998    //! author : zemlanin : https://github.com/zemlanin
12999    //! Author : Menelion Elensúle : https://github.com/Oire
13000
13001    function plural$6(word, num) {
13002        var forms = word.split('_');
13003        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
13004    }
13005    function relativeTimeWithPlural$4(number, withoutSuffix, key) {
13006        var format = {
13007            'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
13008            'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
13009            'dd': 'день_дні_днів',
13010            'MM': 'місяць_місяці_місяців',
13011            'yy': 'рік_роки_років'
13012        };
13013        if (key === 'm') {
13014            return withoutSuffix ? 'хвилина' : 'хвилину';
13015        }
13016        else if (key === 'h') {
13017            return withoutSuffix ? 'година' : 'годину';
13018        }
13019        else {
13020            return number + ' ' + plural$6(format[key], +number);
13021        }
13022    }
13023    function weekdaysCaseReplace(m, format) {
13024        var weekdays = {
13025            'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
13026            'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
13027            'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
13028        };
13029
13030        if (!m) {
13031            return weekdays['nominative'];
13032        }
13033
13034        var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
13035            'accusative' :
13036            ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
13037                'genitive' :
13038                'nominative');
13039        return weekdays[nounCase][m.day()];
13040    }
13041    function processHoursFunction(str) {
13042        return function () {
13043            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
13044        };
13045    }
13046
13047    hooks.defineLocale('uk', {
13048        months: {
13049            'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
13050            'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
13051        },
13052        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
13053        weekdays: weekdaysCaseReplace,
13054        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
13055        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
13056        longDateFormat: {
13057            LT: 'HH:mm',
13058            LTS: 'HH:mm:ss',
13059            L: 'DD.MM.YYYY',
13060            LL: 'D MMMM YYYY р.',
13061            LLL: 'D MMMM YYYY р., HH:mm',
13062            LLLL: 'dddd, D MMMM YYYY р., HH:mm'
13063        },
13064        calendar: {
13065            sameDay: processHoursFunction('[Сьогодні '),
13066            nextDay: processHoursFunction('[Завтра '),
13067            lastDay: processHoursFunction('[Вчора '),
13068            nextWeek: processHoursFunction('[У] dddd ['),
13069            lastWeek: function () {
13070                switch (this.day()) {
13071                    case 0:
13072                    case 3:
13073                    case 5:
13074                    case 6:
13075                        return processHoursFunction('[Минулої] dddd [').call(this);
13076                    case 1:
13077                    case 2:
13078                    case 4:
13079                        return processHoursFunction('[Минулого] dddd [').call(this);
13080                }
13081            },
13082            sameElse: 'L'
13083        },
13084        relativeTime: {
13085            future: 'за %s',
13086            past: '%s тому',
13087            s: 'декілька секунд',
13088            m: relativeTimeWithPlural$4,
13089            mm: relativeTimeWithPlural$4,
13090            h: 'годину',
13091            hh: relativeTimeWithPlural$4,
13092            d: 'день',
13093            dd: relativeTimeWithPlural$4,
13094            M: 'місяць',
13095            MM: relativeTimeWithPlural$4,
13096            y: 'рік',
13097            yy: relativeTimeWithPlural$4
13098        },
13099        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
13100        meridiemParse: /ночі|ранку|дня|вечора/,
13101        isPM: function (input) {
13102            return /^(дня|вечора)$/.test(input);
13103        },
13104        meridiem: function (hour, minute, isLower) {
13105            if (hour < 4) {
13106                return 'ночі';
13107            } else if (hour < 12) {
13108                return 'ранку';
13109            } else if (hour < 17) {
13110                return 'дня';
13111            } else {
13112                return 'вечора';
13113            }
13114        },
13115        dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
13116        ordinal: function (number, period) {
13117            switch (period) {
13118                case 'M':
13119                case 'd':
13120                case 'DDD':
13121                case 'w':
13122                case 'W':
13123                    return number + '-й';
13124                case 'D':
13125                    return number + '-го';
13126                default:
13127                    return number;
13128            }
13129        },
13130        week: {
13131            dow: 1, // Monday is the first day of the week.
13132            doy: 7  // The week that contains Jan 1st is the first week of the year.
13133        }
13134    });
13135
13136    //! moment.js locale configuration
13137    //! locale : Urdu [ur]
13138    //! author : Sawood Alam : https://github.com/ibnesayeed
13139    //! author : Zack : https://github.com/ZackVision
13140
13141    var months$8 = [
13142        'جنوری',
13143        'فروری',
13144        'مارچ',
13145        'اپریل',
13146        'مئی',
13147        'جون',
13148        'جولائی',
13149        'اگست',
13150        'ستمبر',
13151        'اکتوبر',
13152        'نومبر',
13153        'دسمبر'
13154    ];
13155    var days$2 = [
13156        'اتوار',
13157        'پیر',
13158        'منگل',
13159        'بدھ',
13160        'جمعرات',
13161        'جمعہ',
13162        'ہفتہ'
13163    ];
13164
13165    hooks.defineLocale('ur', {
13166        months: months$8,
13167        monthsShort: months$8,
13168        weekdays: days$2,
13169        weekdaysShort: days$2,
13170        weekdaysMin: days$2,
13171        longDateFormat: {
13172            LT: 'HH:mm',
13173            LTS: 'HH:mm:ss',
13174            L: 'DD/MM/YYYY',
13175            LL: 'D MMMM YYYY',
13176            LLL: 'D MMMM YYYY HH:mm',
13177            LLLL: 'dddd، D MMMM YYYY HH:mm'
13178        },
13179        meridiemParse: /صبح|شام/,
13180        isPM: function (input) {
13181            return 'شام' === input;
13182        },
13183        meridiem: function (hour, minute, isLower) {
13184            if (hour < 12) {
13185                return 'صبح';
13186            }
13187            return 'شام';
13188        },
13189        calendar: {
13190            sameDay: '[آج بوقت] LT',
13191            nextDay: '[کل بوقت] LT',
13192            nextWeek: 'dddd [بوقت] LT',
13193            lastDay: '[گذشتہ روز بوقت] LT',
13194            lastWeek: '[گذشتہ] dddd [بوقت] LT',
13195            sameElse: 'L'
13196        },
13197        relativeTime: {
13198            future: '%s بعد',
13199            past: '%s قبل',
13200            s: 'چند سیکنڈ',
13201            m: 'ایک منٹ',
13202            mm: '%d منٹ',
13203            h: 'ایک گھنٹہ',
13204            hh: '%d گھنٹے',
13205            d: 'ایک دن',
13206            dd: '%d دن',
13207            M: 'ایک ماہ',
13208            MM: '%d ماہ',
13209            y: 'ایک سال',
13210            yy: '%d سال'
13211        },
13212        preparse: function (string) {
13213            return string.replace(/،/g, ',');
13214        },
13215        postformat: function (string) {
13216            return string.replace(/,/g, '،');
13217        },
13218        week: {
13219            dow: 1, // Monday is the first day of the week.
13220            doy: 4  // The week that contains Jan 4th is the first week of the year.
13221        }
13222    });
13223
13224    //! moment.js locale configuration
13225    //! locale : Uzbek Latin [uz-latn]
13226    //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
13227
13228    hooks.defineLocale('uz-latn', {
13229        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
13230        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
13231        weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
13232        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
13233        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
13234        longDateFormat: {
13235            LT: 'HH:mm',
13236            LTS: 'HH:mm:ss',
13237            L: 'DD/MM/YYYY',
13238            LL: 'D MMMM YYYY',
13239            LLL: 'D MMMM YYYY HH:mm',
13240            LLLL: 'D MMMM YYYY, dddd HH:mm'
13241        },
13242        calendar: {
13243            sameDay: '[Bugun soat] LT [da]',
13244            nextDay: '[Ertaga] LT [da]',
13245            nextWeek: 'dddd [kuni soat] LT [da]',
13246            lastDay: '[Kecha soat] LT [da]',
13247            lastWeek: '[O\'tgan] dddd [kuni soat] LT [da]',
13248            sameElse: 'L'
13249        },
13250        relativeTime: {
13251            future: 'Yaqin %s ichida',
13252            past: 'Bir necha %s oldin',
13253            s: 'soniya',
13254            m: 'bir daqiqa',
13255            mm: '%d daqiqa',
13256            h: 'bir soat',
13257            hh: '%d soat',
13258            d: 'bir kun',
13259            dd: '%d kun',
13260            M: 'bir oy',
13261            MM: '%d oy',
13262            y: 'bir yil',
13263            yy: '%d yil'
13264        },
13265        week: {
13266            dow: 1, // Monday is the first day of the week.
13267            doy: 7  // The week that contains Jan 1st is the first week of the year.
13268        }
13269    });
13270
13271    //! moment.js locale configuration
13272    //! locale : Uzbek [uz]
13273    //! author : Sardor Muminov : https://github.com/muminoff
13274
13275    hooks.defineLocale('uz', {
13276        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
13277        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
13278        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
13279        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
13280        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
13281        longDateFormat: {
13282            LT: 'HH:mm',
13283            LTS: 'HH:mm:ss',
13284            L: 'DD/MM/YYYY',
13285            LL: 'D MMMM YYYY',
13286            LLL: 'D MMMM YYYY HH:mm',
13287            LLLL: 'D MMMM YYYY, dddd HH:mm'
13288        },
13289        calendar: {
13290            sameDay: '[Бугун соат] LT [да]',
13291            nextDay: '[Эртага] LT [да]',
13292            nextWeek: 'dddd [куни соат] LT [да]',
13293            lastDay: '[Кеча соат] LT [да]',
13294            lastWeek: '[Утган] dddd [куни соат] LT [да]',
13295            sameElse: 'L'
13296        },
13297        relativeTime: {
13298            future: 'Якин %s ичида',
13299            past: 'Бир неча %s олдин',
13300            s: 'фурсат',
13301            m: 'бир дакика',
13302            mm: '%d дакика',
13303            h: 'бир соат',
13304            hh: '%d соат',
13305            d: 'бир кун',
13306            dd: '%d кун',
13307            M: 'бир ой',
13308            MM: '%d ой',
13309            y: 'бир йил',
13310            yy: '%d йил'
13311        },
13312        week: {
13313            dow: 1, // Monday is the first day of the week.
13314            doy: 7  // The week that contains Jan 4th is the first week of the year.
13315        }
13316    });
13317
13318    //! moment.js locale configuration
13319    //! locale : Vietnamese [vi]
13320    //! author : Bang Nguyen : https://github.com/bangnk
13321
13322    hooks.defineLocale('vi', {
13323        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
13324        monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
13325        monthsParseExact: true,
13326        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
13327        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
13328        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
13329        weekdaysParseExact: true,
13330        meridiemParse: /sa|ch/i,
13331        isPM: function (input) {
13332            return /^ch$/i.test(input);
13333        },
13334        meridiem: function (hours, minutes, isLower) {
13335            if (hours < 12) {
13336                return isLower ? 'sa' : 'SA';
13337            } else {
13338                return isLower ? 'ch' : 'CH';
13339            }
13340        },
13341        longDateFormat: {
13342            LT: 'HH:mm',
13343            LTS: 'HH:mm:ss',
13344            L: 'DD/MM/YYYY',
13345            LL: 'D MMMM [năm] YYYY',
13346            LLL: 'D MMMM [năm] YYYY HH:mm',
13347            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
13348            l: 'DD/M/YYYY',
13349            ll: 'D MMM YYYY',
13350            lll: 'D MMM YYYY HH:mm',
13351            llll: 'ddd, D MMM YYYY HH:mm'
13352        },
13353        calendar: {
13354            sameDay: '[Hôm nay lúc] LT',
13355            nextDay: '[Ngày mai lúc] LT',
13356            nextWeek: 'dddd [tuần tới lúc] LT',
13357            lastDay: '[Hôm qua lúc] LT',
13358            lastWeek: 'dddd [tuần rồi lúc] LT',
13359            sameElse: 'L'
13360        },
13361        relativeTime: {
13362            future: '%s tới',
13363            past: '%s trước',
13364            s: 'vài giây',
13365            m: 'một phút',
13366            mm: '%d phút',
13367            h: 'một giờ',
13368            hh: '%d giờ',
13369            d: 'một ngày',
13370            dd: '%d ngày',
13371            M: 'một tháng',
13372            MM: '%d tháng',
13373            y: 'một năm',
13374            yy: '%d năm'
13375        },
13376        dayOfMonthOrdinalParse: /\d{1,2}/,
13377        ordinal: function (number) {
13378            return number;
13379        },
13380        week: {
13381            dow: 1, // Monday is the first day of the week.
13382            doy: 4  // The week that contains Jan 4th is the first week of the year.
13383        }
13384    });
13385
13386    //! moment.js locale configuration
13387    //! locale : Pseudo [x-pseudo]
13388    //! author : Andrew Hood : https://github.com/andrewhood125
13389
13390    hooks.defineLocale('x-pseudo', {
13391        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),
13392        monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.
13392split('_'),
13393        monthsParseExact: true,
13394        weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),
13395        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
13396        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
13397        weekdaysParseExact: true,
13398        longDateFormat: {
13399            LT: 'HH:mm',
13400            L: 'DD/MM/YYYY',
13401            LL: 'D MMMM YYYY',
13402            LLL: 'D MMMM YYYY HH:mm',
13403            LLLL: 'dddd, D MMMM YYYY HH:mm'
13404        },
13405        calendar: {
13406            sameDay: '[T~ódá~ý át] LT',
13407            nextDay: '[T~ómó~rró~w át] LT',
13408            nextWeek: 'dddd [át] LT',
13409            lastDay: '[Ý~ést~érdá~ý át] LT',
13410            lastWeek: '[L~ást] dddd [át] LT',
13411            sameElse: 'L'
13412        },
13413        relativeTime: {
13414            future: 'í~ñ %s',
13415            past: '%s á~gó',
13416            s: 'á ~féw ~sécó~ñds',
13417            m: 'á ~míñ~úté',
13418            mm: '%d m~íñú~tés',
13419            h: 'á~ñ hó~úr',
13420            hh: '%d h~óúrs',
13421            d: 'á ~dáý',
13422            dd: '%d d~áýs',
13423            M: 'á ~móñ~th',
13424            MM: '%d m~óñt~hs',
13425            y: 'á ~ýéár',
13426            yy: '%d ý~éárs'
13427        },
13428        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
13429        ordinal: function (number) {
13430            var b = number % 10,
13431                output = (~~(number % 100 / 10) === 1) ? 'th' :
13432                    (b === 1) ? 'st' :
13433                        (b === 2) ? 'nd' :
13434                            (b === 3) ? 'rd' : 'th';
13435            return number + output;
13436        },
13437        week: {
13438            dow: 1, // Monday is the first day of the week.
13439            doy: 4  // The week that contains Jan 4th is the first week of the year.
13440        }
13441    });
13442
13443    //! moment.js locale configuration
13444    //! locale : Yoruba Nigeria [yo]
13445    //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
13446
13447    hooks.defineLocale('yo', {
13448        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
13449        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
13450        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
13451        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
13452        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
13453        longDateFormat: {
13454            LT: 'h:mm A',
13455            LTS: 'h:mm:ss A',
13456            L: 'DD/MM/YYYY',
13457            LL: 'D MMMM YYYY',
13458            LLL: 'D MMMM YYYY h:mm A',
13459            LLLL: 'dddd, D MMMM YYYY h:mm A'
13460        },
13461        calendar: {
13462            sameDay: '[Ònì ni] LT',
13463            nextDay: '[Ọ̀la ni] LT',
13464            nextWeek: 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT',
13465            lastDay: '[Àna ni] LT',
13466            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
13467            sameElse: 'L'
13468        },
13469        relativeTime: {
13470            future: 'ní %s',
13471            past: '%s kọjá',
13472            s: 'ìsẹjú aayá die',
13473            m: 'ìsẹjú kan',
13474            mm: 'ìsẹjú %d',
13475            h: 'wákati kan',
13476            hh: 'wákati %d',
13477            d: 'ọjọ́ kan',
13478            dd: 'ọjọ́ %d',
13479            M: 'osù kan',
13480            MM: 'osù %d',
13481            y: 'ọdún kan',
13482            yy: 'ọdún %d'
13483        },
13484        dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
13485        ordinal: 'ọjọ́ %d',
13486        week: {
13487            dow: 1, // Monday is the first day of the week.
13488            doy: 4 // The week that contains Jan 4th is the first week of the year.
13489        }
13490    });
13491
13492    //! moment.js locale configuration
13493    //! locale : Chinese (China) [zh-cn]
13494    //! author : suupic : https://github.com/suupic
13495    //! author : Zeno Zeng : https://github.com/zenozeng
13496
13497    hooks.defineLocale('zh-cn', {
13498        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
13499        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
13500        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
13501        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
13502        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
13503        longDateFormat: {
13504            LT: 'HH:mm',
13505            LTS: 'HH:mm:ss',
13506            L: 'YYYY年MMMD日',
13507            LL: 'YYYY年MMMD日',
13508            LLL: 'YYYY年MMMD日Ah点mm分',
13509            LLLL: 'YYYY年MMMD日ddddAh点mm分',
13510            l: 'YYYY年MMMD日',
13511            ll: 'YYYY年MMMD日',
13512            lll: 'YYYY年MMMD日 HH:mm',
13513            llll: 'YYYY年MMMD日dddd HH:mm'
13514        },
13515        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
13516        meridiemHour: function (hour, meridiem) {
13517            if (hour === 12) {
13518                hour = 0;
13519            }
13520            if (meridiem === '凌晨' || meridiem === '早上' ||
13521                meridiem === '上午') {
13522                return hour;
13523            } else if (meridiem === '下午' || meridiem === '晚上') {
13524                return hour + 12;
13525            } else {
13526                // '中午'
13527                return hour >= 11 ? hour : hour + 12;
13528            }
13529        },
13530        meridiem: function (hour, minute, isLower) {
13531            var hm = hour * 100 + minute;
13532            if (hm < 600) {
13533                return '凌晨';
13534            } else if (hm < 900) {
13535                return '早上';
13536            } else if (hm < 1130) {
13537                return '上午';
13538            } else if (hm < 1230) {
13539                return '中午';
13540            } else if (hm < 1800) {
13541                return '下午';
13542            } else {
13543                return '晚上';
13544            }
13545        },
13546        calendar: {
13547            sameDay: '[今天]LT',
13548            nextDay: '[明天]LT',
13549            nextWeek: '[下]ddddLT',
13550            lastDay: '[昨天]LT',
13551            lastWeek: '[上]ddddLT',
13552            sameElse: 'L'
13553        },
13554        dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
13555        ordinal: function (number, period) {
13556            switch (period) {
13557                case 'd':
13558                case 'D':
13559                case 'DDD':
13560                    return number + '日';
13561                case 'M':
13562                    return number + '月';
13563                case 'w':
13564                case 'W':
13565                    return number + '周';
13566                default:
13567                    return number;
13568            }
13569        },
13570        relativeTime: {
13571            future: '%s内',
13572            past: '%s前',
13573            s: '几秒',
13574            m: '1 分钟',
13575            mm: '%d 分钟',
13576            h: '1 小时',
13577            hh: '%d 小时',
13578            d: '1 天',
13579            dd: '%d 天',
13580            M: '1 个月',
13581            MM: '%d 个月',
13582            y: '1 å¹´',
13583            yy: '%d å¹´'
13584        },
13585        week: {
13586            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
13587            dow: 1, // Monday is the first day of the week.
13588            doy: 4  // The week that contains Jan 4th is the first week of the year.
13589        }
13590    });
13591
13592    //! moment.js locale configuration
13593    //! locale : Chinese (Hong Kong) [zh-hk]
13594    //! author : Ben : https://github.com/ben-lin
13595    //! author : Chris Lam : https://github.com/hehachris
13596    //! author : Konstantin : https://github.com/skfd
13597
13598    hooks.defineLocale('zh-hk', {
13599        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
13600        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
13601        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
13602        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
13603        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
13604        longDateFormat: {
13605            LT: 'HH:mm',
13606            LTS: 'HH:mm:ss',
13607            L: 'YYYY年MMMD日',
13608            LL: 'YYYY年MMMD日',
13609            LLL: 'YYYY年MMMD日 HH:mm',
13610            LLLL: 'YYYY年MMMD日dddd HH:mm',
13611            l: 'YYYY年MMMD日',
13612            ll: 'YYYY年MMMD日',
13613            lll: 'YYYY年MMMD日 HH:mm',
13614            llll: 'YYYY年MMMD日dddd HH:mm'
13615        },
13616        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
13617        meridiemHour: function (hour, meridiem) {
13618            if (hour === 12) {
13619                hour = 0;
13620            }
13621            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
13622                return hour;
13623            } else if (meridiem === '中午') {
13624                return hour >= 11 ? hour : hour + 12;
13625            } else if (meridiem === '下午' || meridiem === '晚上') {
13626                return hour + 12;
13627            }
13628        },
13629        meridiem: function (hour, minute, isLower) {
13630            var hm = hour * 100 + minute;
13631            if (hm < 600) {
13632                return '凌晨';
13633            } else if (hm < 900) {
13634                return '早上';
13635            } else if (hm < 1130) {
13636                return '上午';
13637            } else if (hm < 1230) {
13638                return '中午';
13639            } else if (hm < 1800) {
13640                return '下午';
13641            } else {
13642                return '晚上';
13643            }
13644        },
13645        calendar: {
13646            sameDay: '[今天]LT',
13647            nextDay: '[明天]LT',
13648            nextWeek: '[下]ddddLT',
13649            lastDay: '[昨天]LT',
13650            lastWeek: '[上]ddddLT',
13651            sameElse: 'L'
13652        },
13653        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
13654        ordinal: function (number, period) {
13655            switch (period) {
13656                case 'd':
13657                case 'D':
13658                case 'DDD':
13659                    return number + '日';
13660                case 'M':
13661                    return number + '月';
13662                case 'w':
13663                case 'W':
13664                    return number + '週';
13665                default:
13666                    return number;
13667            }
13668        },
13669        relativeTime: {
13670            future: '%s內',
13671            past: '%s前',
13672            s: '幾秒',
13673            m: '1 分鐘',
13674            mm: '%d 分鐘',
13675            h: '1 小時',
13676            hh: '%d 小時',
13677            d: '1 天',
13678            dd: '%d 天',
13679            M: '1 個月',
13680            MM: '%d 個月',
13681            y: '1 å¹´',
13682            yy: '%d å¹´'
13683        }
13684    });
13685
13686    //! moment.js locale configuration
13687    //! locale : Chinese (Taiwan) [zh-tw]
13688    //! author : Ben : https://github.com/ben-lin
13689    //! author : Chris Lam : https://github.com/hehachris
13690
13691    hooks.defineLocale('zh-tw', {
13692        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
13693        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
13694        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
13695        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
13696        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
13697        longDateFormat: {
13698            LT: 'HH:mm',
13699            LTS: 'HH:mm:ss',
13700            L: 'YYYY年MMMD日',
13701            LL: 'YYYY年MMMD日',
13702            LLL: 'YYYY年MMMD日 HH:mm',
13703            LLLL: 'YYYY年MMMD日dddd HH:mm',
13704            l: 'YYYY年MMMD日',
13705            ll: 'YYYY年MMMD日',
13706            lll: 'YYYY年MMMD日 HH:mm',
13707            llll: 'YYYY年MMMD日dddd HH:mm'
13708        },
13709        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
13710        meridiemHour: function (hour, meridiem) {
13711            if (hour === 12) {
13712                hour = 0;
13713            }
13714            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
13715                return hour;
13716            } else if (meridiem === '中午') {
13717                return hour >= 11 ? hour : hour + 12;
13718            } else if (meridiem === '下午' || meridiem === '晚上') {
13719                return hour + 12;
13720            }
13721        },
13722        meridiem: function (hour, minute, isLower) {
13723            var hm = hour * 100 + minute;
13724            if (hm < 600) {
13725                return '凌晨';
13726            } else if (hm < 900) {
13727                return '早上';
13728            } else if (hm < 1130) {
13729                return '上午';
13730            } else if (hm < 1230) {
13731                return '中午';
13732            } else if (hm < 1800) {
13733                return '下午';
13734            } else {
13735                return '晚上';
13736            }
13737        },
13738        calendar: {
13739            sameDay: '[今天]LT',
13740            nextDay: '[明天]LT',
13741            nextWeek: '[下]ddddLT',
13742            lastDay: '[昨天]LT',
13743            lastWeek: '[上]ddddLT',
13744            sameElse: 'L'
13745        },
13746        dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
13747        ordinal: function (number, period) {
13748            switch (period) {
13749                case 'd':
13750                case 'D':
13751                case 'DDD':
13752                    return number + '日';
13753                case 'M':
13754                    return number + '月';
13755                case 'w':
13756                case 'W':
13757                    return number + '週';
13758                default:
13759                    return number;
13760            }
13761        },
13762        relativeTime: {
13763            future: '%s內',
13764            past: '%s前',
13765            s: '幾秒',
13766            m: '1 分鐘',
13767            mm: '%d 分鐘',
13768            h: '1 小時',
13769            hh: '%d 小時',
13770            d: '1 天',
13771            dd: '%d 天',
13772            M: '1 個月',
13773            MM: '%d 個月',
13774            y: '1 å¹´',
13775            yy: '%d å¹´'
13776        }
13777    });
13778
13779    hooks.locale('en');
13780
13781    return hooks;
13782
13783})));
13784// ========================================================================================
13785// DATE RANGE PICKER
13786// ========================================================================================
13787
13788// jquery.daterangepicker.js
13789// author : Chunlong Liu
13790// license : MIT
13791// www.jszen.com
13792
13793(function (factory) {
13794    if (typeof define === 'function' && define.amd) {
13795        // AMD. Register as an anonymous module.
13796        define(['jquery', 'moment'], factory);
13797    } else if (typeof exports === 'object' && typeof module !== 'undefined') {
13798        // CommonJS. Register as a module
13799        module.exports = factory(require('jquery'), require('moment'));
13800    } else {
13801        // Browser globals
13802        factory(jQuery, moment);
13803    }
13804}(function ($, moment) {
13805    'use strict';
13806    $.dateRangePickerLanguages =
13807    {
13808        'default':  //default language: English
13809        {
13810            'selected': 'Selected:',
13811            'day': 'Day',
13812            'days': 'Days',
13813            'night': 'Night',
13814            'nights': 'Nights',
13815            'apply': 'Close',
13816            'week-1': 'mo',
13817            'week-2': 'tu',
13818            'week-3': 'we',
13819            'week-4': 'th',
13820            'week-5': 'fr',
13821            'week-6': 'sa',
13822            'week-7': 'su',
13823            'week-number': 'W',
13824            'month-name': ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'],
13825            'shortcuts': 'Shortcuts',
13826            'custom-values': 'Custom Values',
13827            'past': 'Past',
13828            'following': 'Following',
13829            'previous': 'Previous',
13830            'prev-week': 'Week',
13831            'prev-month': 'Month',
13832            'prev-year': 'Year',
13833            'next': 'Next',
13834            'next-week': 'Week',
13835            'next-month': 'Month',
13836            'next-year': 'Year',
13837            'less-than': 'Date range should not be more than %d days',
13838            'more-than': 'Date range should not be less than %d days',
13839            'default-more': 'Please select a date range longer than %d days',
13840            'default-single': 'Please select a date',
13841            'default-less': 'Please select a date range less than %d days',
13842            'default-range': 'Please select a date range between %d and %d days',
13843           
13843 'default-default': 'Please select a date range',
13844            'time': 'Time',
13845            'hour': 'Hour',
13846            'minute': 'Minute'
13847        },
13848        'id':
13849        {
13850            'selected': 'Terpilih:',
13851            'day': 'Hari',
13852            'days': 'Hari',
13853            'apply': 'Tutup',
13854            'week-1': 'sen',
13855            'week-2': 'sel',
13856            'week-3': 'rab',
13857            'week-4': 'kam',
13858            'week-5': 'jum',
13859            'week-6': 'sab',
13860            'week-7': 'min',
13861            'week-number': 'W',
13862            'month-name': ['januari', 'februari', 'maret', 'april', 'mei', 'juni', 'juli', 'agustus', 'september', 'oktober', 'november', 'desember'],
13863            'shortcuts': 'Pintas',
13864            'custom-values': 'Nilai yang ditentukan',
13865            'past': 'Yang Lalu',
13866            'following': 'Mengikuti',
13867            'previous': 'Sebelumnya',
13868            'prev-week': 'Minggu',
13869            'prev-month': 'Bulan',
13870            'prev-year': 'Tahun',
13871            'next': 'Selanjutnya',
13872            'next-week': 'Minggu',
13873            'next-month': 'Bulan',
13874            'next-year': 'Tahun',
13875            'less-than': 'Tanggal harus lebih dari %d hari',
13876            'more-than': 'Tanggal harus kurang dari %d hari',
13877            'default-more': 'Jarak tanggal harus lebih lama dari %d hari',
13878            'default-single': 'Silakan pilih tanggal',
13879            'default-less': 'Jarak rentang tanggal tidak boleh lebih lama dari %d hari',
13880            'default-range': 'Rentang tanggal harus antara %d dan %d hari',
13881            'default-default': 'Silakan pilih rentang tanggal',
13882            'time': 'Waktu',
13883            'hour': 'Jam',
13884            'minute': 'Menit'
13885        },
13886        'az':
13887        {
13888            'selected': 'Seçildi:',
13889            'day': ' gün',
13890            'days': ' gün',
13891            'apply': 'tətbiq',
13892            'week-1': '1',
13893            'week-2': '2',
13894            'week-3': '3',
13895            'week-4': '4',
13896            'week-5': '5',
13897            'week-6': '6',
13898            'week-7': '7',
13899            'month-name': ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'],
13900            'shortcuts': 'Qısayollar',
13901            'past': 'Keçmiş',
13902            'following': 'Növbəti',
13903            'previous': '&nbsp;&nbsp;&nbsp;',
13904            'prev-week': 'Öncəki həftə',
13905            'prev-month': 'Öncəki ay',
13906            'prev-year': 'Öncəki il',
13907            'next': '&nbsp;&nbsp;&nbsp;',
13908            'next-week': 'Növbəti həftə',
13909            'next-month': 'Növbəti ay',
13910            'next-year': 'Növbəti il',
13911            'less-than': 'Tarix aralığı %d gündən çox olmamalıdır',
13912            'more-than': 'Tarix aralığı %d gündən az olmamalıdır',
13913            'default-more': '%d gündən çox bir tarix seçin',
13914            'default-single': 'Tarix seçin',
13915            'default-less': '%d gündən az bir tarix seçin',
13916            'default-range': '%d və %d gün aralığında tarixlər seçin',
13917            'default-default': 'Tarix aralığı seçin'
13918        },
13919        'cn':  //simplified chinese
13920        {
13921            'selected': '已选择:',
13922            'day': '天',
13923            'days': '天',
13924            'apply': '确定',
13925            'week-1': '一',
13926            'week-2': '二',
13927            'week-3': '三',
13928            'week-4': '四',
13929            'week-5': '五',
13930            'week-6': '六',
13931            'week-7': '日',
13932            'week-number': '周',
13933            'month-name': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
13934            'shortcuts': '快捷选择',
13935            'past': '过去',
13936            'following': '将来',
13937            'previous': '&nbsp;&nbsp;&nbsp;',
13938            'prev-week': '上周',
13939            'prev-month': '上个月',
13940            'prev-year': '去年',
13941            'next': '&nbsp;&nbsp;&nbsp;',
13942            'next-week': '下周',
13943            'next-month': '下个月',
13944            'next-year': '明年',
13945            'less-than': '所选日期范围不能大于%d天',
13946            'more-than': '所选日期范围不能小于%d天',
13947            'default-more': '请选择大于%d天的日期范围',
13948            'default-less': '请选择小于%d天的日期范围',
13949            'default-range': '请选择%d天到%d天的日期范围',
13950            'default-single': '请选择一个日期',
13951            'default-default': '请选择一个日期范围',
13952            'time': '时间',
13953            'hour': '小时',
13954            'minute': '分钟'
13955        },
13956        'cz':
13957        {
13958            'selected': 'Vybráno:',
13959            'day': 'Den',
13960            'days': 'Dny',
13961            'apply': 'Zavřít',
13962            'week-1': 'po',
13963            'week-2': 'út',
13964            'week-3': 'st',
13965            'week-4': 'čt',
13966            'week-5': 'pá',
13967            'week-6': 'so',
13968            'week-7': 'ne',
13969            'month-name': ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
13970            'shortcuts': 'Zkratky',
13971            'past': 'po',
13972            'following': 'následující',
13973            'previous': 'předchozí',
13974            'prev-week': 'týden',
13975            'prev-month': 'měsíc',
13976            'prev-year': 'rok',
13977            'next': 'další',
13978            'next-week': 'týden',
13979            'next-month': 'měsíc',
13980            'next-year': 'rok',
13981            'less-than': 'Rozsah data by neměl být větší než %d dnů',
13982            'more-than': 'Rozsah data by neměl být menší než %d dnů',
13983            'default-more': 'Prosím zvolte rozsah data větší než %d dnů',
13984            'default-single': 'Prosím zvolte datum',
13985            'default-less': 'Prosím zvolte rozsah data menší než %d dnů',
13986            'default-range': 'Prosím zvolte rozsah data mezi %d a %d dny',
13987            'default-default': 'Prosím zvolte rozsah data'
13988        },
13989        'de':
13990        {
13991            'selected': 'Auswahl:',
13992            'day': 'Tag',
13993            'days': 'Tage',
13994            'apply': 'Schließen',
13995            'week-1': 'mo',
13996            'week-2': 'di',
13997            'week-3': 'mi',
13998            'week-4': 'do',
13999            'week-5': 'fr',
14000            'week-6': 'sa',
14001            'week-7': 'so',
14002            'month-name': ['januar', 'februar', 'märz', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'dezember'],
14003            'shortcuts': 'Schnellwahl',
14004            'past': 'Vorherige',
14005            'following': 'Folgende',
14006            'previous': 'Vorherige',
14007            'prev-week': 'Woche',
14008            'prev-month': 'Monat',
14009            'prev-year': 'Jahr',
14010            'next': 'Nächste',
14011            'next-week': 'Woche',
14012            'next-month': 'Monat',
14013            'next-year': 'Jahr',
14014            'less-than': 'Datumsbereich darf nicht größer sein als %d Tage',
14015            'more-than': 'Datumsbereich darf nicht kleiner sein als %d Tage',
14016            'default-more': 'Bitte mindestens %d Tage auswählen',
14017            'default-single': 'Bitte ein Datum auswählen',
14018            'default-less': 'Bitte weniger als %d Tage auswählen',
14019            'default-range': 'Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen',
14020            'default-default': 'Bitte ein Start- und Enddatum auswählen',
14021            'Time': 'Zeit',
14022            'hour': 'Stunde',
14023            'minute': 'Minute'
14024        },
14025        'es':
14026        {
14027            'selected': 'Seleccionado:',
14028            'day': 'Día',
14029            'days': 'Días',
14030            'apply': 'Cerrar',
14031            'week-1': 'lu',
14032            'week-2': 'ma',
14033            'week-3': 'mi',
14034            'week-4': 'ju',
14035            'week-5': 'vi',
14036            'week-6': 'sa',
14037            'week-7': 'do',
14038            'month-name': ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'],
14039            'shortcuts': 'Accesos directos',
14040            'past': 'Pasado',
14041            'following': 'Siguiente',
14042            'previous': 'Anterior',
14043            'prev-week': 'Semana',
14044            'prev-month': 'Mes',
14045            'prev-year': 'Año',
14046            'next': 'Siguiente',
14047            'next-week': 'Semana',
14048            'next-month': 'Mes',
14049            'next-year': 'Año',
14050            'less-than': 'El rango no debería ser mayor de %d días',
14051            'more-than': 'El rango no debería ser menor de %d días',
14052            'default-more': 'Por favor selecciona un rango mayor a %d días',
14053            'default-single': 'Por favor selecciona un día',
14054            'default-less': 'Por favor selecciona un rango menor a %d días',
14055            'default-range': 'Por favor selecciona un rango entre %d y %d días',
14056            'default-default': 'Por favor selecciona un rango de fechas.'
14057        },
14058        'fr':
14059        {
14060            'selected': 'Sélection:',
14061            'day': 'Jour',
14062            'days': 'Jours',
14063            'apply': 'Fermer',
14064            'week-1': 'lu',
14065            'week-2': 'ma',
14066            'week-3': 'me',
14067            'week-4': 'je',
14068            'week-5': 've',
14069            'week-6': 'sa',
14070            'week-7': 'di',
14071            'month-name': ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
14072            'shortcuts': 'Raccourcis',
14073            'past': 'Passé',
14074            'following': 'Suivant',
14075            'previous': 'Précédent',
14076            'prev-week': 'Semaine',
14077            'prev-month': 'Mois',
14078            'prev-year': 'Année',
14079            'next': 'Suivant',
14080            'next-week': 'Semaine',
14081            'next-month': 'Mois',
14082            'next-year': 'Année',
14083            'less-than': 'L\'intervalle ne doit pas être supérieure à %d jours',
14084            'more-than': 'L\'intervalle ne doit pas être inférieure à %d jours',
14085            'default-more': 'Merci de choisir une intervalle supérieure à %d jours',
14086            'default-single': 'Merci de choisir une date',
14087            'default-less': 'Merci de choisir une intervalle inférieure %d jours',
14088            'default-range': 'Merci de choisir une intervalle comprise entre %d et %d jours',
14089            'default-default': 'Merci de choisir une date'
14090        },
14091        'hu':
14092        {
14093            'selected': 'Kiválasztva:',
14094            'day': 'Nap',
14095            'days': 'Nap',
14096            'apply': 'Ok',
14097            'week-1': 'h',
14098            'week-2': 'k',
14099            'week-3': 'sz',
14100            'week-4': 'cs',
14101            'week-5': 'p',
14102            'week-6': 'sz',
14103            'week-7': 'v',
14104            'month-name': ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'],
14105            'shortcuts': 'Gyorsválasztó',
14106            'past': 'Múlt',
14107            'following': 'Következő',
14108            'previous': 'Előző',
14109            'prev-week': 'Hét',
14110            'prev-month': 'Hónap',
14111            'prev-year': 'Év',
14112            'next': 'Következő',
14113            'next-week': 'Hét',
14114            'next-month': 'Hónap',
14115            'next-year': 'Év',
14116            'less-than': 'A kiválasztás nem lehet több %d napnál',
14117            'more-than': 'A kiválasztás nem lehet több %d napnál',
14118            'default-more': 'Válassz ki egy időszakot ami hosszabb mint %d nap',
14119            'default-single': 'Válassz egy napot',
14120            'default-less': 'Válassz ki egy időszakot ami rövidebb mint %d nap',
14121            'default-range': 'Válassz ki egy %d - %d nap hosszú időszakot',
14122            'default-default': 'Válassz ki egy időszakot'
14123        },
14124        'it':
14125        {
14126            'selected': 'Selezionati:',
14127            'day': 'Giorno',
14128            'days': 'Giorni',
14129            'apply': 'Chiudi',
14130            'week-1': 'lu',
14131            'week-2': 'ma',
14132            'week-3': 'me',
14133            'week-4': 'gi',
14134            'week-5': 've',
14135            'week-6': 'sa',
14136            'week-7': 'do',
14137            'month-name': ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
14138            'shortcuts': 'Scorciatoie',
14139            'past': 'Scorso',
14140            'following': 'Successivo',
14141            'previous': 'Precedente',
14142            'prev-week': 'Settimana',
14143            'prev-month': 'Mese',
14144            'prev-year': 'Anno',
14145            'next': 'Prossimo',
14146            'next-week': 'Settimana',
14147            'next-month': 'Mese',
14148            'next-year': 'Anno',
14149            'less-than': 'L\'intervallo non dev\'essere maggiore di %d giorni',
14150            'more-than': 'L\'intervallo non dev\'essere minore di %d giorni',
14151            'default-more': 'Seleziona un intervallo maggiore di %d giorni',
14152            'default-single': 'Seleziona una data',
14153            'default-less': 'Seleziona un intervallo minore di %d giorni',
14154            'default-range': 'Seleziona un intervallo compreso tra i %d e i %d giorni',
14155            'default-default': 'Seleziona un intervallo di date'
14156        },
14157        'ko':
14158        {
14159            'selected': '기간:',
14160            'day': '일',
14161            'days': '일간',
14162            'apply': '닫기',
14163            'week-1': '월',
14164            'week-2': '화',
14165            'week-3': '수',
14166            'week-4': '목',
14167            'week-5': '금',
14168            'week-6': '토',
14169            'week-7': '일',
14170            'week-number': '주',
14171            'month-name': ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
14172            'shortcuts': '단축키들',
14173            'past': '지난(오늘기준)',
14174            'following': '이후(오늘기준)',
14175            'previous': '이전',
14176            'prev-week': '1주',
14177            'prev-month': '1달',
14178            'prev-year': '1년',
14179            'next': '다음',
14180            'next-week': '1주',
14181            'next-month': '1달',
14182            'next-year': '1년',
14183            'less-than': '날짜 범위는 %d 일보다 많을 수 없습니다',
14184            'more-than': '날짜 범위는 %d 일보다 작을 수 없습니다',
14185            'default-more': '날짜 범위를 %d 일보다 길게 선택해 주세요',
14186            'default-single': '날짜를 선택해 주세요',
14187            'default-less': '%d 일보다 작은 날짜를 선택해 주세요',
14188            'default-range': '%d와 %d 일 사이의 날짜 범위를 선택해 주세요',
14189            'default-default': '날짜 범위를 선택해 주세요',
14190            'time': '시각',
14191            'hour': '시',
14192            'minute': '분'
14193        },
14194        'no':
14195        {
14196            'selected': 'Valgt:',
14197            'day': 'Dag',
14198            'days': 'Dager',
14199            'apply': 'Lukk',
14200            'week-1': 'ma',
14201            'week-2': 'ti',
14202            'week-3': 'on',
14203            'week-4': 'to',
14204            'week-5': 'fr',
14205            'week-6': 'lø',
14206            'week-7': 'sø',
14207            'month-name': ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'],
14208            'shortcuts': 'Snarveier',
14209            'custom-values': 'Egendefinerte Verdier',
14210            'past': 'Over', // Not quite sure about the context of this one
14211            'following': 'Følger',
14212            'previous': 'Forrige',
14213            'prev-week': 'Uke',
14214            'prev-month': 'MÃ¥ned',
14215            'prev-year': 'År',
14216            'next': 'Neste',
14217            'next-week': 'Uke',
14218            'next-month': 'MÃ¥ned',
14219            'next-year': 'År',
14220            'less-than': 'Datoperioden skal ikkje være lengre enn %d dager',
14221            'more-than': 'Datoperioden skal ikkje være kortere enn %d dager',
14222            'default-more': 'Vennligst velg ein datoperiode lengre enn %d dager',
14223            'default-single': 'Vennligst velg ein dato',
14224            'default-less': 'Vennligst velg ein datoperiode mindre enn %d dager',
14225            'default-range': 'Vennligst velg ein datoperiode mellom %d og %d dager',
14226            'default-default': 'Vennligst velg ein datoperiode',
14227            'time': 'Tid',
14228            'hour': 'Time',
14229            'minute': 'Minutter'
14230        },
14231        'nl':
14232        {
14233            'selected': 'Geselecteerd:',
14234            'day': 'Dag',
14235            'days': 'Dagen',
14236            'apply': 'Ok',
14237            'week-1': 'ma',
14238            'week-2': 'di',
14239            'week-3': 'wo',
14240            'week-4': 'do',
14241            'week-5': 'vr',
14242            'week-6': 'za',
14243            'week-7': 'zo',
14244            'month-name': ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
14245            'shortcuts': 'Snelkoppelingen',
14246            'custom-values': 'Aangepaste waarden',
14247            'past': 'Verleden',
14248            'following': 'Komend',
14249            'previous': 'Vorige',
14250            'prev-week': 'Week',
14251            'prev-month': 'Maand',
14252            'prev-year': 'Jaar',
14253            'next': 'Volgende',
14254            'next-week': 'Week',
14255            'next-month': 'Maand',
14256            'next-year': 'Jaar',
14257            'less-than': 'Interval moet langer dan %d dagen zijn',
14258            'more-than': 'Interval mag niet minder dan %d dagen zijn',
14259            'default-more': 'Selecteer een interval langer dan %dagen',
14260            'default-single': 'Selecteer een datum',
14261            'default-less': 'Selecteer een interval minder dan %d dagen',
14262            'default-range': 'Selecteer een interval tussen %d en %d dagen',
14263            'default-default': 'Selecteer een interval',
14264            'time': 'Tijd',
14265            'hour': 'Uur',
14266            'minute': 'Minuut'
14267        },
14268        'ru':
14269        {
14270            'selected': 'Выбрано:',
14271            'day': 'День',
14272            'days': 'Дней',
14273            'apply': 'Закрыть',
14274            'week-1': 'пн',
14275            'week-2': 'вт',
14276            'week-3': 'ср',
14277            'week-4': 'чт',
14278            'week-5': 'пт',
14279            'week-6': 'сб',
14280            'week-7': 'вс',
14281            'month-name': ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'],
14282            'shortcuts': 'Быстрый выбор',
14283            'past': 'Прошедшие',
14284            'following': 'Следующие',
14285            'previous': '&nbsp;&nbsp;&nbsp;',
14286            'prev-week': 'Неделя',
14287            'prev-month': 'Месяц',
14288            'prev-year': 'Год',
14289            'next': '&nbsp;&nbsp;&nbsp;',
14290            'next-week': 'Неделя',
14291            'next-month': 'Месяц',
14292            'next-year': 'Год',
14293            'less-than': 'Диапазон не может быть больше %d дней',
14294            'more-than': 'Диапазон не может быть меньше %d дней',
14295            'default-more': 'Пожалуйста выберите диапазон больше %d дней',
14296            'default-single': 'Пожалуйста выберите дату',
14297            'default-less': 'Пожалуйста выберите диапазон меньше %d дней',
14298            'default-range': 'Пожалуйста выберите диапазон между %d и %d днями',
14299            'default-default': 'Пожалуйста выберите диапазон'
14300        },
14301        'pl':
14302        {
14303            'selected': 'Wybrany:',
14304            'day': 'Dzień',
14305            'days': 'Dni',
14306            'apply': 'Zamknij',
14307            'week-1': 'pon',
14308            'week-2': 'wt',
14309            'week-3': 'śr',
14310            'week-4': 'czw',
14311            'week-5': 'pt',
14312            'week-6': 'so',
14313            'week-7': 'nd',
14314            'month-name': ['styczeń', 'luty', 'marzec', 'kwiecieÅ
14314„', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
14315            'shortcuts': 'Skróty',
14316            'custom-values': 'Niestandardowe wartości',
14317            'past': 'Przeszłe',
14318            'following': 'Następne',
14319            'previous': 'Poprzednie',
14320            'prev-week': 'tydzień',
14321            'prev-month': 'miesiąc',
14322            'prev-year': 'rok',
14323            'next': 'Następny',
14324            'next-week': 'tydzień',
14325            'next-month': 'miesiąc',
14326            'next-year': 'rok',
14327            'less-than': 'Okres nie powinien być dłuższy niż %d dni',
14328            'more-than': 'Okres nie powinien być krótszy niż  %d ni',
14329            'default-more': 'Wybierz okres dłuższy niż %d dni',
14330            'default-single': 'Wybierz datę',
14331            'default-less': 'Wybierz okres krótszy niż %d dni',
14332            'default-range': 'Wybierz okres trwający od %d do %d dni',
14333            'default-default': 'Wybierz okres',
14334            'time': 'Czas',
14335            'hour': 'Godzina',
14336            'minute': 'Minuta'
14337        },
14338        'se':
14339        {
14340            'selected': 'Vald:',
14341            'day': 'dag',
14342            'days': 'dagar',
14343            'apply': 'godkänn',
14344            'week-1': 'ma',
14345            'week-2': 'ti',
14346            'week-3': 'on',
14347            'week-4': 'to',
14348            'week-5': 'fr',
14349            'week-6': 'lö',
14350            'week-7': 'sö',
14351            'month-name': ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'],
14352            'shortcuts': 'genvägar',
14353            'custom-values': 'Anpassade värden',
14354            'past': 'över',
14355            'following': 'följande',
14356            'previous': 'förra',
14357            'prev-week': 'vecka',
14358            'prev-month': 'månad',
14359            'prev-year': 'Ã¥r',
14360            'next': 'nästa',
14361            'next-week': 'vecka',
14362            'next-month': 'måned',
14363            'next-year': 'Ã¥r',
14364            'less-than': 'Datumintervall bör inte vara mindre än %d dagar',
14365            'more-than': 'Datumintervall bör inte vara mer än %d dagar',
14366            'default-more': 'Välj ett datumintervall längre än %d dagar',
14367            'default-single': 'Välj ett datum',
14368            'default-less': 'Välj ett datumintervall mindre än %d dagar',
14369            'default-range': 'Välj ett datumintervall mellan %d och %d dagar',
14370            'default-default': 'Välj ett datumintervall',
14371            'time': 'tid',
14372            'hour': 'timme',
14373            'minute': 'minut'
14374        },
14375        'pt':  //Portuguese (European)
14376        {
14377            'selected': 'Selecionado:',
14378            'day': 'Dia',
14379            'days': 'Dias',
14380            'apply': 'Fechar',
14381            'week-1': 'seg',
14382            'week-2': 'ter',
14383            'week-3': 'qua',
14384            'week-4': 'qui',
14385            'week-5': 'sex',
14386            'week-6': 'sab',
14387            'week-7': 'dom',
14388            'week-number': 'N',
14389            'month-name': ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'],
14390            'shortcuts': 'Atalhos',
14391            'custom-values': 'Valores Personalizados',
14392            'past': 'Passado',
14393            'following': 'Seguinte',
14394            'previous': 'Anterior',
14395            'prev-week': 'Semana',
14396            'prev-month': 'Mês',
14397            'prev-year': 'Ano',
14398            'next': 'Próximo',
14399            'next-week': 'Próxima Semana',
14400            'next-month': 'Próximo Mês',
14401            'next-year': 'Próximo Ano',
14402            'less-than': 'O período selecionado não deve ser maior que %d dias',
14403            'more-than': 'O período selecionado não deve ser menor que %d dias',
14404            'default-more': 'Selecione um período superior a %d dias',
14405            'default-single': 'Selecione uma data',
14406            'default-less': 'Selecione um período inferior a %d dias',
14407            'default-range': 'Selecione um período de %d a %d dias',
14408            'default-default': 'Selecione um período',
14409            'time': 'Tempo',
14410            'hour': 'Hora',
14411            'minute': 'Minuto'
14412        },
14413        'tc':  // traditional chinese
14414        {
14415            'selected': '已選擇:',
14416            'day': '天',
14417            'days': '天',
14418            'apply': '確定',
14419            'week-1': '一',
14420            'week-2': '二',
14421            'week-3': '三',
14422            'week-4': '四',
14423            'week-5': '五',
14424            'week-6': '六',
14425            'week-7': '日',
14426            'week-number': '周',
14427            'month-name': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
14428            'shortcuts': '快速選擇',
14429            'past': '過去',
14430            'following': '將來',
14431            'previous': '&nbsp;&nbsp;&nbsp;',
14432            'prev-week': '上週',
14433            'prev-month': '上個月',
14434            'prev-year': '去年',
14435            'next': '&nbsp;&nbsp;&nbsp;',
14436            'next-week': '下周',
14437            'next-month': '下個月',
14438            'next-year': '明年',
14439            'less-than': '所選日期範圍不能大於%d天',
14440            'more-than': '所選日期範圍不能小於%d天',
14441            'default-more': '請選擇大於%d天的日期範圍',
14442            'default-less': '請選擇小於%d天的日期範圍',
14443            'default-range': '請選擇%d天到%d天的日期範圍',
14444            'default-single': '請選擇一個日期',
14445            'default-default': '請選擇一個日期範圍',
14446            'time': '日期',
14447            'hour': '小時',
14448            'minute': '分鐘'
14449        },
14450        'ja':
14451        {
14452            'selected': '選択しました:',
14453            'day': '日',
14454            'days': '日々',
14455            'apply': '閉じる',
14456            'week-1': '日',
14457            'week-2': '月',
14458            'week-3': '火',
14459            'week-4': 'æ°´',
14460            'week-5': '木',
14461            'week-6': '金',
14462            'week-7': '土',
14463            'month-name': ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
14464            'shortcuts': 'クイック選択',
14465            'past': '過去',
14466            'following': '将来',
14467            'previous': '&nbsp;&nbsp;&nbsp;',
14468            'prev-week': '先週、',
14469            'prev-month': '先月',
14470            'prev-year': '昨年',
14471            'next': '&nbsp;&nbsp;&nbsp;',
14472            'next-week': '来週',
14473            'next-month': '来月',
14474            'next-year': '来年',
14475            'less-than': '日付の範囲は %d 日以上にすべきではありません',
14476            'more-than': '日付の範囲は %d 日を下回ってはいけません',
14477            'default-more': '%d 日よりも長い期間を選択してください',
14478            'default-less': '%d 日未満の期間を選択してください',
14479            'default-range': '%d と% d日の間の日付範囲を選択してください',
14480            'default-single': '日付を選択してください',
14481            'default-default': '日付範囲を選択してください',
14482            'time': '時間',
14483            'hour': '時間',
14484            'minute': '分'
14485        },
14486        'da':
14487        {
14488            'selected': 'Valgt:',
14489            'day': 'Dag',
14490            'days': 'Dage',
14491            'apply': 'Luk',
14492            'week-1': 'ma',
14493            'week-2': 'ti',
14494            'week-3': 'on',
14495            'week-4': 'to',
14496            'week-5': 'fr',
14497            'week-6': 'lö',
14498            'week-7': 'sö',
14499            'month-name': ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'],
14500            'shortcuts': 'genveje',
14501            'custom-values': 'Brugerdefinerede værdier',
14502            'past': 'Forbi',
14503            'following': 'Følgende',
14504            'previous': 'Forrige',
14505            'prev-week': 'uge',
14506            'prev-month': 'månad',
14507            'prev-year': 'Ã¥r',
14508            'next': 'Næste',
14509            'next-week': 'Næste uge',
14510            'next-month': 'Næste måned',
14511            'next-year': 'Næste år',
14512            'less-than': 'Dato interval bør ikke være med end %d dage',
14513            'more-than': 'Dato interval bør ikke være mindre end %d dage',
14514            'default-more': 'Vælg datointerval længere end %d dage',
14515            'default-single': 'Vælg dato',
14516            'default-less': 'Vælg datointerval mindre end %d dage',
14517            'default-range': 'Vælg datointerval mellem %d og %d dage',
14518            'default-default': 'Vælg datointerval',
14519            'time': 'tid',
14520            'hour': 'time',
14521            'minute': 'minut'
14522        }
14523    };
14524
14525    $.fn.dateRangePicker = function (opt) {
14526        if (!opt) opt = {};
14527        opt = $.extend(true,
14528            {
14529                autoClose: false,
14530                format: 'YYYY-MM-DD',
14531                separator: ' to ',
14532                language: 'en',
14533                startOfWeek: 'monday',// or sunday
14534                getValue: function () {
14535                    return $(this).val();
14536                },
14537                setValue: function (s) {
14538                    if (!$(this).attr('readonly') && !$(this).is(':disabled') && s != $(this).val()) {
14539                        $(this).val(s);
14540                    }
14541                },
14542                startDate: false,
14543                endDate: false,
14544                time: {
14545                    enabled: false
14546                },
14547                minDays: 0,
14548                maxDays: 0,
14549                showShortcuts: false,
14550                shortcuts:
14551                {
14552                    //'prev-days': [1,3,5,7],
14553                    // 'next-days': [3,5,7],
14554                    //'prev' : ['week','month','year'],
14555                    // 'next' : ['week','month','year']
14556                },
14557                customShortcuts: [],
14558                inline: false,
14559                container: 'body',
14560                alwaysOpen: false,
14561                singleDate: false,
14562                lookBehind: false,
14563                batchMode: false,
14564                duration: 200,
14565                stickyMonths: false,
14566                dayDivAttrs: [],
14567                dayTdAttrs: [],
14568                selectForward: false,
14569                selectBackward: false,
14570                applyBtnClass: '',
14571                singleMonth: 'auto',
14572                hoveringTooltip: function (days, startTime, hoveringTime) {
14573                    return days > 1 ? days - 1 + ' ' + lang('nights') : '';
14574                },
14575                showTopbar: true,
14576                swapTime: false,
14577                showWeekNumbers: false,
14578                getWeekNumber: function (date) //date will be the first day of a week
14579                {
14580                    return moment(date).format('w');
14581                },
14582                customOpenAnimation: null,
14583                customCloseAnimation: null,
14584                customArrowPrevSymbol: null,
14585                customArrowNextSymbol: null
14586            }, opt);
14587
14588        opt.start = false;
14589        opt.end = false;
14590
14591        opt.startWeek = false;
14592
14593        //detect a touch device
14594        opt.isTouchDevice = 'ontouchstart' in window || navigator.msMaxTouchPoints;
14595
14596        //if it is a touch device, hide hovering tooltip
14597        if (opt.isTouchDevice) opt.hoveringTooltip = false;
14598
14599        //show one month on mobile devices
14600        if (opt.singleMonth == 'auto') opt.singleMonth = $(window).width() < 480;
14601        if (opt.singleMonth) opt.stickyMonths = false;
14602
14603        if (!opt.showTopbar) opt.autoClose = true;
14604
14605        if (opt.startDate && typeof opt.startDate == 'string') opt.startDate = moment(opt.startDate, opt.format).toDate();
14606        if (opt.endDate && typeof opt.endDate == 'string') opt.endDate = moment(opt.endDate, opt.format).toDate();
14607
14608        var langs = getLanguages();
14609        var box;
14610        var initiated = false;
14611        var self = this;
14612        var selfDom = $(self).get(0);
14613        var domChangeTimer;
14614
14615        $(this).unbind('.datepicker').bind('click.datepicker', function (evt) {
14616            var isOpen = box.is(':visible');
14617            if (!isOpen) open(opt.duration);
14618        }).bind('change.datepicker', function (evt) {
14619            checkAndSetDefaultValue();
14620        }).bind('keyup.datepicker', function () {
14621            try { clearTimeout(domChangeTimer); } catch (e) { }
14622            domChangeTimer = setTimeout(function () {
14623                checkAndSetDefaultValue();
14624            }, 2000);
14625        });
14626
14627        init_datepicker.call(this);
14628
14629        if (opt.alwaysOpen) {
14630            open(0);
14631        }
14632
14633        // expose some api
14634        $(this).data('dateRangePicker',
14635            {
14636                setStart: function (d1) {
14637                    if (typeof d1 == 'string') {
14638                        d1 = moment(d1, opt.format).toDate();
14639                    }
14640
14641                    opt.end = false;
14642                    setSingleDate(d1);
14643
14644                    return this;
14645                },
14646                setEnd: function (d2, silent) {
14647                    var start = new Date();
14648                    start.setTime(opt.start);
14649                    if (typeof d2 == 'string') {
14650                        d2 = moment(d2, opt.format).toDate();
14651                    }
14652                    setDateRange(start, d2, silent);
14653                    return this;
14654                },
14655                setDateRange: function (d1, d2, silent) {
14656                    if (typeof d1 == 'string' && typeof d2 == 'string') {
14657                        d1 = moment(d1, opt.format).toDate();
14658                        d2 = moment(d2, opt.format).toDate();
14659                    }
14660                    setDateRange(d1, d2, silent);
14661                },
14662                clear: clearSelection,
14663                close: closeDatePicker,
14664                open: open,
14665                redraw: redrawDatePicker,
14666                getDatePicker: getDatePicker,
14667                resetMonthsView: resetMonthsView,
14668                destroy: function () {
14669                    $(self).unbind('.datepicker');
14670                    $(self).data('dateRangePicker', '');
14671                    $(self).data('date-picker-opened', null);
14672                    box.remove();
14673                    $(window).unbind('resize.datepicker', calcPosition);
14674                    $(document).unbind('click.datepicker', closeDatePicker);
14675                }
14676            });
14677
14678        $(window).bind('resize.datepicker', calcPosition);
14679
14680        return this;
14681
14682        function IsOwnDatePickerClicked(evt, selfObj) {
14683            return (selfObj.contains(evt.target) || evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, selfObj.childNodes) >= 0));
14684        }
14685
14686        function init_datepicker() {
14687            var self = this;
14688
14689            if ($(this).data('date-picker-opened')) {
14690                closeDatePicker();
14691                return;
14692            }
14693            $(this).data('date-picker-opened', true);
14694
14695
14696            box = createDom().hide();
14697            box.append('<div class="date-range-length-tip"></div>');
14698            box.delegate('.day', 'mouseleave', function () {
14699                box.find('.date-range-length-tip').hide();
14700                if (opt.singleDate) {
14701                    clearHovering();
14702                }
14703            });
14704
14705            $(opt.container).append(box);
14706
14707            if (!opt.inline) {
14708                calcPosition();
14709            }
14710            else {
14711                box.addClass('inline-wrapper');
14712            }
14713
14714            if (opt.alwaysOpen) {
14715                box.find('.apply-btn').hide();
14716            }
14717
14718            var defaultTime = getDefaultTime();
14719            resetMonthsView(defaultTime);
14720
14721            if (opt.time.enabled) {
14722                if ((opt.startDate && opt.endDate) || (opt.start && opt.end)) {
14723                    showTime(moment(opt.start || opt.startDate).toDate(), 'time1');
14724                    showTime(moment(opt.end || opt.endDate).toDate(), 'time2');
14725                } else {
14726                    var defaultEndTime = opt.defaultEndTime ? opt.defaultEndTime : defaultTime;
14727                    showTime(defaultTime, 'time1');
14728                    showTime(defaultEndTime, 'time2');
14729                }
14730            }
14731
14732            //showSelectedInfo();
14733
14734
14735            var defaultTopText = '';
14736            if (opt.singleDate)
14737                defaultTopText = lang('default-single');
14738            else if (opt.minDays && opt.maxDays)
14739                defaultTopText = lang('default-range');
14740            else if (opt.minDays)
14741                defaultTopText = lang('default-more');
14742            else if (opt.maxDays)
14743                defaultTopText = lang('default-less');
14744            else
14745                defaultTopText = lang('default-default');
14746
14747            box.find('.default-top').html(defaultTopText.replace(/\%d/, opt.minDays).replace(/\%d/, opt.maxDays));
14748            if (opt.singleMonth) {
14749                box.addClass('single-month');
14750            }
14751            else {
14752                box.addClass('two-months');
14753            }
14754
14755
14756            setTimeout(function () {
14757                updateCalendarWidth();
14758                initiated = true;
14759            }, 0);
14760
14761            box.click(function (evt) {
14762                evt.stopPropagation();
14763            });
14764
14765            //if user click other place of the webpage, close date range picker window
14766            $(document).bind('click.datepicker', function (evt) {
14767                if (!IsOwnDatePickerClicked(evt, self[0])) {
14768                    if (box.is(':visible')) closeDatePicker();
14769                }
14770            });
14771
14772            box.find('.next').click(function () {
14773                if (!opt.stickyMonths)
14774                    gotoNextMonth(this);
14775                else
14776                    gotoNextMonth_stickily(this);
14777            });
14778
14779            function gotoNextMonth(self) {
14780                var isMonth2 = $(self).parents('table').hasClass('month2');
14781                var month = isMonth2 ? opt.month2 : opt.month1;
14782                month = nextMonth(month);
14783                if (!opt.singleMonth && !opt.singleDate && !isMonth2 && compare_month(month, opt.month2) >= 0 || isMonthOutOfBounds(month)) return;
14784                showMonth(month, isMonth2 ? 'month2' : 'month1');
14785                showGap();
14786            }
14787
14788            function gotoNextMonth_stickily(self) {
14789                var nextMonth1 = nextMonth(opt.month1);
14790                var nextMonth2 = nextMonth(opt.month2);
14791                if (isMonthOutOfBounds(nextMonth2)) return;
14792                if (!opt.singleDate && compare_month(nextMonth1, nextMonth2) >= 0) return;
14793                showMonth(nextMonth1, 'month1');
14794                showMonth(nextMonth2, 'month2');
14795                showSelectedDays();
14796            }
14797
14798
14799            box.find('.prev').click(function () {
14800                if (!opt.stickyMonths)
14801                    gotoPrevMonth(this);
14802                else
14803                    gotoPrevMonth_stickily(this);
14804            });
14805
14806            function gotoPrevMonth(self) {
14807                var isMonth2 = $(self).parents('table').hasClass('month2');
14808                var month = isMonth2 ? opt.month2 : opt.month1;
14809                month = prevMonth(month);
14810                if (isMonth2 && compare_month(month, opt.month1) <= 0 || isMonthOutOfBounds(month)) return;
14811                showMonth(month, isMonth2 ? 'month2' : 'month1');
14812                showGap();
14813            }
14814
14815            function gotoPrevMonth_stickily(self) {
14816                var prevMonth1 = prevMonth(opt.month1);
14817                var prevMonth2 = prevMonth(opt.month2);
14818                if (isMonthOutOfBounds(prevMonth1)) return;
14819                if (!opt.singleDate && compare_month(prevMonth2, prevMonth1) <= 0) return;
14820                showMonth(prevMonth2, 'month2');
14821                showMonth(prevMonth1, 'month1');
14822                showSelectedDays();
14823            }
14824
14825            box.delegate('.day', 'click', function (evt) {
14826                dayClicked($(this));
14827            });
14828
14829            box.delegate('.day', 'mouseenter', function (evt) {
14830                dayHovering($(this));
14831            });
14832
14833            box.delegate('.week-number', 'click', function (evt) {
14834                weekNumberClicked($(this));
14835            });
14836
14837            box.attr('unselectable', 'on')
14838                .css('user-select', 'none')
14839                .bind('selectstart', function (e) {
14840                    e.preventDefault(); return false;
14841                });
14842
14843            box.find('.apply-btn').click(function () {
14844                closeDatePicker();
14845                var dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
14846                $(self).trigger('datepicker-apply',
14847                    {
14848                        'value': dateRange,
14849                        'date1': new Date(opt.start),
14850                        'date2': new Date(opt.end)
14851                    });
14852            });
14853
14854            box.find('[custom]').click(function () {
14855                var valueName = $(this).attr('custom');
14856                opt.start = false;
14857                opt.end = false;
14858                box.find('.day.checked').removeClass('checked');
14859                opt.setValue.call(selfDom, valueName);
14860                checkSelectionValid();
14861                showSelectedInfo(true);
14862                showSelectedDays();
14863                if (opt.autoClose) closeDatePicker();
14864            });
14865
14866            box.find('[shortcut]').click(function () {
14867                var shortcut = $(this).attr('shortcut');
14868                var end = new Date(), start = false;
14869                var dir;
14870                if (shortcut.indexOf('day') != -1) {
14871                    var day = parseInt(shortcut.split(',', 2)[1], 10);
14872                    start = new Date(new Date().getTime() + 86400000 * day);
14873                    end = new Date(end.getTime() + 86400000 * (day > 0 ? 1 : -1));
14874                }
14875                else if (shortcut.indexOf('week') != -1) {
14876                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
14877                    var stopDay;
14878                    if (dir == 1)
14879                        stopDay = opt.startOfWeek == 'monday' ? 1 : 0;
14880                    else
14881                        stopDay = opt.startOfWeek == 'monday' ? 0 : 6;
14882
14883                    end = new Date(end.getTime() - 86400000);
14884                    while (end.getDay() != stopDay) end = new Date(end.getTime() + dir * 86400000);
14885                    start = new Date(end.getTime() + dir * 86400000 * 6);
14886                }
14887                else if (shortcut.indexOf('month') != -1) {
14888                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
14889                    if (dir == 1)
14890                        start = nextMonth(end);
14891                    else
14892                        start = prevMonth(end);
14893                    start.setDate(1);
14894                    end = nextMonth(start);
14895                    end.setDate(1);
14896                    end = new Date(end.getTime() - 86400000);
14897                }
14898                else if (shortcut.indexOf('year') != -1) {
14899                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
14900                    start = new Date();
14901                    start.setFullYear(end.getFullYear() + dir);
14902                    start.setMonth(0);
14903                    start.setDate(1);
14904                    end.setFullYear(end.getFullYear() + dir);
14905                    end.setMonth(11);
14906                    end.setDate(31);
14907                }
14908                else if (shortcut == 'custom') {
14909                    var name = $(this).html();
14910                    if (opt.customShortcuts && opt.customShortcuts.length > 0) {
14911                        for (var i = 0; i < opt.customShortcuts.length; i++) {
14912                            var sh = opt.customShortcuts[i];
14913                            if (sh.name == name) {
14914                                var data = [];
14915                                // try
14916                                // {
14917                                data = sh['dates'].call();
14918                                //}catch(e){}
14919                                if (data && data.length == 2) {
14920                                    start = data[0];
14921                                    end = data[1];
14922                                }
14923
14924                                // if only one date is specified then just move calendars there
14925                                // move calendars to show this date's month and next months
14926                                if (data && data.length == 1) {
14927                                    var movetodate = data[0];
14928                                    showMonth(movetodate, 'month1');
14929                                    showMonth(nextMonth(movetodate), 'month2');
14930                                    showGap();
14931                                }
14932
14933                                break;
14934                            }
14935                        }
14936                    }
14937                }
14938                if (start && end) {
14939                    setDateRange(start, end);
14940                    checkSelectionValid();
14941                }
14942            });
14943
14944            box.find('.time1 input[type=range]').bind('change touchmove', function (e) {
14945                var target = e.target,
14946                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
14947                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
14948                setTime('time1', hour, min);
14949            });
14950
14951            box.find('.time2 input[type=range]').bind('change touchmove', function (e) {
14952                var target = e.target,
14953                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
14954                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
14955                setTime('time2', hour, min);
14956            });
14957
14958        }
14959
14960
14961        function calcPosition() {
14962            if (!opt.inline) {
14963                var offset = $(self).offset();
14964                if ($(opt.container).css('position') == 'relative') {
14965                    var containerOffset = $(opt.container).offset();
14966                    box.css(
14967                        {
14968                            top: offset.top - containerOffset.top + $(self).outerHeight() + 4,
14969                            left: offset.left - containerOffset.left
14970                        });
14971                }
14972                else {
14973                    if (offset.left < 460) //left to right
14974                    {
14975                        box.css(
14976                            {
14977                                top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
14978                                left: offset.left
14979                            });
14980                    }
14981                    else {
14982                        box.css(
14983                            {
14984                                top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
14985                                left: offset.left + $(self).width() - box.width() - 16
14986                            });
14987                    }
14988                }
14989            }
14990        }
14991
14992        // Return the date picker wrapper element
14993        function getDatePicker() {
14994            return box;
14995        }
14996
14997        function open(animationTime) {
14998            calcPosition();
14999            redrawDatePicker();
15000            checkAndSetDefaultValue();
15001            if (opt.customOpenAnimation) {
15002                opt.customOpenAnimation.call(box.get(0), function () {
15003                    $(self).trigger('datepicker-opened', { relatedTarget: box });
15004                });
15005            }
15006            else {
15007                box.slideDown(animationTime, function () {
15008                    $(self).trigger('datepicker-opened', { relatedTarget: box });
15009                });
15010            }
15011            $(self).trigger('datepicker-open', { relatedTarget: box });
15012            showGap();
15013            updateCalendarWidth();
15014        }
15015
15016        function checkAndSetDefaultValue() {
15017            var __default_string = opt.getValue.call(selfDom);
15018            var defaults = __default_string ? __default_string.split(opt.separator) : '';
15019
15020            if (defaults && ((defaults.length == 1 && opt.singleDate) || defaults.length >= 2)) {
15021                var ___format = opt.format;
15022                if (___format.match(/Do/)) {
15023
15024                    ___format = ___format.replace(/Do/, 'D');
15025                    defaults[0] = defaults[0].replace(/(\d+)(th|nd|st)/, '$1');
15026                    if (defaults.length >= 2) {
15027                        defaults[1] = defaults[1].replace(/(\d+)(th|nd|st)/, '$1');
15028                    }
15029                }
15030                // set initiated  to avoid triggerring datepicker-change event
15031                initiated = false;
15032                if (defaults.length >= 2) {
15033                    setDateRange(getValidValue(defaults[0], ___format, moment.locale(opt.language)), getValidValue(defaults[1], ___format, moment.locale(opt.language)));
15034                }
15035                else if (defaults.length == 1 && opt.singleDate) {
15036                    setSingleDate(getValidValue(defaults[0], ___format, moment.locale(opt.language)));
15037                }
15038
15039                initiated = true;
15040            }
15041        }
15042
15043        function getValidValue(date, format, locale) {
15044            if (moment(date, format, locale).isValid()) {
15045                return moment(date, format, locale).toDate();
15046            } else {
15047                return moment().toDate();
15048            }
15049        }
15050
15051        function updateCalendarWidth() {
15052            var gapMargin = box.find('.gap').css('margin-left');
15053            if (gapMargin) gapMargin = parseInt(gapMargin);
15054            var w1 = box.find('.month1').width();
15055            var w2 = box.find('.gap').width() + (gapMargin ? gapMargin * 2 : 0);
15056            var w3 = box.find('.month2').width();
15057            box.find('.month-wrapper').width(w1 + w2 + w3);
15058        }
15059
15060        function renderTime(name, date) {
15061            box.find('.' + name + ' input[type=range].hour-range').val(moment(date).hours());
15062            box.find('.' + name + ' input[type=range].minute-range').val(moment(date).minutes());
15063            setTime(name, moment(date).format('HH'), moment(date).format('mm'));
15064        }
15065
15066        function changeTime(name, date) {
15067            opt[name] = parseInt(
15068                moment(parseInt(date))
15069                    .startOf('day')
15070                    .add(moment(opt[name + 'Time']).format('HH'), 'h')
15071                    .add(moment(opt[name + 'Time']).format('mm'), 'm').valueOf()
15072            );
15073        }
15074
15075        function swapTime() {
15076            renderTime('time1', opt.start);
15077            renderTime('time2', opt.end);
15078        }
15079
15080        function setTime(name, hour, minute) {
15081            hour && (box.find('.' + name + ' .hour-val').text(hour));
15082            minute && (box.find('.' + name + ' .minute-val').text(minute));
15083            switch (name) {
15084                case 'time1':
15085                    if (opt.start) {
15086                        setRange('start', moment(opt.start));
15087                    }
15088                    setRange('startTime', moment(opt.startTime || moment().valueOf()));
15089                    break;
15090                case 'time2':
15091                    if (opt.end) {
15092                        setRange('end', moment(opt.end));
15093                    }
15094                    setRange('endTime', moment(opt.endTime || moment().valueOf()));
15095                    break;
15096            }
15097            function setRange(name, timePoint) {
15098                var h = timePoint.format('HH'),
15099                    m = timePoint.format('mm');
15100                opt[name] = timePoint
15101                    .startOf('day')
15102                    .add(hour || h, 'h')
15103                    .add(minute || m, 'm')
15104                    .valueOf();
15105            }
15106            checkSelectionValid();
15107            showSelectedInfo();
15108            showSelectedDays();
15109        }
15110
15111        function clearSelection() {
15112            opt.start = false;
15113            opt.end = false;
15114            box.find('.day.checked').removeClass('checked');
15115            box.find('.day.last-date-selected').removeClass('last-date-selected');
15116            box.find('.day.first-date-selected').removeClass('first-date-selected');
15117            opt.setValue.call(selfDom, '');
15118            checkSelectionValid();
15119            showSelectedInfo();
15120            showSelectedDays();
15121        }
15122
15123        function handleStart(time) {
15124            var r = time;
15125            if (opt.batchMode === 'week-range') {
15126                if (opt.startOfWeek === 'monday') {
15127                    r = moment(parseInt(time)).startOf('isoweek').valueOf();
15128                }
15129                else {
15130                    r = moment(parseInt(time)).startOf('week').valueOf();
15131                }
15132            }
15133            else if (opt.batchMode === 'month-range') {
15134                r = moment(parseInt(time)).startOf('month').valueOf();
15135            }
15136            return r;
15137        }
15138
15139        function handleEnd(time) {
15140            var r = time;
15141            if (opt.batchMode === 'week-range') {
15142                if (opt.startOfWeek === 'monday') {
15143                    r = moment(parseInt(time)).endOf('isoweek').valueOf();
15144                }
15145                else {
15146                    r = moment(parseInt(time)).endOf('week').valueOf();
15147                }
15148            }
15149            else if (opt.batchMode === 'month-range') {
15150                r = moment(parseInt(time)).endOf('month').valueOf();
15151            }
15152            return r;
15153        }
15154
15155
15156        function dayClicked(day) {
15157            if (day.hasClass('invalid')) return;
15158            var time = day.attr('time');
15159            day.addClass('checked');
15160            if (opt.singleDate) {
15161                opt.start = time;
15162                opt.end = false;
15163            }
15164            else if (opt.batchMode === 'week') {
15165                if (opt.startOfWeek === 'monday') {
15166                    opt.start = moment(parseInt(time)).startOf('isoweek').valueOf();
15167                    opt.end = moment(parseInt(time)).endOf('isoweek').valueOf();
15168                } else {
15169                    opt.end = moment(parseInt(time)).endOf('week').valueOf();
15170                    opt.start = moment(parseInt(time)).startOf('week').valueOf();
15171                }
15172            }
15173            else if (opt.batchMode === 'workweek') {
15174                opt.start = moment(parseInt(time)).day(1).valueOf();
15175                opt.end = moment(parseInt(time)).day(5).valueOf();
15176            }
15177            else if (opt.batchMode === 'weekend') {
15178                opt.start = moment(parseInt(time)).day(6).valueOf();
15179                opt.end = moment(parseInt(time)).day(7).valueOf();
15180            }
15181            else if (opt.batchMode === 'month') {
15182                opt.start = moment(parseInt(time)).startOf('month').valueOf();
15183                opt.end = moment(parseInt(time)).endOf('month').valueOf();
15184            }
15185            else if ((opt.start && opt.end) || (!opt.start && !opt.end)) {
15186                opt.start = handleStart(time);
15187                opt.end = false;
15188            }
15189            else if (opt.start) {
15190                opt.end = handleEnd(time);
15191                if (opt.time.enabled) {
15192                    changeTime('end', opt.end);
15193                }
15194            }
15195
15196            //Update time in case it is enabled and timestamps are available
15197            if (opt.time.enabled) {
15198                if (opt.start) {
15199                    changeTime('start', opt.start);
15200                }
15201                if (opt.end) {
15202                    changeTime('end', opt.end);
15203                }
15204            }
15205
15206            //In case the start is after the end, swap the timestamps
15207            if (!opt.singleDate && opt.start && opt.end && opt.start > opt.end) {
15208                var tmp = opt.end;
15209                opt.end = handleEnd(opt.start);
15210                opt.start = handleStart(tmp);
15211                if (opt.time.enabled && opt.swapTime) {
15212                    swapTime();
15213                }
15214            }
15215
15216            opt.start = parseInt(opt.start);
15217            opt.end = parseInt(opt.end);
15218
15219            clearHovering();
15220            if (opt.start && !opt.end) {
15221                $(self).trigger('datepicker-first-date-selected',
15222                    {
15223                        'date1': new Date(opt.start)
15224                    });
15225                dayHovering(day);
15226            }
15227            updateSelectableRange(time);
15228
15229            checkSelectionValid();
15230            showSelectedInfo();
15231            showSelectedDays();
15232            autoclose();
15233        }
15234
15235
15236        function weekNumberClicked(weekNumberDom) {
15237            var thisTime = parseInt(weekNumberDom.attr('data-start-time'), 10);
15238            var date1, date2;
15239            if (!opt.startWeek) {
15240                opt.startWeek = thisTime;
15241                weekNumberDom.addClass('week-number-selected');
15242                date1 = new Date(thisTime);
15243                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
15244                opt.end = moment(date1).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
15245            }
15246            else {
15247                box.find('.week-number-selected').removeClass('week-number-selected');
15248                date1 = new Date(thisTime < opt.startWeek ? thisTime : opt.startWeek);
15249                date2 = new Date(thisTime < opt.startWeek ? opt.startWeek : thisTime);
15250                opt.startWeek = false;
15251                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
15252                opt.end = moment(date2).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
15253            }
15254            updateSelectableRange();
15255            checkSelectionValid();
15256            showSelectedInfo();
15257            showSelectedDays();
15258            autoclose();
15259        }
15260
15261        function isValidTime(time) {
15262            time = parseInt(time, 10);
15263            if (opt.startDate && compare_day(time, opt.startDate) < 0) return false;
15264            if (opt.endDate && compare_day(time, opt.endDate) > 0) return false;
15265
15266            if (opt.start && !opt.end && !opt.singleDate) {
15267                //check maxDays and minDays setting
15268                if (opt.maxDays > 0 && countDays(time, opt.start) > opt.maxDays) return false;
15269                if (opt.minDays > 0 && countDays(time, opt.start) < opt.minDays) return false;
15270
15271                //check selectForward and selectBackward
15272                if (opt.selectForward && time < opt.start) return false;
15273                if (opt.selectBackward && time > opt.start) return false;
15274
15275                //check disabled days
15276                if (opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
15277                    var valid = true;
15278                    var timeTmp = time;
15279                    while (countDays(timeTmp, opt.start) > 1) {
15280                        var arr = opt.beforeShowDay(new Date(timeTmp));
15281                        if (!arr[0]) {
15282                            valid = false;
15283                            break;
15284                        }
15285                        if (Math.abs(timeTmp - opt.start) < 86400000) break;
15286                        if (timeTmp > opt.start) timeTmp -= 86400000;
15287                        if (timeTmp < opt.start) timeTmp += 86400000;
15288                    }
15289                    if (!valid) return false;
15290                }
15291            }
15292            return true;
15293        }
15294
15295
15296        function updateSelectableRange() {
15297            box.find('.day.invalid.tmp').removeClass('tmp invalid').addClass('valid');
15298            if (opt.start && !opt.end) {
15299                box.find('.day.toMonth.valid').each(function () {
15300                    var time = parseInt($(this).attr('time'), 10);
15301                    if (!isValidTime(time))
15302                        $(this).addClass('invalid tmp').removeClass('valid');
15303                    else
15304                        $(this).addClass('valid tmp').removeClass('invalid');
15305                });
15306            }
15307
15308            return true;
15309        }
15310
15311
15312        function dayHovering(day) {
15313            var hoverTime = parseInt(day.attr('time'));
15314            var tooltip = '';
15315
15316            if (day.hasClass('has-tooltip') && day.attr('data-tooltip')) {
15317                tooltip = '<span style="white-space:nowrap">' + day.attr('data-tooltip') + '</span>';
15318            }
15319            else if (!day.hasClass('invalid')) {
15320                if (opt.singleDate) {
15321                    box.find('.day.hovering').removeClass('hovering');
15322                    day.addClass('hovering');
15323                }
15324                else {
15325                    box.find('.day').each(function () {
15326                        var time = parseInt($(this).attr('time')),
15327                            start = opt.start,
15328                            end = opt.end;
15329
15330                        if (time == hoverTime) {
15331                            $(this).addClass('hovering');
15332                        }
15333                        else {
15334                            $(this).removeClass('hovering');
15335                        }
15336
15337                        if (
15338                            (opt.start && !opt.end) &&
15339                            (
15340                                (opt.start < time && hoverTime >= time) ||
15341                                (opt.start > time && hoverTime <= time)
15342                            )
15343                        ) {
15344                            $(this).addClass('hovering');
15345                        }
15346                        else {
15347                            $(this).removeClass('hovering');
15348                        }
15349                    });
15350
15351                    if (opt.start && !opt.end) {
15352                        var days = countDays(hoverTime, opt.start);
15353                        if (opt.hoveringTooltip) {
15354                            if (typeof opt.hoveringTooltip == 'function') {
15355                                tooltip = opt.hoveringTooltip(days, opt.start, hoverTime);
15356                            }
15357                            else if (opt.hoveringTooltip === true && days > 1) {
15358                                tooltip = days + ' ' + lang('days');
15359                            }
15360                        }
15361                    }
15362                }
15363            }
15364
15365            if (tooltip) {
15366                var posDay = day.offset();
15367                var posBox = box.offset();
15368
15369                var _left = posDay.left - posBox.left;
15370                var _top = posDay.top - posBox.top;
15371                _left += day.width() / 2;
15372
15373
15374                var $tip = box.find('.date-range-length-tip');
15375                var w = $tip.css({ 'visibility': 'hidden', 'display': 'none' }).html(tooltip).width();
15376                var h = $tip.height();
15377                _left -= w / 2;
15378                _top -= h;
15379                setTimeout(function () {
15380                    $tip.css({ left: _left, top: _top, display: 'block', 'visibility': 'visible' });
15381                }, 10);
15382            }
15383            else {
15384                box.find('.date-range-length-tip').hide();
15385            }
15386        }
15387
15388        function clearHovering() {
15389            box.find('.day.hovering').removeClass('hovering');
15390            box.find('.date-range-length-tip').hide();
15391        }
15392
15393        function autoclose() {
15394            if (opt.singleDate === true) {
15395                if (initiated && opt.start) {
15396                    if (opt.autoClose) closeDatePicker();
15397                }
15398            } else {
15399                if (initiated && opt.start && opt.end) {
15400                    if (opt.autoClose) closeDatePicker();
15401                }
15402            }
15403        }
15404
15405        function checkSelectionValid() {
15406            var days = Math.ceil((opt.end - opt.start) / 86400000) + 1;
15407            if (opt.singleDate) { // Validate if only start is there
15408                if (opt.start && !opt.end)
15409                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
15410                else
15411                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
15412            }
15413            else if (opt.maxDays && days > opt.maxDays) {
15414                opt.start = false;
15415                opt.end = false;
15416                box.find('.day').removeClass('checked');
15417                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(lang('less-than').replace('%d', opt.maxDays));
15418            }
15419            else if (opt.minDays && days < opt.minDays) {
15420                opt.start = false;
15421                opt.end = false;
15422                box.find('.day').removeClass('checked');
15423                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(lang('more-than').replace('%d', opt.minDays));
15424            }
15425            else {
15426                if (opt.start || opt.end)
15427                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
15428                else
15429                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
15430            }
15431
15432            if ((opt.singleDate && opt.start && !opt.end) || (!opt.singleDate && opt.start && opt.end)) {
15433                box.find('.apply-btn').removeClass('disabled');
15434            }
15435            else {
15436                box.find('.apply-btn').addClass('disabled');
15437            }
15438
15439            if (opt.batchMode) {
15440                if (
15441                    (opt.start && opt.startDate && compare_day(opt.start, opt.startDate) < 0) ||
15442                    (opt.end && opt.endDate && compare_day(opt.end, opt.endDate) > 0)
15443                ) {
15444                    opt.start = false;
15445                    opt.end = false;
15446                    box.find('.day').removeClass('checked');
15447                }
15448            }
15449        }
15450
15451        function showSelectedInfo(forceValid, silent) {
15452            box.find('.start-day').html('...');
15453            box.find('.end-day').html('...');
15454            box.find('.selected-days').hide();
15455            if (opt.start) {
15456                box.find('.start-day').html(getDateString(new Date(parseInt(opt.start))));
15457            }
15458            if (opt.end) {
15459                box.find('.end-day').html(getDateString(new Date(parseInt(opt.end))));
15460            }
15461            var dateRange;
15462            if (opt.start && opt.singleDate) {
15463                box.find('.apply-btn').removeClass('disabled');
15464                dateRange = getDateString(new Date(opt.start));
15465                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));
15466
15467                if (initiated && !silent) {
15468                    $(self).trigger('datepicker-change',
15469                        {
15470                            'value': dateRange,
15471                            'date1': new Date(opt.start)
15472                        });
15473                }
15474            }
15475            else if (opt.start && opt.end) {
15476                box.find('.selected-days').show().find('.selected-days-num').html(countDays(opt.end, opt.start));
15477                box.find('.apply-btn').removeClass('disabled');
15478                dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
15479                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));
15480                if (initiated && !silent) {
15481                    $(self).trigger('datepicker-change',
15482                        {
15483                            'value': dateRange,
15484                            'date1': new Date(opt.start),
15485                            'date2': new Date(opt.end)
15486                        });
15487                }
15488            }
15489            else if (forceValid) {
15490                box.find('.apply-btn').removeClass('disabled');
15491            }
15492            else {
15493                box.find('.apply-btn').addClass('disabled');
15494            }
15495        }
15496
15497        function countDays(start, end) {
15498            return Math.abs(daysFrom1970(start) - daysFrom1970(end)) + 1;
15499        }
15500
15501        function setDateRange(date1, date2, silent) {
15502            if (date1.getTime() > date2.getTime()) {
15503                var tmp = date2;
15504                date2 = date1;
15505                date1 = tmp;
15506                tmp = null;
15507            }
15508            var valid = true;
15509            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
15510            if (opt.endDate && compare_day(date2, opt.endDate) > 0) valid = false;
15511            if (!valid) {
15512                showMonth(opt.startDate, 'month1');
15513                showMonth(nextMonth(opt.startDate), 'month2');
15514                showGap();
15515                return;
15516            }
15517
15518            opt.start = date1.getTime();
15519            opt.end = date2.getTime();
15520
15521            if (opt.time.enabled) {
15522                renderTime('time1', date1);
15523                renderTime('time2', date2);
15524            }
15525
15526            if (opt.stickyMonths || (compare_day(date1, date2) > 0 && compare_month(date1, date2) === 0)) {
15527                if (opt.lookBehind) {
15528                    date1 = prevMonth(date2);
15529                } else {
15530                    date2 = nextMonth(date1);
15531                }
15532            }
15533
15534            if (opt.stickyMonths && opt.endDate !== false && compare_month(date2, opt.endDate) > 0) {
15535                date1 = prevMonth(date1);
15536                date2 = prevMonth(date2);
15537            }
15538
15539            if (!opt.stickyMonths) {
15540                if (compare_month(date1, date2) === 0) {
15541                    if (opt.lookBehind) {
15542                        date1 = prevMonth(date2);
15543                    } else {
15544                        date2 = nextMonth(date1);
15545                    }
15546                }
15547            }
15548
15549            showMonth(date1, 'month1');
15550            showMonth(date2, 'month2');
15551            showGap();
15552            checkSelectionValid();
15553            showSelectedInfo(false, silent);
15554            autoclose();
15555        }
15556
15557        function setSingleDate(date1) {
15558
15559            var valid = true;
15560            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
15561            if (opt.endDate && compare_day(date1, opt.endDate) > 0) valid = false;
15562            if (!valid) {
15563                showMonth(opt.startDate, 'month1');
15564                return;
15565            }
15566
15567            opt.start = date1.getTime();
15568
15569
15570            if (opt.time.enabled) {
15571                renderTime('time1', date1);
15572
15573            }
15574            showMonth(date1, 'month1');
15575            if (opt.singleMonth !== true) {
15576                var date2 = nextMonth(date1);
15577                showMonth(date2, 'month2');
15578            }
15579            showGap();
15580            showSelectedInfo();
15581            autoclose();
15582        }
15583
15584        function showSelectedDays() {
15585            if (!opt.start && !opt.end) return;
15586            box.find('.day').each(function () {
15587                var time = parseInt($(this).attr('time')),
15588                    start = opt.start,
15589                    end = opt.end;
15590                if (opt.time.enabled) {
15591                    time = moment(time).startOf('day').valueOf();
15592                    start = moment(start || moment().valueOf()).startOf('day').valueOf();
15593                    end = moment(end || moment().valueOf()).startOf('day').valueOf();
15594                }
15595                if (
15596                    (opt.start && opt.end && end >= time && start <= time) ||
15597                    (opt.start && !opt.end && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD'))
15598                ) {
15599                    $(this).addClass('checked');
15600                }
15601                else {
15602                    $(this).removeClass('checked');
15603                }
15604
15605                //add first-date-selected class name to the first date selected
15606                if (opt.start && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
15607                    $(this).addClass('first-date-selected');
15608                }
15609                else {
15610                    $(this).removeClass('first-date-selected');
15611                }
15612                //add last-date-selected
15613                if (opt.end && moment(end).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
15614                    $(this).addClass('last-date-selected');
15615                }
15616                else {
15617                    $(this).removeClass('last-date-selected');
15618                }
15619            });
15620
15621            box.find('.week-number').each(function () {
15622                if ($(this).attr('data-start-time') == opt.startWeek) {
15623                    $(this).addClass('week-number-selected');
15624                }
15625            });
15626        }
15627
15628        function showMonth(date, month) {
15629            date = moment(date).toDate();
15630            var monthName = nameMonth(date.getMonth());
15631            box.find('.' + month + ' .month-name').html(monthName + ' ' + date.getFullYear());
15632            box.find('.' + month + ' tbody').html(createMonthHTML(date));
15633            opt[month] = date;
15634            updateSelectableRange();
15635        }
15636
15637        function showTime(date, name) {
15638            box.find('.' + name).append(getTimeHTML());
15639            renderTime(name, date);
15640        }
15641
15642        function nameMonth(m) {
15643            return lang('month-name')[m];
15644        }
15645
15646        function getDateString(d) {
15647            return moment(d).format(opt.format);
15648        }
15649
15650        function showGap() {
15651            showSelectedDays();
15652            var m1 = parseInt(moment(opt.month1).format('YYYYMM'));
15653            var m2 = parseInt(moment(opt.month2).format('YYYYMM'));
15654            var p = Math.abs(m1 - m2);
15655            var shouldShow = (p > 1 && p != 89);
15656            if (shouldShow) {
15657                box.addClass('has-gap').removeClass('no-gap').find('.gap').css('visibility', 'visible');
15658            }
15659            else {
15660                box.removeClass('has-gap').addClass('no-gap').find('.gap').css('visibility', 'hidden');
15661            }
15662            var h1 = box.find('table.month1').height();
15663            var h2 = box.find('table.month2').height();
15664            box.find('.gap').height(Math.max(h1, h2) + 10);
15665        }
15666
15667        function closeDatePicker() {
15668            if (opt.alwaysOpen) return;
15669
15670            var afterAnim = function () {
15671                $(self).data('date-picker-opened', false);
15672                $(self).trigger('datepicker-closed', { relatedTarget: box });
15673            };
15674            if (opt.customCloseAnimation) {
15675                opt.customCloseAnimation.call(box.get(0), afterAnim);
15676            }
15677            else {
15678                $(box).slideUp(opt.duration, afterAnim);
15679            }
15680            $(self).trigger('datepicker-close', { relatedTarget: box });
15681        }
15682
15683        function redrawDatePicker() {
15684            showMonth(opt.month1, 'month1');
15685            showMonth(opt.month2, 'month2');
15686        }
15687
15688        function compare_month(m1, m2) {
15689            var p = parseInt(moment(m1).format('YYYYMM')) - parseInt(moment(m2).format('YYYYMM'));
15690            if (p > 0) return 1;
15691            if (p === 0) return 0;
15692            return -1;
15693        }
15694
15695        function compare_day(m1, m2) {
15696            var p = parseInt(moment(m1).format('YYYYMMDD')) - parseInt(moment(m2).format('YYYYMMDD'));
15697            if (p > 0) return 1;
15698            if (p === 0) return 0;
15699            return -1;
15700        }
15701
15702        function nextMonth(month) {
15703            return moment(month).add(1, 'months').toDate();
15704        }
15705
15706        function prevMonth(month) {
15707            return moment(month).add(-1, 'months').toDate();
15708        }
15709
15710        function getTimeHTML() {
15711            return '<div>' +
15712                '<span>' + lang('Time') + ': <span class="hour-val">00</span>:<span class="minute-val">00</span></span>' +
15713                '</div>' +
15714                '<div class="hour">' +
15715                '<label>' + lang('Hour') + ': <input type="range" class="hour-range" name="hour" min="0" max="23"></label>' +
15716                '</div>' +
15717                '<div class="minute">' +
15718                '<label>' + lang('Minute') + ': <input type="range" class="minute-range" name="minute" min="0" max="59"></label>' +
15719                '</div>';
15720        }
15721
15722        function createDom() {
15723            var html = '<div class="date-picker-wrapper';
15724            if (opt.extraClass) html += ' ' + opt.extraClass + ' ';
15725            if (opt.singleDate) html += ' single-date ';
15726            if (!opt.showShortcuts) html += ' no-shortcuts ';
15727            if (!opt.showTopbar) html += ' no-topbar ';
15728            if (opt.customTopBar) html += ' custom-topbar ';
15729            html += '">';
15730
15731            if (opt.showTopbar) {
15732                html += '<div class="drp_top-bar">';
15733
15734                if (opt.customTopBar) {
15735                    if (typeof opt.customTopBar == 'function') opt.customTopBar = opt.customTopBar();
15736                    html += '<div class="custom-top">' + opt.customTopBar + '</div>';
15737                }
15738                else {
15739                    html += '<div class="normal-top">' +
15740                        '<span style="color:#333">' + lang('selected') + ' </span> <b class="start-day">...</b>';
15741                    if (!opt.singleDate) {
15742                        html += ' <span class="separator-day">' + opt.separator + '</span> <b class="end-day">...</b> <i class="selected-days">(<span class="selected-days-num">3</span> ' + lang('days') + ')</i>';
15743                    }
15744                    html += '</div>';
15745                    html += '<div class="error-top">error</div>' +
15746                        '<div class="default-top">default</div>';
15747                }
15748
15749                html += '<input type="button" class="apply-btn disabled' + getApplyBtnClass() + '" value="' + lang('apply') + '" />';
15750                html += '</div>';
15751            }
15752
15753            var _colspan = opt.showWeekNumbers ? 6 : 5;
15754
15755            var arrowPrev = '&lt;';
15756            if (opt.customArrowPrevSymbol) arrowPrev = opt.customArrowPrevSymbol;
15757
15758            var arrowNext = '&gt;';
15759            if (opt.customArrowNextSymbol) arrowNext = opt.customArrowNextSymbol;
15760
15761            /* closebutton */
15762            if (!opt.singleMonth) {
15763                html += '<div class="na-searchbox__close"><span class="na-searchbox__close-icon"></span></div>';
15764            };
15765
15766            if (opt.singleMonth) {
15767                html += '<div class="calendar-header"><div class="checkin"><label>Check In</label><span class="checkin-date"></span></div><div class="checkout"><label>Check Out</label><span class="checkout-date"></span></div></div>';
15768            };
15769
15770            html += '<div class="month-wrapper">' +
15771                '   <table class="month1" cellspacing="0" border="0" cellpadding="0">' +
15772                '       <thead>' +
15773                '           <tr class="caption">' +
15774                '               <th style="width:27px;">' +
15775                '                   <span class="prev">' +
15776                arrowPrev +
15777                '                   </span>' +
15778                '               </th>' +
15779                '               <th colspan="' + _colspan + '" class="month-name">' +
15780                '               </th>' +
15781                '               <th style="width:27px;">' +
15782                (opt.singleDate || !opt.stickyMonths ? '<span class="next">' + arrowNext + '</span>' : '') +
15783                '               </th>' +
15784                '           </tr>' +
15785                '           <tr class="week-name">' + getWeekHead() +
15786                '       </thead>' +
15787                '       <tbody></tbody>' +
15788                '   </table>';
15789
15790            if (hasMonth2()) {
15791                html += '<div class="gap">' + getGapHTML() + '</div>' +
15792                    '<table class="month2" cellspacing="0" border="0" cellpadding="0">' +
15793                    '   <thead>' +
15794                    '   <tr class="caption">' +
15795                    '       <th style="width:27px;">' +
15796                    (!opt.stickyMonths ? '<span class="prev">' + arrowPrev + '</span>' : '') +
15797                    '       </th>' +
15798                    '       <th colspan="' + _colspan + '" class="month-name">' +
15799                    '       </th>' +
15800                    '       <th style="width:27px;">' +
15801                    '           <span class="next">' + arrowNext + '</span>' +
15802                    '       </th>' +
15803                    '   </tr>' +
15804                    '   <tr class="week-name">' + getWeekHead() +
15805                    '   </thead>' +
15806                    '   <tbody></tbody>' +
15807                    '</table>';
15808            }
15809
15810            //+'</div>'
15811            html += '<div style="clear:both;height:0;font-size:0;"></div>' +
15812                '<div class="time">' +
15813                '<div class="time1"></div>';
15814            if (!opt.singleDate) {
15815                html += '<div class="time2"></div>';
15816            }
15817            html += '</div>' +
15818                '<div style="clear:both;height:0;font-size:0;"></div>' +
15819                '</div>';
15820
15821            html += '<div class="na-searchbox__footer"><div class="message"><span></span></div><div class="na-searchbox__close"><span class="na-searchbox__close-icon"></span> Close <cal>Calendar</cal></a></div></div>';
15822
15823            html += '<div class="footer">';
15824
15825            if (opt.showShortcuts) {
15826                html += '<div class="shortcuts"><b>' + lang('shortcuts') + '</b>';
15827
15828                var data = opt.shortcuts;
15829                if (data) {
15830                    var name;
15831                    if (data['prev-days'] && data['prev-days'].length > 0) {
15832                        html += '&nbsp;<span class="prev-days">' + lang('past');
15833                        for (var i = 0; i < data['prev-days'].length; i++) {
15834                            name = data['prev-days'][i];
15835                            name += (data['prev-days'][i] > 1) ? lang('days') : lang('day');
15836                            html += ' <a href="javascript:;" shortcut="day,-' + data['prev-days'][i] + '">' + name + '</a>';
15837                        }
15838                        html += '</span>';
15839                    }
15840
15841                    if (data['next-days'] && data['next-days'].length > 0) {
15842                        html += '&nbsp;<span class="next-days">' + lang('following');
15843                        for (var i = 0; i < data['next-days'].length; i++) {
15844                            name = data['next-days'][i];
15845                            name += (data['next-days'][i] > 1) ? lang('days') : lang('day');
15846                            html += ' <a href="javascript:;" shortcut="day,' + data['next-days'][i] + '">' + name + '</a>';
15847                        }
15848                        html += '</span>';
15849                    }
15850
15851                    if (data.prev && data.prev.length > 0) {
15852                        html += '&nbsp;<span class="prev-buttons">' + lang('previous');
15853                        for (var i = 0; i < data.prev.length; i++) {
15854                            name = lang('prev-' + data.prev[i]);
15855                            html += ' <a href="javascript:;" shortcut="prev,' + data.prev[i] + '">' + name + '</a>';
15856                        }
15857                        html += '</span>';
15858                    }
15859
15860                    if (data.next && data.next.length > 0) {
15861                        html += '&nbsp;<span class="next-buttons">' + lang('next');
15862                        for (var i = 0; i < data.next.length; i++) {
15863                            name = lang('next-' + data.next[i]);
15864                            html += ' <a href="javascript:;" shortcut="next,' + data.next[i] + '">' + name + '</a>';
15865                        }
15866                        html += '</span>';
15867                    }
15868                }
15869
15870                if (opt.customShortcuts) {
15871                    for (var i = 0; i < opt.customShortcuts.length; i++) {
15872                        var sh = opt.customShortcuts[i];
15873                        html += '&nbsp;<span class="custom-shortcut"><a href="javascript:;" shortcut="custom">' + sh.name + '</a></span>';
15874                    }
15875                }
15876                html += '</div>';
15877            }
15878
15879
15880            // Add Custom Values Dom
15881            if (opt.showCustomValues) {
15882                html += '<div class="customValues"><b>' + (opt.customValueLabel || lang('custom-values')) + '</b>';
15883
15884                if (opt.customValues) {
15885                    for (var i = 0; i < opt.customValues.length; i++) {
15886                        var val = opt.customValues[i];
15887                        html += '&nbsp;<span class="custom-value"><a href="javascript:;" custom="' + val.value + '">' + val.name + '</a></span>';
15888                    }
15889                }
15890            }
15891
15892            html += '</div></div>';
15893
15894            return $(html);
15895        }
15896
15897        function getApplyBtnClass() {
15898            var klass = '';
15899            if (opt.autoClose === true) {
15900                klass += ' hide';
15901            }
15902            if (opt.applyBtnClass !== '') {
15903                klass += ' ' + opt.applyBtnClass;
15904            }
15905            return klass;
15906        }
15907
15908        function getWeekHead() {
15909            var prepend = opt.showWeekNumbers ? '<th>' + lang('week-number') + '</th>' : '';
15910            if (opt.startOfWeek == 'monday') {
15911                return prepend + '<th>' + lang('week-1') + '</th>' +
15912                    '<th>' + lang('week-2') + '</th>' +
15913                    '<th>' + lang('week-3') + '</th>' +
15914                    '<th>' + lang('week-4') + '</th>' +
15915                    '<th>' + lang('week-5') + '</th>' +
15916                    '<th>' + lang('week-6') + '</th>' +
15917                    '<th>' + lang('week-7') + '</th>';
15918            }
15919            else {
15920                return prepend + '<th>' + lang('week-7') + '</th>' +
15921                    '<th>' + lang('week-1') + '</th>' +
15922                    '<th>' + lang('week-2') + '</th>' +
15923                    '<th>' + lang('week-3') + '</th>' +
15924                    '<th>' + lang('week-4') + '</th>' +
15925                    '<th>' + lang('week-5') + '</th>' +
15926                    '<th>' + lang('week-6') + '</th>';
15927            }
15928        }
15929
15930        function isMonthOutOfBounds(month) {
15931            month = moment(month);
15932            if (opt.startDate && month.endOf('month').isBefore(opt.startDate)) {
15933                return true;
15934            }
15935            if (opt.endDate && month.startOf('month').isAfter(opt.endDate)) {
15936                return true;
15937            }
15938            return false;
15939        }
15940
15941        function getGapHTML() {
15942            var html = ['<div class="gap-top-mask"></div><div class="gap-bottom-mask"></div><div class="gap-lines">'];
15943            for (var i = 0; i < 20; i++) {
15944                html.push('<div class="gap-line">' +
15945                    '<div class="gap-1"></div>' +
15946                    '<div class="gap-2"></div>' +
15947                    '<div class="gap-3"></div>' +
15948                    '</div>');
15949            }
15950            html.push('</div>');
15951            return html.join('');
15952        }
15953
15954        function hasMonth2() {
15955            return (!opt.singleMonth);
15956        }
15957
15958        function attributesCallbacks(initialObject, callbacksArray, today) {
15959            var resultObject = $.extend(true, {}, initialObject);
15960
15961            $.each(callbacksArray, function (cbAttrIndex, cbAttr) {
15962                var addAttributes = cbAttr(today);
15963                for (var attr in addAttributes) {
15964                    if (resultObject.hasOwnProperty(attr)) {
15965                        resultObject[attr] += addAttributes[attr];
15966                    } else {
15967                        resultObject[attr] = addAttributes[attr];
15968                    }
15969                }
15970            });
15971
15972            var attrString = '';
15973
15974            for (var attr in resultObject) {
15975                if (resultObject.hasOwnProperty(attr)) {
15976                    attrString += attr + '="' + resultObject[attr] + '" ';
15977                }
15978            }
15979
15980            return attrString;
15981        }
15982
15983        function daysFrom1970(t) {
15984            return Math.round(toLocalTimestamp(t) / 86400000);
15985        }
15986
15987        function toLocalTimestamp(t) {
15988            if (moment.isMoment(t)) t = t.toDate().getTime();
15989            if (typeof t == 'object' && t.getTime) t = t.getTime();
15990            if (typeof t == 'string' && !t.match(/\d{13}/)) t = moment(t, opt.format).toDate().getTime();
15991            t = parseInt(t, 10) - new Date().getTimezoneOffset() * 60 * 1000;
15992            return t;
15993        }
15994
15995        function createMonthHTML(d) {
15996            var days = [];
15997            d.setDate(1);
15998            var lastMonth = new Date(d.getTime() - 86400000);
15999            var now = new Date();
16000
16001            var dayOfWeek = d.getDay();
16002            if ((dayOfWeek === 0) && (opt.startOfWeek === 'monday')) {
16003                // add one week
16004                dayOfWeek = 7;
16005            }
16006            var today, valid;
16007
16008            if (dayOfWeek > 0) {
16009                for (var i = dayOfWeek; i > 0; i--) {
16010                    var day = new Date(d.getTime() - 86400000 * i);
16011                    valid = isValidTime(day.getTime());
16012                    if (opt.startDate && compare_day(day, opt.startDate) < 0) valid = false;
16013                    if (opt.endDate && compare_day(day, opt.endDate) > 0) valid = false;
16014                    days.push(
16015                        {
16016                            date: day,
16017                            type: 'lastMonth',
16018                            day: day.getDate(),
16019                            time: day.getTime(),
16020                            valid: valid
16021                        });
16022                }
16023            }
16024            var toMonth = d.getMonth();
16025            for (var i = 0; i < 40; i++) {
16026                today = moment(d).add(i, 'days').toDate();
16027                valid = isValidTime(today.getTime());
16028                if (opt.startDate && compare_day(today, opt.startDate) < 0) valid = false;
16029                if (opt.endDate && compare_day(today, opt.endDate) > 0) valid = false;
16030                days.push(
16031                    {
16032                        date: today,
16033                        type: today.getMonth() == toMonth ? 'toMonth' : 'nextMonth',
16034                        day: today.getDate(),
16035                        time: today.getTime(),
16036                        valid: valid
16037                    });
16038            }
16039            var html = [];
16040            for (var week = 0; week < 6; week++) {
16041                if (days[week * 7].type == 'nextMonth') break;
16042                html.push('<tr>');
16043
16044                for (var day = 0; day < 7; day++) {
16045                    var _day = (opt.startOfWeek == 'monday') ? day + 1 : day;
16046                    today = days[week * 7 + _day];
16047                    var highlightToday = moment(today.time).format('L') == moment(now).format('L');
16048                    today.extraClass = '';
16049                    today.tooltip = '';
16050                    if (today.valid && opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
16051                        var _r = opt.beforeShowDay(moment(today.time).toDate());
16052                        today.valid = _r[0];
16053                        today.extraClass = _r[1] || '';
16054                        today.tooltip = _r[2] || '';
16055                        if (today.tooltip !== '') today.extraClass += ' has-tooltip ';
16056                    }
16057
16058                    var todayDivAttr = {
16059                        time: today.time,
16060                        'data-tooltip': today.tooltip,
16061                        'class': 'day ' + today.type + ' ' + today.extraClass + ' ' + (today.valid ? 'valid' : 'invali
16061d') + ' ' + (highlightToday ? 'real-today' : '')
16062                    };
16063
16064                    if (day === 0 && opt.showWeekNumbers) {
16065                        html.push('<td><div class="week-number" data-start-time="' + today.time + '">' + opt.getWeekNumber(today.date) + '</div></td>');
16066                    }
16067
16068                    html.push('<td ' + attributesCallbacks({}, opt.dayTdAttrs, today) + '><div ' + attributesCallbacks(todayDivAttr, opt.dayDivAttrs, today) + '>' + showDayHTML(today.time, today.day) + '</div></td>');
16069                }
16070                html.push('</tr>');
16071            }
16072            return html.join('');
16073        }
16074
16075        function showDayHTML(time, date) {
16076            if (opt.showDateFilter && typeof opt.showDateFilter == 'function') return opt.showDateFilter(time, date);
16077            return date;
16078        }
16079
16080        function getLanguages() {
16081
16082            if (opt.language == 'auto') {
16083                var language = navigator.language ? navigator.language : navigator.browserLanguage;
16084                if (!language) return $.dateRangePickerLanguages['default'];
16085                language = language.toLowerCase();
16086                for (var key in $.dateRangePickerLanguages) {
16087                    if (language.indexOf(key) !== -1) {
16088                        return $.dateRangePickerLanguages[key];
16089                    }
16090                }
16091                return $.dateRangePickerLanguages['default'];
16092            }
16093            else if (opt.language && opt.language in $.dateRangePickerLanguages) {
16094                return $.dateRangePickerLanguages[opt.language];
16095            }
16096            else {
16097                return $.dateRangePickerLanguages['default'];
16098            }
16099        }
16100
16101        /**
16102         * translate language string
16103         */
16104        function lang(t) {
16105            var _t = t.toLowerCase();
16106            var re = (t in langs) ? langs[t] : (_t in langs) ? langs[_t] : null;
16107            var defaultLanguage = $.dateRangePickerLanguages['default'];
16108            if (re == null) re = (t in defaultLanguage) ? defaultLanguage[t] : (_t in defaultLanguage) ? defaultLanguage[_t] : '';
16109            return re;
16110        }
16111
16112        function getDefaultTime() {
16113            var defaultTime = opt.defaultTime ? opt.defaultTime : new Date();
16114
16115            if (opt.lookBehind) {
16116                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = nextMonth(moment(opt.startDate).toDate());
16117                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
16118            }
16119            else {
16120                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
16121                if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate());
16122            }
16123
16124            if (opt.singleDate) {
16125                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
16126                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
16127            }
16128
16129            return defaultTime;
16130        }
16131
16132        function resetMonthsView(time) {
16133            if (!time) {
16134                time = getDefaultTime();
16135            }
16136
16137            if (opt.lookBehind) {
16138                showMonth(prevMonth(time), 'month1');
16139                showMonth(time, 'month2');
16140            }
16141            else {
16142                showMonth(time, 'month1');
16143                showMonth(nextMonth(time), 'month2');
16144            }
16145
16146            if (opt.singleDate) {
16147                showMonth(time, 'month1');
16148            }
16149
16150            showSelectedDays();
16151            showGap();
16152        }
16153
16154    };
16155}));
16156
16157// ============================================================== //
16158// BEGIN - Minified MALIHU SCROLLBAR PLUGIN
16159// ============================================================== //
16160/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
16161!function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery) }(function (a) { function b(b) { var g = b || window.event, h = i.call(arguments, 1), j = 0, l = 0, m = 0, n = 0, o = 0, p = 0; if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (m = -1 * g.detail), "wheelDelta" in g && (m = g.wheelDelta), "wheelDeltaY" in g && (m = g.wheelDeltaY), "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, m = 0), j = 0 === m ? l : m, "deltaY" in g && (m = -1 * g.deltaY, j = m), "deltaX" in g && (l = g.deltaX, 0 === m && (j = -1 * l)), 0 !== m || 0 !== l) { if (1 === g.deltaMode) { var q = a.data(this, "mousewheel-line-height"); j *= q, m *= q, l *= q } else if (2 === g.deltaMode) { var r = a.data(this, "mousewheel-page-height"); j *= r, m *= r, l *= r } if (n = Math.max(Math.abs(m), Math.abs(l)), (!f || f > n) && (f = n, d(g, n) && (f /= 40)), d(g, n) && (j /= 40, l /= 40, m /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), m = Math[m >= 1 ? "floor" : "ceil"](m / f), k.settings.normalizeOffset && this.getBoundingClientRect) { var s = this.getBoundingClientRect(); o = b.clientX - s.left, p = b.clientY - s.top } return b.deltaX = l, b.deltaY = m, b.deltaFactor = f, b.offsetX = o, b.offsetY = p, b.deltaMode = 0, h.unshift(b, j, l, m), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h) } } function c() { f = null } function d(a, b) { return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 } var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h 
vendor: 49,751 bytes, lines 16161-16173
16161= "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice; if (a.event.fixHooks) for (var j = g.length; j;)a.event.fixHooks[g[--j]] = a.event.mouseHooks; var k = a.event.special.mousewheel = { version: "3.1.12", setup: function () { if (this.addEventListener) for (var c = h.length; c;)this.addEventListener(h[--c], b, !1); else this.onmousewheel = b; a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this)) }, teardown: function () { if (this.removeEventListener) for (var c = h.length; c;)this.removeEventListener(h[--c], b, !1); else this.onmousewheel = null; a.removeData(this, "mousewheel-line-height"), a.removeData(this, "mousewheel-page-height") }, getLineHeight: function (b) { var c = a(b), d = c["offsetParent" in a.fn ? "offsetParent" : "parent"](); return d.length || (d = a("body")), parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16 }, getPageHeight: function (b) { return a(b).height() }, settings: { adjustOldDeltas: !0, normalizeOffset: !0 } }; a.fn.extend({ mousewheel: function (a) { return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") }, unmousewheel: function (a) { return this.unbind("mousewheel", a) } }) }); !function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery) }(function (a) { function b(b) { var g = b || window.event, h = i.call(arguments, 1), j = 0, l = 0, m = 0, n = 0, o = 0, p = 0; if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (m = -1 * g.detail), "wheelDelta" in g && (m = g.wheelDelta), "wheelDeltaY" in g && (m = g.wheelDeltaY), "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, m = 0), j = 0 === m ? l : m, "deltaY" in g && (m = -1 * g.deltaY, j = m), "deltaX" in g && (l = g.deltaX, 0 === m && (j = -1 * l)), 0 !== m || 0 !== l) { if (1 === g.deltaMode) { var q = a.data(this, "mousewheel-line-height"); j *= q, m *= q, l *= q } else if (2 === g.deltaMode) { var r = a.data(this, "mousewheel-page-height"); j *= r, m *= r, l *= r } if (n = Math.max(Math.abs(m), Math.abs(l)), (!f || f > n) && (f = n, d(g, n) && (f /= 40)), d(g, n) && (j /= 40, l /= 40, m /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), m = Math[m >= 1 ? "floor" : "ceil"](m / f), k.settings.normalizeOffset && this.getBoundingClientRect) { var s = this.getBoundingClientRect(); o = b.clientX - s.left, p = b.clientY - s.top } return b.deltaX = l, b.deltaY = m, b.deltaFactor = f, b.offsetX = o, b.offsetY = p, b.deltaMode = 0, h.unshift(b, j, l, m), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h) } } function c() { f = null } function d(a, b) { return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 } var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice; if (a.event.fixHooks) for (var j = g.length; j;)a.event.fixHooks[g[--j]] = a.event.mouseHooks; var k = a.event.special.mousewheel = { version: "3.1.12", setup: function () { if (this.addEventListener) for (var c = h.length; c;)this.addEventListener(h[--c], b, !1); else this.onmousewheel = b; a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this)) }, teardown: function () { if (this.removeEventListener) for (var c = h.length; c;)this.removeEventListener(h[--c], b, !1); else this.onmousewheel = null; a.removeData(this, "mousewheel-line-height"), a.removeData(this, "mousewheel-page-height") }, getLineHeight: function (b) { var c = a(b), d = c["offsetParent" in a.fn ? "offsetParent" : "parent"](); return d.length || (d = a("body")), parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16 }, getPageHeight: function (b) { return a(b).height() }, settings: { adjustOldDeltas: !0, normalizeOffset: !0 } }; a.fn.extend({ mousewheel: function (a) { return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") }, unmousewheel: function (a) { return this.unbind("mousewheel", a) } }) });
16162/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
16163!function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : "undefined" != typeof module && module.exports ? module.exports = e : e(jQuery, window, document) }(function (e) {
16164    !function (t) { var o = "function" == typeof define && define.amd, a = "undefined" != typeof module && module.exports, n = "https:" == document.location.protocol ? "https:" : "http:", i = "cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"; o || (a ? require("jquery-mousewheel")(e) : e.event.special.mousewheel || e("head").append(decodeURI("%3Cscript src=" + n + "//" + i + "%3E%3C/script%3E"))), t() }(function () {
16165        var t, o = "mCustomScrollbar", a = "mCS", n = ".mCustomScrollbar", i = { setTop: 0, setLeft: 0, axis: "y", scrollbarPosition: "inside", scrollInertia: 950, autoDraggerLength: !0, alwaysShowScrollbar: 0, snapOffset: 0, mouseWheel: { enable: !0, scrollAmount: "auto", axis: "y", deltaFactor: "auto", disableOver: ["select", "option", "keygen", "datalist", "textarea"] }, scrollButtons: { scrollType: "stepless", scrollAmount: "auto" }, keyboard: { enable: !0, scrollType: "stepless", scrollAmount: "auto" }, contentTouchScroll: 25, documentTouchScroll: !0, advanced: { autoScrollOnFocus: "input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", updateOnContentResize: !0, updateOnImageLoad: "auto", autoUpdateTimeout: 60 }, theme: "light", callbacks: { onTotalScrollOffset: 0, onTotalScrollBackOffset: 0, alwaysTriggerOffsets: !0 } }, r = 0, l = {}, s = window.attachEvent && !window.addEventListener ? 1 : 0, c = !1, d = ["mCSB_dragger_onDrag", "mCSB_scrollTools_onDrag", "mCS_img_loaded", "mCS_disabled", "mCS_destroyed", "mCS_no_scrollbar", "mCS-autoHide", "mCS-dir-rtl", "mCS_no_scrollbar_y", "mCS_no_scrollbar_x", "mCS_y_hidden", "mCS_x_hidden", "mCSB_draggerContainer", "mCSB_buttonUp", "mCSB_buttonDown", "mCSB_buttonLeft", "mCSB_buttonRight"], u = { init: function (t) { var t = e.extend(!0, {}, i, t), o = f.call(this); if (t.live) { var s = t.liveSelector || this.selector || n, c = e(s); if ("off" === t.live) return void m(s); l[s] = setTimeout(function () { c.mCustomScrollbar(t), "once" === t.live && c.length && m(s) }, 500) } else m(s); return t.setWidth = t.set_width ? t.set_width : t.setWidth, t.setHeight = t.set_height ? t.set_height : t.setHeight, t.axis = t.horizontalScroll ? "x" : p(t.axis), t.scrollInertia = t.scrollInertia > 0 && t.scrollInertia < 17 ? 17 : t.scrollInertia, "object" != typeof t.mouseWheel && 1 == t.mouseWheel && (t.mouseWheel = { enable: !0, scrollAmount: "auto", axis: "y", preventDefault: !1, deltaFactor: "auto", normalizeDelta: !1, invert: !1 }), t.mouseWheel.scrollAmount = t.mouseWheelPixels ? t.mouseWheelPixels : t.mouseWheel.scrollAmount, t.mouseWheel.normalizeDelta = t.advanced.normalizeMouseWheelDelta ? t.advanced.normalizeMouseWheelDelta : t.mouseWheel.normalizeDelta, t.scrollButtons.scrollType = g(t.scrollButtons.scrollType), h(t), e(o).each(function () { var o = e(this); if (!o.data(a)) { o.data(a, { idx: ++r, opt: t, scrollRatio: { y: null, x: null }, overflowed: null, contentReset: { y: null, x: null }, bindEvents: !1, tweenRunning: !1, sequential: {}, langDir: o.css("direction"), cbOffsets: null, trigger: null, poll: { size: { o: 0, n: 0 }, img: { o: 0, n: 0 }, change: { o: 0, n: 0 } } }); var n = o.data(a), i = n.opt, l = o.data("mcs-axis"), s = o.data("mcs-scrollbar-position"), c = o.data("mcs-theme"); l && (i.axis = l), s && (i.scrollbarPosition = s), c && (i.theme = c, h(i)), v.call(this), n && i.callbacks.onCreate && "function" == typeof i.callbacks.onCreate && i.callbacks.onCreate.call(this), e("#mCSB_" + n.idx + "_container img:not(." + d[2] + ")").addClass(d[2]), u.update.call(null, o) } }) }, update: function (t, o) { var n = t || f.call(this); return e(n).each(function () { var t = e(this); if (t.data(a)) { var n = t.data(a), i = n.opt, r = e("#mCSB_" + n.idx + "_container"), l = e("#mCSB_" + n.idx), s = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")]; if (!r.length) return; n.tweenRunning && Q(t), o && n && i.callbacks.onBeforeUpdate && "function" == typeof i.callbacks.onBeforeUpdate && i.callbacks.onBeforeUpdate.call(this), t.hasClass(d[3]) && t.removeClass(d[3]), t.hasClass(d[4]) && t.removeClass(d[4]), l.css("max-height", "none"), l.height() !== t.height() && l.css("max-height", t.height()), _.call(this), "y" === i.axis || i.advanced.autoExpandHorizontalScroll || r.css("width", x(r)), n.overflowed = y.call(this), M.call(this), i.autoDraggerLength && S.call(this), b.call(this), T.call(this); var c = [Math.abs(r[0].offsetTop), Math.abs(r[0].offsetLeft)]; "x" !== i.axis && (n.overflowed[0] ? s[0].height() > s[0].parent().height() ? B.call(this) : (G(t, c[0].toString(), { dir: "y", dur: 0, overwrite: "none" }), n.contentReset.y = null) : (B.call(this), "y" === i.axis ? k.call(this) : "yx" === i.axis && n.overflowed[1] && G(t, c[1].toString(), { dir: "x", dur: 0, overwrite: "none" }))), "y" !== i.axis && (n.overflowed[1] ? s[1].width() > s[1].parent().width() ? B.call(this) : (G(t, c[1].toString(), { dir: "x", dur: 0, overwrite: "none" }), n.contentReset.x = null) : (B.call(this), "x" === i.axis ? k.call(this) : "yx" === i.axis && n.overflowed[0] && G(t, c[0].toString(), { dir: "y", dur: 0, overwrite: "none" }))), o && n && (2 === o && i.callbacks.onImageLoad && "function" == typeof i.callbacks.onImageLoad ? i.callbacks.onImageLoad.call(this) : 3 === o && i.callbacks.onSelectorChange && "function" == typeof i.callbacks.onSelectorChange ? i.callbacks.onSelectorChange.call(this) : i.callbacks.onUpdate && "function" == typeof i.callbacks.onUpdate && i.callbacks.onUpdate.call(this)), N.call(this) } }) }, scrollTo: function (t, o) { if ("undefined" != typeof t && null != t) { var n = f.call(this); return e(n).each(function () { var n = e(this); if (n.data(a)) { var i = n.data(a), r = i.opt, l = { trigger: "external", scrollInertia: r.scrollInertia, scrollEasing: "mcsEaseInOut", moveDragger: !1, timeout: 60, callbacks: !0, onStart: !0, onUpdate: !0, onComplete: !0 }, s = e.extend(!0, {}, l, o), c = Y.call(this, t), d = s.scrollInertia > 0 && s.scrollInertia < 17 ? 17 : s.scrollInertia; c[0] = X.call(this, c[0], "y"), c[1] = X.call(this, c[1], "x"), s.moveDragger && (c[0] *= i.scrollRatio.y, c[1] *= i.scrollRatio.x), s.dur = ne() ? 0 : d, setTimeout(function () { null !== c[0] && "undefined" != typeof c[0] && "x" !== r.axis && i.overflowed[0] && (s.dir = "y", s.overwrite = "all", G(n, c[0].toString(), s)), null !== c[1] && "undefined" != typeof c[1] && "y" !== r.axis && i.overflowed[1] && (s.dir = "x", s.overwrite = "none", G(n, c[1].toString(), s)) }, s.timeout) } }) } }, stop: function () { var t = f.call(this); return e(t).each(function () { var t = e(this); t.data(a) && Q(t) }) }, disable: function (t) { var o = f.call(this); return e(o).each(function () { var o = e(this); if (o.data(a)) { o.data(a); N.call(this, "remove"), k.call(this), t && B.call(this), M.call(this, !0), o.addClass(d[3]) } }) }, destroy: function () { var t = f.call(this); return e(t).each(function () { var n = e(this); if (n.data(a)) { var i = n.data(a), r = i.opt, l = e("#mCSB_" + i.idx), s = e("#mCSB_" + i.idx + "_container"), c = e(".mCSB_" + i.idx + "_scrollbar"); r.live && m(r.liveSelector || e(t).selector), N.call(this, "remove"), k.call(this), B.call(this), n.removeData(a), $(this, "mcs"), c.remove(), s.find("img." + d[2]).removeClass(d[2]), l.replaceWith(s.contents()), n.removeClass(o + " _" + a + "_" + i.idx + " " + d[6] + " " + d[7] + " " + d[5] + " " + d[3]).addClass(d[4]) } }) } }, f = function () { return "object" != typeof e(this) || e(this).length < 1 ? n : this }, h = function (t) { var o = ["rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark"], a = ["rounded-dots", "rounded-dots-dark", "3d", "3d-dark", "3d-thick", "3d-thick-dark", "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark"], n = ["minimal", "minimal-dark"], i = ["minimal", "minimal-dark"], r = ["minimal", "minimal-dark"]; t.autoDraggerLength = e.inArray(t.theme, o) > -1 ? !1 : t.autoDraggerLength, t.autoExpandScrollbar = e.inArray(t.theme, a) > -1 ? !1 : t.autoExpandScrollbar, t.scrollButtons.enable = e.inArray(t.theme, n) > -1 ? !1 : t.scrollButtons.enable, t.autoHideScrollbar = e.inArray(t.theme, i) > -1 ? !0 : t.autoHideScrollbar, t.scrollbarPosition = e.inArray(t.theme, r) > -1 ? "outside" : t.scrollbarPosition }, m = function (e) { l[e] && (clearTimeout(l[e]), $(l, e)) }, p = function (e) { return "yx" === e || "xy" === e || "auto" === e ? "yx" : "x" === e || "horizontal" === e ? "x" : "y" }, g = function (e) { return "stepped" === e || "pixels" === e || "step" === e || "click" === e ? "stepped" : "stepless" }, v = function () { var t = e(this), n = t.data(a), i = n.opt, r = i.autoExpandScrollbar ? " " + d[1] + "_expand" : "", l = ["<div id='mCSB_" + n.idx + "_scrollbar_vertical' class='mCSB_scrollTools mCSB_" + n.idx + "_scrollbar mCS-" + i.theme + " mCSB_scrollTools_vertical" + r + "'><div class='" + d[12] + "'><div id='mCSB_" + n.idx + "_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>", "<div id='mCSB_" + n.idx + "_scrollbar_horizontal' class='mCSB_scrollTools mCSB_" + n.idx + "_scrollbar mCS-" + i.theme + " mCSB_scrollTools_horizontal" + r + "'><div class='" + d[12] + "'><div id='mCSB_" + n.idx + "_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"], s = "yx" === i.axis ? "mCSB_vertical_horizontal" : "x" === i.axis ? "mCSB_horizontal" : "mCSB_vertical", c = "yx" === i.axis ? l[0] + l[1] : "x" === i.axis ? l[1] : l[0], u = "yx" === i.axis ? "<div id='mCSB_" + n.idx + "_container_wrapper' class='mCSB_container_wrapper' />" : "", f = i.autoHideScrollbar ? " " + d[6] : "", h = "x" !== i.axis && "rtl" === n.langDir ? " " + d[7] : ""; i.setWidth && t.css("width", i.setWidth), i.setHeight && t.css("height", i.setHeight), i.setLeft = "y" !== i.axis && "rtl" === n.langDir ? "989999px" : i.setLeft, t.addClass(o + " _" + a + "_" + n.idx + f + h).wrapInner("<div id='mCSB_" + n.idx + "' class='mCustomScrollBox mCS-" + i.theme + " " + s + "'><div id='mCSB_" + n.idx + "_container' class='mCSB_container' style='position:relative; top:" + i.setTop + "; left:" + i.setLeft + ";' dir='" + n.langDir + "' /></div>"); var m = e("#mCSB_" + n.idx), p = e("#mCSB_" + n.idx + "_container"); "y" === i.axis || i.advanced.autoExpandHorizontalScroll || p.css("width", x(p)), "outside" === i.scrollbarPosition ? ("static" === t.css("position") && t.css("position", "relative"), t.css("overflow", "visible"), m.addClass("mCSB_outside").after(c)) : (m.addClass("mCSB_inside").append(c), p.wrap(u)), w.call(this); var g = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")]; g[0].css("min-height", g[0].height()), g[1].css("min-width", g[1].width()) }, x = function (t) { var o = [t[0].scrollWidth, Math.max.apply(Math, t.children().map(function () { return e(this).outerWidth(!0) }).get())], a = t.parent().width(); return o[0] > a ? o[0] : o[1] > a ? o[1] : "100%" }, _ = function () { var t = e(this), o = t.data(a), n = o.opt, i = e("#mCSB_" + o.idx + "_container"); if (n.advanced.autoExpandHorizontalScroll && "y" !== n.axis) { i.css({ width: "auto", "min-width": 0, "overflow-x": "scroll" }); var r = Math.ceil(i[0].scrollWidth); 3 === n.advanced.autoExpandHorizontalScroll || 2 !== n.advanced.autoExpandHorizontalScroll && r > i.parent().width() ? i.css({ width: r, "min-width": "100%", "overflow-x": "inherit" }) : i.css({ "overflow-x": "inherit", position: "absolute" }).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({ width: Math.ceil(i[0].getBoundingClientRect().right + .4) - Math.floor(i[0].getBoundingClientRect().left), "min-width": "100%", position: "relative" }).unwrap() } }, w = function () { var t = e(this), o = t.data(a), n = o.opt, i = e(".mCSB_" + o.idx + "_scrollbar:first"), r = oe(n.scrollButtons.tabindex) ? "tabindex='" + n.scrollButtons.tabindex + "'" : "", l = ["<a href='#' class='" + d[13] + "' " + r + " />", "<a href='#' class='" + d[14] + "' " + r + " />", "<a href='#' class='" + d[15] + "' " + r + " />", "<a href='#' class='" + d[16] + "' " + r + " />"], s = ["x" === n.axis ? l[2] : l[0], "x" === n.axis ? l[3] : l[1], l[2], l[3]]; n.scrollButtons.enable && i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3]) }, S = function () { var t = e(this), o = t.data(a), n = e("#mCSB_" + o.idx), i = e("#mCSB_" + o.idx + "_container"), r = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")], l = [n.height() / i.outerHeight(!1), n.width() / i.outerWidth(!1)], c = [parseInt(r[0].css("min-height")), Math.round(l[0] * r[0].parent().height()), parseInt(r[1].css("min-width")), Math.round(l[1] * r[1].parent().width())], d = s && c[1] < c[0] ? c[0] : c[1], u = s && c[3] < c[2] ? c[2] : c[3]; r[0].css({ height: d, "max-height": r[0].parent().height() - 10 }).find(".mCSB_dragger_bar").css({ "line-height": c[0] + "px" }), r[1].css({ width: u, "max-width": r[1].parent().width() - 10 }) }, b = function () { var t = e(this), o = t.data(a), n = e("#mCSB_" + o.idx), i = e("#mCSB_" + o.idx + "_container"), r = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")], l = [i.outerHeight(!1) - n.height(), i.outerWidth(!1) - n.width()], s = [l[0] / (r[0].parent().height() - r[0].height()), l[1] / (r[1].parent().width() - r[1].width())]; o.scrollRatio = { y: s[0], x: s[1] } }, C = function (e, t, o) { var a = o ? d[0] + "_expanded" : "", n = e.closest(".mCSB_scrollTools"); "active" === t ? (e.toggleClass(d[0] + " " + a), n.toggleClass(d[1]), e[0]._draggable = e[0]._draggable ? 0 : 1) : e[0]._draggable || ("hide" === t ? (e.removeClass(d[0]), n.removeClass(d[1])) : (e.addClass(d[0]), n.addClass(d[1]))) }, y = function () { var t = e(this), o = t.data(a), n = e("#mCSB_" + o.idx), i = e("#mCSB_" + o.idx + "_container"), r = null == o.overflowed ? i.height() : i.outerHeight(!1), l = null == o.overflowed ? i.width() : i.outerWidth(!1), s = i[0].scrollHeight, c = i[0].scrollWidth; return s > r && (r = s), c > l && (l = c), [r > n.height(), l > n.width()] }, B = function () { var t = e(this), o = t.data(a), n = o.opt, i = e("#mCSB_" + o.idx), r = e("#mCSB_" + o.idx + "_container"), l = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")]; if (Q(t), ("x" !== n.axis && !o.overflowed[0] || "y" === n.axis && o.overflowed[0]) && (l[0].add(r).css("top", 0), G(t, "_resetY")), "y" !== n.axis && !o.overflowed[1] || "x" === n.axis && o.overflowed[1]) { var s = dx = 0; "rtl" === o.langDir && (s = i.width() - r.outerWidth(!1), dx = Math.abs(s / o.scrollRatio.x)), r.css("left", s), l[1].css("left", dx), G(t, "_resetX") } }, T = function () { function t() { r = setTimeout(function () { e.event.special.mousewheel ? (clearTimeout(r), W.call(o[0])) : t() }, 100) } var o = e(this), n = o.data(a), i = n.opt; if (!n.bindEvents) { if (I.call(this), i.contentTouchScroll && D.call(this), E.call(this), i.mouseWheel.enable) { var r; t() } P.call(this), U.call(this), i.advanced.autoScrollOnFocus && H.call(this), i.scrollButtons.enable && F.call(this), i.keyboard.enable && q.call(this), n.bindEvents = !0 } }, k = function () { var t = e(this), o = t.data(a), n = o.opt, i = a + "_" + o.idx, r = ".mCSB_" + o.idx + "_scrollbar", l = e("#mCSB_" + o.idx + ",#mCSB_" + o.idx + "_container,#mCSB_" + o.idx + "_container_wrapper," + r + " ." + d[12] + ",#mCSB_" + o.idx + "_dragger_vertical,#mCSB_" + o.idx + "_dragger_horizontal," + r + ">a"), s = e("#mCSB_" + o.idx + "_container"); n.advanced.releaseDraggableSelectors && l.add(e(n.advanced.releaseDraggableSelectors)), n.advanced.extraDraggableSelectors && l.add(e(n.advanced.extraDraggableSelectors)), o.bindEvents && (e(document).add(e(!A() || top.document)).unbind("." + i), l.each(function () { e(this).unbind("." + i) }), clearTimeout(t[0]._focusTimeout), $(t[0], "_focusTimeout"), clearTimeout(o.sequential.step), $(o.sequential, "step"), clearTimeout(s[0].onCompleteTimeout), $(s[0], "onCompleteTimeout"), o.bindEvents = !1) }, M = function (t) { var o = e(this), n = o.data(a), i = n.opt, r = e("#mCSB_" + n.idx + "_container_wrapper"), l = r.length ? r : e("#mCSB_" + n.idx + "_container"), s = [e("#mCSB_" + n.idx + "_scrollbar_vertical"), e("#mCSB_" + n.idx + "_scrollbar_horizontal")], c = [s[0].find(".mCSB_dragger"), s[1].find(".mCSB_dragger")]; "x" !== i.axis && (n.overflowed[0] && !t ? (s[0].add(c[0]).add(s[0].children("a")).css("display", "block"), l.removeClass(d[8] + " " + d[10])) : (i.alwaysShowScrollbar ? (2 !== i.alwaysShowScrollbar && c[0].css("display", "none"), l.removeClass(d[10])) : (s[0].css("display", "none"), l.addClass(d[10])), l.addClass(d[8]))), "y" !== i.axis && (n.overflowed[1] && !t ? (s[1].add(c[1]).add(s[1].children("a")).css("display", "block"), l.removeClass(d[9] + " " + d[11])) : (i.alwaysShowScrollbar ? (2 !== i.alwaysShowScrollbar && c[1].css("display", "none"), l.removeClass(d[11])) : (s[1].css("display", "none"), l.addClass(d[11])), l.addClass(d[9]))), n.overflowed[0] || n.overflowed[1] ? o.removeClass(d[5]) : o.addClass(d[5]) }, O = function (t) { var o = t.type, a = t.target.ownerDocument !== document && null !== frameElement ? [e(frameElement).offset().top, e(frameElement).offset().left] : null, n = A() && t.target.ownerDocument !== top.document && null !== frameElement ? [e(t.view.frameElement).offset().top, e(t.view.frameElement).offset().left] : [0, 0]; switch (o) { case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": return a ? [t.originalEvent.pageY - a[0] + n[0], t.originalEvent.pageX - a[1] + n[1], !1] : [t.originalEvent.pageY, t.originalEvent.pageX, !1]; case "touchstart": case "touchmove": case "touchend": var i = t.originalEvent.touches[0] || t.originalEvent.changedTouches[0], r = t.originalEvent.touches.length || t.originalEvent.changedTouches.length; return t.target.ownerDocument !== document ? [i.screenY, i.screenX, r > 1] : [i.pageY, i.pageX, r > 1]; default: return a ? [t.pageY - a[0] + n[0], t.pageX - a[1] + n[1], !1] : [t.pageY, t.pageX, !1] } }, I = function () { function t(e, t, a, n) { if (h[0].idleTimer = d.scrollInertia < 233 ? 250 : 0, o.attr("id") === f[1]) var i = "x", s = (o[0].offsetLeft - t + n) * l.scrollRatio.x; else var i = "y", s = (o[0].offsetTop - e + a) * l.scrollRatio.y; G(r, s.toString(), { dir: i, drag: !0 }) } var o, n, i, r = e(this), l = r.data(a), d = l.opt, u = a + "_" + l.idx, f = ["mCSB_" + l.idx + "_dragger_vertical", "mCSB_" + l.idx + "_dragger_horizontal"], h = e("#mCSB_" + l.idx + "_container"), m = e("#" + f[0] + ",#" + f[1]), p = d.advanced.releaseDraggableSelectors ? m.add(e(d.advanced.releaseDraggableSelectors)) : m, g = d.advanced.extraDraggableSelectors ? e(!A() || top.document).add(e(d.advanced.extraDraggableSelectors)) : e(!A() || top.document); m.bind("contextmenu." + u, function (e) { e.preventDefault() }).bind("mousedown." + u + " touchstart." + u + " pointerdown." + u + " MSPointerDown." + u, function (t) { if (t.stopImmediatePropagation(), t.preventDefault(), ee(t)) { c = !0, s && (document.onselectstart = function () { return !1 }), L.call(h, !1), Q(r), o = e(this); var a = o.offset(), l = O(t)[0] - a.top, u = O(t)[1] - a.left, f = o.height() + a.top, m = o.width() + a.left; f > l && l > 0 && m > u && u > 0 && (n = l, i = u), C(o, "active", d.autoExpandScrollbar) } }).bind("touchmove." + u, function (e) { e.stopImmediatePropagation(), e.preventDefault(); var a = o.offset(), r = O(e)[0] - a.top, l = O(e)[1] - a.left; t(n, i, r, l) }), e(document).add(g).bind("mousemove." + u + " pointermove." + u + " MSPointerMove." + u, function (e) { if (o) { var a = o.offset(), r = O(e)[0] - a.top, l = O(e)[1] - a.left; if (n === r && i === l) return; t(n, i, r, l) } }).add(p).bind("mouseup." + u + " touchend." + u + " pointerup." + u + " MSPointerUp." + u, function () { o && (C(o, "active", d.autoExpandScrollbar), o = null), c = !1, s && (document.onselectstart = null), L.call(h, !0) }) }, D = function () { function o(e) { if (!te(e) || c || O(e)[2]) return void (t = 0); t = 1, b = 0, C = 0, d = 1, y.removeClass("mCS_touch_action"); var o = I.offset(); u = O(e)[0] - o.top, f = O(e)[1] - o.left, z = [O(e)[0], O(e)[1]] } function n(e) { if (te(e) && !c && !O(e)[2] && (T.documentTouchScroll || e.preventDefault(), e.stopImmediatePropagation(), (!C || b) && d)) { g = K(); var t = M.offset(), o = O(e)[0] - t.top, a = O(e)[1] - t.left, n = "mcsLinearOut"; if (E.push(o), W.push(a), z[2] = Math.abs(O(e)[0] - z[0]), z[3] = Math.abs(O(e)[1] - z[1]), B.overflowed[0]) var i = D[0].parent().height() - D[0].height(), r = u - o > 0 && o - u > -(i * B.scrollRatio.y) && (2 * z[3] < z[2] || "yx" === T.axis); if (B.overflowed[1]) var l = D[1].parent().width() - D[1].width(), h = f - a > 0 && a - f > -(l * B.scrollRatio.x) && (2 * z[2] < z[3] || "yx" === T.axis); r || h ? (U || e.preventDefault(), b = 1) : (C = 1, y.addClass("mCS_touch_action")), U && e.preventDefault(), w = "yx" === T.axis ? [u - o, f - a] : "x" === T.axis ? [null, f - a] : [u - o, null], I[0].idleTimer = 250, B.overflowed[0] && s(w[0], R, n, "y", "all", !0), B.overflowed[1] && s(w[1], R, n, "x", L, !0) } } function i(e) { if (!te(e) || c || O(e)[2]) return void (t = 0); t = 1, e.stopImmediatePropagation(), Q(y), p = K(); var o = M.offset(); h = O(e)[0] - o.top, m = O(e)[1] - o.left, E = [], W = [] } function r(e) { if (te(e) && !c && !O(e)[2]) { d = 0, e.stopImmediatePropagation(), b = 0, C = 0, v = K(); var t = M.offset(), o = O(e)[0] - t.top, a = O(e)[1] - t.left; if (!(v - g > 30)) { _ = 1e3 / (v - p); var n = "mcsEaseOut", i = 2.5 > _, r = i ? [E[E.length - 2], W[W.length - 2]] : [0, 0]; x = i ? [o - r[0], a - r[1]] : [o - h, a - m]; var u = [Math.abs(x[0]), Math.abs(x[1])]; _ = i ? [Math.abs(x[0] / 4), Math.abs(x[1] / 4)] : [_, _]; var f = [Math.abs(I[0].offsetTop) - x[0] * l(u[0] / _[0], _[0]), Math.abs(I[0].offsetLeft) - x[1] * l(u[1] / _[1], _[1])]; w = "yx" === T.axis ? [f[0], f[1]] : "x" === T.axis ? [null, f[1]] : [f[0], null], S = [4 * u[0] + T.scrollInertia, 4 * u[1] + T.scrollInertia]; var y = parseInt(T.contentTouchScroll) || 0; w[0] = u[0] > y ? w[0] : 0, w[1] = u[1] > y ? w[1] : 0, B.overflowed[0] && s(w[0], S[0], n, "y", L, !1), B.overflowed[1] && s(w[1], S[1], n, "x", L, !1) } } } function l(e, t) { var o = [1.5 * t, 2 * t, t / 1.5, t / 2]; return e > 90 ? t > 4 ? o[0] : o[3] : e > 60 ? t > 3 ? o[3] : o[2] : e > 30 ? t > 8 ? o[1] : t > 6 ? o[0] : t > 4 ? t : o[2] : t > 8 ? t : o[3] } function s(e, t, o, a, n, i) { e && G(y, e.toString(), { dur: t, scrollEasing: o, dir: a, overwrite: n, drag: i }) } var d, u, f, h, m, p, g, v, x, _, w, S, b, C, y = e(this), B = y.data(a), T = B.opt, k = a + "_" + B.idx, M = e("#mCSB_" + B.idx), I = e("#mCSB_" + B.idx + "_container"), D = [e("#mCSB_" + B.idx + "_dragger_vertical"), e("#mCSB_" + B.idx + "_dragger_horizontal")], E = [], W = [], R = 0, L = "yx" === T.axis ? "none" : "all", z = [], P = I.find("iframe"), H = ["touchstart." + k + " pointerdown." + k + " MSPointerDown." + k, "touchmove." + k + " pointermove." + k + " MSPointerMove." + k, "touchend." + k + " pointerup." + k + " MSPointerUp." + k], U = void 0 !== document.body.style.touchAction && "" !== document.body.style.touchAction; I.bind(H[0], function (e) { o(e) }).bind(H[1], function (e) { n(e) }), M.bind(H[0], function (e) { i(e) }).bind(H[2], function (e) { r(e) }), P.length && P.each(function () { e(this).bind("load", function () { A(this) && e(this.contentDocument || this.contentWindow.document).bind(H[0], function (e) { o(e), i(e) }).bind(H[1], function (e) { n(e) }).bind(H[2], function (e) { r(e) }) }) }) }, E = function () { function o() { return window.getSelection ? window.getSelection().toString() : document.selection && "Control" != document.selection.type ? document.selection.createRange().text : 0 } function n(e, t, o) { d.type = o && i ? "stepped" : "stepless", d.scrollAmount = 10, j(r, e, t, "mcsLinearOut", o ? 60 : null) } var i, r = e(this), l = r.data(a), s = l.opt, d = l.sequential, u = a + "_" + l.idx, f = e("#mCSB_" + l.idx + "_container"), h = f.parent(); f.bind("mousedown." + u, function () { t || i || (i = 1, c = !0) }).add(document).bind("mousemove." + u, function (e) { if (!t && i && o()) { var a = f.offset(), r = O(e)[0] - a.top + f[0].offsetTop, c = O(e)[1] - a.left + f[0].offsetLeft; r > 0 && r < h.height() && c > 0 && c < h.width() ? d.step && n("off", null, "stepped") : ("x" !== s.axis && l.overflowed[0] && (0 > r ? n("on", 38) : r > h.height() && n("on", 40)), "y" !== s.axis && l.overflowed[1] && (0 > c ? n("on", 37) : c > h.width() && n("on", 39))) } }).bind("mouseup." + u + " dragend." + u, function () { t || (i && (i = 0, n("off", null)), c = !1) }) }, W = function () { function t(t, a) { if (Q(o), !z(o, t.target)) { var r = "auto" !== i.mouseWheel.deltaFactor ? parseInt(i.mouseWheel.deltaFactor) : s && t.deltaFactor < 100 ? 100 : t.deltaFactor || 100, d = i.scrollInertia; if ("x" === i.axis || "x" === i.mouseWheel.axis) var u = "x", f = [Math.round(r * n.scrollRatio.x), parseInt(i.mouseWheel.scrollAmount)], h = "auto" !== i.mouseWheel.scrollAmount ? f[1] : f[0] >= l.width() ? .9 * l.width() : f[0], m = Math.abs(e("#mCSB_" + n.idx + "_container")[0].offsetLeft), p = c[1][0].offsetLeft, g = c[1].parent().width() - c[1].width(), v = "y" === i.mouseWheel.axis ? t.deltaY || a : t.deltaX; else var u = "y", f = [Math.round(r * n.scrollRatio.y), parseInt(i.mouseWheel.scrollAmount)], h = "auto" !== i.mouseWheel.scrollAmount ? f[1] : f[0] >= l.height() ? .9 * l.height() : f[0], m = Math.abs(e("#mCSB_" + n.idx + "_container")[0].offsetTop), p = c[0][0].offsetTop, g = c[0].parent().height() - c[0].height(), v = t.deltaY || a; "y" === u && !n.overflowed[0] || "x" === u && !n.overflowed[1] || ((i.mouseWheel.invert || t.webkitDirectionInvertedFromDevice) && (v = -v), i.mouseWheel.normalizeDelta && (v = 0 > v ? -1 : 1), (v > 0 && 0 !== p || 0 > v && p !== g || i.mouseWheel.preventDefault) && (t.stopImmediatePropagation(), t.preventDefault()), t.deltaFactor < 5 && !i.mouseWheel.normalizeDelta && (h = t.deltaFactor, d = 17), G(o, (m - v * h).toString(), { dir: u, dur: d })) } } if (e(this).data(a)) { var o = e(this), n = o.data(a), i = n.opt, r = a + "_" + n.idx, l = e("#mCSB_" + n.idx), c = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")], d = e("#mCSB_" + n.idx + "_container").find("iframe"); d.length && d.each(function () { e(this).bind("load", function () { A(this) && e(this.contentDocument || this.contentWindow.document).bind("mousewheel." + r, function (e, o) { t(e, o) }) }) }), l.bind("mousewheel." + r, function (e, o) { t(e, o) }) } }, R = new Object, A = function (t) { var o = !1, a = !1, n = null; if (void 0 === t ? a = "#empty" : void 0 !== e(t).attr("id") && (a = e(t).attr("id")), a !== !1 && void 0 !== R[a]) return R[a]; if (t) { try { var i = t.contentDocument || t.contentWindow.document; n = i.body.innerHTML } catch (r) { } o = null !== n } else { try { var i = top.document; n = i.body.innerHTML } catch (r) { } o = null !== n } return a !== !1 && (R[a] = o), o }, L = function (e) { var t = this.find("iframe"); if (t.length) { var o = e ? "auto" : "none"; t.css("pointer-events", o) } }, z = function (t, o) { var n = o.nodeName.toLowerCase(), i = t.data(a).opt.mouseWheel.disableOver, r = ["select", "textarea"]; return e.inArray(n, i) > -1 && !(e.inArray(n, r) > -1 && !e(o).is(":focus")) }, P = function () { var t, o = e(this), n = o.data(a), i = a + "_" + n.idx, r = e("#mCSB_" + n.idx + "_container"), l = r.parent(), s = e(".mCSB_" + n.idx + "_scrollbar ." + d[12]); s.bind("mousedown." + i + " touchstart." + i + " pointerdown." + i + " MSPointerDown." + i, function (o) { c = !0, e(o.target).hasClass("mCSB_dragger") || (t = 1) }).bind("touchend." + i + " pointerup." + i + " MSPointerUp." + i, function () { c = !1 }).bind("click." + i, function (a) { if (t && (t = 0, e(a.target).hasClass(d[12]) || e(a.target).hasClass("mCSB_draggerRail"))) { Q(o); var i = e(this), s = i.find(".mCSB_dragger"); if (i.parent(".mCSB_scrollTools_horizontal").length > 0) { if (!n.overflowed[1]) return; var c = "x", u = a.pageX > s.offset().left ? -1 : 1, f = Math.abs(r[0].offsetLeft) - u * (.9 * l.width()) } else { if (!n.overflowed[0]) return; var c = "y", u = a.pageY > s.offset().top ? -1 : 1, f = Math.abs(r[0].offsetTop) - u * (.9 * l.height()) } G(o, f.toString(), { dir: c, scrollEasing: "mcsEaseInOut" }) } }) }, H = function () { var t = e(this), o = t.data(a), n = o.opt, i = a + "_" + o.idx, r = e("#mCSB_" + o.idx + "_container"), l = r.parent(); r.bind("focusin." + i, function () { var o = e(document.activeElement), a = r.find(".mCustomScrollBox").length, i = 0; o.is(n.advanced.autoScrollOnFocus) && (Q(t), clearTimeout(t[0]._focusTimeout), t[0]._focusTimer = a ? (i + 17) * a : 0, t[0]._focusTimeout = setTimeout(function () { var e = [ae(o)[0], ae(o)[1]], a = [r[0].offsetTop, r[0].offsetLeft], s = [a[0] + e[0] >= 0 && a[0] + e[0] < l.height() - o.outerHeight(!1), a[1] + e[1] >= 0 && a[0] + e[1] < l.width() - o.outerWidth(!1)], c = "yx" !== n.axis || s[0] || s[1] ? "all" : "none"; "x" === n.axis || s[0] || G(t, e[0].toString(), { dir: "y", scrollEasing: "mcsEaseInOut", overwrite: c, dur: i }), "y" === n.axis || s[1] || G(t, e[1].toString(), { dir: "x", scrollEasing: "mcsEaseInOut", overwrite: c, dur: i }) }, t[0]._focusTimer)) }) }, U = function () { var t = e(this), o = t.data(a), n = a + "_" + o.idx, i = e("#mCSB_" + o.idx + "_container").parent(); i.bind("scroll." + n, function () { 0 === i.scrollTop() && 0 === i.scrollLeft() || e(".mCSB_" + o.idx + "_scrollbar").css("visibility", "hidden") }) }, F = function () { var t = e(this), o = t.data(a), n = o.opt, i = o.sequential, r = a + "_" + o.idx, l = ".mCSB_" + o.idx + "_scrollbar", s = e(l + ">a"); s.bind("contextmenu." + r, function (e) { e.preventDefault() }).bind("mousedown." + r + " touchstart." + r + " pointerdown." + r + " MSPointerDown." + r + " mouseup." + r + " touchend." + r + " pointerup." + r + " MSPointerUp." + r + " mouseout." + r + " pointerout." + r + " MSPointerOut." + r + " click." + r, function (a) { function r(e, o) { i.scrollAmount = n.scrollButtons.scrollAmount, j(t, e, o) } if (a.preventDefault(), ee(a)) { var l = e(this).attr("class"); switch (i.type = n.scrollButtons.scrollType, a.type) { case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": if ("stepped" === i.type) return; c = !0, o.tweenRunning = !1, r("on", l); break; case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": case "mouseout": case "pointerout": case "MSPointerOut": if ("stepped" === i.type) return; c = !1, i.dir && r("off", l); break; case "click": if ("stepped" !== i.type || o.tweenRunning) return; r("on", l) } } }) }, q = function () { function t(t) { function a(e, t) { r.type = i.keyboard.scrollType, r.scrollAmount = i.keyboard.scrollAmount, "stepped" === r.type && n.tweenRunning || j(o, e, t) } switch (t.type) { case "blur": n.tweenRunning && r.dir && a("off", null); break; case "keydown": case "keyup": var l = t.keyCode ? t.keyCode : t.which, s = "on"; if ("x" !== i.axis && (38 === l || 40 === l) || "y" !== i.axis && (37 === l || 39 === l)) { if ((38 === l || 40 === l) && !n.overflowed[0] || (37 === l || 39 === l) && !n.overflowed[1]) return; "keyup" === t.type && (s = "off"), e(document.activeElement).is(u) || (t.preventDefault(), t.stopImmediatePropagation(), a(s, l)) } else if (33 === l || 34 === l) { if ((n.overflowed[0] || n.overflowed[1]) && (t.preventDefault(), t.stopImmediatePropagation()), "keyup" === t.type) { Q(o); var f = 34 === l ? -1 : 1; if ("x" === i.axis || "yx" === i.axis && n.overflowed[1] && !n.overflowed[0]) var h = "x", m = Math.abs(c[0].offsetLeft) - f * (.9 * d.width()); else var h = "y", m = Math.abs(c[0].offsetTop) - f * (.9 * d.height()); G(o, m.toString(), { dir: h, scrollEasing: "mcsEaseInOut" }) } } else if ((35 === l || 36 === l) && !e(document.activeElement).is(u) && ((n.overflowed[0] || n.overflowed[1]) && (t.preventDefault(), t.stopImmediatePropagation()), "keyup" === t.type)) { if ("x" === i.axis || "yx" === i.axis && n.overflowed[1] && !n.overflowed[0]) var h = "x", m = 35 === l ? Math.abs(d.width() - c.outerWidth(!1)) : 0; else var h = "y", m = 35 === l ? Math.abs(d.height() - c.outerHeight(!1)) : 0; G(o, m.toString(), { dir: h, scrollEasing: "mcsEaseInOut" }) } } } var o = e(this), n = o.data(a), i = n.opt, r = n.sequential, l = a + "_" + n.idx, s = e("#mCSB_" + n.idx), c = e("#mCSB_" + n.idx + "_container"), d = c.parent(), u = "input,textarea,select,datalist,keygen,[contenteditable='true']", f = c.find("iframe"), h = ["blur." + l + " keydown." + l + " keyup." + l]; f.length && f.each(function () { e(this).bind("load", function () { A(this) && e(this.contentDocument || this.contentWindow.document).bind(h[0], function (e) { t(e) }) }) }), s.attr("tabindex", "0").bind(h[0], function (e) { t(e) }) }, j = function (t, o, n, i, r) { function l(e) { u.snapAmount && (f.scrollAmount = u.snapAmount instanceof Array ? "x" === f.dir[0] ? u.snapAmount[1] : u.snapAmount[0] : u.snapAmount); var o = "stepped" !== f.type, a = r ? r : e ? o ? p / 1.5 : g : 1e3 / 60, n = e ? o ? 7.5 : 40 : 2.5, s = [Math.abs(h[0].offsetTop), Math.abs(h[0].offsetLeft)], d = [c.scrollRatio.y > 10 ? 10 : c.scrollRatio.y, c.scrollRatio.x > 10 ? 10 : c.scrollRatio.x], m = "x" === f.dir[0] ? s[1] + f.dir[1] * (d[1] * n) : s[0] + f.dir[1] * (d[0] * n), v = "x" === f.dir[0] ? s[1] + f.dir[1] * parseInt(f.scrollAmount) : s[0] + f.dir[1] * parseInt(f.scrollAmount), x = "auto" !== f.scrollAmount ? v : m, _ = i ? i : e ? o ? "mcsLinearOut" : "mcsEaseInOut" : "mcsLinear", w = !!e; return e && 17 > a && (x = "x" === f.dir[0] ? s[1] : s[0]), G(t, x.toString(), { dir: f.dir[0], scrollEasing: _, dur: a, onComplete: w }), e ? void (f.dir = !1) : (clearTimeout(f.step), void (f.step = setTimeout(function () { l() }, a))) } function s() { clearTimeout(f.step), $(f, "step"), Q(t) } var c = t.data(a), u = c.opt, f = c.sequential, h = e("#mCSB_" + c.idx + "_container"), m = "stepped" === f.type, p = u.scrollInertia < 26 ? 26 : u.scrollInertia, g = u.scrollInertia < 1 ? 17 : u.scrollInertia; switch (o) { case "on": if (f.dir = [n === d[16] || n === d[15] || 39 === n || 37 === n ? "x" : "y", n === d[13] || n === d[15] || 38 === n || 37 === n ? -1 : 1], Q(t), oe(n) && "stepped" === f.type) return; l(m); break; case "off": s(), (m || c.tweenRunning && f.dir) && l(!0) } }, Y = function (t) { var o = e(this).data(a).opt, n = []; return "function" == typeof t && (t = t()), t instanceof Array ? n = t.length > 1 ? [t[0], t[1]] : "x" === o.axis ? [null, t[0]] : [t[0], null] : (n[0] = t.y ? t.y : t.x || "x" === o.axis ? null : t, n[1] = t.x ? t.x : t.y || "y" === o.axis ? null : t), "function" == typeof n[0] && (n[0] = n[0]()), "function" == typeof n[1] && (n[1] = n[1]()), n }, X = function (t, o) { if (null != t && "undefined" != typeof t) { var n = e(this), i = n.data(a), r = i.opt, l = e("#mCSB_" + i.idx + "_container"), s = l.parent(), c = typeof t; o || (o = "x" === r.axis ? "x" : "y"); var d = "x" === o ? l.outerWidth(!1) - s.width() : l.outerHeight(!1) - s.height(), f = "x" === o ? l[0].offsetLeft : l[0].offsetTop, h = "x" === o ? "left" : "top"; switch (c) { case "function": return t(); case "object": var m = t.jquery ? t : e(t); if (!m.length) return; return "x" === o ? ae(m)[1] : ae(m)[0]; case "string": case "number": if (oe(t)) return Math.abs(t); if (-1 !== t.indexOf("%")) return Math.abs(d * parseInt(t) / 100); if (-1 !== t.indexOf("-=")) return Math.abs(f - parseInt(t.split("-=")[1])); if (-1 !== t.indexOf("+=")) { var p = f + parseInt(t.split("+=")[1]); return p >= 0 ? 0 : Math.abs(p) } if (-1 !== t.indexOf("px") && oe(t.split("px")[0])) return Math.abs(t.split("px")[0]); if ("top" === t || "left" === t) return 0; if ("bottom" === t) return Math.abs(s.height() - l.outerHeight(!1)); if ("right" === t) return Math.abs(s.width() - l.outerWidth(!1)); if ("first" === t || "last" === t) { var m = l.find(":" + t); return "x" === o ? ae(m)[1] : ae(m)[0] } return e(t).length ? "x" === o ? ae(e(t))[1] : ae(e(t))[0] : (l.css(h, t), void u.update.call(null, n[0])) } } }, N = function (t) {
16166            function o() { return clearTimeout(f[0].autoUpdate), 0 === l.parents("html").length ? void (l = null) : void (f[0].autoUpdate = setTimeout(function () { return c.advanced.updateOnSelectorChange && (s.poll.change.n = i(), s.poll.change.n !== s.poll.change.o) ? (s.poll.change.o = s.poll.change.n, void r(3)) : c.advanced.updateOnContentResize && (s.poll.size.n = l[0].scrollHeight + l[0].scrollWidth + f[0].offsetHeight + l[0].offsetHeight + l[0].offsetWidth, s.poll.size.n !== s.poll.size.o) ? (s.poll.size.o = s.poll.size.n, void r(1)) : !c.advanced.updateOnImageLoad || "auto" === c.advanced.updateOnImageLoad && "y" === c.axis || (s.poll.img.n = f.find("img").length, s.poll.img.n === s.poll.img.o) ? void ((c.advanced.updateOnSelectorChange || c.advanced.updateOnContentResize || c.advanced.updateOnImageLoad) && o()) : (s.poll.img.o = s.poll.img.n, void f.find("img").each(function () { n(this) })) }, c.advanced.autoUpdateTimeout)) } function n(t) {
16167                function o(e, t) {
16168                    return function () {
16169                        return t.apply(e, arguments)
16170                    }
16171                } function a() { this.onload = null, e(t).addClass(d[2]), r(2) } if (e(t).hasClass(d[2])) return void r(); var n = new Image; n.onload = o(n, a), n.src = t.src
16172            } function i() { c.advanced.updateOnSelectorChange === !0 && (c.advanced.updateOnSelectorChange = "*"); var e = 0, t = f.find(c.advanced.updateOnSelectorChange); return c.advanced.updateOnSelectorChange && t.length > 0 && t.each(function () { e += this.offsetHeight + this.offsetWidth }), e } function r(e) { clearTimeout(f[0].autoUpdate), u.update.call(null, l[0], e) } var l = e(this), s = l.data(a), c = s.opt, f = e("#mCSB_" + s.idx + "_container"); return t ? (clearTimeout(f[0].autoUpdate), void $(f[0], "autoUpdate")) : void o()
16173        }, V = function (e, t, o) { return Math.round(e / t) * t - o }, Q = function (t) { var o = t.data(a), n = e("#mCSB_" + o.idx + "_container,#mCSB_" + o.idx + "_container_wrapper,#mCSB_" + o.idx + "_dragger_vertical,#mCSB_" + o.idx + "_dragger_horizontal"); n.each(function () { Z.call(this) }) }, G = function (t, o, n) { function i(e) { return s && c.callbacks[e] && "function" == typeof c.callbacks[e] } function r() { return [c.callbacks.alwaysTriggerOffsets || w >= S[0] + y, c.callbacks.alwaysTriggerOffsets || -B >= w] } function l() { var e = [h[0].offsetTop, h[0].offsetLeft], o = [x[0].offsetTop, x[0].offsetLeft], a = [h.outerHeight(!1), h.outerWidth(!1)], i = [f.height(), f.width()]; t[0].mcs = { content: h, top: e[0], left: e[1], draggerTop: o[0], draggerLeft: o[1], topPct: Math.round(100 * Math.abs(e[0]) / (Math.abs(a[0]) - i[0])), leftPct: Math.round(100 * Math.abs(e[1]) / (Math.abs(a[1]) - i[1])), direction: n.dir } } var s = t.data(a), c = s.opt, d = { trigger: "internal", dir: "y", scrollEasing: "mcsEaseOut", drag: !1, dur: c.scrollInertia, overwrite: "all", callbacks: !0, onStart: !0, onUpdate: !0, onComplete: !0 }, n = e.extend(d, n), u = [n.dur, n.drag ? 0 : n.dur], f = e("#mCSB_" + s.idx), h = e("#mCSB_" + s.idx + "_container"), m = h.parent(), p = c.callbacks.onTotalScrollOffset ? Y.call(t, c.callbacks.onTotalScrollOffset) : [0, 0], g = c.callbacks.onTotalScrollBackOffset ? Y.call(t, c.callbacks.onTotalScrollBackOffset) : [0, 0]; if (s.trigger = n.trigger, 0 === m.scrollTop() && 0 === m.scrollLeft() || (e(".mCSB_" + s.idx + "_scrollbar").css("visibility", "visible"), m.scrollTop(0).scrollLeft(0)), "_resetY" !== o || s.contentReset.y || (i("onOverflowYNone") && c.callbacks.onOverflowYNone.call(t[0]), s.contentReset.y = 1), "_resetX" !== o || s.contentReset.x || (i("onOverflowXNone") && c.callbacks.onOverflowXNone.call(t[0]), s.contentReset.x = 1), "_resetY" !== o && "_resetX" !== o) { if (!s.contentReset.y && t[0].mcs || !s.overflowed[0] || (i("onOverflowY") && c.callbacks.onOverflowY.call(t[0]), s.contentReset.x = null), !s.contentReset.x && t[0].mcs || !s.overflowed[1] || (i("onOverflowX") && c.callbacks.onOverflowX.call(t[0]), s.contentReset.x = null), c.snapAmount) { var v = c.snapAmount instanceof Array ? "x" === n.dir ? c.snapAmount[1] : c.snapAmount[0] : c.snapAmount; o = V(o, v, c.snapOffset) } switch (n.dir) { case "x": var x = e("#mCSB_" + s.idx + "_dragger_horizontal"), _ = "left", w = h[0].offsetLeft, S = [f.width() - h.outerWidth(!1), x.parent().width() - x.width()], b = [o, 0 === o ? 0 : o / s.scrollRatio.x], y = p[1], B = g[1], T = y > 0 ? y / s.scrollRatio.x : 0, k = B > 0 ? B / s.scrollRatio.x : 0; break; case "y": var x = e("#mCSB_" + s.idx + "_dragger_vertical"), _ = "top", w = h[0].offsetTop, S = [f.height() - h.outerHeight(!1), x.parent().height() - x.height()], b = [o, 0 === o ? 0 : o / s.scrollRatio.y], y = p[0], B = g[0], T = y > 0 ? y / s.scrollRatio.y : 0, k = B > 0 ? B / s.scrollRatio.y : 0 }b[1] < 0 || 0 === b[0] && 0 === b[1] ? b = [0, 0] : b[1] >= S[1] ? b = [S[0], S[1]] : b[0] = -b[0], t[0].mcs || (l(), i("onInit") && c.callbacks.onInit.call(t[0])), clearTimeout(h[0].onCompleteTimeout), J(x[0], _, Math.round(b[1]), u[1], n.scrollEasing), !s.tweenRunning && (0 === w && b[0] >= 0 || w === S[0] && b[0] <= S[0]) || J(h[0], _, Math.round(b[0]), u[0], n.scrollEasing, n.overwrite, { onStart: function () { n.callbacks && n.onStart && !s.tweenRunning && (i("onScrollStart") && (l(), c.callbacks.onScrollStart.call(t[0])), s.tweenRunning = !0, C(x), s.cbOffsets = r()) }, onUpdate: function () { n.callbacks && n.onUpdate && i("whileScrolling") && (l(), c.callbacks.whileScrolling.call(t[0])) }, onComplete: function () { if (n.callbacks && n.onComplete) { "yx" === c.axis && clearTimeout(h[0].onCompleteTimeout); var e = h[0].idleTimer || 0; h[0].onCompleteTimeout = setTimeout(function () { i("onScroll") && (l(), c.callbacks.onScroll.call(t[0])), i("onTotalScroll") && b[1] >= S[1] - T && s.cbOffsets[0] && (l(), c.callbacks.onTotalScroll.call(t[0])), i("onTotalScrollBack") && b[1] <= k && s.cbOffsets[1] && (l(), c.callbacks.onTotalScrollBack.call(t[0])), s.tweenRunning = !1, h[0].idleTimer = 0, C(x, "hide") }, e) } } }) } }, J = function (e, t, o, a, n, i, r) { function l() { S.stop || (x || m.call(), x = K() - v, s(), x >= S.time && (S.time = x > S.time ? x + f - (x - S.time) : x + f - 1, S.time < x + 1 && (S.time = x + 1)), S.time < a ? S.id = h(l) : g.call()) } function s() { a > 0 ? (S.currVal = u(S.time, _, b, a, n), w[t] = Math.round(S.currVal) + "px") : w[t] = o + "px", p.call() } function c() { f = 1e3 / 60, S.time = x + f, h = window.requestAnimationFrame ? window.requestAnimationFrame : function (e) { return s(), setTimeout(e, .01) }, S.id = h(l) } function d() { null != S.id && (window.requestAnimationFrame ? window.cancelAnimationFrame(S.id) : clearTimeout(S.id), S.id = null) } function u(e, t, o, a, n) { switch (n) { case "linear": case "mcsLinear": return o * e / a + t; case "mcsLinearOut": return e /= a, e--, o * Math.sqrt(1 - e * e) + t; case "easeInOutSmooth": return e /= a / 2, 1 > e ? o / 2 * e * e + t : (e--, -o / 2 * (e * (e - 2) - 1) + t); case "easeInOutStrong": return e /= a / 2, 1 > e ? o / 2 * Math.pow(2, 10 * (e - 1)) + t : (e--, o / 2 * (-Math.pow(2, -10 * e) + 2) + t); case "easeInOut": case "mcsEaseInOut": return e /= a / 2, 1 > e ? o / 2 * e * e * e + t : (e -= 2, o / 2 * (e * e * e + 2) + t); case "easeOutSmooth": return e /= a, e--, -o * (e * e * e * e - 1) + t; case "easeOutStrong": return o * (-Math.pow(2, -10 * e / a) + 1) + t; case "easeOut": case "mcsEaseOut": default: var i = (e /= a) * e, r = i * e; return t + o * (.499999999999997 * r * i + -2.5 * i * i + 5.5 * r + -6.5 * i + 4 * e) } } e._mTween || (e._mTween = { top: {}, left: {} }); var f, h, r = r || {}, m = r.onStart || function () { }, p = r.onUpdate || function () { }, g = r.onComplete || function () { }, v = K(), x = 0, _ = e.offsetTop, w = e.style, S = e._mTween[t]; "left" === t && (_ = e.offsetLeft); var b = o - _; S.stop = 0, "none" !== i && d(), c() }, K = function () { return window.performance && window.performance.now ? window.performance.now() : window.performance && window.performance.webkitNow ? window.performance.webkitNow() : Date.now ? Date.now() : (new Date).getTime() }, Z = function () { var e = this; e._mTween || (e._mTween = { top: {}, left: {} }); for (var t = ["top", "left"], o = 0; o < t.length; o++) { var a = t[o]; e._mTween[a].id && (window.requestAnimationFrame ? window.cancelAnimationFrame(e._mTween[a].id) : clearTimeout(e._mTween[a].id), e._mTween[a].id = null, e._mTween[a].stop = 1) } }
16173, $ = function (e, t) { try { delete e[t] } catch (o) { e[t] = null } }, ee = function (e) { return !(e.which && 1 !== e.which) }, te = function (e) { var t = e.originalEvent.pointerType; return !(t && "touch" !== t && 2 !== t) }, oe = function (e) { return !isNaN(parseFloat(e)) && isFinite(e) }, ae = function (e) { var t = e.parents(".mCSB_container"); return [e.offset().top - t.offset().top, e.offset().left - t.offset().left] }, ne = function () { function e() { var e = ["webkit", "moz", "ms", "o"]; if ("hidden" in document) return "hidden"; for (var t = 0; t < e.length; t++)if (e[t] + "Hidden" in document) return e[t] + "Hidden"; return null } var t = e(); return t ? document[t] : !1 }; e.fn[o] = function (t) { return u[t] ? u[t].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof t && t ? void e.error("Method " + t + " does not exist") : u.init.apply(this, arguments) }, e[o] = function (t) { return u[t] ? u[t].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof t && t ? void e.error("Method " + t + " does not exist") : u.init.apply(this, arguments) }, e[o].defaults = i, window[o] = !0, e(window).bind("load", function () { e(n)[o](), e.extend(e.expr[":"], { mcsInView: e.expr[":"].mcsInView || function (t) { var o, a, n = e(t), i = n.parents(".mCSB_container"); if (i.length) return o = i.parent(), a = [i[0].offsetTop, i[0].offsetLeft], a[0] + ae(n)[0] >= 0 && a[0] + ae(n)[0] < o.height() - n.outerHeight(!1) && a[1] + ae(n)[1] >= 0 && a[1] + ae(n)[1] < o.width() - n.outerWidth(!1) }, mcsInSight: e.expr[":"].mcsInSight || function (t, o, a) { var n, i, r, l, s = e(t), c = s.parents(".mCSB_container"), d = "exact" === a[3] ? [[1, 0], [1, 0]] : [[.9, .1], [.6, .4]]; if (c.length) return n = [s.outerHeight(!1), s.outerWidth(!1)], r = [c[0].offsetTop + ae(s)[0], c[0].offsetLeft + ae(s)[1]], i = [c.parent()[0].offsetHeight, c.parent()[0].offsetWidth], l = [n[0] < i[0] ? d[0] : d[1], n[1] < i[1] ? d[0] : d[1]], r[0] - i[0] * l[0][0] < 0 && r[0] + n[0] - i[0] * l[0][1] >= 0 && r[1] - i[1] * l[1][0] < 0 && r[1] + n[1] - i[1] * l[1][1] >= 0 }, mcsOverflow: e.expr[":"].mcsOverflow || function (t) { var o = e(t).data(a); if (o) return o.overflowed[0] || o.overflowed[1] } }) })
16174    })
16175});
16176// ============================================================== //
16177// END - Minified MALIHU SCROLLBAR PLUGIN
16178// ============================================================== //
16179
16180
16181// *********************************************************************************************** //
16182// *********************************************************************************************** //
16183// 02 - SEARCHBOX FUNCTIONS
16184// *********************************************************************************************** //
16185// *********************************************************************************************** //
16186
16187/* Check if is Mobile. Returns "true" if positive */
16188function isMobile() {
16189    /* Devices smaller than 768 pixels */
16190    if ($(window).width() <= 768) {
16191        return true
16192    } else {
16193        return false
16194    }
16195}
16196
16197function updateAllDatepickers() {
16198    $('.na-searchbox').each(function (index) {
16199        if ($(this).hasClass('na-searchbox__boxes') || $(this).hasClass('na-searchbox__inline')) {
16200            $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__dates').data('dateRangePicker').setDateRange(currentCheckIn(), currentCheckOut(), true);
16201        }
16202        if ($(this).hasClass('na-searchbox__boxes-nights') || $(this).hasClass('na-searchbox__inline-nights')) {
16203            $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__checkin').data('dateRangePicker').setDateRange(currentCheckIn(), currentCheckOut(), true);
16204        }
16205    })
16206}
16207
16208// ml test start
16209var ibeRatecode;
16210// ml test end
16211
16212function updateRatecode() {
16213    $('.na-searchbox__ratecode-input').val($('form#bke_searchbox_data #bke_ratecode').val());
16214
16215    // ml test start
16216    ibeRatecode = $('.na-searchbox__ratecode-input').val();
16217    if (ibeRatecode && ibeRatecode.includes("&")) {
16218        ibeRatecode = ibeRatecode.replace("&", "%26");
16219    }
16220    // ml test end
16221}
16222
16223function flexibleDates() {
16224
16225    var checkbox = $('form#bke_searchbox_data #bke_grid_view').val();
16226    if (checkbox == 2) {
16227        $(".na-searchbox__flexible-dates").find('span').addClass('checked');
16228    } else if (checkbox == 0) {
16229        $(".na-searchbox__flexible-dates").find('span').removeClass('checked');
16230    }
16231
16232    $(".na-searchbox__flexible-dates").click(function () {
16233        var checkbox = $('form#bke_searchbox_data #bke_grid_view').val();
16234        console.log(checkbox);
16235        if (checkbox == 2) {
16236            $('form#bke_searchbox_data #bke_grid_view').val('0');
16237            $(".na-searchbox__flexible-dates").find('span').removeClass('checked');
16238        } else if (checkbox == 0) {
16239            $('form#bke_searchbox_data #bke_grid_view').val('2');
16240            $(".na-searchbox__flexible-dates").find('span').addClass('checked');
16241        }
16242    });
16243
16244}
16245
16246/* Retrieve current selected dates based on main form */
16247function currentCheckIn() {
16248    var currentCheckIn = ($('#bke_searchbox_data #bke_arrival_year').val()) + '-' +
16249        ($('#bke_searchbox_data #bke_arrival_month').val()) + '-' +
16250        ($('#bke_searchbox_data #bke_arrival_day').val());
16251    return currentCheckIn;
16252}
16253function currentCheckOut() {
16254    var currentCheckOut = ($('#bke_searchbox_data #bke_departure_year').val()) + '-' +
16255        ($('#bke_searchbox_data #bke_departure_month').val()) + '-' +
16256        ($('#bke_searchbox_data #bke_departure_day').val());
16257    return currentCheckOut;
16258}
16259
16260function oneNight() {
16261    // Remove arrow for check-in/out dates if only one night is selected.
16262    if ($('form#bke_searchbox_data #bke_nights').val() == 1) {
16263        $('.date-picker-wrapper .first-date-selected').addClass('no-arrow');
16264        $('.date-picker-wrapper .last-date-selected').addClass('no-arrow');
16265    } else {
16266        $('.date-picker-wrapper .first-date-selected').removeClass('no-arrow');
16267        $('.date-picker-wrapper .last-date-selected').removeClass('no-arrow');
16268    }
16269}
16270/* Adjust Datepicker Position */
16271/*
16272   In some resolutions the datepicker might appear outside the viewport.
16273   This function will calculate the area outside viewport and make the necessary adjustments
16274*/
16275
16276/* Datepicker Close timeout */
16277var closeDatepicker;
16278
16279function closeTimeOut() {
16280    closeDatepicker = setTimeout(function () {
16281        $('.date-picker-wrapper').fadeOut('300');
16282    }, 500);
16283}
16284
16285function stopCloseTimeOut() {
16286    clearTimeout(closeDatepicker);
16287}
16288
16289
16290function datepickerPosition(datepickerId) {
16291
16292    var datepicker = $(datepickerId);
16293    datepicker.css('margin-top', '0');
16294    datepicker.css('margin-left', '0');
16295
16296    /* Get information about viewport, datepicker height and distance to the top/bottom of page*/
16297    var topOfDiv = datepicker.offset().top - $(window).scrollTop();
16298    var heightOfDiv = 375;
16299    var bottomOfVisibleWindow = $(window).height();
16300    var distanceBottom = (topOfDiv + heightOfDiv) - bottomOfVisibleWindow;
16301
16302    /* Get information about viewport, datepicker width and distance to the edge of the page*/
16303    var position = datepicker.position();
16304    var leftOfDiv = position.left;
16305    var widthOfDiv = 660;
16306    var sizeOfVisibleWindow = $(window).width();
16307    var distanceSide = (leftOfDiv + widthOfDiv) - sizeOfVisibleWindow;
16308
16309    if (distanceSide > 0 && !isMobile()) {
16310        datepicker.css('margin-left', -(distanceSide));
16311    }
16312    /* If datepicker is out of viewport, the margin-top will be adjusted*/
16313
16314    if (distanceBottom > 0 && !isMobile()) {
16315        datepicker.css('margin-top', -(distanceBottom));
16316    }
16317
16318}
16319/* Updates the message field */
16320function updateMsg(message) {
16321
16322    $('.na-searchbox__footer .message span').html(message);
16323    $('.na-searchbox__footer .message span').addClass('update-message');
16324    setTimeout(function () {
16325        $('.na-searchbox__footer .message span').removeClass('update-message');
16326    }, 1000);
16327
16328}
16329
16330$(document).ready(function () {
16331
16332    $ = jQuery;
16333
16334    // *********************************************************************************************** //
16335    // *********************************************************************************************** //
16336    // 03 - SEARCHBOX PARAMETERS SETTINGS
16337    // *********************************************************************************************** //
16338    // *********************************************************************************************** //
16339
16340    // ============================================================== //
16341    // BEGIN - Using bke parameters to set searchbox style
16342    // ============================================================== //
16343
16344    $('.na-searchbox').each(function (i) {
16345
16346        // Get parameters
16347        var searchbox = $(this);
16348        var searchbox_count = '0' + (i + 1);
16349        var searchbox_display = $(this).find("input[name='searchbox_display']").val();
16350        var searchbox_size = $(this).find("input[name='searchbox_size']").val();
16351        var searchbox_collapse = $(this).find("input[name='searchbox_collapse']").val();
16352        var searchbox_type = $(this).find("input[name='searchbox_type']").val();
16353        var searchbox_flexdate = $(this).find("input[name='searchbox_flexdate']").val();
16354        var searchbox_usp = $(this).find("input[name='searchbox_usp']").val();
16355        var searchbox_ratecode = $(this).find("input[name='searchbox_ratecode']").val();
16356        var searchbox_hidden = $(this).find("input[name='searchbox_hidden']").val();
16357        var searchbox_debug = $(this).find("input[name='searchbox_debug']").val();
16358        var searchbox_location = $(this).find("input[name='searchbox_location']").val();
16359
16360        // Remove parameters from html
16361        searchbox.find(".na-searchbox__parameters").remove();
16362
16363        // Defining HTML contents
16364        var searchbox_main = searchbox.find(".na-searchbox__main");
16365        var searchbox_overlay = searchbox.find(".na-searchbox__overlay");
16366        searchbox_overlay.addClass('na-overlay-' + searchbox_count);
16367        searchbox_overlay.addClass('na-searchbox-' + searchbox_count);
16368        var searchbox_overlay = $('.na-overlay-' + searchbox_count);
16369        var searchbox_uspoverlay = searchbox.find(".na-searchbox__uspoverlay");
16370        searchbox_uspoverlay.addClass('na-usp-' + searchbox_count);
16371        var searchbox_uspoverlay = $('.na-usp-' + searchbox_count);
16372        var searchbox_header = searchbox.find("> .na-searchbox__header");
16373        var searchbox_content_checkout = $('<div class="na-searchbox__checkout"><span class="na-searchbox__label">Check out</span><div class="na-searchbox__day-week"></div><div class="na-searchbox__day-number"></div><div class="na-searchbox__month"></div><div class="na-searchbox__year"></div></div>');
16374        var searchbox_content_nights = $("<div class='na-searchbox__nights'><div class='controls-nights'><a noref class='btn-nightsRem'></a><a noref class='btn-nightsAdd'></a></div><span class='na-searchbox__label'>Nights</span><div class='na-searchbox__nights-counter'></div></div>");
16375        var searchbox_content_fulldate = $("<div class='na-searchbox__fulldate'></div>");
16376        var searchbox_content_ratecode_label = $('<label for="ratecode">Code:</label>');
16377        var searchbox_content_flexdate = $('<div class="na-searchbox__flexible-dates pull-right"><label class="flexible-dates-element">My dates are flexible</label><div class="input-wrapper"><input type="checkbox" name="flexible-dates" id="flexible-dates" class="na-searchbox__flexible-dates-input"><span class="flexible-dates-element"></span></div></div>');
16378
16379        // Defining default set
16380        if (searchbox_display == '') {
16381            searchbox_display = 'boxes';
16382        }
16383        if (searchbox_collapse == '') {
16384            searchbox_collapse = 'no';
16385        }
16386        if (searchbox_type == '') {
16387            searchbox_type = 'checkout';
16388        }
16389        if (searchbox_size == '') {
16390            searchbox_size = 'M';
16391        }
16392        if (searchbox_flexdate == '') {
16393            searchbox_flexdate = 'yes';
16394        }
16395        if (searchbox_usp == '') {
16396            searchbox_usp = 'yes';
16397        }
16398        if (searchbox_hidden == '') {
16399            searchbox_hidden = 'no';
16400        }
16401        if (searchbox_debug == '') {
16402            searchbox_debug = 'no';
16403        }
16404        if (searchbox_location == '') {
16405            searchbox_location = 'no';
16406        }
16407
16408        // location: no
16409        if (searchbox_location == 'no') {
16410            searchbox.find('.na-searchbox__location').remove();
16411        }
16412
16413        // type: checkout
16414        if (searchbox_type == 'checkout') {
16415            if (searchbox_display == 'boxes' || searchbox_display == 'overlay') {
16416                searchbox.addClass('na-searchbox__boxes');
16417            } else {
16418                searchbox.addClass('na-searchbox__inline');
16419            }
16420            searchbox_content_checkout.appendTo(searchbox.find('.na-searchbox__dates'));
16421        }
16422
16423        // type: nights
16424        if (searchbox_type == 'nights') {
16425
16426            if (searchbox_display == 'boxes' || searchbox_display == 'overlay') {
16427                searchbox.addClass('na-searchbox__boxes-nights');
16428            } else {
16429                searchbox.addClass('na-searchbox__inline-nights');
16430            }
16431            searchbox_content_nights.appendTo(searchbox.find('.na-searchbox__dates'));
16432        }
16433
16434        // hidden: yes
16435        if (searchbox_hidden == 'yes') {
16436            searchbox_display = 'overlay';
16437
16438            searchbox_header.remove();
16439            searchbox.find('.na-searchbox__usptrigger').remove();
16440        }
16441
16442        // display: overlay
16443        if (searchbox_display == 'overlay') {
16444            searchbox_collapse = 'no';
16445            searchbox_main.insertAfter(searchbox_overlay.find('.na-searchbox__header'));
16446            searchbox_header.addClass('na-searchbox__overlaytrigger')
16447
16448            searchbox.find($(".na-searchbox__overlaytrigger")).on('click', function (e) {
16449                e.preventDefault();
16450                searchbox_overlay.fadeIn();
16451                scrollbar_function(searchbox_overlay);
16452            });
16453
16454            searchbox_overlay.find($(".na-searchbox__overlayclose")).on('click', function (e) {
16455                e.preventDefault();
16456                searchbox_overlay.fadeOut();
16457            });
16458
16459            $(document).keyup(function (e) {
16460                if (e.keyCode == 27) {
16461                    searchbox_overlay.find($(".na-searchbox__overlayclose")).click();
16462                }
16463            });
16464        }
16465
16466        // display: no-overlay and collapse: no
16467        if (searchbox_display != 'overlay' && searchbox_collapse == 'no') {
16468            searchbox_overlay.remove();
16469        }
16470
16471        // display: boxes or display: overlay
16472        if (searchbox_display == 'boxes' || searchbox_display == 'overlay') {
16473            searchbox_content_ratecode_label.appendTo(searchbox.find('.na-searchbox__ratecode'));
16474        }
16475
16476        // display: inline
16477        if (searchbox_display == 'inline') {
16478            searchbox_collapse = 'no';
16479            searchbox_flexdate = 'no';
16480            searchbox.find('.na-searchbox__checkin').append(searchbox_content_fulldate[0].outerHTML);
16481            searchbox.find('.na-searchbox__checkout').append(searchbox_content_fulldate[0].outerHTML);
16482        }
16483
16484        //size:L
16485        if (searchbox_size == 'S') {
16486            searchbox.addClass('na-searchbox__small');
16487        }
16488        if (searchbox_size == 'M') {
16489            searchbox.addClass('na-searchbox__medium');
16490        }
16491        if (searchbox_size == 'L') {
16492            searchbox.addClass('na-searchbox__large');
16493        }
16494
16495        // flexdate: yes
16496        if (searchbox_flexdate == 'yes') {
16497            // just for desktop
16498          
16499            searchbox_content_flexdate.insertBefore(searchbox.find('.na-searchbox__submit'));
16500     
16501        }
16502
16503        // usp: yes
16504        if (searchbox_usp == 'yes') {
16505            searchbox.find($(".na-searchbox__usptrigger")).on('click', function (e) {
16506                e.preventDefault();
16507                if (searchbox.hasClass('collapsed') || searchbox_display == 'overlay') {
16508                    e.preventDefault();
16509                    searchbox_overlay.fadeIn();
16510                    scrollbar_function(searchbox_overlay);
16511                } else {
16512                    searchbox_uspoverlay.fadeIn();
16513                }
16514            });
16515            searchbox_uspoverlay.find($(".na-searchbox__uspclose")).on('click', function (e) {
16516                e.preventDefault();
16517                searchbox_uspoverlay.fadeOut();
16518            });
16519        }
16520
16521        // usp: no
16522        if (searchbox_usp == 'no') {
16523            searchbox.find($(".na-searchbox__usptrigger")).remove();
16524            searchbox_uspoverlay.remove();
16525            searchbox_overlay.find($(".na-searchbox__overlayusp")).remove();
16526        }
16527
16528        // collapse: yes
16529        if (searchbox_collapse == 'yes') {
16530
16531            //var offset = searchbox.offset().top;
16532            var offset = 1;
16533
16534            //$(window).resize(function() {
16535            //  offset = searchbox.offset().top;
16536            //});
16537
16538            searchbox_overlay.find($(".na-searchbox__overlayclose")).on('click', function (e) {
16539                e.preventDefault();
16540                searchbox_overlay.fadeOut();
16541                if ((!searchbox.hasClass('collapsed')) && (searchbox.hasClass('na-searchbox_overlay_opened'))) {
16542                    searchbox_main.insertAfter(searchbox_header);
16543                }
16544                if (searchbox_location == 'yes') {
16545                    $('.bke_name').val('');
16546                    $('#idhotel').val('');
16547                    $('#bke_id').val('');
16548                    $('#loc_id').val('');
16549                    $('#c_id').val('');
16550                    $('#cc_id').val('');
16551                    $('#landmark_id').val('');
16552                }
16553                searchbox.removeClass('na-searchbox_overlay_opened');
16554            });
16555
16556            $(document).keyup(function (e) {
16557                if (e.keyCode == 27) {
16558                    searchbox_overlay.find($(".na-searchbox__overlayclose")).click();
16559                }
16560            });
16561
16562            $(window).scroll(function () {
16563
16564                var scroll = $(window).scrollTop();
16565
16566                if (scroll > offset) {
16567                    if (!searchbox.hasClass('collapsed') && (!searchbox.hasClass('na-searchbox_overlay_opened'))) {
16568
16569                        if (searchbox_main.is(":visible") == true) {
16570                            searchbox_main.slideToggle(250, function () {
16571                                searchbox_main.insertAfter(searchbox_overlay.find('.na-searchbox__header'));
16572                                searchbox_main.slideToggle(0, function () {
16573                                    scrollbar_function(searchbox_overlay);
16574                                });
16575                            });
16576                        }
16577                    }
16578                    searchbox.addClass('collapsed');
16579                    searchbox_header.addClass('na-searchbox__overlaytrigger');
16580                } else {
16581                    if (searchbox.hasClass('collapsed') && (!searchbox.hasClass('na-searchbox_overlay_opened'))) {
16582                        if (searchbox_main.is(":hidden") == true) {
16583
16584                            searchbox_main.slideToggle(0, function () {
16585                                searchbox_main.insertAfter(searchbox_header);
16586                                searchbox_main.slideToggle(250);
16587                            });
16588                        }
16589                    }
16590                    searchbox.removeClass('collapsed');
16591                    searchbox_header.removeClass('na-searchbox__overlaytrigger');
16592                }
16593
16594                if (searchbox.find($(".na-searchbox__overlaytrigger")).length > 0) {
16595                    searchbox.find($(".na-searchbox__overlaytrigger")).on('click', function (e) {
16596                        e.preventDefault();
16597                        searchbox_overlay.fadeIn();
16598                        scrollbar_function(searchbox_overlay);
16599                        searchbox.addClass('na-searchbox_overlay_opened');
16600                    });
16601                } else {
16602                    searchbox_header.unbind('click');
16603                }
16604
16605            });
16606        }
16607
16608        // ratecode: default ratecode
16609        if (searchbox_ratecode != '') {
16610            searchbox.find('.na-searchbox__ratecode-input').val(searchbox_ratecode);
16611        }
16612
16613        // display: overlay or copllapse:yes
16614        if (searchbox_display == 'overlay' || searchbox_collapse == 'yes') {
16615
16616            // overlay scrollbar
16617            scrollbar_function = function (thisObj) {
16618
16619                var window_width = $(window).width();
16620                var window_height = $(window).height();
16621                var searchbox_overlay_header_height = thisObj.find($(".na-searchbox__overlaywrapper .na-searchbox__header")).outerHeight();
16622                var searchbox_overlay_logo_height = thisObj.find($(".na-searchbox__overlaylogo")).outerHeight(true);
16623                var searchbox_overlay_logo_margin = thisObj.find($(".na-searchbox__overlaylogo")).outerHeight(true) - thisObj.find($(".na-searchbox__overlaylogo")).outerHeight();
16624                var searchbox_overlay_wrapper = thisObj.find(".na-searchbox__overlaywrapper");
16625                var searchbox_overlay_scroll = thisObj.find($(".na-searchbox__overlayscroll"));
16626                var searchbox_overlay_main_height = thisObj.find($(".na-searchbox__main")).outerHeight();
16627                var searchbox_overlay_usp = thisObj.find($(".na-searchbox__overlayusp"));
16628                var searchbox_overlay_uspwrapper_height = thisObj.find($(".na-searchbox__overlayusp .na-searchbox__overlayuspwrapper")).outerHeight();
16629                var searchbox_overlay_uspwrapper_height = (typeof searchbox_overlay_uspwrapper_height === 'undefined') ? 1 : searchbox_overlay_uspwrapper_height;
16630
16631                searchbox_overlay_wrapper.css('height', searchbox_overlay_main_height + searchbox_overlay_uspwrapper_height + searchbox_overlay_header_height);
16632
16633                console.log(searchbox_overlay_main_height, searchbox_overlay_uspwrapper_height, searchbox_overlay_header_height);
16634
16635                if (window_width <= 480) {
16636                    var searchbox_overlay_height = window_height - searchbox_overlay_header_height;
16637                    var searchbox_overlay_maxheight = window_height - searchbox_overlay_logo_height;
16638
16639                    searchbox_overlay_wrapper.css('height', searchbox_overlay_height);
16640                    searchbox_overlay_wrapper.css('max-height', searchbox_overlay_maxheight);
16641
16642                } else {
16643                    var searchbox_overlay_height = searchbox_overlay_main_height + searchbox_overlay_uspwrapper_height + searchbox_overlay_header_height;
16644                    var searchbox_overlay_maxheight = window_height - searchbox_overlay_logo_height - searchbox_overlay_logo_margin;
16645
16646                    searchbox_overlay_wrapper.css('height', searchbox_overlay_height);
16647                    searchbox_overlay_wrapper.css('max-height', searchbox_overlay_maxheight);
16648
16649                }
16650
16651                searchbox_overlay_scroll.css('height', searchbox_overlay_maxheight);
16652
16653                if (searchbox_overlay_maxheight < searchbox_overlay_height) {
16654                    searchbox_overlay_scroll.mCustomScrollbar({
16655                        theme: "dark"
16656                    })
16657                } else {
16658                    searchbox_overlay_scroll.mCustomScrollbar("destroy");
16659                }
16660            };
16661
16662            scrollbar_function(searchbox_overlay);
16663
16664            $(window).resize(function () {
16665                scrollbar_function(searchbox_overlay);
16666            });
16667        }
16668
16669        // external buttons settings
16670        if (searchbox_display == 'overlay' || searchbox_collapse == 'yes') {
16671            $('.open-searchbox-' + searchbox_count).on('click', function (e) {
16672                e.preventDefault();
16673                searchbox_overlay.fadeIn();
16674                scrollbar_function(searchbox_overlay);
16675            });
16676        }
16677        if (searchbox_usp == 'yes') {
16678            $('.open-usp-' + searchbox_count).on('click', function (e) {
16679                e.preventDefault();
16680                searchbox_uspoverlay.fadeIn();
16681            });
16682        }
16683
16684        // debug: yes
16685        if (searchbox_debug == 'yes') {
16686            // Console Parameters Checker
16687            console.log('%c    Searchbox Parameters Settings    ', 'background: black; color: #fff');
16688
16689            console.log('%c   class    ', 'background: pink; color: #fff', searchbox_overlay);
16690            console.log('%c  display   ', 'background: green; color: #fff', searchbox_display);
16691            console.log('%c    size    ', 'background: purple; color: #fff', searchbox_size);
16692            console.log('%c  collapse  ', 'background: blue; color: #fff', searchbox_collapse);
16693            console.log('%c    type    ', 'background: orange; color: #fff', searchbox_type);
16694            console.log('%c  flexdate  ', 'background: red; color: #fff', searchbox_flexdate);
16695            console.log('%c    usp     ', 'background: purple; color: #fff', searchbox_usp);
16696            console.log('%c   hidden   ', 'background: gray; color: #fff', searchbox_hidden);
16697        }
16698    });
16699
16700    // ============================================================== //
16701    // END - Using bke parameters to set searchbox style
16702    // ============================================================== //
16703
16704    // *********************************************************************************************** //
16705    // *********************************************************************************************** //
16706    // 04 - SEARCHBOX RUN
16707    // *********************************************************************************************** //
16708    // *********************************************************************************************** //
16709
16710    // ml test start
16711    var urlIbeDates;
16712    // ml test end
16713
16714    /* Function applies values to DOM, based on the current values of #bke_searchbox_data */
16715    function applyDates(date1, date2, source) {
16716
16717        /* The gap between check in and check out, needs to be different depending on the source of the interaction */
16718        /*
16719            For example:
16720            - When page is loaded (onLoad), the gap betweek check-in and check-out needs to be the minStay value
16721            - When user interacts with nights buttons, the gap between check in/out dates needs to be 0, since the
16722              new "gap" will be set by the button's function. The same applies for when interacting with "datePicker"
16723
16724        */
16725        if (source == 'datePicker') {
16726            gap = 0;
16727        }
16728        if (source == 'btNights') {
16729            gap = 0;
16730        }
16731        if (source == 'onLoad') {
16732            gap = minStay;
16733        }
16734
16735        // The total nights displayed on DOM is check-out date minus check-in date. (in this order)
16736        var totalNights = moment(date2).diff(moment(date1), 'days') + gap;
16737
16738        /* Define Arrival Dates */
16739        var arrDayWeek = moment(date1).format('dddd');
16740        var arrDayWeekAbr = moment(date1).format('ddd');
16741        var arrDay = moment(date1).format('DD');
16742        var arrMonth = moment(date1).format('MM');
16743        var arrMonthAbr = moment(date1).format('MMM');
16744        var arrYear = moment(date1).format('YYYY');
16745        var arrDate = arrDay + '/' + arrMonth + '/' + arrYear;
16746
16747        /* Define Departure Dates */
16748        var depDayWeek = moment(date2).add(gap, 'day').format('dddd');
16749        var depDayWeekAbr = moment(date2).add(gap, 'day').format('ddd');
16750        var depDay = moment(date2).add(gap, 'day').format('DD');
16751        var depMonth = moment(date2).add(gap, 'day').format('MM');
16752        var depMonthAbr = moment(date2).add(gap, 'day').format('MMM');
16753        var depYear = moment(date2).add(gap, 'day').format('YYYY');
16754        var depDate = depDay + '/' + depMonth + '/' + depYear;
16755
16756
16757        
16758        // ml test start
16759
16760        var arrDateIbe = arrYear + '-' + arrMonth + '-' + arrDay;
16761        var depDateIbe = depYear + '-' + depMonth + '-' + depDay;
16762
16763        urlIbeDates = "/date/" + arrDateIbe + '/' + depDateIbe;
16764        // ml test end
16765
16766
16767
16768        /* Apply dates to BKE form */
16769        $('form#bke_searchbox_data #bke_arrival_day').val(arrDay);
16770        $('form#bke_searchbox_data #bke_arrival_month').val(arrMonth);
16771        $('form#bke_searchbox_data #bke_arrival_year').val(arrYear);
16772        $('form#bke_searchbox_data #bke_departure_day').val(depDay);
16773        $('form#bke_searchbox_data #bke_departure_month').val(depMonth);
16774        $('form#bke_searchbox_data #bke_departure_year').val(depYear);
16775        $('form#bke_searchbox_data #bke_nights').val(totalNights);
16776
16777        /* Apply dates to DOM */
16778        $('.na-searchbox__checkin .na-searchbox__day-week').html(arrDayWeekAbr);
16779        $('.na-searchbox__checkin .na-searchbox__day-number').html(arrDay);
16780        $('.na-searchbox__checkin .na-searchbox__month').html(arrMonthAbr);
16781        $('.na-searchbox__checkin .na-searchbox__year').html(arrYear);
16782        $('.na-searchbox__checkin .na-searchbox__fulldate').html(arrDate);
16783
16784        $('.na-searchbox__checkout .na-searchbox__day-week').html(depDayWeekAbr);
16785        $('.na-searchbox__checkout .na-searchbox__day-number').html(depDay);
16786        $('.na-searchbox__checkout .na-searchbox__month').html(depMonthAbr);
16787        $('.na-searchbox__checkout .na-searchbox__year').html(depYear);
16788        $('.na-searchbox__checkout .na-searchbox__fulldate').html(depDate);
16789        $('.na-searchbox__nights-counter').html(totalNights);
16790
16791        /* Apply values to calendar header */
16792        $('.calendar-header .checkin-date').html(arrDate);
16793        $('.calendar-header .checkout-date').html(depDate);
16794
16795        // console.log('original date (todays):' + arrDate);
16796
16797        // Create a new var to store the arr date in the format needed for the initial date
16798        var arrDateF = arrYear + '-' + arrMonth + '-' + arrDay;
16799        var depDateF = depYear + '-' + depMonth + '-' + depDay;
16800
16801        // get the new value when user make the selection
16802        //atm is getting only after the user select the 2 dates
16803        $('.na-searchbox__submit').click(function () {
16804            var myArrDate = arrDateF;
16805            localStorage.setItem("myArrDate", myArrDate);
16806
16807            var myDepDate = depDateF;
16808            localStorage.setItem("myDepDate", myDepDate);
16809        });
16810
16811
16812    }
16813
16814
16815    var mySavedArrDate = localStorage.getItem('myArrDate');
16816    var mySavedDepDate = localStorage.getItem('myDepDate');
16817
16818    //COMPARE SAVED DATE AND TODAY;
16819    var mySavedArrDateMoment = moment(mySavedArrDate);
16820    var mySavedDepDateMoment = moment(mySavedDepDate);
16821    var todayMoment = moment();
16822
16823    /* Calculates and updates the nights value in the #bke_searchbox_data */
16824    function controlNights(cmd) {
16825
16826        // Retrieve totalNights value from form
16827        var totalNights = $('form#bke_searchbox_data #bke_nights').val() * 1;
16828
16829        // Minimum stay based on BKE tag
16830        var minStay = $('form#bke_searchbox_data #bke_minstay').val() * 1;
16831
16832        // Retrieves current check-in date applied on form
16833        var currentCheckIn = ($('#bke_searchbox_data #bke_arrival_year').val()) + '-' +
16834            ($('#bke_searchbox_data #bke_arrival_month').val()) + '-' +
16835            ($('#bke_searchbox_data #bke_arrival_day').val());
16836
16837        // Retrieves current check-out date applied on form
16838        var currentCheckOut = ($('#bke_searchbox_data #bke_departure_year').val()) + '-' +
16839            ($('#bke_searchbox_data #bke_departure_month').val()) + '-' +
16840            ($('#bke_searchbox_data #bke_departure_day').val());
16841
16842
16843
16844
16845
16846        if (mySavedArrDate && todayMoment > mySavedArrDateMoment) {
16847            //if has saved ArrDate, and its in the past; remove my saved dates
16848            localStorage.removeItem('myArrDate');
16849            localStorage.removeItem('myDepDate');
16850        } else if (mySavedArrDate && todayMoment < mySavedArrDateMoment) {
16851            //if has saved ArrDate, and its in the future; recalculate
16852
16853            // UPDATE CHECKin VALUE IF USER HAS VALID SAVED DATA (DATE IN THE FUTURE)
16854            if (mySavedArrDate && mySavedArrDate !== currentCheckIn) {
16855                currentCheckIn = mySavedArrDate;
16856            }
16857            // UPDATE CHECKout VALUE IF USER HAS VALID SAVED DATA (DATE IN THE FUTURE)
16858            if (mySavedDepDate && mySavedDepDate !== currentCheckOut) {
16859                // UPDATE VALUE
16860                currentCheckOut = mySavedDepDate;
16861            }
16862            //update total nights to the difference between the dates
16863            totalNights = mySavedDepDateMoment.diff(mySavedArrDateMoment, 'days');
16864        }
16865
16866        // Adds totalNights to current check-in date, to generate check-out date.
16867        var newCheckOut = moment(currentCheckIn).add(totalNights, 'day').format('YYYY-MM-DD');
16868
16869
16870        // If statement for "add" button, within nights
16871        if (cmd == 'add') {
16872
16873            totalNights = parseFloat($('form#bke_searchbox_data #bke_nights').val()) + 1;
16874            $('form#bke_searchbox_data #bke_nights').val(totalNights);
16875            var newCheckOut = moment(currentCheckIn).add(totalNights, 'day').format('YYYY-MM-DD');
16876
16877            $('.na-searchbox').each(function (index) {
16878                if ($(this).hasClass('na-searchbox__boxes') || $(this).hasClass('na-searchbox__inline')) {
16879                    $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__dates').data('dateRangePicker').setDateRange(currentCheckIn, newCheckOut, true);
16880                };
16881                if ($(this).hasClass('na-searchbox__boxes-nights') || $(this).hasClass('na-searchbox__inline-nights')) {
16882                    $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__checkin').data('dateRangePicker').setDateRange(currentCheckIn, newCheckOut, true);
16883                };
16884            });
16885        }
16886
16887        // If statement for "rem" button, within nights
16888        // if totalNights is greater than the minimum stay, its possible to decrease the number.
16889        if (cmd == 'rem' && totalNights > minStay) {
16890            if (totalNights > 1) {
16891                totalNights = parseFloat($('form#bke_searchbox_data #bke_nights').val()) - 1;
16892            }
16893
16894            $('form#bke_searchbox_data #bke_nights').val(moment(newCheckOut).diff(moment(currentCheckIn), 'days'));
16895
16896            if (mySavedArrDate) {
16897                //if have saved date
16898                var newCheckOut = moment(currentCheckIn).add(totalNights, 'day').format('YYYY-MM-DD');
16899            } else {
16900                //if dont have saved date
16901                var newCheckOut = moment(currentCheckOut).subtract(1, 'day').format('YYYY-MM-DD');
16902            }
16903
16904
16905            console.log(newCheckOut);
16906            $('.na-searchbox').each(function (index) {
16907                if ($(this).hasClass('na-searchbox__boxes') || $(this).hasClass('na-searchbox__inline')) {
16908                    $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__dates').data('dateRangePicker').setDateRange(currentCheckIn, newCheckOut, true);
16909                }
16910                if ($(this).hasClass('na-searchbox__boxes-nights') || $(this).hasClass('na-searchbox__inline-nights')) {
16911                    $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__checkin').data('dateRangePicker').setDateRange(currentCheckIn, newCheckOut, true);
16912                }
16913            });
16914        }
16915
16916        // if totalNights is equal minStay, the button is disabled.
16917        //this is one of the parts that control the "nights" control
16918        if (totalNights == minStay) {
16919            $('.btn-nightsRem').css({
16920                'opacity': '0.3',
16921                'pointer-events': 'none'
16922            });
16923            // otherwise, button is set back to normal.
16924        } else {
16925            $('.btn-nightsRem').css({
16926                'opacity': '1',
16927                'pointer-events': 'auto'
16928            });
16929        }
16930
16931        /* Updates the nights input within BKE form */
16932        $('form#bke_searchbox_data #bke_nights').val(totalNights);
16933        applyDates(currentCheckIn, newCheckOut, 'btNights');
16934
16935        /* Will blink dates to imply that's been updated */
16936        $('.na-searchbox').removeClass('updated');
16937        $('.na-searchbox').addClass('updated');
16938
16939
16940
16941    }
16942
16943    // Runs all searchboxes
16944    /* Searhbox Message*/
16945    updateMsg("Select check-in date");
16946
16947    //shouldnt touch any of this
16948
16949    //isso controla as datas no calendario; porem se eu mudo esse valor para o saved date, o calendario bloqueia as datas anteriores no passado
16950    /* Initial Check In */
16951
16952    var initCheckIn = ( $('#bke_searchbox_data #bke_arrival_year').val() ) + '-' +
16953                       ( $('#bke_searchbox_data #bke_arrival_month').val() ) + '-' +
16954                       ( $('#bke_searchbox_data #bke_arrival_day').val() );
16955
16956    var initCheckOut = initCheckIn;
16957
16958    /* Min-Max Stay */
16959    var minStay = $('form#bke_searchbox_data #bke_minstay').val() * 1;
16960    var maxStay = $('form#bke_searchbox_data #bke_maxstay').val() * 1;
16961
16962    var selectStatus = 0;
16963
16964    /* This section will support multiple searchbox in the same page */
16965    /* Each searchbox will receive an individual ID to work independently */
16966
16967    $('.na-searchbox').each(function (index, el) {
16968
16969        /* Adds class '.na-searchbox-##'' */
16970        $(this).addClass('na-searchbox-' + 0 + (index + 1));
16971        searchboxSelector = '.na-searchbox-' + 0 + (index + 1);
16972
16973        /* Define correct selector according to its type*/
16974        if ($(this).hasClass('na-searchbox__boxes') || $(this).hasClass('na-searchbox__inline')) {
16975            var searchboxType = '.na-searchbox__dates';
16976        }
16977        if ($(this).hasClass('na-searchbox__boxes-nights') || $(this).hasClass('na-searchbox__inline-nights')) {
16978            var searchboxType = '.na-searchbox__checkin';
16979        }
16980
16981        /* Runs Range Datepicker Plugin */
16982        $(searchboxSelector + ' ' + searchboxType).dateRangePicker({
16983            customArrowPrevSymbol: '<i class="fa fa-angle-left"></i>',
16984            customArrowNextSymbol: '<i class="fa fa-angle-right"></i>',
16985            minDays: minStay + 1,
16986            maxDays: maxStay,
16987            extraClass: 'datepicker-' + (index + 1),
16988            singleMonth: isMobile(),                // User single-month scheme only if isMobile() is true.
16989            startDate: initCheckIn,                 // Uses initCheckIn function
16990            stickyMonths: true,
16991            showTopbar: false,
16992            format: 'YYYY-MM-DD',
16993            separator: ' to ',
16994
16995            /* Custom animation for opening datepicker */
16996            customOpenAnimation: function (cb) {
16997
16998                if (isMobile) {
16999                    $(this).show();
17000                } else {
17001                    $(this).fadeIn(300, cb);
17002                }
17003                updateRatecode();
17004                stopCloseTimeOut();
17005                oneNight();
17006
17007            },
17008            /* Custom animation for close datepicker */
17009            customCloseAnimation: function (cb) {
17010                if (selectStatus == 1) {
17011                    $('.na-searchbox__dates').data('dateRangePicker').setDateRange(currentCheckIn(), currentCheckOut(), true);
17012                };
17013                closeTimeOut();
17014                oneNight();
17015            },
17016
17017            /* Runs when calendar is open or check in and check out dates are selected */
17018            getValue: function () {
17019                updateMsg("Select check-in date");
17020                $('.na-searchbox__footer .submit').removeClass('disable');
17021                $(this).removeClass('updated');
17022                $('.calendar-header').addClass('open');
17023
17024
17025            },
17026
17027            /* Runs when calendar is open or check in and check out dates are selected */
17028            setValue: function (s, s1, s2) {
17029                /* CSS changes */
17030                $(this).addClass('updated');
17031                $('.calendar-header').removeClass('selecting-checkout');
17032                applyDates(s1, s2, 'datePicker');
17033                updateMsg('Dates applied');
17034
17035                /* Nights */
17036                var totalNights = moment(s2).diff(moment(s1), 'days');
17037                $('form#bke_searchbox_data #bke_nights').val(totalNights);
17038                $('.na-searchbox__footer .submit').removeClass('disable');
17039                selectStatus = 2;
17040                oneNight();
17041            }
17042        })
17043            .bind('datepicker-first-date-selected', function (evt, obj) {
17044
17045                if (selectStatus == 1) {
17046                    $('.na-searchbox__dates').data('dateRangePicker').setDateRange(currentCheckIn(), currentCheckOut(), true);
17047                    selectStatus = 2;
17048                };
17049
17050                $('.calendar-header').addClass('selecting-checkout');
17051                $('.calendar-header .checkout-date').html('');
17052                $('.calendar-header .checkin-date').html(moment(obj.date1).format('DD/MM/YYYY'));
17053                applyDates(moment(obj.date1).format('YYYY-MM-DD'), moment(obj.date1).add(1, 'day').format('YYYY-MM-DD'), 'datePicker');
17054                updateMsg('Select check-out date');
17055                selectStatus = 1;
17056            })
17057            .bind('datepicker-open', function () {
17058                $('.calendar-header').addClass('open');
17059                datepickerPosition('.datepicker-' + (index + 1));
17060            })
17061            .bind('datepicker-change', function (evt, obj) {
17062
17063            })
17064            .bind('datepicker-closed', function () {
17065
17066                updateRatecode();
17067                $('.calendar-header').removeClass('open');
17068
17069            })
17070        // $('.na-searchbox__submit').on('click', function () {
17071        // 	applyDates();
17072            
17073        //     $('form#bke_searchbox_data').submit();
17074        //     $('.na-searchbox__footer .submit').addClass('loading');
17075
17076        //     $('.na-searchbox__submit').html('Searching');
17077        //     $('.na-searchbox__submit').prepend('<span class="loading-circle"></span>');
17078        // });
17079
17080        // ml test start
17081
17082        $('#ibe_submit').on('click', function () {
17083
17084
17085            $('.na-searchbox__footer .submit').addClass('loading');
17086            $('.na-searchbox__submit').html('Searching');
17087            $('.na-searchbox__submit').prepend('<span class="loading-circle"></span>');
17088
17089            updateRatecode();
17090
17091            var urlIbe;
17092            var checkboxIbe = $('form#bke_searchbox_data #bke_grid_view').val();
17093            var langIbe = 'en';
17094            
17095            if (checkboxIbe == 2) {
17096                urlIbe = "https://www.theoldinn.com/bookings.html#!/accommodation/flexiSearch" + urlIbeDates;
17097            } else {
17098                urlIbe = "https://www.theoldinn.com/bookings.html#!/accommodation/search" + urlIbeDates;
17099            }
17100
17101            if (ibeRatecode) {
17102                var discountedUrlIbe = urlIbe + '?code=' + ibeRatecode;
17103                window.location = discountedUrlIbe + "&lang=" + langIbe;
17104            } else {
17105                window.location = urlIbe + "?lang=" + langIbe;
17106            }
17107            
17108        });
17109
17110        // ml test end
17111
17112
17113
17114        /* Check In Select */
17115        $(searchboxSelector).find('.na-searchbox__checkin').click(function (evt) {
17116            evt.preventDefault();
17117            //$(this).parent().data('dateRangePicker').resetMonthsView();
17118            updateMsg("Select check-in date");
17119
17120        });
17121        /* Check Out Select */
17122        $(searchboxSelector).find('.na-searchbox__checkout').click(function (evt) {
17123            evt.preventDefault();
17124            //selectStatus = 2;
17125            selectStatus = 1;
17126            $(this).parent().data('dateRangePicker').open();
17127            $(this).parent().data('dateRangePicker').setStart(currentCheckIn());
17128            updateMsg('Select check-out date');
17129            $('.na-searchbox__footer .submit').addClass('disable');
17130        });
17131
17132        /* Close Calendar */
17133        $('.na-searchbox__close').click(function (evt) {
17134            evt.stopPropagation();
17135            $('.na-searchbox-0' + (index + 1) + ' ' + searchboxType).data('dateRangePicker').close();
17136            $('.date-picker-wrapper').fadeOut(300, function () {
17137                stopCloseTimeOut();
17138            });
17139            $('.calendar-header').removeClass('selecting-checkout');
17140            $('.calendar-header').removeClass('selecting-checkin');
17141            $('.calendar-header').removeClass('open');
17142        });
17143
17144
17145    });
17146    /* Ends Each */
17147
17148    $('form#bke_searchbox_data').not(':first').remove();
17149
17150    /* Apply dates to DOM onLoad */
17151    applyDates(initCheckIn, initCheckOut, 'onLoad');
17152
17153    if (mySavedArrDate && todayMoment < mySavedArrDateMoment) {
17154        //uncoment the first works for inline, dont work for boxes
17155        $('.na-searchbox').each(function (index) {
17156            if ($(this).hasClass('na-searchbox__boxes') || $(this).hasClass('na-searchbox__inline')) {
17157                $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__dates').data('dateRangePicker').setDateRange(mySavedArrDate, mySavedDepDate, true);
17158            }
17159            if ($(this).hasClass('na-searchbox__boxes-nights') || $(this).hasClass('na-searchbox__inline-nights')) {
17160                $('.na-searchbox-' + 0 + (index + 1) + ' ' + '.na-searchbox__checkin').data('dateRangePicker').setDateRange(mySavedArrDate, mySavedDepDate, true);
17161            }
17162        });
17163        applyDates(mySavedArrDate, mySavedDepDate, 'onLoad');
17164        selectStatus == 0;
17165
17166    }
17167
17168    /* Check nights and if "minus" button needs to be disabled */
17169    controlNights();
17170    /* Check if flexible dates is selected on load */
17171    flexibleDates();
17172
17173    /* BUTTONS - CLICKS */
17174
17175    /* Add / Remove Nights */
17176    $('.btn-nightsAdd').click(function () {
17177        controlNights('add');
17178    });
17179    $('.btn-nightsRem').click(function () {
17180        controlNights('rem');
17181    });
17182
17183    $('.na-searchbox__ratecode-input').focusout(function () {
17184        $('form#bke_searchbox_data #bke_ratecode').attr('value', $(this).val());
17185        updateRatecode();
17186
17187    });
17188
17189    if ($('form#bke_searchbox_data #bke_ratecode').val() != '') {
17190        $('.na-searchbox__flexible-dates').addClass('active');
17191        $('.na-searchbox__ratecode-input').addClass('active');
17192    }
17193
17194    $('.na-searchbox__ratecode-input').on('keyup', function () {
17195        if ($(this).val() != '') {
17196            $('.na-searchbox__flexible-dates').addClass('active');
17197            $('.na-searchbox__ratecode-input').addClass('active');
17198        } else {
17199            $('.na-searchbox__flexible-dates').removeClass('active');
17200            $('.na-searchbox__ratecode-input').removeClass('active');
17201        }
17202    });
17203
17204
17205    $(document).mouseup(function (e) {
17206        var container = $(".date-picker-wrapper");
17207        if (!container.is(e.target) // if the target of the click isn't the container...
17208            && container.has(e.target).length === 0) // ... nor a descendant of the container
17209        {
17210            $('.date-picker-wrapper').fadeOut(300);
17211        }
17212    });
17213
17214    // *********************************************************************************************** //
17215    // *********************************************************************************************** //
17216    // 05 - APPENDING OVERLAYS TO BODY ELEMENT
17217    // *********************************************************************************************** //
17218    // *********************************************************************************************** //
17219
17220    $('.na-searchbox').each(function (i) {
17221        var searchbox = $(this);
17222        var searchbox_count = '0' + (i + 1);
17223        var searchbox_overlay = $('.na-overlay-' + searchbox_count);
17224        var searchbox_uspoverlay = $('.na-usp-' + searchbox_count);
17225
17226        // appending overlays to body element
17227        searchbox_overlay.insertBefore($('.date-picker-wrapper'));
17228        searchbox_uspoverlay.insertBefore($('.date-picker-wrapper'));
17229    });
17230
17231});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.