Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated externs and turned tests toward packages...gearing up for

release
  • Loading branch information...
commit 9e82fad0a646e938efa92e84ae96d60349b7fb3a 1 parent 9b745bb
@andrewplummer authored
View
25 lib/externs.js
@@ -1,5 +1,4 @@
Object.SugarMethods = {};
-
Array.prototype.any = function() {};
Array.prototype.clone = function() {};
Array.prototype.findAll = function() {};
@@ -9,8 +8,10 @@ Array.prototype.groupBy = function() {};
Array.prototype.has = function() {};
Array.prototype.insert = function() {};
Array.prototype.none = function() {};
+Array.prototype.remove = function() {};
Array.prototype.removeAt = function() {};
Array.prototype.sum = function() {};
+Array.prototype.flatten = function() {};
Date.addFormat = function() {};
Date.prototype.addMinutes = function() {};
Date.prototype.advance = function() {};
@@ -40,9 +41,14 @@ Number.prototype.pad = function() {};
Number.prototype.times = function() {};
Number.prototype.upto = function() {};
Number.prototype.compare = function() {};
+Number.prototype.round = function() {};
+Number.prototype.format = function() {};
Object.defineProperties = function() {};
Object.defineProperty = function() {};
Object.equal = function() {};
+Object.keys = function() {};
+Object.values = function() {};
+Object.merge = function() {};
Object.extended = function() {};
Object.isArray = function() {};
Object.isBoolean = function() {};
@@ -52,8 +58,8 @@ Object.isNumber = function() {};
Object.isObject = function() {};
Object.isRegExp = function() {};
Object.isString = function() {};
-Object.keys = function() {};
-Object.merge = function() {};
+Object.isEmpty = function() {};
+RegExp.escape = function() {};
RegExp.prototype.addFlag = function() {};
RegExp.prototype.setFlags = function() {};
RegExp.prototype.getFlags = function() {};
@@ -78,3 +84,16 @@ String.prototype.underscore = function() {};
String.prototype.unescapeURL = function() {};
String.prototype.zenkaku = function() {};
String.prototype.compare = function() {};
+String.prototype.humanize = function() {};
+String.prototype.spacify = function() {};
+String.prototype.words = function() {};
+String.prototype.normalize = function() {};
+String.prototype.isBlank = function() {};
+
+String.Inflector.plural = function() {};
+String.Inflector.singular = function() {};
+String.Inflector.irregular = function() {};
+String.Inflector.uncountable = function() {};
+String.Inflector.acronymRegExp = new RegExp();
+String.Inflector.acronyms = [];
+
View
2  lib/inflections.js
@@ -476,7 +476,7 @@
var str = this.normalize();
str = str.replace(/[^a-z0-9\-_]+/gi, separator)
if(separator) {
- str = str.replace(new RegExp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ sep: RegExp.escape(separator) }), 'g'), '$1');
+ str = str.replace(new RegExp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ 'sep': RegExp.escape(separator) }), 'g'), '$1');
}
return str.toLowerCase();
},
View
101 release/edge/development/sugar-edge-core.development.js
@@ -108,6 +108,7 @@
}
function multiMatch(el, match, scope, params) {
+ var result = true;
if(el === match) {
// Match strictly equal values up front.
return true;
@@ -117,9 +118,16 @@
} else if(object.isFunction(match)) {
// Match against a filtering function
return match.apply(scope, [el].concat(params));
- } else {
+ } else if(object.isObject(match) && object.isObject(el)) {
// Match against a hash or array.
- return object.equal(match, el);
+ iterateOverObject(match, function(key, value) {
+ if(!multiMatch(el[key], match[key], scope, params)) {
+ result = false;
+ }
+ });
+ return !object.isEmpty(match) && result;
+ } else {
+ return object.equal(el, match);
}
}
@@ -202,7 +210,7 @@
} else if(!conflict || (conflict && resolve !== false)) {
prop = source[key];
}
- if(isDefined(prop)) target[key] = prop;
+ target[key] = prop;
});
}
return target;
@@ -1226,7 +1234,7 @@
*
***/
'clone': function() {
- return this.concat();
+ return mergeObject([], this);
},
/***
@@ -1809,6 +1817,26 @@
return arr;
}
+ function abbreviateNumber(num, roundTo, str, mid, limit, bytes) {
+ var fixed = num.toFixed(20),
+ decimalPlace = fixed.search(/\./),
+ numeralPlace = fixed.search(/[1-9]/),
+ significant = decimalPlace - numeralPlace,
+ unit, i, divisor;
+ if(significant > 0) {
+ significant -= 1;
+ }
+ i = Math.max(Math.min((significant / 3).floor(), limit === false ? str.length : limit), -mid);
+ unit = str.charAt(i + mid - 1);
+ if(significant < -9) {
+ i = -3;
+ roundTo = significant.abs() - 9;
+ unit = str.first();
+ }
+ divisor = bytes ? (2).pow(10 * i) : (10).pow(i * 3);
+ return (num / divisor).round(roundTo || 0).format() + unit.trim();
+ }
+
extend(number, false, false, {
@@ -1850,6 +1878,71 @@
},
/***
+ * @method abbr([precision] = 0)
+ * @returns String
+ * @short Returns an abbreviated form of the number.
+ * @extra [precision] will round to the given precision.
+ * @example
+ *
+ * (1000).abbr() -> "1k"
+ * (1000000).abbr() -> "1m"
+ * (1280).abbr(1) -> "1.3k"
+ *
+ ***/
+ 'abbr': function(precision) {
+ return abbreviateNumber(this, precision, 'kmbt', 0, 4);
+ },
+
+ /***
+ * @method metric([precision] = 0, [limit] = 1)
+ * @returns String
+ * @short Returns the number as a string in metric notation.
+ * @extra [precision] will round to the given precision. Both very large numbers and very small numbers are supported. [limit] is the upper limit for the units. The default is %1%, which is "kilo". If [limit] is %false%, the upper limit will be "exa". The lower limit is "nano", and cannot be changed.
+ * @example
+ *
+ * (1000).metric() -> "1k"
+ * (1000000).metric() -> "1,000k"
+ * (1000000).metric(0, false) -> "1M"
+ * (1249).metric(2) + 'g' -> "1.25kg"
+ * (0.025).metric() + 'm' -> "25mm"
+ *
+ ***/
+ 'metric': function(precision, limit) {
+ return abbreviateNumber(this, precision, 'nμm kMGTPE', 4, isDefined(limit) ? limit : 1);
+ },
+
+ /***
+ * @method bytes([precision] = 0, [limit] = 4)
+ * @returns String
+ * @short Returns an abbreviated form of the number, considered to be "Bytes".
+ * @extra [precision] will round to the given precision. [limit] is the upper limit for the units. The default is %4%, which is "terabytes" (TB). If [limit] is %false%, the upper limit will be "exa".
+ * @example
+ *
+ * (1000).bytes() -> "1kB"
+ * (1000).bytes(2) -> "0.98kB"
+ * ((10).pow(20)).bytes() -> "90,949,470TB"
+ * ((10).pow(20)).bytes(0, false) -> "87EB"
+ *
+ ***/
+ 'bytes': function(precision, limit) {
+ return abbreviateNumber(this, precision, 'kMGTPE', 0, isDefined(limit) ? limit : 4, true) + 'B';
+ },
+
+ /***
+ * @method isInteger()
+ * @returns Boolean
+ * @short Returns true if the number has no trailing decimal.
+ * @example
+ *
+ * (420).isInteger() -> true
+ * (4.5).isInteger() -> false
+ *
+ ***/
+ 'isInteger': function() {
+ return this % 1 == 0;
+ },
+
+ /***
* @method ceil([precision] = 0)
* @returns Number
* @short Rounds the number up. [precision] will round to the given precision.
View
2  release/edge/development/sugar-edge-inflections.development.js
@@ -476,7 +476,7 @@
var str = this.normalize();
str = str.replace(/[^a-z0-9\-_]+/gi, separator)
if(separator) {
- str = str.replace(new RegExp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ sep: RegExp.escape(separator) }), 'g'), '$1');
+ str = str.replace(new RegExp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ 'sep': RegExp.escape(separator) }), 'g'), '$1');
}
return str.toLowerCase();
},
View
101 release/edge/development/sugar-edge.development.js
@@ -108,6 +108,7 @@
}
function multiMatch(el, match, scope, params) {
+ var result = true;
if(el === match) {
// Match strictly equal values up front.
return true;
@@ -117,9 +118,16 @@
} else if(object.isFunction(match)) {
// Match against a filtering function
return match.apply(scope, [el].concat(params));
- } else {
+ } else if(object.isObject(match) && object.isObject(el)) {
// Match against a hash or array.
- return object.equal(match, el);
+ iterateOverObject(match, function(key, value) {
+ if(!multiMatch(el[key], match[key], scope, params)) {
+ result = false;
+ }
+ });
+ return !object.isEmpty(match) && result;
+ } else {
+ return object.equal(el, match);
}
}
@@ -202,7 +210,7 @@
} else if(!conflict || (conflict && resolve !== false)) {
prop = source[key];
}
- if(isDefined(prop)) target[key] = prop;
+ target[key] = prop;
});
}
return target;
@@ -1226,7 +1234,7 @@
*
***/
'clone': function() {
- return this.concat();
+ return mergeObject([], this);
},
/***
@@ -1809,6 +1817,26 @@
return arr;
}
+ function abbreviateNumber(num, roundTo, str, mid, limit, bytes) {
+ var fixed = num.toFixed(20),
+ decimalPlace = fixed.search(/\./),
+ numeralPlace = fixed.search(/[1-9]/),
+ significant = decimalPlace - numeralPlace,
+ unit, i, divisor;
+ if(significant > 0) {
+ significant -= 1;
+ }
+ i = Math.max(Math.min((significant / 3).floor(), limit === false ? str.length : limit), -mid);
+ unit = str.charAt(i + mid - 1);
+ if(significant < -9) {
+ i = -3;
+ roundTo = significant.abs() - 9;
+ unit = str.first();
+ }
+ divisor = bytes ? (2).pow(10 * i) : (10).pow(i * 3);
+ return (num / divisor).round(roundTo || 0).format() + unit.trim();
+ }
+
extend(number, false, false, {
@@ -1850,6 +1878,71 @@
},
/***
+ * @method abbr([precision] = 0)
+ * @returns String
+ * @short Returns an abbreviated form of the number.
+ * @extra [precision] will round to the given precision.
+ * @example
+ *
+ * (1000).abbr() -> "1k"
+ * (1000000).abbr() -> "1m"
+ * (1280).abbr(1) -> "1.3k"
+ *
+ ***/
+ 'abbr': function(precision) {
+ return abbreviateNumber(this, precision, 'kmbt', 0, 4);
+ },
+
+ /***
+ * @method metric([precision] = 0, [limit] = 1)
+ * @returns String
+ * @short Returns the number as a string in metric notation.
+ * @extra [precision] will round to the given precision. Both very large numbers and very small numbers are supported. [limit] is the upper limit for the units. The default is %1%, which is "kilo". If [limit] is %false%, the upper limit will be "exa". The lower limit is "nano", and cannot be changed.
+ * @example
+ *
+ * (1000).metric() -> "1k"
+ * (1000000).metric() -> "1,000k"
+ * (1000000).metric(0, false) -> "1M"
+ * (1249).metric(2) + 'g' -> "1.25kg"
+ * (0.025).metric() + 'm' -> "25mm"
+ *
+ ***/
+ 'metric': function(precision, limit) {
+ return abbreviateNumber(this, precision, 'nμm kMGTPE', 4, isDefined(limit) ? limit : 1);
+ },
+
+ /***
+ * @method bytes([precision] = 0, [limit] = 4)
+ * @returns String
+ * @short Returns an abbreviated form of the number, considered to be "Bytes".
+ * @extra [precision] will round to the given precision. [limit] is the upper limit for the units. The default is %4%, which is "terabytes" (TB). If [limit] is %false%, the upper limit will be "exa".
+ * @example
+ *
+ * (1000).bytes() -> "1kB"
+ * (1000).bytes(2) -> "0.98kB"
+ * ((10).pow(20)).bytes() -> "90,949,470TB"
+ * ((10).pow(20)).bytes(0, false) -> "87EB"
+ *
+ ***/
+ 'bytes': function(precision, limit) {
+ return abbreviateNumber(this, precision, 'kMGTPE', 0, isDefined(limit) ? limit : 4, true) + 'B';
+ },
+
+ /***
+ * @method isInteger()
+ * @returns Boolean
+ * @short Returns true if the number has no trailing decimal.
+ * @example
+ *
+ * (420).isInteger() -> true
+ * (4.5).isInteger() -> false
+ *
+ ***/
+ 'isInteger': function() {
+ return this % 1 == 0;
+ },
+
+ /***
* @method ceil([precision] = 0)
* @returns Number
* @short Rounds the number up. [precision] will round to the given precision.
View
103 release/edge/minified/sugar-edge-core.min.js
@@ -6,60 +6,61 @@
* http://sugarjs.com/
*
* ---------------------------- */
-(function(){var h=true,j=null,k=false,m=Object,n=Array,o=RegExp,q=Date,r=String,s=Number,t=m.defineProperty&&m.defineProperties;function u(a,b,c,d,e){var f=b?a.prototype:a;v(a,b,d);w(d,function(g,i){if(typeof c==="function")x(f,g,aa(f[g],i,c));else if(c===h||!f[g])x(f,g,i);e||(a.SugarMethods[g]={g:b,method:i})})}
-function v(a){if(!a.SugarMethods){x(a,"SugarMethods",{});x(a,"restore",function(){var b=arguments.length===0,c=y(arguments);w(a.SugarMethods,function(d,e){if(b||z(c,d))x(e.g?a.prototype:a,d,e.method)})});x(a,"extend",function(b,c,d){if(a===m&&arguments.length===0)A(Object.keys(Object.SugarMethods).remove("extended","fromQueryString"),Object);else{if(B(c))c=h;u(a,d!==k,c,b,h)}})}}
-function aa(a,b,c){return function(){return a&&(c===h||c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function x(a,b,c){if(t)m.defineProperty(a,b,{value:c,configurable:h,enumerable:k,writable:h});else a[b]=c}function w(a,b){var c=0,d;for(d in a)if(a.hasOwnProperty(d)){b.call(a,d,a[d],c);c++}}
-function C(a,b,c){var d=m.prototype.toString.call(a).match(/\[object (\w+)\]/)[1];if(a===b)return a!==0||1/a===1/b;else if(a===j||B(a)||b===j||B(b))return k;else if(d=="RegExp")return a.ignoreCase==b.ignoreCase&&a.multiline==b.multiline&&a.source==b.source&&a.global==b.global;else if(d=="Array"||d=="Object"){for(d=c.length;d--;)if(c[d]==a)return h;c.push(a);for(var e in a)if(a.hasOwnProperty(e))if(!b.hasOwnProperty(e)||!C(a[e],b[e],c))return k;c.pop();return m.keys(a).length===m.keys(b).length&&a.constructor===
-b.constructor&&a.length===b.length}else return D(b,d)&&a.valueOf()===b.valueOf()}function E(a,b,c,d){return a===b?h:m.isRegExp(b)?o(b).test(a):m.isFunction(b)?b.apply(c,[a].concat(d)):m.equal(b,a)}function F(a,b,c,d){return B(b)?a:m.isFunction(b)?b.apply(c,d||[]):m.isFunction(a[b])?a[b].call(a):a[b]}function G(a,b){return Array.prototype.slice.call(a,b)}function y(a,b,c,d){a=G(a);if(c!==k)a=H(a);I(a,b||function(){},d);return a}
-function J(a,b,c){var d=[],e=a.length,f=b[b.length-1]!==k,g;y(b,function(i){if(m.isBoolean(i))return k;if(f){i%=e;if(i<0)i=e+i}g=c?a.charAt(i)||"":a[i];d.push(g)});return d.length<2?d[0]:d}function D(a,b){return m.prototype.toString.call(a)==="[object "+b+"]"}function K(a){return typeof a=="object"}function B(a){return a===void 0}function L(a){return a!==void 0}
-function M(a,b,c,d){K(b)&&w(b,function(e,f){var g=a[e],i=L(g),l=m.isArray(f);if(c===h&&(l||m.isObject(f))){g||(g=l?[]:{});M(g,f,c)}else if(i&&m.isFunction(d))g=d.call(b,e,a[e],b[e]);else if(!i||i&&d!==k)g=b[e];if(L(g))a[e]=g});return a}
-function O(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,i;if(d!==k&&(g=b.match(e))){i=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");I(b,function(l){f=!l||l.match(/^\d+$/);if(!i&&m.isArray(a))i=a.length;a[i]||(a[i]=f?[]:{});a=a[i];i=l});if(!i&&f)i=a.length.toString();O(a,i,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?h:c==="false"?k:c}function P(a){var b=this;w(a,function(c,d){b[c]=d})}P.prototype.constructor=m;
-function A(a,b){var c={};I(a,function(d){c[d+(d==="equal"?"s":"")]=function(){return Object[d].apply(j,[this].concat(G(arguments)))}});u(b,h,k,c)}u(m,k,h,{watch:function(a,b,c){if(t){var d=a[b];m.defineProperty(a,b,{get:function(){return d},set:function(e){d=c.call(a,b,d,e)},enumerable:h,configurable:h})}}});
-u(m,k,k,{extended:function(a){return new P(a)},isObject:function(a){return a===j||B(a)?k:D(a,"Object")&&a.constructor===m},isNaN:function(a){return m.isNumber(a)&&a.valueOf()!==a.valueOf()},each:function(a,b){b&&w(a,function(c,d){b.call(a,c,d,a)});return a},merge:function(a,b,c){return M(a,b,h,c)},isEmpty:function(a){if(!K(a)||a===j)return!(a&&a.length>0);return m.keys(a).length==0},equal:function(a,b){return C(a,b,[])},values:function(a,b){var c=[];w(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},
-clone:function(a,b){if(!K(a)||a===j)return a;var c=Object.isFunction(a.keys)?Object.extended():{};return M(c,a,b)},fromQueryString:function(a,b){var c=m.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").unescapeURL().split("&").each(function(d){d=d.split("=");d.length===2&&O(c,d[0],d[1],b)});return c},tap:function(a,b){F(a,b,a,[a]);return a}});
-u(m,k,function(){return arguments.length<2},{keys:function(a,b){if(a===j||!K(a)&&!m.isRegExp(a)&&!m.isFunction(a))throw new TypeError("Object required");var c=[];w(a,function(d,e){c.push(d);b&&b.call(a,d,e)});return c}});function I(a,b,c,d,e){var f,g;Q(b);if(c<0)c=a.length+c;g=isNaN(c)?0:parseInt(c>>0);for(c=d===h?a.length+g:a.length;g<c;){f=g%a.length;if(!(f in a)&&e===h)return ba(a,b,g,d);else if(b.call(a,a[f],f,a)===k)break;g++}}
-function z(a,b,c,d,e){var f,g;I(a,function(i,l,p){if(E(i,b,p,[l,p])){f=i;g=l;return k}},c,d);return e?g:f}function R(a,b){function c(e){return F(e,b,a,[e])===d}var d;return a.reduce(function(e,f,g){d=F(f,b,a,[f,g,a]);if(e.none(b?c:f))e.push(f);return e},[])}function H(a,b,c){b=b||Infinity;c=c||0;var d=[];I(a,function(e){if(m.isArray(e)&&c<b)d=d.concat(H(e,b,c+1));else d.push(e)});return d}
-function S(a,b,c,d){var e=a.length,f=d==-1,g=f?e-1:0;c=isNaN(c)?g:parseInt(c>>0);if(c<0)c=e+c;if(!f&&c<0||f&&c>=e)c=g;for(;f&&c>=0||!f&&c<e;){if(a[c]===b)return c;c+=d}return-1}function ca(a,b,c,d){var e=a.length,f=0,g=L(c);Q(b);if(e==0&&!g)throw new TypeError("Reduce called on empty array with no initial value");else if(g)c=c;else{c=a[d?e-1:f];f++}for(;f<e;){g=d?e-f-1:f;if(g in a)c=b.call(void 0,c,a[g],g,a);f++}return c}
-function Q(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}function T(a){if(a.length===0)throw new TypeError("First argument must be defined");}function ba(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(e.toNumber());d.sort().each(function(f){return b.call(a,a[f],f,a)});return a}
-function U(a,b,c,d){var e=c==="max",f=c==="min",g=e?-Infinity:Infinity,i=[];w(a,function(l){var p=a[l];l=F(p,b,a,d?[p,l.toNumber(),a]:[]);if(!B(l))if(l===g)i.push(p);else if(e&&l>g||f&&l<g){i=[p];g=l}});return i}u(n,k,k,{create:function(){var a=[];y(arguments,function(b){if(b&&b.callee)b=G(b);a=a.concat(b)});return a},isArray:function(a){return D(a,"Array")}});
-u(n,h,function(){var a=arguments;return a.length===0||m.isFunction(a[0])},{every:function(a,b){var c=this.length,d=0;for(T(arguments);d<c;){if(d in this&&!E(this[d],a,b,[d,this]))return k;d++}return h},some:function(a,b){var c=this.length,d=0;for(T(arguments);d<c;){if(d in this&&E(this[d],a,b,[d,this]))return h;d++}return k},map:function(a,b){var c=this.length,d=0,e,f=Array(c);for(T(arguments);d<c;){if(d in this){e=this[d];f[d]=F(e,a,b,[e,d,this])}d++}return f},filter:function(a,b){var c=this.length,
-d=0,e=[];for(T(arguments);d<c;){d in this&&E(this[d],a,b,[d,this])&&e.push(this[d]);d++}return e}});
-u(n,h,k,{indexOf:function(a,b){if(m.isString(this))return this.indexOf(a,b);return S(this,a,b,1)},lastIndexOf:function(a,b){if(m.isString(this))return this.lastIndexOf(a,b);return S(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(Q(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return ca(this,a,b)},reduceRight:function(a,b){return ca(this,a,b,h)},each:function(a,b,c){I(this,a,b,c,h);return this},find:function(a,b,c){return z(this,a,b,c)},findAll:function(a,b,
-c){var d=[];I(this,function(e,f,g){E(e,a,g,[f,g])&&d.push(e)},b,c);return d},findIndex:function(a,b,c){a=z(this,a,b,c,h);return L(a)?a:-1},count:function(a){if(B(a))return this.length;return this.findAll(a).length},none:function(){return!this.any.apply(this,arguments)},remove:function(){var a,b=this;y(arguments,function(c){for(a=0;a<b.length;)if(E(b[a],c,b,[a,b]))b.splice(a,1);else a++},k);return b},removeAt:function(a,b){if(B(a))return this;if(B(b))b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},
-add:function(a,b){if(!m.isNumber(s(b))||isNaN(b)||b==-1)b=this.length;else if(b<-1)b+=1;n.prototype.splice.apply(this,[b,0].concat(a));return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return n.prototype.remove.apply(this.clone(),arguments)},clone:function(){return this.concat()},unique:function(a){return R(this,a)},union:function(){var a=this;y(arguments,function(b){a=a.concat(b)});return R(a)},intersect:function(){var a=[],b=arguments;this.each(function(c){y(b,
-function(d){m.isArray(d)||(d=[d]);B(z(a,c))&&L(z(d,c))&&a.push(c)})});return a},subtract:function(){var a=this.clone();y(arguments,function(b){m.isArray(b)||(b=[b]);b.each(function(c){a.remove(c)})});return a},at:function(){return J(this,arguments)},first:function(a){if(B(a))return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(B(a))return this[this.length-1];return this.slice(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(B(a))a=this.length;
-return this.slice(0,a)},min:function(a){return R(U(this,a,"min",h))},max:function(a){return R(U(this,a,"max",h))},least:function(){var a=H(U(this.groupBy.apply(this,arguments),"length","min"));return a.length===this.length?[]:R(a)},most:function(){var a=H(U(this.groupBy.apply(this,arguments),"length","max"));return a.length===this.length?[]:R(a)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?
-a.sum()/a.length:0},groupBy:function(a,b){var c=this,d=m.extended(),e;I(c,function(f,g){e=F(f,a,c,[f,g,c]);d[e]||(d[e]=[]);d[e].push(f)});return d.each(b)},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],f=(this.length/a).ceil();(0).upto(a-1,function(g){g=g*f;var i=d.slice(g,g+f);c&&i.length<f&&(f-i.length).times(function(){i=i.add(b)});e.push(i)});return e},inGroupsOf:function(a,b){if(this.length===0||a===0)return this;if(B(a))a=1;if(B(b))b=j;var c=[],d=j;this.each(function(e,f){if(f%
-a===0){d&&c.push(d);d=[]}if(B(e))e=b;d.push(e)});if(!this.length.isMultipleOf(a)){(a-this.length%a).times(function(){d.push(b)});this.length+=a-this.length%a}d.length>0&&c.push(d);return c},compact:function(a){var b=[];I(this,function(c){if(m.isArray(c))b.push(c.compact());else if(a&&c)b.push(c);else if(!a&&L(c)&&c!==j&&(!m.isNumber(c)||!isNaN(c)))b.push(c)});return b},isEmpty:function(){return this.compact().length==0},flatten:function(a){return H(this,a)},sortBy:function(a,b){var c=this.clone();
-c.sort(function(d,e){var f,g;f=F(d,a,c,[d]);g=F(e,a,c,[e]);return(f&&f.compare?f.compare(g):f<g)*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a},zip:function(){var a=G(arguments);return this.map(function(b,c){return[b].concat(a.map(function(d){return c in d?d[c]:j}))})},sample:function(a){var b=[],c=this.clone(),d;for(a>0||(a=1);b.length<a;){d=Number.random(0,c.length-1);b.push(c[d]);c.removeAt(d);
-if(c.length==0)break}return arguments.length>0?b:b[0]}});u(n,h,k,{all:n.prototype.every,any:n.prototype.some,has:n.prototype.some,insert:n.prototype.add});function V(a,b,c){c=Math[c||"round"];var d=Math.pow(10,(b||0).abs());if(b<0)d=1/d;return c(a*d)/d}function da(a,b,c,d){var e=[];a=parseInt(a);for(var f=d>0;f&&a<=b||!f&&a>=b;){e.push(a);c&&c.call(this,a);a+=d}return e}
-u(s,k,k,{random:function(a,b){var c;if(arguments.length==1){b=a;a=0}c=Math.min(a||0,L(b)?b:1);return V(Math.random()*(Math.max(a||0,L(b)?b:1)-c)+c)}});
-u(s,h,k,{toNumber:function(){return parseFloat(this,10)},ceil:function(a){return V(this,a,"ceil")},floor:function(a){return V(this,a,"floor")},abs:function(){return Math.abs(this)},pow:function(a){if(B(a))a=1;return Math.pow(this,a)},round:function(a){return V(this,a,"round")},chr:function(){return r.fromCharCode(this)},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},upto:function(a,b,c){return da(this,a,b,c||
-1)},downto:function(a,b,c){return da(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},ordinalize:function(){var a;a=this.abs();var b=a.toString().last(2).toNumber();if(b>=11&&b<=13)a="th";else switch(a%10){case 1:a="st";break;case 2:a="nd";break;case 3:a="rd";break;default:a="th"}return this.toString()+a},pad:function(a,b,c){c=c||10;c=this.toNumber()===0?"":this.toString(c).replace(/^-/,"");c=W(c,"0",a-c.replace(/\.\d+$/,"").length,0);if(b||this<
-0)c=(this<0?"-":"+")+c;return c},format:function(a,b,c){var d,e,f=/(\d+)(\d{3})/;if(r(b).match(/\d/))throw new TypeError("Thousands separator cannot contain numbers.");d=m.isNumber(a)?V(this,a).toFixed(Math.max(a,0)):this.toString();b=b||",";c=c||".";e=d.split(".");d=e[0];for(e=e[1]||"";d.match(f);)d=d.replace(f,"$1"+b+"$2");if(e.length>0)d+=c+W(e,"0",0,a-e.length);return d},hex:function(a){return this.pad(a||1,k,16)},compare:function(a){return this-Number(a)}});
-function X(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function ea(a,b,c,d){var e=G(b).join("");e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(f){return d[f]&&(!e||e.has(d[f].type))?d[f].to:f})}
-var fa=[{type:"a",shift:65248,start:65,end:90},{type:"a",shift:65248,start:97,end:122},{type:"n",shift:65248,start:48,end:57},{type:"p",shift:65248,start:33,end:47},{type:"p",shift:65248,start:58,end:64},{type:"p",shift:65248,start:91,end:96},{type:"p",shift:65248,start:123,end:126}],ga={},ha={},ia=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,ja=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,ka=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,
-la=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/;function Y(a,b,c){ga[b]={type:a,to:c};ha[c]={type:a,to:b}}function W(a,b,c,d){var e=String(b);if(e!=b)e="";m.isNumber(c)||(c=1);m.isNumber(d)||(d=1);return e.repeat(c)+a+e.repeat(d)}
-u(r,h,k,{escapeRegExp:function(){return o.escape(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return btoa(this)},decodeBase64:function(){return atob(this)},capitalize:function(a){return this.toLowerCase().replace(a?
+(function(context){var i=true,j=null,k=false,m=Object,n=Array,o=RegExp,q=Date,r=String,s=Number,t=m.defineProperty&&m.defineProperties;function u(a,b,c,d,e){var f=b?a.prototype:a;v(a,b,d);w(d,function(g,h){if(typeof c==="function")x(f,g,aa(f[g],h,c));else if(c===i||!f[g])x(f,g,h);e||(a.SugarMethods[g]={e:b,method:h})})}
+function v(a){if(!a.SugarMethods){x(a,"SugarMethods",{});x(a,"restore",function(){var b=arguments.length===0,c=y(arguments);w(a.SugarMethods,function(d,e){if(b||z(c,d))x(e.e?a.prototype:a,d,e.method)})});x(a,"extend",function(b,c,d){if(a===m&&arguments.length===0)A(Object.keys(Object.SugarMethods).remove("extended","fromQueryString"),Object);else{if(B(c))c=i;u(a,d!==k,c,b,i)}})}}
+function aa(a,b,c){return function(){return a&&(c===i||c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function x(a,b,c){if(t)m.defineProperty(a,b,{value:c,configurable:i,enumerable:k,writable:i});else a[b]=c}function w(a,b){var c=0,d;for(d in a)if(a.hasOwnProperty(d)){b.call(a,d,a[d],c);c++}}
+function C(a,b,c){var d=m.prototype.toString.call(a).match(/\[object (\w+)\]/)[1];if(a===b)return a!==0||1/a===1/b;else if(a===j||B(a)||b===j||B(b))return k;else if(d=="RegExp")return a.ignoreCase==b.ignoreCase&&a.multiline==b.multiline&&a.source==b.source&&a.global==b.global;else if(d=="Array"||d=="Object"){for(d=c.length;d--;)if(c[d]==a)return i;c.push(a);for(var e in a)if(a.hasOwnProperty(e))if(!b.hasOwnProperty(e)||!C(a[e],b[e],c))return k;c.pop();return m.keys(a).length===m.keys(b).length&&a.constructor===
+b.constructor&&a.length===b.length}else return D(b,d)&&a.valueOf()===b.valueOf()}function E(a,b,c,d){var e=i;if(a===b)return i;else if(m.isRegExp(b))return o(b).test(a);else if(m.isFunction(b))return b.apply(c,[a].concat(d));else if(m.isObject(b)&&m.isObject(a)){w(b,function(f){E(a[f],b[f],c,d)||(e=k)});return!m.isEmpty(b)&&e}else return m.equal(a,b)}function F(a,b,c,d){return B(b)?a:m.isFunction(b)?b.apply(c,d||[]):m.isFunction(a[b])?a[b].call(a):a[b]}
+function G(a,b){return Array.prototype.slice.call(a,b)}function y(a,b,c,d){a=G(a);if(c!==k)a=H(a);I(a,b||function(){},d);return a}function J(a,b,c){var d=[],e=a.length,f=b[b.length-1]!==k,g;y(b,function(h){if(m.isBoolean(h))return k;if(f){h%=e;if(h<0)h=e+h}g=c?a.charAt(h)||"":a[h];d.push(g)});return d.length<2?d[0]:d}function D(a,b){return m.prototype.toString.call(a)==="[object "+b+"]"}function K(a){return typeof a=="object"}function B(a){return a===void 0}function L(a){return a!==void 0}
+function M(a,b,c,d){K(b)&&w(b,function(e,f){var g=a[e],h=L(g),l=m.isArray(f);if(c===i&&(l||m.isObject(f))){g||(g=l?[]:{});M(g,f,c)}else if(h&&m.isFunction(d))g=d.call(b,e,a[e],b[e]);else if(!h||h&&d!==k)g=b[e];a[e]=g});return a}
+function N(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,h;if(d!==k&&(g=b.match(e))){h=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");I(b,function(l){f=!l||l.match(/^\d+$/);if(!h&&m.isArray(a))h=a.length;a[h]||(a[h]=f?[]:{});a=a[h];h=l});if(!h&&f)h=a.length.toString();N(a,h,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?i:c==="false"?k:c}function P(a){var b=this;w(a,function(c,d){b[c]=d})}P.prototype.constructor=m;
+function A(a,b){var c={};I(a,function(d){c[d+(d==="equal"?"s":"")]=function(){return Object[d].apply(j,[this].concat(G(arguments)))}});u(b,i,k,c)}u(m,k,i,{watch:function(a,b,c){if(t){var d=a[b];m.defineProperty(a,b,{get:function(){return d},set:function(e){d=c.call(a,b,d,e)},enumerable:i,configurable:i})}}});
+u(m,k,k,{extended:function(a){return new P(a)},isObject:function(a){return a===j||B(a)?k:D(a,"Object")&&a.constructor===m},isNaN:function(a){return m.isNumber(a)&&a.valueOf()!==a.valueOf()},each:function(a,b){b&&w(a,function(c,d){b.call(a,c,d,a)});return a},merge:function(a,b,c){return M(a,b,i,c)},isEmpty:function(a){if(!K(a)||a===j)return!(a&&a.length>0);return m.keys(a).length==0},equal:function(a,b){return C(a,b,[])},values:function(a,b){var c=[];w(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},
+clone:function(a,b){if(!K(a)||a===j)return a;var c=Object.isFunction(a.keys)?Object.extended():{};return M(c,a,b)},fromQueryString:function(a,b){var c=m.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").unescapeURL().split("&").each(function(d){d=d.split("=");d.length===2&&N(c,d[0],d[1],b)});return c},tap:function(a,b){F(a,b,a,[a]);return a}});
+u(m,k,function(){return arguments.length<2},{keys:function(a,b){if(a===j||!K(a)&&!m.isRegExp(a)&&!m.isFunction(a))throw new TypeError("Object required");var c=[];w(a,function(d,e){c.push(d);b&&b.call(a,d,e)});return c}});function I(a,b,c,d,e){var f,g;Q(b);if(c<0)c=a.length+c;g=isNaN(c)?0:parseInt(c>>0);for(c=d===i?a.length+g:a.length;g<c;){f=g%a.length;if(!(f in a)&&e===i)return ba(a,b,g,d);else if(b.call(a,a[f],f,a)===k)break;g++}}
+function z(a,b,c,d,e){var f,g;I(a,function(h,l,p){if(E(h,b,p,[l,p])){f=h;g=l;return k}},c,d);return e?g:f}function R(a,b){function c(e){return F(e,b,a,[e])===d}var d;return a.reduce(function(e,f,g){d=F(f,b,a,[f,g,a]);if(e.none(b?c:f))e.push(f);return e},[])}function H(a,b,c){b=b||Infinity;c=c||0;var d=[];I(a,function(e){if(m.isArray(e)&&c<b)d=d.concat(H(e,b,c+1));else d.push(e)});return d}
+function ca(a,b,c,d){var e=a.length,f=d==-1,g=f?e-1:0;c=isNaN(c)?g:parseInt(c>>0);if(c<0)c=e+c;if(!f&&c<0||f&&c>=e)c=g;for(;f&&c>=0||!f&&c<e;){if(a[c]===b)return c;c+=d}return-1}function da(a,b,c,d){var e=a.length,f=0,g=L(c);Q(b);if(e==0&&!g)throw new TypeError("Reduce called on empty array with no initial value");else if(g)c=c;else{c=a[d?e-1:f];f++}for(;f<e;){g=d?e-f-1:f;if(g in a)c=b.call(void 0,c,a[g],g,a);f++}return c}
+function Q(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}function S(a){if(a.length===0)throw new TypeError("First argument must be defined");}function ba(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(e.toNumber());d.sort().each(function(f){return b.call(a,a[f],f,a)});return a}
+function T(a,b,c,d){var e=c==="max",f=c==="min",g=e?-Infinity:Infinity,h=[];w(a,function(l){var p=a[l];l=F(p,b,a,d?[p,l.toNumber(),a]:[]);if(!B(l))if(l===g)h.push(p);else if(e&&l>g||f&&l<g){h=[p];g=l}});return h}u(n,k,k,{create:function(){var a=[];y(arguments,function(b){if(b&&b.callee)b=G(b);a=a.concat(b)});return a},isArray:function(a){return D(a,"Array")}});
+u(n,i,function(){var a=arguments;return a.length===0||m.isFunction(a[0])},{every:function(a,b){var c=this.length,d=0;for(S(arguments);d<c;){if(d in this&&!E(this[d],a,b,[d,this]))return k;d++}return i},some:function(a,b){var c=this.length,d=0;for(S(arguments);d<c;){if(d in this&&E(this[d],a,b,[d,this]))return i;d++}return k},map:function(a,b){var c=this.length,d=0,e,f=Array(c);for(S(arguments);d<c;){if(d in this){e=this[d];f[d]=F(e,a,b,[e,d,this])}d++}return f},filter:function(a,b){var c=this.length,
+d=0,e=[];for(S(arguments);d<c;){d in this&&E(this[d],a,b,[d,this])&&e.push(this[d]);d++}return e}});
+u(n,i,k,{indexOf:function(a,b){if(m.isString(this))return this.indexOf(a,b);return ca(this,a,b,1)},lastIndexOf:function(a,b){if(m.isString(this))return this.lastIndexOf(a,b);return ca(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(Q(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return da(this,a,b)},reduceRight:function(a,b){return da(this,a,b,i)},each:function(a,b,c){I(this,a,b,c,i);return this},find:function(a,b,c){return z(this,a,b,c)},findAll:function(a,
+b,c){var d=[];I(this,function(e,f,g){E(e,a,g,[f,g])&&d.push(e)},b,c);return d},findIndex:function(a,b,c){a=z(this,a,b,c,i);return L(a)?a:-1},count:function(a){if(B(a))return this.length;return this.findAll(a).length},none:function(){return!this.any.apply(this,arguments)},remove:function(){var a,b=this;y(arguments,function(c){for(a=0;a<b.length;)if(E(b[a],c,b,[a,b]))b.splice(a,1);else a++},k);return b},removeAt:function(a,b){if(B(a))return this;if(B(b))b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},
+add:function(a,b){if(!m.isNumber(s(b))||isNaN(b)||b==-1)b=this.length;else if(b<-1)b+=1;n.prototype.splice.apply(this,[b,0].concat(a));return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return n.prototype.remove.apply(this.clone(),arguments)},clone:function(){return M([],this)},unique:function(a){return R(this,a)},union:function(){var a=this;y(arguments,function(b){a=a.concat(b)});return R(a)},intersect:function(){var a=[],b=arguments;this.each(function(c){y(b,function(d){m.isArray(d)||
+(d=[d]);B(z(a,c))&&L(z(d,c))&&a.push(c)})});return a},subtract:function(){var a=this.clone();y(arguments,function(b){m.isArray(b)||(b=[b]);b.each(function(c){a.remove(c)})});return a},at:function(){return J(this,arguments)},first:function(a){if(B(a))return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(B(a))return this[this.length-1];return this.slice(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(B(a))a=this.length;return this.slice(0,a)},
+min:function(a){return R(T(this,a,"min",i))},max:function(a){return R(T(this,a,"max",i))},least:function(){var a=H(T(this.groupBy.apply(this,arguments),"length","min"));return a.length===this.length?[]:R(a)},most:function(){var a=H(T(this.groupBy.apply(this,arguments),"length","max"));return a.length===this.length?[]:R(a)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?a.sum()/a.length:0},groupBy:function(a,
+b){var c=this,d=m.extended(),e;I(c,function(f,g){e=F(f,a,c,[f,g,c]);d[e]||(d[e]=[]);d[e].push(f)});return d.each(b)},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],f=(this.length/a).ceil();(0).upto(a-1,function(g){g=g*f;var h=d.slice(g,g+f);c&&h.length<f&&(f-h.length).times(function(){h=h.add(b)});e.push(h)});return e},inGroupsOf:function(a,b){if(this.length===0||a===0)return this;if(B(a))a=1;if(B(b))b=j;var c=[],d=j;this.each(function(e,f){if(f%a===0){d&&c.push(d);d=[]}if(B(e))e=b;d.push(e)});
+if(!this.length.isMultipleOf(a)){(a-this.length%a).times(function(){d.push(b)});this.length+=a-this.length%a}d.length>0&&c.push(d);return c},compact:function(a){var b=[];I(this,function(c){if(m.isArray(c))b.push(c.compact());else if(a&&c)b.push(c);else if(!a&&L(c)&&c!==j&&(!m.isNumber(c)||!isNaN(c)))b.push(c)});return b},isEmpty:function(){return this.compact().length==0},flatten:function(a){return H(this,a)},sortBy:function(a,b){var c=this.clone();c.sort(function(d,e){var f,g;f=F(d,a,c,[d]);g=F(e,
+a,c,[e]);return(f&&f.compare?f.compare(g):f<g)*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a},zip:function(){var a=G(arguments);return this.map(function(b,c){return[b].concat(a.map(function(d){return c in d?d[c]:j}))})},sample:function(a){var b=[],c=this.clone(),d;for(a>0||(a=1);b.length<a;){d=Number.random(0,c.length-1);b.push(c[d]);c.removeAt(d);if(c.length==0)break}return arguments.length>0?b:b[0]}});
+u(n,i,k,{all:n.prototype.every,any:n.prototype.some,has:n.prototype.some,insert:n.prototype.add});function U(a,b,c){c=Math[c||"round"];var d=Math.pow(10,(b||0).abs());if(b<0)d=1/d;return c(a*d)/d}function ea(a,b,c,d){var e=[];a=parseInt(a);for(var f=d>0;f&&a<=b||!f&&a>=b;){e.push(a);c&&c.call(this,a);a+=d}return e}
+function V(a,b,c,d,e,f){var g=a.toFixed(20),h=g.search(/\./);g=g.search(/[1-9]/);h=h-g;if(h>0)h-=1;e=Math.max(Math.min((h/3).floor(),e===k?c.length:e),-d);d=c.charAt(e+d-1);if(h<-9){e=-3;b=h.abs()-9;d=c.first()}return(a/(f?(2).pow(10*e):(10).pow(e*3))).round(b||0).format()+d.trim()}u(s,k,k,{random:function(a,b){var c;if(arguments.length==1){b=a;a=0}c=Math.min(a||0,L(b)?b:1);return U(Math.random()*(Math.max(a||0,L(b)?b:1)-c)+c)}});
+u(s,i,k,{toNumber:function(){return parseFloat(this,10)},abbr:function(a){return V(this,a,"kmbt",0,4)},metric:function(a,b){return V(this,a,"n\u03bcm kMGTPE",4,L(b)?b:1)},bytes:function(a,b){return V(this,a,"kMGTPE",0,L(b)?b:4,i)+"B"},isInteger:function(){return this%1==0},ceil:function(a){return U(this,a,"ceil")},floor:function(a){return U(this,a,"floor")},abs:function(){return Math.abs(this)},pow:function(a){if(B(a))a=1;return Math.pow(this,a)},round:function(a){return U(this,a,"round")},chr:function(){return r.fromCharCode(this)},
+isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},upto:function(a,b,c){return ea(this,a,b,c||1)},downto:function(a,b,c){return ea(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},ordinalize:function(){var a;a=this.abs();var b=a.toString().last(2).toNumber();if(b>=11&&b<=13)a="th";else switch(a%10){case 1:a="st";break;case 2:a="nd";break;case 3:a="rd";break;
+default:a="th"}return this.toString()+a},pad:function(a,b,c){c=c||10;c=this.toNumber()===0?"":this.toString(c).replace(/^-/,"");c=W(c,"0",a-c.replace(/\.\d+$/,"").length,0);if(b||this<0)c=(this<0?"-":"+")+c;return c},format:function(a,b,c){var d,e,f=/(\d+)(\d{3})/;if(r(b).match(/\d/))throw new TypeError("Thousands separator cannot contain numbers.");d=m.isNumber(a)?U(this,a).toFixed(Math.max(a,0)):this.toString();b=b||",";c=c||".";e=d.split(".");d=e[0];for(e=e[1]||"";d.match(f);)d=d.replace(f,"$1"+
+b+"$2");if(e.length>0)d+=c+W(e,"0",0,a-e.length);return d},hex:function(a){return this.pad(a||1,k,16)},compare:function(a){return this-Number(a)}});function X(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}
+function fa(a,b,c,d){var e=G(b).join("");e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(f){return d[f]&&(!e||e.has(d[f].type))?d[f].to:f})}
+var ga=[{type:"a",shift:65248,start:65,end:90},{type:"a",shift:65248,start:97,end:122},{type:"n",shift:65248,start:48,end:57},{type:"p",shift:65248,start:33,end:47},{type:"p",shift:65248,start:58,end:64},{type:"p",shift:65248,start:91,end:96},{type:"p",shift:65248,start:123,end:126}],ha={},ia={},ja=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,ka=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,la=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,
+ma=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/;function Y(a,b,c){ha[b]={type:a,to:c};ia[c]={type:a,to:b}}function W(a,b,c,d){var e=String(b);if(e!=b)e="";m.isNumber(c)||(c=1);m.isNumber(d)||(d=1);return e.repeat(c)+a+e.repeat(d)}
+u(r,i,k,{escapeRegExp:function(){return o.escape(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return btoa(this)},decodeBase64:function(){return atob(this)},capitalize:function(a){return this.toLowerCase().replace(a?
/\b[a-z]/g:/^[a-z]/,function(b){return b.toUpperCase()})},pad:function(a,b){return W(this,a,b,b)},padLeft:function(a,b){return W(this,a,b,0)},padRight:function(a,b){return W(this,a,0,b)},repeat:function(a){var b="",c=0;if(m.isNumber(a)&&a>0)for(;c<a;){b+=this;c++}return b},each:function(a,b){if(m.isFunction(a)){b=a;a=/./g}else if(a)if(m.isString(a))a=o(o.escape(a),"gi");else{if(m.isRegExp(a))a=a.addFlag("g")}else a=/./g;var c=this.match(a)||[];if(b)for(var d=0;d<c.length;d++)c[d]=b.call(this,c[d],
d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=(c+a).chr()});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.trim().each(a)},words:function(a){return this.trim().each(/\S+/g,a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},
-startsWith:function(a,b){if(B(b))b=h;var c=m.isRegExp(a)?a.source.replace("^",""):o.escape(a);return o("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(B(b))b=h;var c=m.isRegExp(a)?a.source.replace("$",""):o.escape(a);return o(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(a)!==-1},add:function(a,b){return this.split("").add(a,b).join("")},remove:function(a){return this.replace(a,"")},hankaku:function(){return ea(this,arguments,
-ja,ha)},zenkaku:function(){return ea(this,arguments,ia,ga)},hiragana:function(a){var b=this;if(a!==k)b=b.zenkaku("k");return b.replace(/[\u30A1-\u30F6]/g,function(c){return c.shift(-96)})},katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.replace(/[\r\n]/g,"").trim().replace(/([\s\u3000])+/g,
-"$1")},at:function(){return J(this,arguments,h)},first:function(a){a=B(a)?1:a;return this.substr(0,a)},last:function(a){a=B(a)?1:a;return this.substr(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(B(a))a=this.length;return this.slice(0,a)},toDate:function(a){var b=this.toString();return q.create?q.create(b,a):new q(b)},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(String.c&&
-String.c.h,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=r.c&&r.c.e&&r.c.e[d];e=a!==k||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var a=this;y(arguments.length>0?arguments:[""],function(b){a=a.replace(o("</?"+
-b.escapeRegExp()+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;y(arguments.length>0?arguments:["\\S+"],function(b){b=o("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c){var d;b=B(b)?"...":String(b);a-=b.length;if(this.length<=a)return this.toString();d=b.match(/^(.)\1+$/)?b.slice(0,1):"";for(d=o("[^"+X()+d+"]["+X()+d+"]");a>0&&!d.test(this.slice(a-1,a+1))&&c!==h;)a--;return this.slice(0,a)+(a>0?b:"")},assign:function(){var a=m.extended();
-y(arguments,function(b,c){if(m.isObject(b))a.merge(b);else a[c+1]=b});return this.replace(/\{(.+?)\}/g,function(b,c){return a.hasOwnProperty(c)?a[c]:b})},compare:function(a,b){var c=this;a=String(a);if(b===h)b=/\W/g;if(b){a=a.remove(b);c=c.remove(b)}return c==a?0:c<a?-1:1}});
-u(r,h,function(a){return!m.isRegExp(a)},{split:function(a,b){var c=[],d=0;a=o(a).addFlag("g");var e,f,g,i;o.d||(e=RegExp("^"+a.source+"$(?!\\s)",a.getFlags()));if(B(b)||+b<0)b=Infinity;else{b=(+b).floor();if(!b)return[]}for(;f=a.exec(this);){g=f.index+f[0].length;if(g>d){c.push(this.slice(d,f.index));!o.d&&f.length>1&&f[0].replace(e,function(){for(var l=1;l<arguments.length-2;l++)if(B(arguments[l]))f[l]=void 0});f.length>1&&f.index<this.length&&n.prototype.push.apply(c,f.slice(1));i=f[0].length;d=
-g;if(c.length>=b)break}a.lastIndex===f.index&&a.lastIndex++}if(d===this.length){if(i||!a.test(""))c.push("")}else c.push(this.slice(d));return c.length>b?c.slice(0,b):c}});u(r,h,k,{insert:r.prototype.add});o.d=B(o("()??").exec("")[1]);function Z(a,b){var c="";if(b=="g"||a.global)c+="g";if(b=="i"||a.ignoreCase)c+="i";if(b=="m"||a.multiline)c+="m";if(b=="y"||a.i)c+="y";return c}u(o,k,k,{escape:function(a){m.isString(a)||(a=String(a));return a.replace(/([/'*+?|()\[\]{}.^$])/g,"\\$1")}});
-u(o,h,k,{getFlags:function(){return Z(this)},setFlags:function(a){return o(this.source,a)},addFlag:function(a){return this.setFlags(Z(this,a))},removeFlag:function(a){return this.setFlags(Z(this).replace(a,""))}});function $(a,b,c,d,e){if(!a.b)a.b=[];a.b.push(setTimeout(function(){a.b.removeAt(f);c.apply(d,e||[])},b));var f=a.b.length}
-u(Function,h,k,{lazy:function(a,b){function c(){if(!(g||f.length==0)){for(var p=Math.max(f.length-l,0);f.length>p;)Function.prototype.apply.apply(e,f.shift());$(d,i,function(){g=k;c()});g=h}}function d(){if(!(g&&f.length>b-2)){f.push([this,arguments]);c()}}var e=this,f=[],g=k,i,l;a=a||1;b=b||Infinity;i=a.ceil();l=V(i/a);return d},delay:function(a){m.isNumber(a)||(a=0);var b=G(arguments,1);$(this,a,this,this,b);return this},debounce:function(a,b){var c=this;return b===k?this.lazy(a,1):function(){c.cancel();
+startsWith:function(a,b){if(B(b))b=i;var c=m.isRegExp(a)?a.source.replace("^",""):o.escape(a);return o("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(B(b))b=i;var c=m.isRegExp(a)?a.source.replace("$",""):o.escape(a);return o(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(a)!==-1},add:function(a,b){return this.split("").add(a,b).join("")},remove:function(a){return this.replace(a,"")},hankaku:function(){return fa(this,arguments,
+ka,ia)},zenkaku:function(){return fa(this,arguments,ja,ha)},hiragana:function(a){var b=this;if(a!==k)b=b.zenkaku("k");return b.replace(/[\u30A1-\u30F6]/g,function(c){return c.shift(-96)})},katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.replace(/[\r\n]/g,"").trim().replace(/([\s\u3000])+/g,
+"$1")},at:function(){return J(this,arguments,i)},first:function(a){a=B(a)?1:a;return this.substr(0,a)},last:function(a){a=B(a)?1:a;return this.substr(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(B(a))a=this.length;return this.slice(0,a)},toDate:function(a){var b=this.toString();return q.create?q.create(b,a):new q(b)},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(String.Inflector&&
+String.Inflector.acronymRegExp,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=r.Inflector&&r.Inflector.acronyms&&r.Inflector.acronyms[d];e=a!==k||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var a=this;y(arguments.length>
+0?arguments:[""],function(b){a=a.replace(o("</?"+b.escapeRegExp()+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;y(arguments.length>0?arguments:["\\S+"],function(b){b=o("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c){var d;b=B(b)?"...":String(b);a-=b.length;if(this.length<=a)return this.toString();d=b.match(/^(.)\1+$/)?b.slice(0,1):"";for(d=o("[^"+X()+d+"]["+X()+d+"]");a>0&&!d.test(this.slice(a-1,a+1))&&c!==i;)a--;return this.slice(0,
+a)+(a>0?b:"")},assign:function(){var a=m.extended();y(arguments,function(b,c){if(m.isObject(b))a.merge(b);else a[c+1]=b});return this.replace(/\{(.+?)\}/g,function(b,c){return a.hasOwnProperty(c)?a[c]:b})},compare:function(a,b){var c=this;a=String(a);if(b===i)b=/\W/g;if(b){a=a.remove(b);c=c.remove(b)}return c==a?0:c<a?-1:1}});
+u(r,i,function(a){return!m.isRegExp(a)},{split:function(a,b){var c=[],d=0;a=o(a).addFlag("g");var e,f,g,h;o.c||(e=RegExp("^"+a.source+"$(?!\\s)",a.getFlags()));if(B(b)||+b<0)b=Infinity;else{b=(+b).floor();if(!b)return[]}for(;f=a.exec(this);){g=f.index+f[0].length;if(g>d){c.push(this.slice(d,f.index));!o.c&&f.length>1&&f[0].replace(e,function(){for(var l=1;l<arguments.length-2;l++)if(B(arguments[l]))f[l]=void 0});f.length>1&&f.index<this.length&&n.prototype.push.apply(c,f.slice(1));h=f[0].length;d=
+g;if(c.length>=b)break}a.lastIndex===f.index&&a.lastIndex++}if(d===this.length){if(h||!a.test(""))c.push("")}else c.push(this.slice(d));return c.length>b?c.slice(0,b):c}});u(r,i,k,{insert:r.prototype.add});o.c=B(o("()??").exec("")[1]);function Z(a,b){var c="";if(b=="g"||a.global)c+="g";if(b=="i"||a.ignoreCase)c+="i";if(b=="m"||a.multiline)c+="m";if(b=="y"||a.f)c+="y";return c}u(o,k,k,{escape:function(a){m.isString(a)||(a=String(a));return a.replace(/([/'*+?|()\[\]{}.^$])/g,"\\$1")}});
+u(o,i,k,{getFlags:function(){return Z(this)},setFlags:function(a){return o(this.source,a)},addFlag:function(a){return this.setFlags(Z(this,a))},removeFlag:function(a){return this.setFlags(Z(this).replace(a,""))}});function $(a,b,c,d,e){if(!a.b)a.b=[];a.b.push(setTimeout(function(){a.b.removeAt(f);c.apply(d,e||[])},b));var f=a.b.length}
+u(Function,i,k,{lazy:function(a,b){function c(){if(!(g||f.length==0)){for(var p=Math.max(f.length-l,0);f.length>p;)Function.prototype.apply.apply(e,f.shift());$(d,h,function(){g=k;c()});g=i}}function d(){if(!(g&&f.length>b-2)){f.push([this,arguments]);c()}}var e=this,f=[],g=k,h,l;a=a||1;b=b||Infinity;h=a.ceil();l=U(h/a);return d},delay:function(a){m.isNumber(a)||(a=0);var b=G(arguments,1);$(this,a,this,this,b);return this},debounce:function(a,b){var c=this;return b===k?this.lazy(a,1):function(){c.cancel();
$(c,a,c,this,arguments)}},cancel:function(){if(m.isArray(this.b))for(;this.b.length>0;)clearTimeout(this.b.shift());return this},after:function(a){var b=this,c=0,d=[];if(m.isNumber(a)){if(a===0){b.call();return b}}else a=1;return function(){var e;d.push(Array.create(arguments));c++;if(c==a){e=b.call(this,d);c=0;d=[];return e}}},once:function(){var a=this;return function(){return a.hasOwnProperty("memo")?a.memo:a.memo=a.apply(this,arguments)}},fill:function(){var a=this,b=G(arguments);return function(){var c=
G(arguments);I(b,function(d,e){if(L(d)||e>=c.length)c.splice(e,0,d)});return a.apply(this,c)}}});(function(){var a={};I(["Array","Boolean","Date","Function","Number","String","RegExp"],function(b){a["is"+b]=function(c){return D(c,b)}});u(Object,k,k,a)})();A(["keys","values","each","merge","isEmpty","clone","equal","watch","tap"],P);
-(function(a){if(!L(this.btoa)){var b=/[^A-Za-z0-9\+\/\=]/g;btoa=function(c){var d="",e,f,g,i,l,p,N=0;do{e=c.charCodeAt(N++);f=c.charCodeAt(N++);g=c.charCodeAt(N++);i=e>>2;e=(e&3)<<4|f>>4;l=(f&15)<<2|g>>6;p=g&63;if(isNaN(f))l=p=64;else if(isNaN(g))p=64;d=d+a.charAt(i)+a.charAt(e)+a.charAt(l)+a.charAt(p)}while(N<c.length);return d};atob=function(c){var d="",e,f,g,i,l,p=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(c.charAt(p++));
-f=a.indexOf(c.charAt(p++));i=a.indexOf(c.charAt(p++));l=a.indexOf(c.charAt(p++));e=e<<2|f>>4;f=(f&15)<<4|i>>2;g=(i&3)<<6|l;d+=e.chr();if(i!=64)d+=f.chr();if(l!=64)d+=g.chr()}while(p<c.length);return unescape(d)}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
-(function(){var a=X().match(/^\s+$/);try{r.prototype.trim.call([1])}catch(b){a=k}var c=o("^["+X()+"]+"),d=o("["+X()+"]+$");u(r,h,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(c,"")},trimRight:function(){return this.replace(d,"")}})})();
-(function(){var a;I(fa,function(b){b.start.upto(b.end,function(c){Y(b.type,c.chr(),(c+b.shift).chr())})});"\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb".each(function(b,c){a="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65".charAt(c);
-Y("k",a,b);b.match(ka)&&Y("k",a+"\uff9e",b.shift(1));b.match(la)&&Y("k",a+"\uff9f",b.shift(2))});"\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1".each(function(b,c){Y("p","\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3".charAt(c),b)});Y("k","\uff73\uff9e","\u30f4");Y("k","\uff66\uff9e","\u30fa");Y("s"," ","\u3000")})();
+(function(a){if(!L(this.btoa)){var b=/[^A-Za-z0-9\+\/\=]/g;btoa=function(c){var d="",e,f,g,h,l,p,O=0;do{e=c.charCodeAt(O++);f=c.charCodeAt(O++);g=c.charCodeAt(O++);h=e>>2;e=(e&3)<<4|f>>4;l=(f&15)<<2|g>>6;p=g&63;if(isNaN(f))l=p=64;else if(isNaN(g))p=64;d=d+a.charAt(h)+a.charAt(e)+a.charAt(l)+a.charAt(p)}while(O<c.length);return d};atob=function(c){var d="",e,f,g,h,l,p=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(c.charAt(p++));
+f=a.indexOf(c.charAt(p++));h=a.indexOf(c.charAt(p++));l=a.indexOf(c.charAt(p++));e=e<<2|f>>4;f=(f&15)<<4|h>>2;g=(h&3)<<6|l;d+=e.chr();if(h!=64)d+=f.chr();if(l!=64)d+=g.chr()}while(p<c.length);return unescape(d)}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
+(function(){var a=X().match(/^\s+$/);try{r.prototype.trim.call([1])}catch(b){a=k}var c=o("^["+X()+"]+"),d=o("["+X()+"]+$");u(r,i,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(c,"")},trimRight:function(){return this.replace(d,"")}})})();
+(function(){var a;I(ga,function(b){b.start.upto(b.end,function(c){Y(b.type,c.chr(),(c+b.shift).chr())})});"\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb".each(function(b,c){a="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65".charAt(c);
+Y("k",a,b);b.match(la)&&Y("k",a+"\uff9e",b.shift(1));b.match(ma)&&Y("k",a+"\uff9f",b.shift(2))});"\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1".each(function(b,c){Y("p","\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3".charAt(c),b)});Y("k","\uff73\uff9e","\u30f4");Y("k","\uff66\uff9e","\u30fa");Y("s"," ","\u3000")})();
[{a:["Arabic"],source:"\u0600-\u06ff"},{a:["Cyrillic"],source:"\u0400-\u04ff"},{a:["Devanagari"],source:"\u0900-\u097f"},{a:["Greek"],source:"\u0370-\u03ff"},{a:["Hangul"],source:"\uac00-\ud7af\u1100-\u11ff"},{a:["Han","Kanji"],source:"\u4e00-\u9fff\uf900-\ufaff"},{a:["Hebrew"],source:"\u0590-\u05ff"},{a:["Hiragana"],source:"\u3040-\u309f\u30fb-\u30fc"},{a:["Kana"],source:"\u3040-\u30ff\uff61-\uff9f"},{a:["Katakana"],source:"\u30a0-\u30ff\uff61-\uff9f"},{a:["Latin"],source:"\u0001-\u0080-\u00ff\u0100-\u017f\u0180-\u024f"},
{a:["Thai"],source:"\u0e00-\u0e7f"}].each(function(a){var b=o("^["+a.source+"\\s]+$"),c=o("["+a.source+"]");a.a.each(function(d){x(r.prototype,"is"+d,function(){return b.test(this.trim())});x(r.prototype,"has"+d,function(){return c.test(this)})})});
-(function(){var a=k;if(Function.prototype.f){a=function(){};var b=a.f();a=new b instanceof b&&!(new a instanceof b)}u(Function,h,!a,{bind:function(c){var d=this,e=G(arguments,1),f,g;if(!m.isFunction(this))throw new TypeError("Function.prototype.bind called on a non-function");g=function(){return d.apply(d.prototype&&this instanceof d?this:c,e.concat(G(arguments)))};f=function(){};f.prototype=this.prototype;g.prototype=new f;return g}})})();v(q);})();
+(function(){var a=k;if(Function.prototype.d){a=function(){};var b=a.d();a=new b instanceof b&&!(new a instanceof b)}u(Function,i,!a,{bind:function(c){var d=this,e=G(arguments,1),f,g;if(!m.isFunction(this))throw new TypeError("Function.prototype.bind called on a non-function");g=function(){return d.apply(d.prototype&&this instanceof d?this:c,e.concat(G(arguments)))};f=function(){};f.prototype=this.prototype;g.prototype=new f;return g}})})();v(q);})(this);
View
46 release/edge/minified/sugar-edge-dates-only.min.js
@@ -6,7 +6,7 @@
* http://sugarjs.com/
*
* ---------------------------- */
-(function(){var i=true,j=false;function k(a){return function(){return a}}var l=Object,o=Array,r=RegExp,s=Date,t=String,u=Number,aa=l.defineProperty&&l.defineProperties;function v(a,b,c,d){var f=b?a.prototype:a;w(d,function(g,h){if(typeof c==="function")x(f,g,ba(f[g],h,c));else if(c===i||!f[g])x(f,g,h)})}function ba(a,b,c){return function(){return a&&(c===i||c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}
+(function(context){var i=true,j=false;function k(a){return function(){return a}}var l=Object,o=Array,r=RegExp,s=Date,t=String,u=Number,aa=l.defineProperty&&l.defineProperties;function v(a,b,c,d){var f=b?a.prototype:a;w(d,function(g,h){if(typeof c==="function")x(f,g,ba(f[g],h,c));else if(c===i||!f[g])x(f,g,h)})}function ba(a,b,c){return function(){return a&&(c===i||c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}
function x(a,b,c){if(aa)l.defineProperty(a,b,{value:c,configurable:i,enumerable:j,writable:i});else a[b]=c}function w(a,b){var c=0,d;for(d in a)if(a.hasOwnProperty(d)){b.call(a,d,a[d],c);c++}}function z(a,b,c,d){return a===b?i:l.isRegExp(b)?r(b).test(a):l.isFunction(b)?b.apply(c,[a].concat(d)):l.equal(b,a)}function A(a,b,c,d){return B(b)?a:l.isFunction(b)?b.apply(c,d||[]):l.isFunction(a[b])?a[b].call(a):a[b]}function da(a,b,c,d){a=Array.prototype.slice.call(a,void 0);if(c!==j)a=C(a);D(a,b,d)}
function B(a){return a===void 0}function E(a){return a!==void 0}function F(a,b,c,d){typeof b=="object"&&w(b,function(f,g){var h=a[f],e=E(h),m=l.isArray(g);if(c===i&&(m||l.isObject(g))){h||(h=m?[]:{});F(h,g,c)}else if(e&&l.isFunction(d))h=d.call(b,f,a[f],b[f]);else if(!e||e&&d!==j)h=b[f];if(E(h))a[f]=h});return a}
v(l,j,j,{isObject:function(a){return a===null||B(a)?j:l.prototype.toString.call(a)==="[object Object]"&&a.constructor===l},each:function(a,b){b&&w(a,function(c,d){b.call(a,c,d,a)});return a},merge:function(a,b,c){return F(a,b,i,c)}});function D(a,b,c,d){var f;G(b);if(c<0)c=a.length+c;c=isNaN(c)?0:parseInt(c>>0);for(d=d===i?a.length+c:a.length;c<d;){f=c%a.length;if(b.call(a,a[f],f,a)===j)break;c++}}
@@ -23,10 +23,10 @@ function M(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u200
v(t,i,j,{capitalize:function(a){return this.toLowerCase().replace(a?/\b[a-z]/g:/^[a-z]/,function(b){return b.toUpperCase()})},repeat:function(a){var b="",c=0;if(l.isNumber(a)&&a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},first:function(a){a=B(a)?1:a;return this.substr(0,a)},last:function(a){a=B(a)?1:a;return this.substr(this.length-a<0?0:this.length-a)},to:function(a){if(B(a))a=this.length;return this.slice(0,
a)},toDate:function(a){return L([this.toString(),a])},assign:function(){var a={};da(arguments,function(b,c){if(l.isObject(b))l.merge(a,b);else a[c+1]=b});return this.replace(/\{(.+?)\}/g,function(b,c){return a.hasOwnProperty(c)?a[c]:b})}});
var N=["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"],O="(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(?:\\.(\\d{1,6}))?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?",P="\\s*(?:(?:t|at |\\s+)"+O+")?",Q="\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",R="\u5341\u767e\u5343\u4e07",ga=r("["+Q+R+"]","g"),S=[],T,U,ha=[{src:"(\\d{4})",to:["year"]},{src:"([+-])?(\\d{4})[-.]?({month})[-.]?(\\d{1,2})?",to:["year_sign","year","month","date"]},{src:"(\\d{1,2})[-.\\/]({month})[-.\\/]?(\\d{2,4})?",
-to:["month","date","year"],i:i},{src:"\\/Date\\((\\d+(?:\\+\\d{4})?)\\)\\/",to:["timestamp"],s:j}],ia=[{c:"f{1,4}|ms|milliseconds",b:function(a){return a.getMilliseconds()}},{c:"ss?|seconds",b:function(a){return a.getSeconds()}},{c:"mm?|minutes",b:function(a){return a.getMinutes()}},{c:"hh?|hours|12hr",b:function(a){a=a.getHours(void 0);return a===0?12:a-(a/13).floor()*12}},{c:"HH?|24hr",b:function(a){return a.getHours()}},{c:"dd?|date|day",b:function(a){return a.getDate()}},{c:"dow|weekday",j:i,
-b:function(a,b,c){return b.weekdays[a.getDay()+(c-1)*7]}},{c:"MM?",b:function(a){return a.getMonth()+1}},{c:"mon|month",j:i,b:function(a,b,c){return b.months[a.getMonth()+(c-1)*12]}},{c:"y{2,4}|year",b:function(a){return a.getFullYear()}},{c:"[Tt]{1,2}",b:function(a,b,c,d){a=a.getHours(void 0)<12?"am":"pm";if(d.length===1)a=a.first();if(d.first()==="T")a=a.toUpperCase();return a}},{c:"z{1,4}|tz|timezone",text:i,b:function(a,b,c,d){a=a.getUTCOffset();if(d=="z"||d=="zz")a=a.replace(/(\d{2})(\d{2})/,
-function(f,g){return g.toNumber().pad(d.length)});return a}},{c:"iso(tz|timezone)",b:function(a){return a.getUTCOffset(i)}},{c:"ord",b:function(a){return a.getDate().ordinalize()}}],V=[{a:"year",method:"FullYear",d:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{a:"month",method:"Month",d:function(a,b){var c=30.4375,d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{a:"week",method:"Week",d:k(6048E5)},{a:"day",method:"Date",d:k(864E5)},{a:"hour",method:"Hours",
-d:k(36E5)},{a:"minute",method:"Minutes",d:k(6E4)},{a:"second",method:"Seconds",d:k(1E3)},{a:"millisecond",method:"Milliseconds",d:k(1)}],W={},ja={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit=4-5} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",
+to:["month","date","year"],h:i},{src:"\\/Date\\((\\d+(?:\\+\\d{4})?)\\)\\/",to:["timestamp"],r:j}],ia=[{b:"f{1,4}|ms|milliseconds",format:function(a){return a.getMilliseconds()}},{b:"ss?|seconds",format:function(a){return a.getSeconds()}},{b:"mm?|minutes",format:function(a){return a.getMinutes()}},{b:"hh?|hours|12hr",format:function(a){a=a.getHours(void 0);return a===0?12:a-(a/13).floor()*12}},{b:"HH?|24hr",format:function(a){return a.getHours()}},{b:"dd?|date|day",format:function(a){return a.getDate()}},
+{b:"dow|weekday",i:i,format:function(a,b,c){return b.weekdays[a.getDay()+(c-1)*7]}},{b:"MM?",format:function(a){return a.getMonth()+1}},{b:"mon|month",i:i,format:function(a,b,c){return b.months[a.getMonth()+(c-1)*12]}},{b:"y{2,4}|year",format:function(a){return a.getFullYear()}},{b:"[Tt]{1,2}",format:function(a,b,c,d){a=a.getHours(void 0)<12?"am":"pm";if(d.length===1)a=a.first();if(d.first()==="T")a=a.toUpperCase();return a}},{b:"z{1,4}|tz|timezone",text:i,format:function(a,b,c,d){a=a.getUTCOffset();
+if(d=="z"||d=="zz")a=a.replace(/(\d{2})(\d{2})/,function(f,g){return g.toNumber().pad(d.length)});return a}},{b:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(i)}},{b:"ord",format:function(a){return a.getDate().ordinalize()}}],V=[{a:"year",method:"FullYear",c:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{a:"month",method:"Month",c:function(a,b){var c=30.4375,d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{a:"week",method:"Week",c:k(6048E5)},
+{a:"day",method:"Date",c:k(864E5)},{a:"hour",method:"Hours",c:k(36E5)},{a:"minute",method:"Minutes",c:k(6E4)},{a:"second",method:"Seconds",c:k(1E3)},{a:"millisecond",method:"Milliseconds",c:k(1)}],W={},ja={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit=4-5} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",
ja:"1;\u6708;;\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5;\u30df\u30ea\u79d2,\u79d2,\u5206,\u6642\u9593,\u65e5,\u9031\u9593|\u9031,\u30f6\u6708|\u30f5\u6708|\u6708,\u5e74;;;;{num}{unit}{sign},{shift}{unit=5-7}{weekday?},{year}\u5e74{month?}\u6708?{date?}\u65e5?,{month}\u6708{date?}\u65e5?,{date}\u65e5;{yyyy}\u5e74{M}\u6708{d}\u65e5;\u4e00\u6628\u65e5,\u6628\u65e5,\u4eca\u65e5,\u660e\u65e5,\u660e\u5f8c\u65e5;,\u524d,,\u5f8c;,\u53bb|\u5148,,\u6765",
ko:"1;\uc6d4;;\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c;\ubc00\ub9ac\ucd08,\ucd08,\ubd84,\uc2dc\uac04,\uc77c,\uc8fc,\uac1c\uc6d4|\ub2ec,\ub144;\uc77c|\ud55c,\uc774,\uc0bc,\uc0ac,\uc624,\uc721,\uce60,\ud314,\uad6c,\uc2ed;;;{num}{unit} {sign},{shift} {unit=5-7},{shift} {unit=5?} {weekday},{year}\ub144{month?}\uc6d4?{date?}\uc77c?,{month}\uc6d4{date?}\uc77c?,{date}\uc77c;{yyyy}\ub144{M}\uc6d4{d}\uc77c;\uadf8\uc800\uaed8,\uc5b4\uc81c,\uc624\ub298,\ub0b4\uc77c,\ubaa8\ub808;,\uc804,,\ud6c4;,\uc9c0\ub09c|\uc791,\uc774\ubc88,\ub2e4\uc74c|\ub0b4",
ru:"4;;\u042f\u043d\u0432\u0430\u0440:\u044f|\u044c,\u0424\u0435\u0432\u0440\u0430\u043b:\u044f|\u044c,\u041c\u0430\u0440\u0442:\u0430|,\u0410\u043f\u0440\u0435\u043b:\u044f|\u044c,\u041c\u0430:\u044f|\u0439,\u0418\u044e\u043d:\u044f|\u044c,\u0418\u044e\u043b:\u044f|\u044c,\u0410\u0432\u0433\u0443\u0441\u0442:\u0430|,\u0421\u0435\u043d\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041e\u043a\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041d\u043e\u044f\u0431\u0440:\u044f|\u044c,\u0414\u0435\u043a\u0430\u0431\u0440:\u044f|\u044c;\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0412\u0442\u043e\u0440\u043d\u0438\u043a,\u0421\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440\u0433,\u041f\u044f\u0442\u043d\u0438\u0446\u0430,\u0421\u0443\u0431\u0431\u043e\u0442\u0430;\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u043c\u0438\u043d\u0443\u0442:\u0430|\u0443|\u044b|,\u0447\u0430\u0441:||\u0430|\u043e\u0432,\u0434\u0435\u043d\u044c|\u0434\u0435\u043d\u044c|\u0434\u043d\u044f|\u0434\u043d\u0435\u0439,\u043d\u0435\u0434\u0435\u043b:\u044f|\u044e|\u0438|\u044c|\u0435,\u043c\u0435\u0441\u044f\u0446:||\u0430|\u0435\u0432|\u0435,\u0433\u043e\u0434|\u0433\u043e\u0434|\u0433\u043e\u0434\u0430|\u043b\u0435\u0442|\u0433\u043e\u0434\u0443;\u043e\u0434:\u0438\u043d|\u043d\u0443,\u0434\u0432:\u0430|\u0435,\u0442\u0440\u0438,\u0447\u0435\u0442\u044b\u0440\u0435,\u043f\u044f\u0442\u044c,\u0448\u0435\u0441\u0442\u044c,\u0441\u0435\u043c\u044c,\u0432\u043e\u0441\u0435\u043c\u044c,\u0434\u0435\u0432\u044f\u0442\u044c,\u0434\u0435\u0441\u044f\u0442\u044c;;\u0432|\u043d\u0430,\u0433\u043e\u0434\u0430;{num} {unit} {sign},{sign} {num} {unit},{date} {month} {year?} {2},{month} {year},{1} {shift} {unit=5-7};{d} {month} {yyyy} \u0433\u043e\u0434\u0430;\u043f\u043e\u0437\u0430\u0432\u0447\u0435\u0440\u0430,\u0432\u0447\u0435\u0440\u0430,\u0441\u0435\u0433\u043e\u0434\u043d\u044f,\u0437\u0430\u0432\u0442\u0440\u0430,\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430;,\u043d\u0430\u0437\u0430\u0434,,\u0447\u0435\u0440\u0435\u0437;,\u043f\u0440\u043e\u0448\u043b\u043e:\u0439|\u043c,,\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435:\u0439|\u043c",
@@ -36,34 +36,34 @@ fr:"2;;janvier,f\u00e9vrier|fevrier,mars,avril,mai,juin,juillet,ao\u00fbt,septem
it:"2;;Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre;Domenica,Luned:\u00ec|i,Marted:\u00ec|i,Mercoled:\u00ec|i,Gioved:\u00ec|i,Venerd:\u00ec|i,Sabato;millisecond:o|i,second:o|i,minut:o|i,or:a|e,giorn:o|i,settiman:a|e,mes:e|i,ann:o|i;un:|'|a|o,due,tre,quattro,cinque,sei,sette,otto,nove,dieci;;l'|la|il;{num} {unit} {sign},{weekday?} {date?} {month} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} {month} {yyyy};,ieri,oggi,domani,dopodomani;,fa,,da adesso;,scors:o|a,,prossim:o|a",
de:"2;;Januar,Februar,M\u00e4rz|Marz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember;Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag;Millisekunde:|n,Sekunde:|n,Minute:|n,Stunde:|n,Tag:|en,Woche:|n,Monat:|en,Jahr:|en;ein:|e|er|em|en,zwei,drei,vier,fuenf,sechs,sieben,acht,neun,zehn;;der;{sign} {num} {unit},{num} {unit} {sign},{num} {unit} {sign},{sign} {num} {unit},{weekday?} {date?} {month} {year?},{shift} {unit=5-7};{d}. {Month} {yyyy};vorgestern,gestern,heute,morgen,\u00fcbermorgen|ubermorgen|uebermorgen;,vor:|her,,in;,letzte:|r|n|s,,n\u00e4chste:|r|n|s+naechste:|r|n|s",
"zh-TW":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u9418,\u5206\u9418,\u5c0f\u6642,\u5929,\u500b\u661f\u671f|\u9031,\u500b\u6708,\u5e74;;;\u65e5|\u865f;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}{1},{month}\u6708{date?}{1},{date}{1};{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u5f8c\u5929;,\u524d,,\u5f8c;,\u4e0a|\u53bb,\u9019,\u4e0b|\u660e","zh-CN":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u949f,\u5206\u949f,\u5c0f\u65f6,\u5929,\u4e2a\u661f\u671f|\u5468,\u4e2a\u6708,\u5e74;;;\u65e5|\u53f7;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}{1},{month}\u6708{date?}{1},{date}{1};{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u540e\u5929;,\u524d,,\u540e;,\u4e0a|\u53bb,\u8fd9,\u4e0b|\u660e"};
-function ka(a){var b=s.addFormat,c=a.code;if(!a.m){b("("+a.months.compact().join("|")+")",["month"],c);b("("+a.weekdays.compact().join("|")+")",["weekday"],c);b("("+a.modifiers.filter(function(d){return d.name==="day"}).map("text").join("|")+")",["day"],c);D(a.formats,function(d){var f=[];d=d.replace(/\s+/g,"[-,. ]*");d=d.replace(/\{(.+?)\}/g,function(g,h){var e=h.match(/\?$/),m=h.match(/(\d)(?:-(\d))?/),q=h.match(/^\d+$/),n=h.replace(/[^a-z]+$/,""),p,y;if(n==="time"){f=f.concat(N);return e?P:O}if(q)p=
-a.optionals[q[0]-1];else if(a[n])p=a[n];else if(a[n+"s"]){p=a[n+"s"];if(m){y=[];D(p,function(oa,pa){var ca=pa%(a.units?8:p.length);if(ca>=m[1]&&ca<=(m[2]||m[1]))y.push(oa)});p=y}p=p.compact().join("|")}if(q)return"(?:"+p+")?";else{f.push(n);return"("+p+")"+(e?"?":"")}});b(d,f,c)});a.m=i}}function X(a,b,c){if(b&&(!l.isString(a)||!a))a=Date.currentLocale;a&&!W[a]&&la(a,c);return W[a]}
+function ka(a){var b=s.addFormat,c=a.code;if(!a.l){b("("+a.months.compact().join("|")+")",["month"],c);b("("+a.weekdays.compact().join("|")+")",["weekday"],c);b("("+a.modifiers.filter(function(d){return d.name==="day"}).map("text").join("|")+")",["day"],c);D(a.formats,function(d){var f=[];d=d.replace(/\s+/g,"[-,. ]*");d=d.replace(/\{(.+?)\}/g,function(g,h){var e=h.match(/\?$/),m=h.match(/(\d)(?:-(\d))?/),q=h.match(/^\d+$/),n=h.replace(/[^a-z]+$/,""),p,y;if(n==="time"){f=f.concat(N);return e?P:O}if(q)p=
+a.optionals[q[0]-1];else if(a[n])p=a[n];else if(a[n+"s"]){p=a[n+"s"];if(m){y=[];D(p,function(oa,pa){var ca=pa%(a.units?8:p.length);if(ca>=m[1]&&ca<=(m[2]||m[1]))y.push(oa)});p=y}p=p.compact().join("|")}if(q)return"(?:"+p+")?";else{f.push(n);return"("+p+")"+(e?"?":"")}});b(d,f,c)});a.l=i}}function X(a,b,c){if(b&&(!l.isString(a)||!a))a=Date.currentLocale;a&&!W[a]&&la(a,c);return W[a]}
function la(a,b){function c(g,h){g=g.split("+").map(function(e){return e.replace(/(.+):(.+)$/,function(m,q,n){return n.split("|").map(function(p){return q+p}).join("|")})}).join("|");return D(g.split("|"),h)}function d(g,h,e){var m=[];if(b[g]){D(b[g],function(q,n){c(q,function(p,y){m[y*e+n]=p.toLowerCase()})});if(h)m=m.concat(b[g].map(function(q){return q.slice(0,3).toLowerCase()}));return b[g]=m}}function f(g,h){var e="[0-9\uff10-\uff19]"+(g?"{"+g+","+h+"}":"+");if(b.digits)e+="|["+b.digits+"]+";
-return e}b=b||ma(a);if(!b)throw Error("Invalid locale.");d("months",i,12);d("weekdays",i,7);d("units",j,8);d("numbers",j,10);b.code=a;b.date=f(1,2);b.year=f(4,4);b.num=function(){var g=[f()].concat(b.articles);b.digits||(g=g.concat(b.numbers));return g.compact().join("|")}();(function(){var g=[];b.g={};D(b.modifiers,function(h){c(h.text,function(e){b.g[e]=h;g.push({name:h.name,text:e,value:h.value})})});g.groupBy("name",function(h,e){e=e.map("text");if(h==="day")e=e.concat(b.weekdays);b[h]=e.join("|")});
+return e}b=b||ma(a);if(!b)throw Error("Invalid locale.");d("months",i,12);d("weekdays",i,7);d("units",j,8);d("numbers",j,10);b.code=a;b.date=f(1,2);b.year=f(4,4);b.num=function(){var g=[f()].concat(b.articles);b.digits||(g=g.concat(b.numbers));return g.compact().join("|")}();(function(){var g=[];b.f={};D(b.modifiers,function(h){c(h.text,function(e){b.f[e]=h;g.push({name:h.name,text:e,value:h.value})})});g.groupBy("name",function(h,e){e=e.map("text");if(h==="day")e=e.concat(b.weekdays);b[h]=e.join("|")});
b.modifiers=g})();if(b.monthSuffix){b.month=f(1,2);b.months=ea(1,12,null,1).map(function(g){return g+b.monthSuffix})}W[a]=new na(b)}
function ma(a){function b(f){return!!(d[0]&Math.pow(2,f-1))}if(a.slice(0,3)=="en-")a="en";if(!ja[a])return null;var c={modifiers:[]},d=ja[a].split(";");D(["months","weekdays","units","numbers","articles","optionals","formats"],function(f,g){c[f]=d[g+2]?d[g+2].split(","):[]});c.outputFormat=d[9];D(["day","sign","shift","edge"],function(f,g){d[g+10]&&D(d[g+10].split(","),function(h,e){h&&c.modifiers.push({name:f,text:h,value:e-2})})});if(b(1)){c.digits=Q+R;if(c.numbers.length>0)c.digits+=c.numbers.join("");
else c.numbers=Q.split("");c.monthSuffix=d[1]}c.capitalizeUnit=a=="de";c.hasPlural=b(2);c.pastRelativeFormat=c.formats[0];c.futureRelativeFormat=c.formats[b(3)?1:0];return c}function qa(a){a||(a=Date.currentLocale);return a!="en"&&a!="en-US"}function na(a){l.merge(this,a)}
-v(na,i,j,{getMonth:function(a){return l.isNumber(a)?a-1:H(this.months,r(a,"i"),0,j,i)%12},l:function(a){return H(this.weekdays,r(a,"i"),0,j,i)%7},k:function(a){var b;return l.isNumber(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},o:function(a){var b=this;return a.replace(this.numbers[9],"").replace(/./g,function(c){return b.k(c)})},n:function(a){return English.units[this.units.indexOf(a)%8]},r:function(a,b,c){var d,f;d=c>0?this.futureRelativeFormat:this.pastRelativeFormat;if(this.code=="ru"){f=
+v(na,i,j,{getMonth:function(a){return l.isNumber(a)?a-1:H(this.months,r(a,"i"),0,j,i)%12},k:function(a){return H(this.weekdays,r(a,"i"),0,j,i)%7},j:function(a){var b;return l.isNumber(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},n:function(a){var b=this;return a.replace(this.numbers[9],"").replace(/./g,function(c){return b.j(c)})},m:function(a){return English.units[this.units.indexOf(a)%8]},q:function(a,b,c){var d,f;d=c>0?this.futureRelativeFormat:this.pastRelativeFormat;if(this.code=="ru"){f=
a.toString().slice(-1);switch(i){case f==1:f=1;break;case f>=2&&f<=4:f=2;break;default:f=3}}else f=this.hasPlural&&a>1?1:0;f=this.units[f*8+b]||this.units[b];if(this.capitalizeUnit)f=f.capitalize();b=H(this.modifiers,function(g){return g.name=="sign"&&g.value==(c>0?1:-1)});return d.assign({num:a,unit:f,sign:b.text})}});function Y(a){var b;if(typeof a[0]=="object")return a;else if(a.length==1&&l.isNumber(a[0]))return[a[0]];b={};D(T,function(c,d){b[c.a]=a[d]});return[b]}
-function ra(a,b){a=a.replace(/[\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19\uff10]/g,function(c){return String.fromCharCode(c.charCodeAt(0)-65248)});if(b!="date"&&b!="month"&&b!="year")return a;return a.replace(ga,function(c){return Q.indexOf(c)+1||""})}function sa(a,b){var c={},d,f;D(b,function(g,h){d=a[h+1];if(!(B(d)||d==="")){d=ra(d,g);if(g==="year")c.t=d;if(g==="millisecond")d*=Math.pow(10,3-d.length);f=parseFloat(d);c[g]=!isNaN(f)?f:d.toLowerCase()}});return c}
-function ta(a,b){var c=new s,d=j,f,g,h,e,m,q,n;if(l.isDate(a))c=a;else if(l.isNumber(a))c=new s(a);else if(l.isObject(a)){c=(new s).set(a,i);e=a}else if(l.isString(a)){ka(X(b,i));g=qa(b);a=a.trim().replace(/\.+$/,"").replace(/^now$/,"");D(S,function(p){var y=a.match(p.q);if(y){h=p;e=sa(y,h.to);f=X(h.p,i);if(e.timestamp){c.setTime(0);e={milliseconds:e.timestamp};return j}if(h.i&&!l.isString(e.month)&&(l.isString(e.date)||g)){n=e.month;e.month=e.date;e.date=n}if(e.year&&e.t.length===2)e.year=K((new s).getFullYear()/
-100)*100-K(e.year/100)*100+e.year;if(e.month){e.month=f.getMonth(e.month);if(e.shift&&!e.unit)e.unit="year"}if(e.weekday&&e.date)delete e.weekday;else if(e.weekday){e.weekday=f.l(e.weekday);if(e.shift&&!e.unit)e.unit="week"}if(e.day&&(n=f.g[e.day])){e.day=n.value;c.resetTime();d=i}else if(e.day&&(n=f.l(e.day))>-1){delete e.day;e.weekday=n}if(e.date&&!l.isNumber(e.date))e.date=f.o(e.date);if(e.meridian)if(e.meridian==="pm"&&e.hour<12)e.hour+=12;if(e.offset_hours||e.offset_minutes){e.utc=i;e.offset_minutes=
-e.offset_minutes||0;e.offset_minutes+=e.offset_hours*60;if(e.offset_sign==="-")e.offset_minutes*=-1;e.minute-=e.offset_minutes}if(e.unit){d=i;q=f.k(e.num);m=f.n(e.unit);if(e.shift||e.edge){q*=(n=f.g[e.shift])?n.value:0;if(m==="month"&&E(e.date)){c.set({day:e.date},i);delete e.date}if(m==="year"&&E(e.month)){c.set({month:e.month,day:e.date},i);delete e.month;delete e.date}}if(e.sign&&(n=f.g[e.sign]))q*=n.value;if(E(e.weekday)){c.set({weekday:e.weekday},i);delete e.weekday}e[m]=(e[m]||0)+q}if(e.year_sign===
-"-")e.year*=-1;return j}});if(h)if(d)c.advance(e);else e.utc?c.setUTC(e,i):c.set(e,i);else c=a?new s(a):new s;if(e&&e.edge){n=f.g[e.edge];D(U.slice(4),function(p){if(E(e[p.a])){m=p.a;return j}});if(m==="year")e.e="month";else if(m==="month"||m==="week")e.e="day";c[(n.value<0?"endOf":"beginningOf")+m.capitalize()]();n.value===-2&&c.resetTime()}}return{f:c,set:e}}
-function Z(a,b,c,d){var f,g=X(d,i),h=r(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(l.isFunction(b)){f=ua(a);b=b.apply(a,f.concat(g))}}else return"Invalid Date";if(!b&&!c)b=g.outputFormat;else if(!b&&c){f=f||ua(a);if(f[1]===0){f[1]=1;f[0]=1}return g.r(f[0],f[1],f[2])}D(ia,function(e){b=b.replace(r("\\{("+e.c+")(\\d)?\\}",e.j?"i":""),function(m,q,n){m=e.b(a,g,n||1,q);n=q.length;var p=q.match(/^(.)\1+$/);if(e.j){if(n===3)m=m.slice(0,3);if(p||q.match(h))m=m.capitalize()}else if(p&&!e.text)m=
-(l.isNumber(m)?m.pad(n):m.toString()).last(n);return m})});return b}function va(a,b,c){var d=ta(b),f=0,g=b=0,h;if(c>0){b=g=c;h=i}if(!d.f.isValid())return j;if(d.set&&d.set.e){D(V,function(m){if(m.a===d.set.e)f=m.d(d.f,a-d.f)-1});if(d.set.edge||d.set.shift)d.f["beginningOf"+d.set.e.capitalize()]();if(!h&&d.set.sign&&d.set.e!="millisecond"){b=50;g=-50}}c=a.getTime();h=d.f.getTime();var e=h+f;if(d.set&&d.set.e=="week"&&(new Date(e+1)).getHours()!=0)e-=s.DSTOffset;return c>=h-b&&c<=e+g}
-function $(a,b,c,d,f){if(l.isNumber(b)&&f)b={milliseconds:b};else if(l.isNumber(b)){a.setTime(b);return a}if(b.date)b.day=b.date;if(!f&&B(b.day)&&E(b.weekday)){a["set"+(d?"UTC":"")+"Weekday"](b.weekday);b.day=a["get"+(d?"UTC":"")+"Date"](void 0);delete b.weekday}D(U,function(g){if(E(b[g.a])||E(b[g.a+"s"])){b.e=g.a;return j}else if(c&&g.a!=="week"&&g.a!=="year")a["set"+(d?"UTC":"")+g.method](g.a==="day"?1:0)});D(V,function(g){var h=g.a;g=g.method;var e=E(b[h])?b[h]:b[h+"s"];if(!B(e)){if(f){if(h===
-"week"){e=(b.day||0)+e*7;g="Date"}e=e*f+a["get"+g](void 0)}a["set"+(d?"UTC":"")+g](e);if(h==="month"){h=e;if(h<0)h+=12;h%12!=a.getMonth()&&a.setDate(0)}}});return a}function ua(a){var b;a=a.millisecondsFromNow();var c=a.abs(),d=c,f=0;D(U.slice(1),function(g,h){b=K(c/g.d(),1).floor();if(b>=1){d=b;f=h+1}});return[d,f,a]}function L(a){var b;b=l.isNumber(a[1])?Y(a)[0]:a[0];return ta(b,a[1]).f}
-v(s,j,j,{create:function(){return L(arguments)},now:function(){return(new s).getTime()},setLocale:function(a,b){var c=X(a,j,b);if(c){Date.currentLocale=a;ka(c);return c}},getLocale:function(a){return X(a,i)},addFormat:function(a,b,c,d){S.push({i:d,p:c,q:r("^"+a+"$","i"),to:b})}});
+function ra(a,b){a=a.replace(/[\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19\uff10]/g,function(c){return String.fromCharCode(c.charCodeAt(0)-65248)});if(b!="date"&&b!="month"&&b!="year")return a;return a.replace(ga,function(c){return Q.indexOf(c)+1||""})}function sa(a,b){var c={},d,f;D(b,function(g,h){d=a[h+1];if(!(B(d)||d==="")){d=ra(d,g);if(g==="year")c.s=d;if(g==="millisecond")d*=Math.pow(10,3-d.length);f=parseFloat(d);c[g]=!isNaN(f)?f:d.toLowerCase()}});return c}
+function ta(a,b){var c=new s,d=j,f,g,h,e,m,q,n;if(l.isDate(a))c=a;else if(l.isNumber(a))c=new s(a);else if(l.isObject(a)){c=(new s).set(a,i);e=a}else if(l.isString(a)){ka(X(b,i));g=qa(b);a=a.trim().replace(/\.+$/,"").replace(/^now$/,"");D(S,function(p){var y=a.match(p.p);if(y){h=p;e=sa(y,h.to);f=X(h.o,i);if(e.timestamp){c.setTime(0);e={milliseconds:e.timestamp};return j}if(h.h&&!l.isString(e.month)&&(l.isString(e.date)||g)){n=e.month;e.month=e.date;e.date=n}if(e.year&&e.s.length===2)e.year=K((new s).getFullYear()/
+100)*100-K(e.year/100)*100+e.year;if(e.month){e.month=f.getMonth(e.month);if(e.shift&&!e.unit)e.unit="year"}if(e.weekday&&e.date)delete e.weekday;else if(e.weekday){e.weekday=f.k(e.weekday);if(e.shift&&!e.unit)e.unit="week"}if(e.day&&(n=f.f[e.day])){e.day=n.value;c.resetTime();d=i}else if(e.day&&(n=f.k(e.day))>-1){delete e.day;e.weekday=n}if(e.date&&!l.isNumber(e.date))e.date=f.n(e.date);if(e.meridian)if(e.meridian==="pm"&&e.hour<12)e.hour+=12;if(e.offset_hours||e.offset_minutes){e.utc=i;e.offset_minutes=
+e.offset_minutes||0;e.offset_minutes+=e.offset_hours*60;if(e.offset_sign==="-")e.offset_minutes*=-1;e.minute-=e.offset_minutes}if(e.unit){d=i;q=f.j(e.num);m=f.m(e.unit);if(e.shift||e.edge){q*=(n=f.f[e.shift])?n.value:0;if(m==="month"&&E(e.date)){c.set({day:e.date},i);delete e.date}if(m==="year"&&E(e.month)){c.set({month:e.month,day:e.date},i);delete e.month;delete e.date}}if(e.sign&&(n=f.f[e.sign]))q*=n.value;if(E(e.weekday)){c.set({weekday:e.weekday},i);delete e.weekday}e[m]=(e[m]||0)+q}if(e.year_sign===
+"-")e.year*=-1;return j}});if(h)if(d)c.advance(e);else e.utc?c.setUTC(e,i):c.set(e,i);else c=a?new s(a):new s;if(e&&e.edge){n=f.f[e.edge];D(U.slice(4),function(p){if(E(e[p.a])){m=p.a;return j}});if(m==="year")e.d="month";else if(m==="month"||m==="week")e.d="day";c[(n.value<0?"endOf":"beginningOf")+m.capitalize()]();n.value===-2&&c.resetTime()}}return{e:c,set:e}}
+function Z(a,b,c,d){var f,g=X(d,i),h=r(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(l.isFunction(b)){f=ua(a);b=b.apply(a,f.concat(g))}}else return"Invalid Date";if(!b&&!c)b=g.outputFormat;else if(!b&&c){f=f||ua(a);if(f[1]===0){f[1]=1;f[0]=1}return g.q(f[0],f[1],f[2])}D(ia,function(e){b=b.replace(r("\\{("+e.b+")(\\d)?\\}",e.i?"i":""),function(m,q,n){m=e.format(a,g,n||1,q);n=q.length;var p=q.match(/^(.)\1+$/);if(e.i){if(n===3)m=m.slice(0,3);if(p||q.match(h))m=m.capitalize()}else if(p&&!e.text)m=
+(l.isNumber(m)?m.pad(n):m.toString()).last(n);return m})});return b}function va(a,b,c){var d=ta(b),f=0,g=b=0,h;if(c>0){b=g=c;h=i}if(!d.e.isValid())return j;if(d.set&&d.set.d){D(V,function(m){if(m.a===d.set.d)f=m.c(d.e,a-d.e)-1});if(d.set.edge||d.set.shift)d.e["beginningOf"+d.set.d.capitalize()]();if(!h&&d.set.sign&&d.set.d!="millisecond"){b=50;g=-50}}c=a.getTime();h=d.e.getTime();var e=h+f;if(d.set&&d.set.d=="week"&&(new Date(e+1)).getHours()!=0)e-=s.DSTOffset;return c>=h-b&&c<=e+g}
+function $(a,b,c,d,f){if(l.isNumber(b)&&f)b={milliseconds:b};else if(l.isNumber(b)){a.setTime(b);return a}if(b.date)b.day=b.date;if(!f&&B(b.day)&&E(b.weekday)){a["set"+(d?"UTC":"")+"Weekday"](b.weekday);b.day=a["get"+(d?"UTC":"")+"Date"](void 0);delete b.weekday}D(U,function(g){if(E(b[g.a])||E(b[g.a+"s"])){b.d=g.a;return j}else if(c&&g.a!=="week"&&g.a!=="year")a["set"+(d?"UTC":"")+g.method](g.a==="day"?1:0)});D(V,function(g){var h=g.a;g=g.method;var e=E(b[h])?b[h]:b[h+"s"];if(!B(e)){if(f){if(h===
+"week"){e=(b.day||0)+e*7;g="Date"}e=e*f+a["get"+g](void 0)}a["set"+(d?"UTC":"")+g](e);if(h==="month"){h=e;if(h<0)h+=12;h%12!=a.getMonth()&&a.setDate(0)}}});return a}function ua(a){var b;a=a.millisecondsFromNow();var c=a.abs(),d=c,f=0;D(U.slice(1),function(g,h){b=K(c/g.c(),1).floor();if(b>=1){d=b;f=h+1}});return[d,f,a]}function L(a){var b;b=l.isNumber(a[1])?Y(a)[0]:a[0];return ta(b,a[1]).e}
+v(s,j,j,{create:function(){return L(arguments)},now:function(){return(new s).getTime()},setLocale:function(a,b){var c=X(a,j,b);if(c){Date.currentLocale=a;ka(c);return c}},getLocale:function(a){return X(a,i)},addFormat:function(a,b,c,d){S.push({h:d,o:c,p:r("^"+a+"$","i"),to:b})}});
v(s,i,j,{set:function(){var a=Y(arguments);return $(this,a[0],a[1])},setUTC:function(){var a=Y(arguments);return $(this,a[0],a[1],i)},setWeekday:function(a){B(a)||this.setDate(this.getDate()+a-this.getDay())},setUTCWeekday:function(a){B(a)||this.setDate(this.getUTCDate()+a-this.getDay())},setWeek:function(a){if(!B(a)){this.setMonth(0);this.setDate(a*7+1)}},setUTCWeek:function(a){if(!B(a)){this.setMonth(0);this.setUTCDate(a*7+1)}},getWeek:function(){return((this.getTime()-(new s(this.getFullYear(),
-0,1)).getTime()+1)/6048E5).ceil()},getUTCWeek:function(){return((this.getTime()-(new s).setUTC(this.getUTCFullYear(),0,1,0,0,0,0).getTime()+1)/6048E5).ceil()},getUTCOffset:function(a){var b=this.h?0:this.getTimezoneOffset(),c=a===i?":":"";if(!b&&a)return"Z";return K(-b/60).pad(2,i)+c+(b%60).pad(2)},toUTC:function(){if(this.h)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.h=i;return a},isUTC:function(){return this.h||this.getTimezoneOffset()===0},advance:function(){var a=Y(arguments);
+0,1)).getTime()+1)/6048E5).ceil()},getUTCWeek:function(){return((this.getTime()-(new s).setUTC(this.getUTCFullYear(),0,1,0,0,0,0).getTime()+1)/6048E5).ceil()},getUTCOffset:function(a){var b=this.g?0:this.getTimezoneOffset(),c=a===i?":":"";if(!b&&a)return"Z";return K(-b/60).pad(2,i)+c+(b%60).pad(2)},toUTC:function(){if(this.g)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.g=i;return a},isUTC:function(){return this.g||this.getTimezoneOffset()===0},advance:function(){var a=Y(arguments);
return $(this,a[0],j,j,1,i)},rewind:function(){var a=Y(arguments);return $(this,a[0],j,j,-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>s.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<s.create(a).getTime()+(b||0)},isBetween:function(a,b,c){var d=this.getTime();a=s.create(a).getTime();var f=s.create(b).getTime();b=Math.min(a,f);a=Math.max(a,f);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=this.getFullYear();return a%
4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-(new s(this.getFullYear(),this.getMonth(),32)).getDate()},format:function(a,b){return Z(this,a,j,b)},relative:function(a,b){if(l.isString(a)){b=a;a=null}return Z(this,a,i,b)},is:function(a,b){var c;if(l.isString(a)){a=a.trim().toLowerCase();switch(i){case a==="future":return this.getTime()>(new s).getTime();case a==="past":return this.getTime()<(new s).getTime();case a==="weekday":return this.getDay()>0&&this.getDay()<6;case a==="weekend":return this.getDay()===
0||this.getDay()===6;case (c=English.weekdays.indexOf(a)%7)>-1:return this.getDay()===c;case (c=English.months.indexOf(a)%12)>-1:return this.getMonth()===c}}return va(this,a,b)},resetTime:function(){return this.set({hour:0,minute:0,second:0,millisecond:0})},clone:function(){return new s(this.getTime())},compare:function(){return this-L(arguments)}});v(s,i,j,{getWeekday:s.prototype.getDay,getUTCWeekday:s.prototype.getUTCDay});
(function(){var a={};D(["Array","Boolean","Date","Function","Number","String","RegExp"],function(b){a["is"+b]=function(c){return l.prototype.toString.call(c)==="[object "+b+"]"}});v(Object,j,j,a)})();(function(){var a=M().match(/^\s+$/);try{t.prototype.trim.call([1])}catch(b){a=j}var c=r("^["+M()+"]+"),d=r("["+M()+"]+$");v(t,i,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(c,"")},trimRight:function(){return this.replace(d,"")}})})();
English=s.setLocale("en");
-D(V,function(a,b){var c=a.a,d=c.capitalize(),f=a.d();x(s.prototype,c+"sSince",function(g,h){return K((this.getTime()-s.create(g,h).getTime())/f)});x(s.prototype,c+"sUntil",function(g,h){return K((s.create(g,h).getTime()-this.getTime())/f)});x(s.prototype,c+"sAgo",s.prototype[c+"sUntil"]);x(s.prototype,c+"sFromNow",s.prototype[c+"sSince"]);x(s.prototype,"add"+d+"s",function(g){var h={};h[c]=g;return this.advance(h)});fa(c,f);b<3&&D(["Last","This","Next"],function(g){x(s.prototype,"is"+g+d,function(){return this.is(g+
+D(V,function(a,b){var c=a.a,d=c.capitalize(),f=a.c();x(s.prototype,c+"sSince",function(g,h){return K((this.getTime()-s.create(g,h).getTime())/f)});x(s.prototype,c+"sUntil",function(g,h){return K((s.create(g,h).getTime()-this.getTime())/f)});x(s.prototype,c+"sAgo",s.prototype[c+"sUntil"]);x(s.prototype,c+"sFromNow",s.prototype[c+"sSince"]);x(s.prototype,"add"+d+"s",function(g){var h={};h[c]=g;return this.advance(h)});fa(c,f);b<3&&D(["Last","This","Next"],function(g){x(s.prototype,"is"+g+d,function(){return this.is(g+
" "+c)})});if(b<4){x(s.prototype,"beginningOf"+d,function(){var g={};switch(c){case "year":g.year=this.getFullYear();break;case "month":g.month=this.getMonth();break;case "day":g.day=this.getDate();break;case "week":g.weekday=0}return this.set(g,i)});x(s.prototype,"endOf"+d,function(){var g={hours:23,minutes:59,seconds:59,milliseconds:999};switch(c){case "year":g.month=11;g.day=31;break;case "month":g.day=this.daysInMonth();break;case "week":g.weekday=6}return this.set(g,i)})}});
-(function(){T=V.concat();T.splice(2,1);U=V.concat().reverse();var a="\\d{1,2}|"+English.months.join("|");D(ha,function(b){s.addFormat(b.src.replace(/\{month\}/,a)+(b.s===j?"":P),b.to.concat(N),"en",b.i)});s.addFormat(O,N)})();(function(){var a=English.weekdays.slice(0,7),b=English.months.slice(0,12);D(["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(a).concat(b),function(c){x(s.prototype,"is"+c.capitalize(),function(){return this.is(c)})})})();
+(function(){T=V.concat();T.splice(2,1);U=V.concat().reverse();var a="\\d{1,2}|"+English.months.join("|");D(ha,function(b){s.addFormat(b.src.replace(/\{month\}/,a)+(b.r===j?"":P),b.to.concat(N),"en",b.h)});s.addFormat(O,N)})();(function(){var a=English.weekdays.slice(0,7),b=English.months.slice(0,12);D(["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(a).concat(b),function(c){x(s.prototype,"is"+c.capitalize(),function(){return this.is(c)})})})();
v(s,j,i,{DSTOffset:((new s(2E3,6,1)).getTimezoneOffset()-(new s(2E3,0,1)).getTimezoneOffset())*60*1E3,INTERNATIONAL_TIME:"{h}:{mm}:{ss}",RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"});
-(function(){var a=new s(s.UTC(1999,11,31));if(!a.toISOString||a.toISOString()!=="1999-12-31T00:00:00.000Z")v(s,i,i,{toISOString:function(){return Z(this.toUTC(),s.ISO8601_DATETIME)}});if(!a.toJSON||a.toJSON()!=="1999-12-31T00:00:00.000Z")v(s,i,i,{toJSON:s.prototype.toISOString});v(s,i,j,{iso:s.prototype.toISOString})})();})();
+(function(){var a=new s(s.UTC(1999,11,31));if(!a.toISOString||a.toISOString()!=="1999-12-31T00:00:00.000Z")v(s,i,i,{toISOString:function(){return Z(this.toUTC(),s.ISO8601_DATETIME)}});if(!a.toJSON||a.toJSON()!=="1999-12-31T00:00:00.000Z")v(s,i,i,{toJSON:s.prototype.toISOString});v(s,i,j,{iso:s.prototype.toISOString})})();})(this);
View
46 release/edge/minified/sugar-edge-dates.min.js
@@ -6,12 +6,12 @@
* http://sugarjs.com/
*
* ---------------------------- */
-(function(){var j=true,k=false;function o(a){return function(){return a}}var p=RegExp,q=Object,s=Date,t=Number;function u(a){return a!==void 0}
+(function(context){var j=true,k=false;function o(a){return function(){return a}}var p=RegExp,q=Object,s=Date,t=Number;function u(a){return a!==void 0}
var v=["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"],w="(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(?:\\.(\\d{1,6}))?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?",x="\\s*(?:(?:t|at |\\s+)"+w+")?",y="\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",z="\u5341\u767e\u5343\u4e07",A=p("["+y+z+"]","g"),B=[],C,D,E=[{src:"(\\d{4})",to:["year"]},{src:"([+-])?(\\d{4})[-.]?({month})[-.]?(\\d{1,2})?",to:["year_sign","year","month","date"]},{src:"(\\d{1,2})[-.\\/]({month})[-.\\/]?(\\d{2,4})?",
-to:["month","date","year"],i:j},{src:"\\/Date\\((\\d+(?:\\+\\d{4})?)\\)\\/",to:["timestamp"],s:k}],F=[{c:"f{1,4}|ms|milliseconds",b:function(a){return a.getMilliseconds()}},{c:"ss?|seconds",b:function(a){return a.getSeconds()}},{c:"mm?|minutes",b:function(a){return a.getMinutes()}},{c:"hh?|hours|12hr",b:function(a){a=a.getHours(void 0);return a===0?12:a-(a/13).floor()*12}},{c:"HH?|24hr",b:function(a){return a.getHours()}},{c:"dd?|date|day",b:function(a){return a.getDate()}},{c:"dow|weekday",j:j,b:function(a,
-b,d){return b.weekdays[a.getDay()+(d-1)*7]}},{c:"MM?",b:function(a){return a.getMonth()+1}},{c:"mon|month",j:j,b:function(a,b,d){return b.months[a.getMonth()+(d-1)*12]}},{c:"y{2,4}|year",b:function(a){return a.getFullYear()}},{c:"[Tt]{1,2}",b:function(a,b,d,e){a=a.getHours(void 0)<12?"am":"pm";if(e.length===1)a=a.first();if(e.first()==="T")a=a.toUpperCase();return a}},{c:"z{1,4}|tz|timezone",text:j,b:function(a,b,d,e){a=a.getUTCOffset();if(e=="z"||e=="zz")a=a.replace(/(\d{2})(\d{2})/,function(g,f){return f.toNumber().pad(e.length)});
-return a}},{c:"iso(tz|timezone)",b:function(a){return a.getUTCOffset(j)}},{c:"ord",b:function(a){return a.getDate().ordinalize()}}],G=[{a:"year",method:"FullYear",d:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{a:"month",method:"Month",d:function(a,b){var d=30.4375,e;if(a){e=a.daysInMonth();if(b<=e.days())d=e}return d*24*60*60*1E3}},{a:"week",method:"Week",d:o(6048E5)},{a:"day",method:"Date",d:o(864E5)},{a:"hour",method:"Hours",d:o(36E5)},{a:"minute",method:"Minutes",d:o(6E4)},
-{a:"second",method:"Seconds",d:o(1E3)},{a:"millisecond",method:"Milliseconds",d:o(1)}],H={},I={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit=4-5} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",
+to:["month","date","year"],h:j},{src:"\\/Date\\((\\d+(?:\\+\\d{4})?)\\)\\/",to:["timestamp"],r:k}],F=[{b:"f{1,4}|ms|milliseconds",format:function(a){return a.getMilliseconds()}},{b:"ss?|seconds",format:function(a){return a.getSeconds()}},{b:"mm?|minutes",format:function(a){return a.getMinutes()}},{b:"hh?|hours|12hr",format:function(a){a=a.getHours(void 0);return a===0?12:a-(a/13).floor()*12}},{b:"HH?|24hr",format:function(a){return a.getHours()}},{b:"dd?|date|day",format:function(a){return a.getDate()}},
+{b:"dow|weekday",i:j,format:function(a,b,d){return b.weekdays[a.getDay()+(d-1)*7]}},{b:"MM?",format:function(a){return a.getMonth()+1}},{b:"mon|month",i:j,format:function(a,b,d){return b.months[a.getMonth()+(d-1)*12]}},{b:"y{2,4}|year",format:function(a){return a.getFullYear()}},{b:"[Tt]{1,2}",format:function(a,b,d,e){a=a.getHours(void 0)<12?"am":"pm";if(e.length===1)a=a.first();if(e.first()==="T")a=a.toUpperCase();return a}},{b:"z{1,4}|tz|timezone",text:j,format:function(a,b,d,e){a=a.getUTCOffset();
+if(e=="z"||e=="zz")a=a.replace(/(\d{2})(\d{2})/,function(g,f){return f.toNumber().pad(e.length)});return a}},{b:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(j)}},{b:"ord",format:function(a){return a.getDate().ordinalize()}}],G=[{a:"year",method:"FullYear",c:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{a:"month",method:"Month",c:function(a,b){var d=30.4375,e;if(a){e=a.daysInMonth();if(b<=e.days())d=e}return d*24*60*60*1E3}},{a:"week",method:"Week",c:o(6048E5)},
+{a:"day",method:"Date",c:o(864E5)},{a:"hour",method:"Hours",c:o(36E5)},{a:"minute",method:"Minutes",c:o(6E4)},{a:"second",method:"Seconds",c:o(1E3)},{a:"millisecond",method:"Milliseconds",c:o(1)}],H={},I={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit=4-5} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",
ja:"1;\u6708;;\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5;\u30df\u30ea\u79d2,\u79d2,\u5206,\u6642\u9593,\u65e5,\u9031\u9593|\u9031,\u30f6\u6708|\u30f5\u6708|\u6708,\u5e74;;;;{num}{unit}{sign},{shift}{unit=5-7}{weekday?},{year}\u5e74{month?}\u6708?{date?}\u65e5?,{month}\u6708{date?}\u65e5?,{date}\u65e5;{yyyy}\u5e74{M}\u6708{d}\u65e5;\u4e00\u6628\u65e5,\u6628\u65e5,\u4eca\u65e5,\u660e\u65e5,\u660e\u5f8c\u65e5;,\u524d,,\u5f8c;,\u53bb|\u5148,,\u6765",
ko:"1;\uc6d4;;\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c;\ubc00\ub9ac\ucd08,\ucd08,\ubd84,\uc2dc\uac04,\uc77c,\uc8fc,\uac1c\uc6d4|\ub2ec,\ub144;\uc77c|\ud55c,\uc774,\uc0bc,\uc0ac,\uc624,\uc721,\uce60,\ud314,\uad6c,\uc2ed;;;{num}{unit} {sign},{shift} {unit=5-7},{shift} {unit=5?} {weekday},{year}\ub144{month?}\uc6d4?{date?}\uc77c?,{month}\uc6d4{date?}\uc77c?,{date}\uc77c;{yyyy}\ub144{M}\uc6d4{d}\uc77c;\uadf8\uc800\uaed8,\uc5b4\uc81c,\uc624\ub298,\ub0b4\uc77c,\ubaa8\ub808;,\uc804,,\ud6c4;,\uc9c0\ub09c|\uc791,\uc774\ubc88,\ub2e4\uc74c|\ub0b4",
ru:"4;;\u042f\u043d\u0432\u0430\u0440:\u044f|\u044c,\u0424\u0435\u0432\u0440\u0430\u043b:\u044f|\u044c,\u041c\u0430\u0440\u0442:\u0430|,\u0410\u043f\u0440\u0435\u043b:\u044f|\u044c,\u041c\u0430:\u044f|\u0439,\u0418\u044e\u043d:\u044f|\u044c,\u0418\u044e\u043b:\u044f|\u044c,\u0410\u0432\u0433\u0443\u0441\u0442:\u0430|,\u0421\u0435\u043d\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041e\u043a\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041d\u043e\u044f\u0431\u0440:\u044f|\u044c,\u0414\u0435\u043a\u0430\u0431\u0440:\u044f|\u044c;\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0412\u0442\u043e\u0440\u043d\u0438\u043a,\u0421\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440\u0433,\u041f\u044f\u0442\u043d\u0438\u0446\u0430,\u0421\u0443\u0431\u0431\u043e\u0442\u0430;\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u043c\u0438\u043d\u0443\u0442:\u0430|\u0443|\u044b|,\u0447\u0430\u0441:||\u0430|\u043e\u0432,\u0434\u0435\u043d\u044c|\u0434\u0435\u043d\u044c|\u0434\u043d\u044f|\u0434\u043d\u0435\u0439,\u043d\u0435\u0434\u0435\u043b:\u044f|\u044e|\u0438|\u044c|\u0435,\u043c\u0435\u0441\u044f\u0446:||\u0430|\u0435\u0432|\u0435,\u0433\u043e\u0434|\u0433\u043e\u0434|\u0433\u043e\u0434\u0430|\u043b\u0435\u0442|\u0433\u043e\u0434\u0443;\u043e\u0434:\u0438\u043d|\u043d\u0443,\u0434\u0432:\u0430|\u0435,\u0442\u0440\u0438,\u0447\u0435\u0442\u044b\u0440\u0435,\u043f\u044f\u0442\u044c,\u0448\u0435\u0441\u0442\u044c,\u0441\u0435\u043c\u044c,\u0432\u043e\u0441\u0435\u043c\u044c,\u0434\u0435\u0432\u044f\u0442\u044c,\u0434\u0435\u0441\u044f\u0442\u044c;;\u0432|\u043d\u0430,\u0433\u043e\u0434\u0430;{num} {unit} {sign},{sign} {num} {unit},{date} {month} {year?} {2},{month} {year},{1} {shift} {unit=5-7};{d} {month} {yyyy} \u0433\u043e\u0434\u0430;\u043f\u043e\u0437\u0430\u0432\u0447\u0435\u0440\u0430,\u0432\u0447\u0435\u0440\u0430,\u0441\u0435\u0433\u043e\u0434\u043d\u044f,\u0437\u0430\u0432\u0442\u0440\u0430,\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430;,\u043d\u0430\u0437\u0430\u0434,,\u0447\u0435\u0440\u0435\u0437;,\u043f\u0440\u043e\u0448\u043b\u043e:\u0439|\u043c,,\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435:\u0439|\u043c",
@@ -21,33 +21,33 @@ fr:"2;;janvier,f\u00e9vrier|fevrier,mars,avril,mai,juin,juillet,ao\u00fbt,septem
it:"2;;Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre;Domenica,Luned:\u00ec|i,Marted:\u00ec|i,Mercoled:\u00ec|i,Gioved:\u00ec|i,Venerd:\u00ec|i,Sabato;millisecond:o|i,second:o|i,minut:o|i,or:a|e,giorn:o|i,settiman:a|e,mes:e|i,ann:o|i;un:|'|a|o,due,tre,quattro,cinque,sei,sette,otto,nove,dieci;;l'|la|il;{num} {unit} {sign},{weekday?} {date?} {month} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} {month} {yyyy};,ieri,oggi,domani,dopodomani;,fa,,da adesso;,scors:o|a,,prossim:o|a",
de:"2;;Januar,Februar,M\u00e4rz|Marz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember;Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag;Millisekunde:|n,Sekunde:|n,Minute:|n,Stunde:|n,Tag:|en,Woche:|n,Monat:|en,Jahr:|en;ein:|e|er|em|en,zwei,drei,vier,fuenf,sechs,sieben,acht,neun,zehn;;der;{sign} {num} {unit},{num} {unit} {sign},{num} {unit} {sign},{sign} {num} {unit},{weekday?} {date?} {month} {year?},{shift} {unit=5-7};{d}. {Month} {yyyy};vorgestern,gestern,heute,morgen,\u00fcbermorgen|ubermorgen|uebermorgen;,vor:|her,,in;,letzte:|r|n|s,,n\u00e4chste:|r|n|s+naechste:|r|n|s",
"zh-TW":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u9418,\u5206\u9418,\u5c0f\u6642,\u5929,\u500b\u661f\u671f|\u9031,\u500b\u6708,\u5e74;;;\u65e5|\u865f;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}{1},{month}\u6708{date?}{1},{date}{1};{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u5f8c\u5929;,\u524d,,\u5f8c;,\u4e0a|\u53bb,\u9019,\u4e0b|\u660e","zh-CN":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u949f,\u5206\u949f,\u5c0f\u65f6,\u5929,\u4e2a\u661f\u671f|\u5468,\u4e2a\u6708,\u5e74;;;\u65e5|\u53f7;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}{1},{month}\u6708{date?}{1},{date}{1};{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u540e\u5929;,\u524d,,\u540e;,\u4e0a|\u53bb,\u8fd9,\u4e0b|\u660e"};
-function J(a){var b=s.addFormat,d=a.code;if(!a.m){b("("+a.months.compact().join("|")+")",["month"],d);b("("+a.weekdays.compact().join("|")+")",["weekday"],d);b("("+a.modifiers.filter(function(e){return e.name==="day"}).map("text").join("|")+")",["day"],d);a.formats.each(function(e){var g=[];e=e.replace(/\s+/g,"[-,. ]*");e=e.replace(/\{(.+?)\}/g,function(f,h){var c=h.match(/\?$/),i=h.match(/(\d)(?:-(\d))?/),m=h.match(/^\d+$/),l=h.replace(/[^a-z]+$/,""),n,r;if(l==="time"){g=g.concat(v);return c?x:w}if(m)n=
-a.optionals[m[0]-1];else if(a[l])n=a[l];else if(a[l+"s"]){n=a[l+"s"];if(i){r=[];n.each(function(T,U){var L=U%(a.units?8:n.length);if(L>=i[1]&&L<=(i[2]||i[1]))r.push(T)});n=r}n=n.compact().join("|")}if(m)return"(?:"+n+")?";else{g.push(l);return"("+n+")"+(c?"?":"")}});b(e,g,d)});a.m=j}}function K(a,b,d){if(b&&(!q.isString(a)||!a))a=Date.currentLocale;a&&!H[a]&&M(a,d);return H[a]}
+function J(a){var b=s.addFormat,d=a.code;if(!a.l){b("("+a.months.compact().join("|")+")",["month"],d);b("("+a.weekdays.compact().join("|")+")",["weekday"],d);b("("+a.modifiers.filter(function(e){return e.name==="day"}).map("text").join("|")+")",["day"],d);a.formats.each(function(e){var g=[];e=e.replace(/\s+/g,"[-,. ]*");e=e.replace(/\{(.+?)\}/g,function(f,h){var c=h.match(/\?$/),i=h.match(/(\d)(?:-(\d))?/),m=h.match(/^\d+$/),l=h.replace(/[^a-z]+$/,""),n,r;if(l==="time"){g=g.concat(v);return c?x:w}if(m)n=
+a.optionals[m[0]-1];else if(a[l])n=a[l];else if(a[l+"s"]){n=a[l+"s"];if(i){r=[];n.each(function(T,U){var L=U%(a.units?8:n.length);if(L>=i[1]&&L<=(i[2]||i[1]))r.push(T)});n=r}n=n.compact().join("|")}if(m)return"(?:"+n+")?";else{g.push(l);return"("+n+")"+(c?"?":"")}});b(e,g,d)});a.l=j}}function K(a,b,d){if(b&&(!q.isString(a)||!a))a=Date.currentLocale;a&&!H[a]&&M(a,d);return H[a]}
function M(a,b){function d(f,h){f=f.split("+").map(function(c){return c.replace(/(.+):(.+)$/,function(i,m,l){return l.split("|").map(function(n){return m+n}).join("|")})}).join("|");return f.split("|").each(h)}function e(f,h,c){var i=[];if(b[f]){b[f].each(function(m,l){d(m,function(n,r){i[r*c+l]=n.toLowerCase()})});if(h)i=i.concat(b[f].map(function(m){return m.slice(0,3).toLowerCase()}));return b[f]=i}}function g(f,h){var c="[0-9\uff10-\uff19]"+(f?"{"+f+","+h+"}":"+");if(b.digits)c+="|["+b.digits+
-"]+";return c}b=b||N(a);if(!b)throw Error("Invalid locale.");e("months",j,12);e("weekdays",j,7);e("units",k,8);e("numbers",k,10);b.code=a;b.date=g(1,2);b.year=g(4,4);b.num=function(){var f=[g()].concat(b.articles);b.digits||(f=f.concat(b.numbers));return f.compact().join("|")}();(function(){var f=[];b.g={};b.modifiers.each(function(h){d(h.text,function(c){b.g[c]=h;f.push({name:h.name,text:c,value:h.value})})});f.groupBy("name",function(h,c){c=c.map("text");if(h==="day")c=c.concat(b.weekdays);b[h]=
+"]+";return c}b=b||N(a);if(!b)throw Error("Invalid locale.");e("months",j,12);e("weekdays",j,7);e("units",k,8);e("numbers",k,10);b.code=a;b.date=g(1,2);b.year=g(4,4);b.num=function(){var f=[g()].concat(b.articles);b.digits||(f=f.concat(b.numbers));return f.compact().join("|")}();(function(){var f=[];b.f={};b.modifiers.each(function(h){d(h.text,function(c){b.f[c]=h;f.push({name:h.name,text:c,value:h.value})})});f.groupBy("name",function(h,c){c=c.map("text");if(h==="day")c=c.concat(b.weekdays);b[h]=
c.join("|")});b.modifiers=f})();if(b.monthSuffix){b.month=g(1,2);b.months=(1).upto(12).map(function(f){return f+b.monthSuffix})}H[a]=new O(b)}
function N(a){function b(g){return!!(e[0]&Math.pow(2,g-1))}if(a.slice(0,3)=="en-")a="en";if(!I[a])return null;var d={modifiers:[]},e=I[a].split(";");["months","weekdays","units","numbers","articles","optionals","formats"].each(function(g,f){d[g]=e[f+2]?e[f+2].split(","):[]});d.outputFormat=e[9];["day","sign","shift","edge"].each(function(g,f){e[f+10]&&e[f+10].split(",").each(function(h,c){h&&d.modifiers.push({name:g,text:h,value:c-2})})});if(b(1)){d.digits=y+z;if(d.numbers.length>0)d.digits+=d.numbers.join("");
else d.numbers=y.split("");d.monthSuffix=e[1]}d.capitalizeUnit=a=="de";d.hasPlural=b(2);d.pastRelativeFormat=d.formats[0];d.futureRelativeFormat=d.formats[b(3)?1:0];return d}function P(a){a||(a=Date.currentLocale);return a!="en"&&a!="en-US"}function O(a){q.merge(this,a)}
-q.merge(O.prototype,{getMonth:function(a){return q.isNumber(a)?a-1:this.months.findIndex(p(a,"i"))%12},l:function(a){return this.weekdays.findIndex(p(a,"i"))%7},k:function(a){var b;return q.isNumber(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},o:function(a){var b=this;return a.replace(this.numbers[9],"").each(function(d){return b.k(d)}).join("")},n:function(a){return English.units[this.units.indexOf(a)%8]},r:function(a,b,d){var e,g;e=d>0?this.futureRelativeFormat:this.pastRelativeFormat;if(this.code==
+q.merge(O.prototype,{getMonth:function(a){return q.isNumber(a)?a-1:this.months.findIndex(p(a,"i"))%12},k:function(a){return this.weekdays.findIndex(p(a,"i"))%7},j:function(a){var b;return q.isNumber(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},n:function(a){var b=this;return a.replace(this.numbers[9],"").each(function(d){return b.j(d)}).join("")},m:function(a){return English.units[this.units.indexOf(a)%8]},q:function(a,b,d){var e,g;e=d>0?this.futureRelativeFormat:this.pastRelativeFormat;if(this.code==
"ru"){g=a.toString().from(-1);switch(j){case g==1:g=1;break;case g>=2&&g<=4:g=2;break;default:g=3}}else g=this.hasPlural&&a>1?1:0;g=this.units[g*8+b]||this.units[b];if(this.capitalizeUnit)g=g.capitalize();b=this.modifiers.find(function(f){return f.name=="sign"&&f.value==(d>0?1:-1)});return e.assign({num:a,unit:g,sign:b.text})}});function Q(a){var b;if(q.isObject(a[0]))return a;else if(a.length==1&&q.isNumber(a[0]))return[a[0]];b={};C.each(function(d,e){b[d.a]=a[e]});return[b]}
-function R(a,b){if(b!="date"&&b!="month"&&b!="year")return a;return a.replace(A,function(d){return y.indexOf(d)+1||""})}function S(a,b){var d={},e,g;b.each(function(f,h){e=a[h+1];if(!(e===void 0||e==="")){e=R(e.hankaku("n"),f);if(f==="year")d.t=e;if(f==="millisecond")e*=Math.pow(10,3-e.length);g=parseFloat(e);d[f]=!isNaN(g)?g:e.toLowerCase()}});return d}
-function V(a,b){var d=new s,e=k,g,f,h,c,i,m,l;if(q.isDate(a))d=a;else if(q.isNumber(a))d=new s(a);else if(q.isObject(a)){d=(new s).set(a,j);c=a}else if(q.isString(a)){J(K(b,j));f=P(b);a=a.trim().replace(/\.+$/,"").replace(/^now$/,"");B.each(function(n){var r=a.match(n.q);if(r){h=n;c=S(r,h.to);g=K(h.p,j);if(c.timestamp){d.setTime(0);c={milliseconds:c.timestamp};return k}if(h.i&&!q.isString(c.month)&&(q.isString(c.date)||f)){l=c.month;c.month=c.date;c.date=l}if(c.year&&c.t.length===2)c.year=((new s).getFullYear()/
-100).round()*100-(c.year/100).round()*100+c.year;if(c.month){c.month=g.getMonth(c.month);if(c.shift&&!c.unit)c.unit="year"}if(c.weekday&&c.date)delete c.weekday;else if(c.weekday){c.weekday=g.l(c.weekday);if(c.shift&&!c.unit)c.unit="week"}if(c.day&&(l=g.g[c.day])){c.day=l.value;d.resetTime();e=j}else if(c.day&&(l=g.l(c.day))>-1){delete c.day;c.weekday=l}if(c.date&&!q.isNumber(c.date))c.date=g.o(c.date);if(c.meridian)if(c.meridian==="pm"&&c.hour<12)c.hour+=12;if(c.offset_hours||c.offset_minutes){c.utc=
-j;c.offset_minutes=c.offset_minutes||0;c.offset_minutes+=c.offset_hours*60;if(c.offset_sign==="-")c.offset_minutes*=-1;c.minute-=c.offset_minutes}if(c.unit){e=j;m=g.k(c.num);i=g.n(c.unit);if(c.shift||c.edge){m*=(l=g.g[c.shift])?l.value:0;if(i==="month"&&u(c.date)){d.set({day:c.date},j);delete c.date}if(i==="year"&&u(c.month)){d.set({month:c.month,day:c.date},j);delete c.month;delete c.date}}if(c.sign&&(l=g.g[c.sign]))m*=l.value;if(u(c.weekday)){d.set({weekday:c.weekday},j);delete c.weekday}c[i]=(c[i]||
-0)+m}if(c.year_sign==="-")c.year*=-1;return k}});if(h)if(e)d.advance(c);else c.utc?d.setUTC(c,j):d.set(c,j);else d=a?new s(a):new s;if(c&&c.edge){l=g.g[c.edge];D.slice(4).each(function(n){if(u(c[n.a])){i=n.a;return k}});if(i==="year")c.e="month";else if(i==="month"||i==="week")c.e="day";d[(l.value<0?"endOf":"beginningOf")+i.capitalize()]();l.value===-2&&d.resetTime()}}return{f:d,set:c}}
-function W(a,b,d,e){var g,f=K(e,j),h=p(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(q.isFunction(b)){g=X(a);b=b.apply(a,g.concat(f))}}else return"Invalid Date";if(!b&&!d)b=f.outputFormat;else if(!b&&d){g=g||X(a);if(g[1]===0){g[1]=1;g[0]=1}return f.r(g[0],g[1],g[2])}F.each(function(c){b=b.replace(p("\\{("+c.c+")(\\d)?\\}",c.j?"i":""),function(i,m,l){i=c.b(a,f,l||1,m);l=m.length;var n=m.match(/^(.)\1+$/);if(c.j){if(l===3)i=i.to(3);if(n||m.match(h))i=i.capitalize()}else if(n&&!c.text)i=(q.isNumber(i)?
-i.pad(l):i.toString()).last(l);return i})});return b}function Y(a,b,d){var e=V(b),g=0,f=b=0,h;if(d>0){b=f=d;h=j}if(!e.f.isValid())return k;if(e.set&&e.set.e){G.each(function(i){if(i.a===e.set.e)g=i.d(e.f,a-e.f)-1});if(e.set.edge||e.set.shift)e.f["beginningOf"+e.set.e.capitalize()]();if(!h&&e.set.sign&&e.set.e!="millisecond"){b=50;f=-50}}d=a.getTime();h=e.f.getTime();var c=h+g;if(e.set&&e.set.e=="week"&&(new Date(c+1)).getHours()!=0)c-=s.DSTOffset;return d>=h-b&&d<=c+f}
-function Z(a,b,d,e,g){if(q.isNumber(b)&&g)b={milliseconds:b};else if(q.isNumber(b)){a.setTime(b);return a}if(b.date)b.day=b.date;if(!g&&b.day===void 0&&u(b.weekday)){a["set"+(e?"UTC":"")+"Weekday"](b.weekday);b.day=a["get"+(e?"UTC":"")+"Date"](void 0);delete b.weekday}D.each(function(f){if(u(b[f.a])||u(b[f.a+"s"])){b.e=f.a;return k}else if(d&&f.a!=="week"&&f.a!=="year")a["set"+(e?"UTC":"")+f.method](f.a==="day"?1:0)});G.each(function(f){var h=f.a;f=f.method;var c=u(b[h])?b[h]:b[h+"s"];if(c!==void 0){if(g){if(h===
-"week"){c=(b.day||0)+c*7;f="Date"}c=c*g+a["get"+f](void 0)}a["set"+(e?"UTC":"")+f](c);if(h==="month"){h=c;if(h<0)h+=12;h%12!=a.getMonth()&&a.setDate(0)}}});return a}function X(a){var b;a=a.millisecondsFromNow();var d=a.abs(),e=d,g=0;D.from(1).each(function(f,h){b=(d/f.d()).round(1).floor();if(b>=1){e=b;g=h+1}});return[e,g,a]}function $(a){var b;b=q.isNumber(a[1])?Q(a)[0]:a[0];return V(b,a[1]).f}
+function R(a,b){if(b!="date"&&b!="month"&&b!="year")return a;return a.replace(A,function(d){return y.indexOf(d)+1||""})}function S(a,b){var d={},e,g;b.each(function(f,h){e=a[h+1];if(!(e===void 0||e==="")){e=R(e.hankaku("n"),f);if(f==="year")d.s=e;if(f==="millisecond")e*=Math.pow(10,3-e.length);g=parseFloat(e);d[f]=!isNaN(g)?g:e.toLowerCase()}});return d}
+function V(a,b){var d=new s,e=k,g,f,h,c,i,m,l;if(q.isDate(a))d=a;else if(q.isNumber(a))d=new s(a);else if(q.isObject(a)){d=(new s).set(a,j);c=a}else if(q.isString(a)){J(K(b,j));f=P(b);a=a.trim().replace(/\.+$/,"").replace(/^now$/,"");B.each(function(n){var r=a.match(n.p);if(r){h=n;c=S(r,h.to);g=K(h.o,j);if(c.timestamp){d.setTime(0);c={milliseconds:c.timestamp};return k}if(h.h&&!q.isString(c.month)&&(q.isString(c.date)||f)){l=c.month;c.month=c.date;c.date=l}if(c.year&&c.s.length===2)c.year=((new s).getFullYear()/
+100).round()*100-(c.year/100).round()*100+c.year;if(c.month){c.month=g.getMonth(c.month);if(c.shift&&!c.unit)c.unit="year"}if(c.weekday&&c.date)delete c.weekday;else if(c.weekday){c.weekday=g.k(c.weekday);if(c.shift&&!c.unit)c.unit="week"}if(c.day&&(l=g.f[c.day])){c.day=l.value;d.resetTime();e=j}else if(c.day&&(l=g.k(c.day))>-1){delete c.day;c.weekday=l}if(c.date&&!q.isNumber(c.date))c.date=g.n(c.date);if(c.meridian)if(c.meridian==="pm"&&c.hour<12)c.hour+=12;if(c.offset_hours||c.offset_minutes){c.utc=
+j;c.offset_minutes=c.offset_minutes||0;c.offset_minutes+=c.offset_hours*60;if(c.offset_sign==="-")c.offset_minutes*=-1;c.minute-=c.offset_minutes}if(c.unit){e=j;m=g.j(c.num);i=g.m(c.unit);if(c.shift||c.edge){m*=(l=g.f[c.shift])?l.value:0;if(i==="month"&&u(c.date)){d.set({day:c.date},j);delete c.date}if(i==="year"&&u(c.month)){d.set({month:c.month,day:c.date},j);delete c.month;delete c.date}}if(c.sign&&(l=g.f[c.sign]))m*=l.value;if(u(c.weekday)){d.set({weekday:c.weekday},j);delete c.weekday}c[i]=(c[i]||
+0)+m}if(c.year_sign==="-")c.year*=-1;return k}});if(h)if(e)d.advance(c);else c.utc?d.setUTC(c,j):d.set(c,j);else d=a?new s(a):new s;if(c&&c.edge){l=g.f[c.edge];D.slice(4).each(function(n){if(u(c[n.a])){i=n.a;return k}});if(i==="year")c.d="month";else if(i==="month"||i==="week")c.d="day";d[(l.value<0?"endOf":"beginningOf")+i.capitalize()]();l.value===-2&&d.resetTime()}}return{e:d,set:c}}
+function W(a,b,d,e){var g,f=K(e,j),h=p(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(q.isFunction(b)){g=X(a);b=b.apply(a,g.concat(f))}}else return"Invalid Date";if(!b&&!d)b=f.outputFormat;else if(!b&&d){g=g||X(a);if(g[1]===0){g[1]=1;g[0]=1}return f.q(g[0],g[1],g[2])}F.each(function(c){b=b.replace(p("\\{("+c.b+")(\\d)?\\}",c.i?"i":""),function(i,m,l){i=c.format(a,f,l||1,m);l=m.length;var n=m.match(/^(.)\1+$/);if(c.i){if(l===3)i=i.to(3);if(n||m.match(h))i=i.capitalize()}else if(n&&!c.text)i=
+(q.isNumber(i)?i.pad(l):i.toString()).last(l);return i})});return b}function Y(a,b,d){var e=V(b),g=0,f=b=0,h;if(d>0){b=f=d;h=j}if(!e.e.isValid())return k;if(e.set&&e.set.d){G.each(function(i){if(i.a===e.set.d)g=i.c(e.e,a-e.e)-1});if(e.set.edge||e.set.shift)e.e["beginningOf"+e.set.d.capitalize()]();if(!h&&e.set.sign&&e.set.d!="millisecond"){b=50;f=-50}}d=a.getTime();h=e.e.getTime();var c=h+g;if(e.set&&e.set.d=="week"&&(new Date(c+1)).getHours()!=0)c-=s.DSTOffset;return d>=h-b&&d<=c+f}
+function Z(a,b,d,e,g){if(q.isNumber(b)&&g)b={milliseconds:b};else if(q.isNumber(b)){a.setTime(b);return a}if(b.date)b.day=b.date;if(!g&&b.day===void 0&&u(b.weekday)){a["set"+(e?"UTC":"")+"Weekday"](b.weekday);b.day=a["get"+(e?"UTC":"")+"Date"](void 0);delete b.weekday}D.each(function(f){if(u(b[f.a])||u(b[f.a+"s"])){b.d=f.a;return k}else if(d&&f.a!=="week"&&f.a!=="year")a["set"+(e?"UTC":"")+f.method](f.a==="day"?1:0)});G.each(function(f){var h=f.a;f=f.method;var c=u(b[h])?b[h]:b[h+"s"];if(c!==void 0){if(g){if(h===
+"week"){c=(b.day||0)+c*7;f="Date"}c=c*g+a["get"+f](void 0)}a["set"+(e?"UTC":"")+f](c);if(h==="month"){h=c;if(h<0)h+=12;h%12!=a.getMonth()&&a.setDate(0)}}});return a}function X(a){var b;a=a.millisecondsFromNow();var d=a.abs(),e=d,g=0;D.from(1).each(function(f,h){b=(d/f.c()).round(1).floor();if(b>=1){e=b;g=h+1}});return[e,g,a]}function $(a){var b;b=q.isNumber(a[1])?Q(a)[0]:a[0];return V(b,a[1]).e}
function aa(a,b){function d(){return(this*b).round()}function e(){return $(arguments)[f](this)}function g(){return $(arguments)[f](-this)}var f="add"+a.capitalize()+"s",h={};h[a]=d;h[a+"s"]=d;h[a+"Before"]=g;h[a+"sBefore"]=g;h[a+"Ago"]=g;h[a+"sAgo"]=g;h[a+"After"]=e;h[a+"sAfter"]=e;h[a+"FromNow"]=e;h[a+"sFromNow"]=e;t.extend(h)}
-s.extend({create:function(){return $(arguments)},now:function(){return(new s).getTime()},setLocale:function(a,b){var d=K(a,k,b);if(d){Date.currentLocale=a;J(d);return d}},getLocale:function(a){return K(a,j)},addFormat:function(a,b,d,e){B.push({i:e,p:d,q:p("^"+a+"$","i"),to:b})}},k,k);
+s.extend({create:function(){return $(arguments)},now:function(){return(new s).getTime()},setLocale:function(a,b){var d=K(a,k,b);if(d){Date.currentLocale=a;J(d);return d}},getLocale:function(a){return K(a,j)},addFormat:function(a,b,d,e){B.push({h:e,o:d,p:p("^"+a+"$","i"),to:b})}},k,k);
s.extend({toISOString:function(){return W(this.toUTC(),s.ISO8601_DATETIME)},set:function(){var a=Q(arguments);return Z(this,a[0],a[1])},setUTC:function(){var a=Q(arguments);return Z(this,a[0],a[1],j)},setWeekday:function(a){a===void 0||this.setDate(this.getDate()+a-this.getDay())},setUTCWeekday:function(a){a===void 0||this.setDate(this.getUTCDate()+a-this.getDay())},setWeek:function(a){if(a!==void 0){this.setMonth(0);this.setDate(a*7+1)}},setUTCWeek:function(a){if(a!==void 0){this.setMonth(0);this.setUTCDate(a*
-7+1)}},getWeek:function(){return((this.getTime()-(new s(this.getFullYear(),0,1)).getTime()+1)/6048E5).ceil()},getUTCWeek:function(){return((this.getTime()-(new s).setUTC(this.getUTCFullYear(),0,1,0,0,0,0).getTime()+1)/6048E5).ceil()},getUTCOffset:function(a){var b=this.h?0:this.getTimezoneOffset(),d=a===j?":":"";if(!b&&a)return"Z";return(-b/60).round().pad(2,j)+d+(b%60).pad(2)},toUTC:function(){if(this.h)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.h=j;return a},isUTC:function(){return this.h||
+7+1)}},getWeek:function(){return((this.getTime()-(new s(this.getFullYear(),0,1)).getTime()+1)/6048E5).ceil()},getUTCWeek:function(){return((this.getTime()-(new s).setUTC(this.getUTCFullYear(),0,1,0,0,0,0).getTime()+1)/6048E5).ceil()},getUTCOffset:function(a){var b=this.g?0:this.getTimezoneOffset(),d=a===j?":":"";if(!b&&a)return"Z";return(-b/60).round().pad(2,j)+d+(b%60).pad(2)},toUTC:function(){if(this.g)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.g=j;return a},isUTC:function(){return this.g||
this.getTimezoneOffset()===0},advance:function(){var a=Q(arguments);return Z(this,a[0],k,k,1,j)},rewind:function(){var a=Q(arguments);return Z(this,a[0],k,k,-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>s.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<s.create(a).getTime()+(b||0)},isBetween:function(a,b,d){var e=this.getTime();a=s.create(a).getTime();var g=s.create(b).getTime();b=Math.min(a,g);a=Math.max(a,g);d=d||0;return b-
d<e&&a+d>e},isLeapYear:function(){var a=this.getFullYear();return a%4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-(new s(this.getFullYear(),this.getMonth(),32)).getDate()},format:function(a,b){return W(this,a,k,b)},relative:function(a,b){if(q.isString(a)){b=a;a=null}return W(this,a,j,b)},is:function(a,b){var d;if(q.isString(a)){a=a.trim().toLowerCase();switch(j){case a==="future":return this.getTime()>(new s).getTime();case a==="past":return this.getTime()<(new s).getTime();case a===
"weekday":return this.getDay()>0&&this.getDay()<6;case a==="weekend":return this.getDay()===0||this.getDay()===6;case (d=English.weekdays.indexOf(a)%7)>-1:return this.getDay()===d;case (d=English.months.indexOf(a)%12)>-1:return this.getMonth()===d}}return Y(this,a,b)},resetTime:function(){return this.set({hour:0,minute:0,second:0,millisecond:0})},clone:function(){return new s(this.getTime())},compare:function(){return this-$(arguments)}});
s.extend({toJSON:s.prototype.toISOString,iso:s.prototype.toISOString,getWeekday:s.prototype.getDay,getUTCWeekday:s.prototype.getUTCDay});English=s.setLocale("en");
-(function(){var a={};G.each(function(b,d){function e(i,m){return((s.create(i,m).getTime()-this.getTime())/c).round()}function g(i,m){return((this.getTime()-s.create(i,m).getTime())/c).round()}var f=b.a,h=f.capitalize(),c=b.d();a[f+"sAgo"]=e;a[f+"sUntil"]=e;a[f+"sSince"]=g;a[f+"sFromNow"]=g;a["add"+h+"s"]=function(i){var m={};m[f]=i;return this.advance(m)};aa(f,c);d<3&&["Last","This","Next"].each(function(i){a["is"+i+h]=function(){return this.is(i+" "+f)}});if(d<4){a["beginningOf"+h]=function(){var i=
+(function(){var a={};G.each(function(b,d){function e(i,m){return((s.create(i,m).getTime()-this.getTime())/c).round()}function g(i,m){return((this.getTime()-s.create(i,m).getTime())/c).round()}var f=b.a,h=f.capitalize(),c=b.c();a[f+"sAgo"]=e;a[f+"sUntil"]=e;a[f+"sSince"]=g;a[f+"sFromNow"]=g;a["add"+h+"s"]=function(i){var m={};m[f]=i;return this.advance(m)};aa(f,c);d<3&&["Last","This","Next"].each(function(i){a["is"+i+h]=function(){return this.is(i+" "+f)}});if(d<4){a["beginningOf"+h]=function(){var i=
{};switch(f){case "year":i.year=this.getFullYear();break;case "month":i.month=this.getMonth();break;case "day":i.day=this.getDate();break;case "week":i.weekday=0}return this.set(i,j)};a["endOf"+h]=function(){var i={hours:23,minutes:59,seconds:59,milliseconds:999};switch(f){case "year":i.month=11;i.day=31;break;case "month":i.day=this.daysInMonth();break;case "week":i.weekday=6}return this.set(i,j)}}});s.extend(a)})();
-(function(){C=G.clone().removeAt(2);D=G.clone().reverse();var a="\\d{1,2}|"+English.months.join("|");E.each(function(b){s.addFormat(b.src.replace(/\{month\}/,a)+(b.s===k?"":x),b.to.concat(v),"en",b.i)});s.addFormat(w,v)})();(function(){var a={},b=English.weekdays.slice(0,7),d=English.months.slice(0,12);["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(b).concat(d).each(function(e){a["is"+e.capitalize()]=function(){return this.is(e)}});s.extend(a)})();
-s.extend({DSTOffset:((new s(2E3,6,1)).getTimezoneOffset()-(new s(2E3,0,1)).getTimezoneOffset())*60*1E3,INTERNATIONAL_TIME:"{h}:{mm}:{ss}",RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"},k,k);})();
+(function(){C=G.clone().removeAt(2);D=G.clone().reverse();var a="\\d{1,2}|"+English.months.join("|");E.each(function(b){s.addFormat(b.src.replace(/\{month\}/,a)+(b.r===k?"":x),b.to.concat(v),"en",b.h)});s.addFormat(w,v)})();(function(){var a={},b=English.weekdays.slice(0,7),d=English.months.slice(0,12);["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(b).concat(d).each(function(e){a["is"+e.capitalize()]=function(){return this.is(e)}});s.extend(a)})();
+s.extend({DSTOffset:((new s(2E3,6,1)).getTimezoneOffset()-(new s(2E3,0,1)).getTimezoneOffset())*60*1E3,INTERNATIONAL_TIME:"{h}:{mm}:{ss}",RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"},k,k);})(this);
View
21 release/edge/minified/sugar-edge-inflections.min.js
@@ -6,11 +6,11 @@
* http://sugarjs.com/
*
* ---------------------------- */
-(function(){var a=[],h=[],j=[],k=[],m={},n,o,q;function r(b,c,d){Object.isString(c)&&j.remove(c);j.remove(d);b.unshift({da:c,ea:d})}function s(b,c){return b==c||b=="all"||!b}function t(b){return j.any(function(c){return RegExp("\\b"+c+"$","i").test(b)})}function u(b,c){b=Object.isString(b)?b.toString():"";return b.ka()||t(b)?b:v(b,c?a:h)}function v(b,c){c.each(function(d){if(b.match(d.da)){b=b.replace(d.da,d.ea);return false}});return b}
+(function(context){var a=[],h=[],j=[],k=[],m={},n,o,q;function r(b,c,d){Object.isString(c)&&j.remove(c);j.remove(d);b.unshift({$:c,ba:d})}function s(b,c){return b==c||b=="all"||!b}function t(b){return j.any(function(c){return RegExp("\\b"+c+"$","i").test(b)})}function u(b,c){b=Object.isString(b)?b.toString():"";return b.isBlank()||t(b)?b:v(b,c?a:h)}function v(b,c){c.each(function(d){if(b.match(d.$)){b=b.replace(d.$,d.ba);return false}});return b}
function x(b){return b.replace(/^\W*[a-z]/,function(c){return c.toUpperCase()})}
-q={acronym:function(b){m[b.toLowerCase()]=b;q.ga=RegExp(Object.oa(m).join("|"),"g")},plural:function(b,c){r(a,b,c)},singular:function(b,c){r(h,b,c)},irregular:function(b,c){var d=b.first(),f=b.from(1),g=c.first(),e=c.from(1),i=g.toUpperCase(),l=g.toLowerCase(),p=d.toUpperCase(),w=d.toLowerCase();j.remove(b);j.remove(c);if(p==i){q.ba(RegExp("({1}){2}$".assign(d,f),"i"),"$1"+e);q.ba(RegExp("({1}){2}$".assign(g,e),"i"),"$1"+e);q.$(RegExp("({1}){2}$".assign(g,e),"i"),"$1"+f)}else{q.ba(RegExp("{1}{2}$".assign(p,
-f)),i+e);q.ba(RegExp("{1}{2}$".assign(w,f)),l+e);q.ba(RegExp("{1}{2}$".assign(i,e)),i+e);q.ba(RegExp("{1}{2}$".assign(l,e)),l+e);q.$(RegExp("{1}{2}$".assign(i,e)),p+f);q.$(RegExp("{1}{2}$".assign(l,e)),w+f)}},uncountable:function(){j.add(Array.create(arguments).ia())},human:function(b,c){k.unshift({da:b,ea:c})},clear:function(b){if(s(b,"singulars"))h=[];if(s(b,"plurals"))a=[];if(s(b,"uncountables"))j=[];if(s(b,"humans"))k=[];if(s(b,"acronyms"))m={}}};
-n=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];
+q={acronym:function(b){m[b.toLowerCase()]=b;q.acronymRegExp=RegExp(Object.values(m).join("|"),"g")},plural:function(b,c){r(a,b,c)},singular:function(b,c){r(h,b,c)},irregular:function(b,c){var d=b.first(),f=b.from(1),g=c.first(),e=c.from(1),i=g.toUpperCase(),l=g.toLowerCase(),p=d.toUpperCase(),w=d.toLowerCase();j.remove(b);j.remove(c);if(p==i){q.plural(RegExp("({1}){2}$".assign(d,f),"i"),"$1"+e);q.plural(RegExp("({1}){2}$".assign(g,e),"i"),"$1"+e);q.singular(RegExp("({1}){2}$".assign(g,e),"i"),"$1"+
+f)}else{q.plural(RegExp("{1}{2}$".assign(p,f)),i+e);q.plural(RegExp("{1}{2}$".assign(w,f)),l+e);q.plural(RegExp("{1}{2}$".assign(i,e)),i+e);q.plural(RegExp("{1}{2}$".assign(l,e)),l+e);q.singular(RegExp("{1}{2}$".assign(i,e)),p+f);q.singular(RegExp("{1}{2}$".assign(l,e)),w+f)}},uncountable:function(){j.add(Array.create(arguments).flatten())},human:function(b,c){k.unshift({$:b,ba:c})},clear:function(b){if(s(b,"singulars"))h=[];if(s(b,"plurals"))a=[];if(s(b,"uncountables"))j=[];if(s(b,"humans"))k=[];
+if(s(b,"acronyms"))m={}}};n=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];
o={A:/[A\u24b6\uff21\u00c0\u00c1\u00c2\u1ea6\u1ea4\u1eaa\u1ea8\u00c3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\u00c4\u01de\u1ea2\u00c5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f]/g,B:/[B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181]/g,C:/[C\u24b8\uff23\u0106\u0108\u010a\u010c\u00c7\u1e08\u0187\u023b\ua73e]/g,D:/[D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779]/g,E:/[E\u24ba\uff25\u00c8\u00c9\u00ca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\u00cb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e]/g,
F:/[F\u24bb\uff26\u1e1e\u0191\ua77b]/g,G:/[G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e]/g,H:/[H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d]/g,I:/[I\u24be\uff29\u00cc\u00cd\u00ce\u0128\u012a\u012c\u0130\u00cf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197]/g,J:/[J\u24bf\uff2a\u0134\u0248]/g,K:/[K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2]/g,L:/[L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780]/g,
M:/[M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c]/g,N:/[N\u24c3\uff2e\u01f8\u0143\u00d1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4]/g,O:/[O\u24c4\uff2f\u00d2\u00d3\u00d4\u1ed2\u1ed0\u1ed6\u1ed4\u00d5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\u00d6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\u00d8\u01fe\u0186\u019f\ua74a\ua74c]/g,P:/[P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754]/g,Q:/[Q\u24c6\uff31\ua756\ua758\u024a]/g,
@@ -21,9 +21,10 @@ h:/[h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2
n:/[n\u24dd\uff4e\u01f9\u0144\u00f1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5]/g,o:/[o\u24de\uff4f\u00f2\u00f3\u00f4\u1ed3\u1ed1\u1ed7\u1ed5\u00f5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\u00f6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\u00f8\u01ff\u0254\ua74b\ua74d\u0275]/g,p:/[p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755]/g,q:/[q\u24e0\uff51\u024b\ua757\ua759]/g,r:/[r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783]/g,
s:/[s\u24e2\uff53\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b]/g,t:/[t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787]/g,u:/[u\u24e4\uff55\u00f9\u00fa\u00fb\u0169\u1e79\u016b\u1e7b\u016d\u00fc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289]/g,v:/[v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c]/g,w:/[w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73]/g,
x:/[x\u24e7\uff58\u1e8b\u1e8d]/g,y:/[y\u24e8\uff59\u1ef3\u00fd\u0177\u1ef9\u0233\u1e8f\u00ff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff]/g,z:/[z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763]/g,AA:/[\ua732]/g,AE:/[\u00c6\u01fc\u01e2]/g,AO:/[\ua734]/g,AU:/[\ua736]/g,AV:/[\ua738\ua73a]/g,AY:/[\ua73c]/g,DZ:/[\u01f1\u01c4]/g,Dz:/[\u01f2\u01c5]/g,LJ:/[\u01c7]/g,Lj:/[\u01c8]/g,NJ:/[\u01ca]/g,Nj:/[\u01cb]/g,OI:/[\u01a2]/g,OO:/[\ua74e]/g,OU:/[\u0222]/g,TZ:/[\ua728]/g,VY:/[\ua760]/g,
-aa:/[\ua733]/g,ae:/[\u00e6\u01fd\u01e3]/g,ao:/