sugar-rails 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sugar/rails/version.rb +2 -2
- data/vendor/assets/javascripts/precompiled/development/array.js +50 -15
- data/vendor/assets/javascripts/precompiled/development/core.js +39 -13
- data/vendor/assets/javascripts/precompiled/development/date.js +137 -152
- data/vendor/assets/javascripts/precompiled/development/date_ranges.js +22 -10
- data/vendor/assets/javascripts/precompiled/development/es5.js +1 -1
- data/vendor/assets/javascripts/precompiled/development/function.js +7 -5
- data/vendor/assets/javascripts/precompiled/development/object.js +2 -2
- data/vendor/assets/javascripts/precompiled/minified/array.js +16 -16
- data/vendor/assets/javascripts/precompiled/minified/core.js +9 -8
- data/vendor/assets/javascripts/precompiled/minified/date.js +41 -39
- data/vendor/assets/javascripts/precompiled/minified/date_locales.js +9 -9
- data/vendor/assets/javascripts/precompiled/minified/date_ranges.js +3 -3
- data/vendor/assets/javascripts/precompiled/minified/es5.js +8 -7
- data/vendor/assets/javascripts/precompiled/minified/function.js +4 -4
- data/vendor/assets/javascripts/precompiled/minified/inflections.js +7 -7
- data/vendor/assets/javascripts/precompiled/minified/language.js +9 -9
- data/vendor/assets/javascripts/precompiled/minified/number.js +5 -5
- data/vendor/assets/javascripts/precompiled/minified/object.js +6 -6
- data/vendor/assets/javascripts/precompiled/minified/regexp.js +2 -2
- data/vendor/assets/javascripts/precompiled/minified/string.js +12 -12
- data/vendor/assets/javascripts/sugar-development.js +259 -199
- data/vendor/assets/javascripts/sugar-full.js +132 -128
- data/vendor/assets/javascripts/sugar.js +107 -103
- metadata +4 -4
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
function wa(a,b,c,d){var e=a.length,g=0
|
3
|
-
|
4
|
-
|
5
|
-
(function(){
|
6
|
-
(function(){var a=
|
7
|
-
(function(){var a=
|
1
|
+
F(o,m,m,{keys:function(a){var b=[];if(!la(a)&&!E(a)&&!A(a))throw new TypeError("Object required");H(a,function(c){b.push(c)});return b}});
|
2
|
+
function wa(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 xa(a,b,c,d){var e=a.length,f=0,g=J(c);ya(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(c,a[g],g,a);f++}return c}function ya(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}
|
3
|
+
function za(a){if(a.length===0)throw new TypeError("First argument must be defined");}F(p,m,m,{isArray:function(a){return fa(a)}});
|
4
|
+
F(p,k,m,{every:function(a,b){var c=this.length,d=0;for(za(arguments);d<c;){if(d in this&&!a.call(b,this[d],d,this))return m;d++}return k},some:function(a,b){var c=this.length,d=0;for(za(arguments);d<c;){if(d in this&&a.call(b,this[d],d,this))return k;d++}return m},map:function(a,b){var c=this.length,d=0,e=Array(c);for(za(arguments);d<c;){if(d in this)e[d]=a.call(b,this[d],d,this);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(za(arguments);d<c;){d in this&&a.call(b,this[d],d,this)&&
|
5
|
+
e.push(this[d]);d++}return e},indexOf:function(a,b){if(D(this))return this.indexOf(a,b);return wa(this,a,b,1)},lastIndexOf:function(a,b){if(D(this))return this.lastIndexOf(a,b);return wa(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(ya(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return xa(this,a,b)},reduceRight:function(a,b){return xa(this,a,b,k)}});F(s,m,m,{now:function(){return(new s).getTime()}});
|
6
|
+
(function(){var a=qa().match(/^\s+$/);try{t.prototype.trim.call([1])}catch(b){a=m}F(t,k,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(q("^["+qa()+"]+"),"")},trimRight:function(){return this.replace(q("["+qa()+"]+$"),"")}})})();
|
7
|
+
(function(){var a=m;if(Function.prototype.qa){a=function(){};var b=a.qa();a=new b instanceof b&&!(new a instanceof b)}F(Function,k,!a,{bind:function(c){var d=this,e=G(arguments).slice(1),f,g;if(!A(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}})})();
|
8
|
+
(function(){var a=new s(s.UTC(1999,11,31));a=a.toISOString&&a.toISOString()==="1999-12-31T00:00:00.000Z";I(s,k,!a,"toISOString,toJSON",function(b,c){b[c]=function(){return R(this.getUTCFullYear(),4)+"-"+R(this.getUTCMonth()+1,2)+"-"+R(this.getUTCDate(),2)+"T"+R(this.getUTCHours(),2)+":"+R(this.getUTCMinutes(),2)+":"+R(this.getUTCSeconds(),2)+"."+R(this.getUTCMilliseconds(),3)+"Z"}})})();
|
@@ -1,4 +1,4 @@
|
|
1
|
-
function
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
function xb(a,b,c,d,e){var f;if(!a.timers)a.timers=[];B(b)||(b=0);a.timers.push(setTimeout(function(){a.timers.splice(f,1);c.apply(d,e||[])},b));f=a.timers.length}
|
2
|
+
F(Function,k,m,{lazy:function(a,b){function c(){if(!(f&&e.length>b-2)){e.push([this,arguments]);g()}}var d=this,e=[],f=m,g,j,i;a=a||1;b=b||Infinity;j=O(a,void 0,"ceil");i=O(j/a);g=function(){if(!(f||e.length==0)){for(var h=v.max(e.length-i,0);e.length>h;)Function.prototype.apply.apply(d,e.shift());xb(c,j,function(){f=m;g()});f=k}};return c},delay:function(a){var b=G(arguments).slice(1);xb(this,a,this,this,b);return this},throttle:function(a){return this.lazy(a,1)},debounce:function(a){function b(){b.cancel();
|
3
|
+
xb(b,a,c,this,arguments)}var c=this;return b},cancel:function(){if(fa(this.timers))for(;this.timers.length>0;)clearTimeout(this.timers.shift());return this},after:function(a){var b=this,c=0,d=[];if(B(a)){if(a===0){b.call();return b}}else a=1;return function(){var e;d.push(G(arguments));c++;if(c==a){e=b.call(this,d);c=0;d=[];return e}}},once:function(){var a=this;return function(){return ma(a,"memo")?a.memo:a.memo=a.apply(this,arguments)}},fill:function(){var a=this,b=G(arguments);return function(){var c=
|
4
|
+
G(arguments);b.forEach(function(d,e){if(d!=l||e>=c.length)c.splice(e,0,d)});return a.apply(this,c)}}});
|
@@ -1,11 +1,11 @@
|
|
1
|
-
var
|
2
|
-
function
|
3
|
-
Z={acronym:function(a){
|
4
|
-
|
5
|
-
if(
|
1
|
+
var Gb=[],Hb=[],Y=[],Ib=[],Jb={},Kb,Z;function Lb(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}
|
2
|
+
function Mb(a,b,c){D(b)&&Lb(Y,b);Lb(Y,c);a.unshift({ka:b,pa:c})}function Nb(a,b){return a==b||a=="all"||!a}function Ob(a){return Y.some(function(b){return(new q("\\b"+b+"$","i")).test(a)})}function Pb(a,b){a=D(a)?a.toString():"";return a.isBlank()||Ob(a)?a:Qb(a,b?Gb:Hb)}function Qb(a,b){H(b,function(c,d){if(a.match(d.ka)){a=a.replace(d.ka,d.pa);return m}});return a}function Rb(a){return a.replace(/^\W*[a-z]/,function(b){return b.toUpperCase()})}
|
3
|
+
Z={acronym:function(a){Jb[a.toLowerCase()]=a;a=o.keys(Jb).map(function(b){return Jb[b]});Z.acronymRegExp=q(a.join("|"),"g")},plural:function(a,b){Mb(Gb,a,b)},singular:function(a,b){Mb(Hb,a,b)},irregular:function(a,b){var c=a.first(),d=a.from(1),e=b.first(),f=b.from(1),g=e.toUpperCase(),j=e.toLowerCase(),i=c.toUpperCase(),h=c.toLowerCase();Lb(Y,a);Lb(Y,b);if(i==g){Z.plural(new q("({1}){2}$".assign(c,d),"i"),"$1"+f);Z.plural(new q("({1}){2}$".assign(e,f),"i"),"$1"+f);Z.singular(new q("({1}){2}$".assign(e,
|
4
|
+
f),"i"),"$1"+d)}else{Z.plural(new q("{1}{2}$".assign(i,d)),g+f);Z.plural(new q("{1}{2}$".assign(h,d)),j+f);Z.plural(new q("{1}{2}$".assign(g,f)),g+f);Z.plural(new q("{1}{2}$".assign(j,f)),j+f);Z.singular(new q("{1}{2}$".assign(g,f)),i+d);Z.singular(new q("{1}{2}$".assign(j,f)),h+d)}},uncountable:function(a){var b=p.isArray(a)?a:G(arguments);Y=Y.concat(b)},human:function(a,b){Ib.unshift({ka:a,pa:b})},clear:function(a){if(Nb(a,"singulars"))Hb=[];if(Nb(a,"plurals"))Gb=[];if(Nb(a,"uncountables"))Y=[];
|
5
|
+
if(Nb(a,"humans"))Ib=[];if(Nb(a,"acronyms"))Jb={}}};Kb=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];Z.plural(/$/,"s");Z.plural(/s$/gi,"s");Z.plural(/(ax|test)is$/gi,"$1es");Z.plural(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1i");Z.plural(/(census|alias|status)$/gi,"$1es");Z.plural(/(bu)s$/gi,"$1ses");Z.plural(/(buffal|tomat)o$/gi,"$1oes");Z.plural(/([ti])um$/gi,"$1a");Z.plural(/([ti])a$/gi,"$1a");
|
6
6
|
Z.plural(/sis$/gi,"ses");Z.plural(/f+e?$/gi,"ves");Z.plural(/(cuff|roof)$/gi,"$1s");Z.plural(/([ht]ive)$/gi,"$1s");Z.plural(/([^aeiouy]o)$/gi,"$1es");Z.plural(/([^aeiouy]|qu)y$/gi,"$1ies");Z.plural(/(x|ch|ss|sh)$/gi,"$1es");Z.plural(/(matr|vert|ind)(?:ix|ex)$/gi,"$1ices");Z.plural(/([ml])ouse$/gi,"$1ice");Z.plural(/([ml])ice$/gi,"$1ice");Z.plural(/^(ox)$/gi,"$1en");Z.plural(/^(oxen)$/gi,"$1");Z.plural(/(quiz)$/gi,"$1zes");Z.plural(/(phot|cant|hom|zer|pian|portic|pr|quart|kimon)o$/gi,"$1os");
|
7
7
|
Z.plural(/(craft)$/gi,"$1");Z.plural(/([ft])[eo]{2}(th?)$/gi,"$1ee$2");Z.singular(/s$/gi,"");Z.singular(/([pst][aiu]s)$/gi,"$1");Z.singular(/([aeiouy])ss$/gi,"$1ss");Z.singular(/(n)ews$/gi,"$1ews");Z.singular(/([ti])a$/gi,"$1um");Z.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/gi,"$1$2sis");Z.singular(/(^analy)ses$/gi,"$1sis");Z.singular(/(i)(f|ves)$/i,"$1fe");Z.singular(/([aeolr]f?)(f|ves)$/i,"$1f");Z.singular(/([ht]ive)s$/gi,"$1");Z.singular(/([^aeiouy]|qu)ies$/gi,"$1y");
|
8
8
|
Z.singular(/(s)eries$/gi,"$1eries");Z.singular(/(m)ovies$/gi,"$1ovie");Z.singular(/(x|ch|ss|sh)es$/gi,"$1");Z.singular(/([ml])(ous|ic)e$/gi,"$1ouse");Z.singular(/(bus)(es)?$/gi,"$1");Z.singular(/(o)es$/gi,"$1");Z.singular(/(shoe)s?$/gi,"$1");Z.singular(/(cris|ax|test)[ie]s$/gi,"$1is");Z.singular(/(octop|vir|fung|foc|radi|alumn)(i|us)$/gi,"$1us");Z.singular(/(census|alias|status)(es)?$/gi,"$1");Z.singular(/^(ox)(en)?/gi,"$1");Z.singular(/(vert|ind)(ex|ices)$/gi,"$1ex");
|
9
9
|
Z.singular(/(matr)(ix|ices)$/gi,"$1ix");Z.singular(/(quiz)(zes)?$/gi,"$1");Z.singular(/(database)s?$/gi,"$1");Z.singular(/ee(th?)$/gi,"oo$1");Z.irregular("person","people");Z.irregular("man","men");Z.irregular("child","children");Z.irregular("sex","sexes");Z.irregular("move","moves");Z.irregular("save","saves");Z.irregular("save","saves");Z.irregular("cow","kine");Z.irregular("goose","geese");Z.irregular("zombie","zombies");Z.uncountable("equipment,information,rice,money,species,series,fish,sheep,jeans".split(","));
|
10
|
-
|
11
|
-
"-";if(b.normalize)b=b.normalize();b=b.replace(/[^a-z0-9\-_]+/gi,a);if(a)b=b.replace(new
|
10
|
+
F(t,k,m,{pluralize:function(){return Pb(this,k)},singularize:function(){return Pb(this,m)},humanize:function(){var a=Qb(this,Ib);a=a.replace(/_id$/g,"");a=a.replace(/(_)?([a-z\d]*)/gi,function(b,c,d){return(c?" ":"")+(Jb[d]||d.toLowerCase())});return Rb(a)},titleize:function(){var a=/[.:;!]$/,b,c,d;return this.spacify().humanize().words(function(e,f,g){b=a.test(e);d=f==0||f==g.length-1||b||c;c=b;return d||Kb.indexOf(e)===-1?Rb(e):e}).join(" ")},parameterize:function(a){var b=this;if(a===undefined)a=
|
11
|
+
"-";if(b.normalize)b=b.normalize();b=b.replace(/[^a-z0-9\-_]+/gi,a);if(a)b=b.replace(new q("^{sep}+|{sep}+$|({sep}){sep}+".assign({sep:S(a)}),"g"),"$1");return encodeURI(b.toLowerCase())}});t.Inflector=Z;t.Inflector.acronyms=Jb;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
|
4
|
-
function
|
5
|
-
function
|
6
|
-
function
|
7
|
-
|
1
|
+
var Sb,Tb="",Vb,Wb=[{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}],Xb,Yb=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,Zb=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,$b="\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3",ac="\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1",
|
2
|
+
bc=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,cc=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/,dc="\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",
|
3
|
+
ec="\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";
|
4
|
+
function fc(a,b,c,d){Xb||gc();var e=G(b).join(""),f=Xb[d];e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(g){return f[g]&&(!e||e.has(f[g].type))?f[g].to:g})}
|
5
|
+
function gc(){var a;Xb={zenkaku:{},hankaku:{}};Wb.forEach(function(b){N(b.start,b.end,function(c){$(b.type,t.fromCharCode(c),t.fromCharCode(c+b.shift))})});ec.each(function(b,c){a=dc.charAt(c);$("k",a,b);b.match(bc)&&$("k",a+"\uff9e",b.shift(1));b.match(cc)&&$("k",a+"\uff9f",b.shift(2))});ac.each(function(b,c){$("p",$b.charAt(c),b)});$("k","\uff73\uff9e","\u30f4");$("k","\uff66\uff9e","\u30fa");$("s"," ","\u3000")}function $(a,b,c){Xb.zenkaku[b]={type:a,to:c};Xb.hankaku[c]={type:a,to:b}}
|
6
|
+
function hc(){Sb={};H(Vb,function(a,b){b.split("").forEach(function(c){Sb[c]=a});Tb+=b});Tb=q("["+Tb+"]","g")}
|
7
|
+
Vb={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",B:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181",C:"C\u24b8\uff23\u0106\u0108\u010a\u010c\u00c7\u1e08\u0187\u023b\ua73e",D:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779",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",
|
8
8
|
F:"F\u24bb\uff26\u1e1e\u0191\ua77b",G:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e",H:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d",I:"I\u24be\uff29\u00cc\u00cd\u00ce\u0128\u012a\u012c\u0130\u00cf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197",J:"J\u24bf\uff2a\u0134\u0248",K:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2",L:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780",
|
9
9
|
M:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c",N:"N\u24c3\uff2e\u01f8\u0143\u00d1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4",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",P:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754",Q:"Q\u24c6\uff31\ua756\ua758\u024a",R:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782",
|
10
10
|
S:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784",T:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786",U:"U\u24ca\uff35\u00d9\u00da\u00db\u0168\u1e78\u016a\u1e7a\u016c\u00dc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244",V:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245",W:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72",
|
@@ -14,6 +14,6 @@ j:"j\u24d9\uff4a\u0135\u01f0\u0249",k:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e
|
|
14
14
|
p:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755",q:"q\u24e0\uff51\u024b\ua757\ua759",r:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783",s:"s\u24e2\uff53\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b",t:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787",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",
|
15
15
|
v:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c",w:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73",x:"x\u24e7\uff58\u1e8b\u1e8d",y:"y\u24e8\uff59\u1ef3\u00fd\u0177\u1ef9\u0233\u1e8f\u00ff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff",z:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763",AA:"\ua732",AE:"\u00c6\u01fc\u01e2",AO:"\ua734",AU:"\ua736",AV:"\ua738\ua73a",AY:"\ua73c",DZ:"\u01f1\u01c4",Dz:"\u01f2\u01c5",LJ:"\u01c7",Lj:"\u01c8",NJ:"\u01ca",Nj:"\u01cb",OI:"\u01a2",
|
16
16
|
OO:"\ua74e",OU:"\u0222",TZ:"\ua728",VY:"\ua760",aa:"\ua733",ae:"\u00e6\u01fd\u01e3",ao:"\ua735",au:"\ua737",av:"\ua739\ua73b",ay:"\ua73d",dz:"\u01f3\u01c6",hv:"\u0195",lj:"\u01c9",nj:"\u01cc",oi:"\u01a3",ou:"\u0223",oo:"\ua74f",ss:"\u00df",tz:"\ua729",vy:"\ua761"};
|
17
|
-
|
17
|
+
F(t,k,m,{normalize:function(){Sb||hc();return this.replace(Tb,function(a){return Sb[a]})},hankaku:function(){return fc(this,arguments,Zb,"hankaku")},zenkaku:function(){return fc(this,arguments,Yb,"zenkaku")},hiragana:function(a){var b=this;if(a!==m)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)})}});
|
18
18
|
[{ca:["Arabic"],source:"\u0600-\u06ff"},{ca:["Cyrillic"],source:"\u0400-\u04ff"},{ca:["Devanagari"],source:"\u0900-\u097f"},{ca:["Greek"],source:"\u0370-\u03ff"},{ca:["Hangul"],source:"\uac00-\ud7af\u1100-\u11ff"},{ca:["Han","Kanji"],source:"\u4e00-\u9fff\uf900-\ufaff"},{ca:["Hebrew"],source:"\u0590-\u05ff"},{ca:["Hiragana"],source:"\u3040-\u309f\u30fb-\u30fc"},{ca:["Kana"],source:"\u3040-\u30ff\uff61-\uff9f"},{ca:["Katakana"],source:"\u30a0-\u30ff\uff61-\uff9f"},{ca:["Latin"],source:"\u0001-\u0080-\u00ff\u0100-\u017f\u0180-\u024f"},
|
19
|
-
{ca:["Thai"],source:"\u0e00-\u0e7f"}].forEach(function(a){var b=
|
19
|
+
{ca:["Thai"],source:"\u0e00-\u0e7f"}].forEach(function(a){var b=q("^["+a.source+"\\s]+$"),c=q("["+a.source+"]");a.ca.forEach(function(d){ja(t.prototype,"is"+d,function(){return b.test(this.trim())});ja(t.prototype,"has"+d,function(){return c.test(this)})})});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
function
|
2
|
-
|
3
|
-
|
4
|
-
d=
|
5
|
-
a,b,c)},ordinalize:function(){var a=this.abs();a=parseInt(a.toString().slice(-2));return this+
|
1
|
+
function yb(a,b,c,d,e,f){var g=a.toFixed(20),j=g.search(/\./);g=g.search(/[1-9]/);j=j-g;if(j>0)j-=1;e=v.max(v.min((j/3).floor(),e===m?c.length:e),-d);d=c.charAt(e+d-1);if(j<-9){e=-3;b=j.abs()-9;d=c.slice(0,1)}return(a/(f?(2).pow(10*e):(10).pow(e*3))).round(b||0).format()+d.trim()}
|
2
|
+
F(u,m,m,{random:function(a,b){var c,d;if(arguments.length==1){b=a;a=0}c=v.min(a||0,K(b)?1:b);d=v.max(a||0,K(b)?1:b);return O(v.random()*(d-c)+c)}});
|
3
|
+
F(u,k,m,{log:function(a){return v.log(this)/(a?v.log(a):1)},abbr:function(a){return yb(this,a,"kmbt",0,4)},metric:function(a,b){return yb(this,a,"n\u03bcm kMGTPE",4,K(b)?1:b)},bytes:function(a,b){return yb(this,a,"kMGTPE",0,K(b)?4:b,k)+"B"},isInteger:function(){return this%1==0},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},format:function(a,b,c){var d,e,f=/(\d+)(\d{3})/;if(t(b).match(/\d/))throw new TypeError("Thousands separator cannot contain numbers.");
|
4
|
+
d=B(a)?O(this,a||0).toFixed(v.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+oa((a||0)-e.length,"0")+e;return d},hex:function(a){return this.pad(a||1,m,16)},upto:function(a,b,c){return N(this,a,b,c||1)},downto:function(a,b,c){return N(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},chr:function(){return t.fromCharCode(this)},pad:function(a,b,c){return R(this,
|
5
|
+
a,b,c)},ordinalize:function(){var a=this.abs();a=parseInt(a.toString().slice(-2));return this+pa(a)},toNumber:function(){return parseFloat(this,10)}});I(u,k,m,"round,floor,ceil",function(a,b){a[b]=function(c){return O(this,c,b)}});I(u,k,m,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(a,b){a[b]=function(c,d){return v[b](this,c,d)}});
|
@@ -1,6 +1,6 @@
|
|
1
|
-
var
|
2
|
-
function
|
3
|
-
|
4
|
-
|
5
|
-
values:function(a,b){var c=[];
|
6
|
-
has:function(a,b){return ma(a,b)}});
|
1
|
+
var Bb="isObject,isNaN".split(","),Cb="keys,values,each,merge,clone,equal,watch,tap,has".split(",");
|
2
|
+
function Db(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,j;if(d!==m&&(g=b.match(e))){j=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(i){f=!i||i.match(/^\d+$/);if(!j&&fa(a))j=a.length;a[j]||(a[j]=f?[]:{});a=a[j];j=i});if(!j&&f)j=a.length.toString();Db(a,j,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?k:c==="false"?m:c}F(o,m,k,{watch:function(a,b,c){if(ea){var d=a[b];o.defineProperty(a,b,{enumerable:k,configurable:k,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
|
3
|
+
F(o,m,function(a,b){return A(b)},{keys:function(a,b){var c=o.keys(a);c.forEach(function(d){b.call(a,d,a[d])});return c}});
|
4
|
+
F(o,m,m,{isObject:function(a){return L(a)},isNaN:function(a){return B(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return ta(a)&&ta(b)?sa(a)===sa(b):a===b},extended:function(a){return new M(a)},merge:function(a,b,c,d){var e,f;if(a&&typeof b!="string")for(e in b)if(ma(b,e)&&a){f=b[e];if(J(a[e])){if(d===m)continue;if(A(d))f=d.call(b,e,a[e],b[e])}if(c===k&&f&&la(f))if(ha(f))f=new s(f.getTime());else if(E(f))f=new q(f.source,ra(f));else{a[e]||(a[e]=p.isArray(f)?[]:{});o.merge(a[e],b[e],c,d);continue}a[e]=
|
5
|
+
f}return a},values:function(a,b){var c=[];H(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){if(!la(a))return a;if(p.isArray(a))return a.concat();var c=a instanceof M?new M:{};return o.merge(c,a,b)},fromQueryString:function(a,b){var c=o.extended();a=a&&a.toString?a.toString():"";decodeURIComponent(a.replace(/^.*?\?/,"")).split("&").forEach(function(d){d=d.split("=");d.length===2&&Db(c,d[0],d[1],b)});return c},tap:function(a,b){var c=b;A(b)||(c=function(){b&&a[b]()});c.call(a,
|
6
|
+
a);return a},has:function(a,b){return ma(a,b)}});I(o,m,m,w,function(a,b){var c="is"+b;Bb.push(c);a[c]=function(d){return o.prototype.toString.call(d)==="[object "+b+"]"}});(function(){F(o,m,function(){return arguments.length===0},{extend:function(){va(Bb.concat(Cb),o)}})})();va(Cb,M);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
F(q,m,m,{escape:function(a){return S(a)}});
|
2
|
+
F(q,k,m,{getFlags:function(){return ra(this)},setFlags:function(a){return q(this.source,a)},addFlag:function(a){return this.setFlags(ra(this,a))},removeFlag:function(a){return this.setFlags(ra(this).replace(a,""))}});
|
@@ -1,12 +1,12 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
d;if(
|
4
|
-
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(
|
5
|
-
a:
|
6
|
-
"-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(
|
7
|
-
" ")},stripTags:function(){var a=this;
|
8
|
-
|
9
|
-
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)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};
|
10
|
-
c){return!!(a=a[c])});return a}});
|
11
|
-
(function(a){if(this.btoa){
|
12
|
-
do{e=a.indexOf(c.charAt(
|
1
|
+
var Eb,Fb;
|
2
|
+
F(t,k,m,{escapeRegExp:function(){return S(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,"&").replace(/</g,"<").replace(/>/g,">")},unescapeHTML:function(){return this.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},encodeBase64:function(){return Eb(this)},decodeBase64:function(){return Fb(this)},each:function(a,b){var c,
|
3
|
+
d;if(A(a)){b=a;a=/[\s\S]/g}else if(a)if(D(a))a=q(S(a),"gi");else{if(E(a))a=q(a.source,ra(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(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+=t.fromCharCode(c+a)});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.each(a)},words:function(a){return this.trim().each(/\S+/g,
|
4
|
+
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(K(b))b=k;var c=E(a)?a.source.replace("^",""):S(a);return q("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("$",""):S(a);return q(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(E(a)?
|
5
|
+
a:S(a))!==-1},add:function(a,b){b=K(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return ua(this,arguments,k)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
|
6
|
+
"-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(t.Inflector&&t.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=d;b=(c=t.Inflector)&&c.acronyms[b];b=D(b)?b:void 0;e=a!==m||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g,
|
7
|
+
" ")},stripTags:function(){var a=this;G(arguments.length>0?arguments:[""],function(b){a=a.replace(q("</?"+S(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;G(arguments.length>0?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",f="",g=this.toString(),j="["+qa()+"]+",i="[^"+qa()+"]*",h=q(j+i+"$");d=K(d)?"...":t(d);if(g.length<=a)return g;switch(c){case "left":a=g.length-a;e=d;g=g.slice(a);
|
8
|
+
h=q("^"+i+j);break;case "middle":a=P(a/2);f=d+g.slice(g.length-a).trimLeft();g=g.slice(0,a);break;default:a=a;f=d;g=g.slice(0,a)}if(b===m&&this.slice(a,a+1).match(/\S/))g=g.remove(h);return e+g+f},pad:function(a,b){return oa(b,a)+this+oa(b,a)},padLeft:function(a,b){return oa(b,a)+this},padRight:function(a,b){return this+oa(b,a)},first:function(a){if(K(a))a=1;return this.substr(0,a)},last:function(a){if(K(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;if(B(a)&&
|
9
|
+
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)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};G(arguments,function(b,c){if(L(b))na(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return ma(a,c)?a[c]:b})},namespace:function(a){a=a||ba;H(this.split("."),function(b,
|
10
|
+
c){return!!(a=a[c])});return a}});F(t,k,m,{insert:t.prototype.add});
|
11
|
+
(function(a){if(this.btoa){Eb=this.btoa;Fb=this.atob}else{var b=/[^A-Za-z0-9\+\/\=]/g;Eb=function(c){var d="",e,f,g,j,i,h,n=0;do{e=c.charCodeAt(n++);f=c.charCodeAt(n++);g=c.charCodeAt(n++);j=e>>2;e=(e&3)<<4|f>>4;i=(f&15)<<2|g>>6;h=g&63;if(isNaN(f))i=h=64;else if(isNaN(g))h=64;d=d+a.charAt(j)+a.charAt(e)+a.charAt(i)+a.charAt(h)}while(n<c.length);return d};Fb=function(c){var d="",e,f,g,j,i,h=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");
|
12
|
+
do{e=a.indexOf(c.charAt(h++));f=a.indexOf(c.charAt(h++));j=a.indexOf(c.charAt(h++));i=a.indexOf(c.charAt(h++));e=e<<2|f>>4;f=(f&15)<<4|j>>2;g=(j&3)<<6|i;d+=t.fromCharCode(e);if(j!=64)d+=t.fromCharCode(f);if(i!=64)d+=t.fromCharCode(g)}while(h<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
|