(function(a){var e={"invariant":{}};a.extend({findClosestCulture:function(b){var c;if(!b)c=a.culture||a.cultures.invariant;else if(a.isPlainObject(b))c=b;else{for(var f=a.cultures,e=a.isArray(b)?b:[b],h=e.length,d=0;d1?parseInt(e[1],10):0;b=e[0];e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=f(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=f(b,c+1);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(h>0)a=l["."]+(a.length>h?a.slice(0,h):f(a,h));else a="";var d=b.length-1,o=l[","],g="";while(d>=0){if(i===0||i>d)return b.slice(0,d+1)+(g.length?o+g+a:a);g=b.slice(d-i+1,d+1)+(g.length?o+g:"");d-=i;if(k1)e=parseInt(d.slice(1),10);var l=d.charAt(0).toUpperCase(),b;switch(l){case"D":i="n";if(e!==-1)c=f(""+c,e,true);if(j<0)c=-c;break;case"N":b=h;case"C":b=b||h.currency;case"P":b=b||h.percent;i=j<0?b.pattern[0]:b.pattern[1]||"n";if(e===-1)e=b.decimals;c=x(c*(l==="P"?100:1),e,b);break;default:a.error("Bad number format specifier: "+l)}for(var m=/n|\$|-|%/g,g="";true;){var o=m.lastIndex,k=m.exec(i);g+=i.slice(o,k?k.index:i.length);if(!k)break;switch(k[0]){case"n":g+=c;break;case"$":g+=h.currency.symbol;break;case"-":if(/[1-9]/.test(c))g+=h["-"];break;case"%":g+=h.percent.symbol}}return g}function b(a,c,b){return ab}function A(d,b){var e=new Date,f=g(e);if(b<100){var a=d.twoDigitYearMax;a=typeof a==="string"?(new Date).getFullYear()%100+parseInt(a,10):a;var c=j(e,d,f);b+=c-c%100;if(b>a)b-=100}return b}function g(e,c){if(!c)return 0;for(var b,d=e.getTime(),a=0,f=c.length;a=b)return a}return 0}function m(a){return a.split("\u00a0").join(" ").toUpperCase()}function c(b){return a.map(b,function(a){return m(a)})}function j(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e].offset;return a}function z(g,d,h){var e,f=g.days,b=g._upperDays;if(!b)g._upperDays=b=[c(f[0]),c(f[1]),c(f[2])];d=m(d);if(h){e=a.inArray(d,b[1]);if(e===-1)e=a.inArray(d,b[2])}else e=a.inArray(d,b[0]);return e}function v(b,f,i){var d=b.months,j=b.monthsGenitive||b.months,e=b._upperMonths,g=b._upperMonthsGen;if(!e){b._upperMonths=e=[c(d[0]),c(d[1])];b._upperMonthsGen=g=[c(d[2]||d[0]),c(d[3]||d[1])]}f=m(f);var h=a.inArray(f,i?e[1]:e[0]);if(h<0)h=a.inArray(f,i?g[1]:g[0]);return h}function h(e,b){for(var d=0,a=false,c=0,g=e.length;c1&&c.length