/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/i18n","./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./_base/xhr ./json module".split(" "),function(u,n,A,B,T,q,N,U,V){A.add("dojo-preload-i18n-Api",1);var C=u.i18n={},W=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,X=function(a,b,d,c){var f=[d+c];b=b.split("-");for(var k="",g=0;g<b.length;g++)if(k+=(k?"-":"")+b[g],!a||a[k])f.push(d+k+"/"+c),f.specificity=k;return f},l={},O=function(a,b,d){d=d?d.toLowerCase():u.locale;a=a.replace(/\./g,"/");b=b.replace(/\./g,"/");
return/root/i.test(d)?a+"/nls/"+b:a+"/nls/"+d+"/"+b},Y=u.getL10nName=function(a,b,d){return a=V.id+"!"+O(a,b,d)},Z=function(a,b,d,c,f,k){a([b],function(g){var h=q.clone(g.root||g.ROOT),e=X(!g._v1x&&g,f,d,c);a(e,function(){for(var m=1;m<e.length;m++)h=q.mixin(q.clone(h),arguments[m]);l[b+"/"+f]=h;h.$locale=e.specificity;k()})})},aa=function(a){var b=T.extraLocale||[];b=q.isArray(b)?b:[b];b.push(a);return b},I=function(a,b,d){var c=W.exec(a),f=c[1]+"/",k=c[5]||c[4],g=f+k,h=(c=c[5]&&c[4])||u.locale||
"",e=g+"/"+h;c=c?[h]:aa(h);var m=c.length,r=function(){--m||d(q.delegate(l[e]))};h=a.split("*");var v="preload"==h[1];if(A("dojo-preload-i18n-Api")){if(v&&(l[a]||(l[a]=1,ba(h[2],U.parse(h[3]),1,b)),d(1)),(h=v)||(w&&H.push([a,b,d]),h=w&&!l[e]),h)return}else if(v){d(1);return}B.forEach(c,function(x){var p=g+"/"+x;A("dojo-preload-i18n-Api")&&D(p);l[p]?r():Z(b,g,f,k,x,r)})};A("dojo-preload-i18n-Api");var ca=C.normalizeLocale=function(a){a=a?a.toLowerCase():u.locale;return"root"==a?"ROOT":a},w=0,H=[],
ba=C._preloadLocalizations=function(a,b,d,c){function f(e,m){c.isXdUrl(n.toUrl(e+".js"))||d?c([e],m):P([e],m,c)}function k(e,m){for(var r=e.split("-");r.length;){if(m(r.join("-")))return;r.pop()}m("ROOT")}function g(){for(--w;!w&&H.length;)I.apply(null,H.shift())}function h(e){e=ca(e);k(e,function(m){if(0<=B.indexOf(b,m)){var r=a.replace(/\./g,"/")+"_"+m;w++;f(r,function(v){for(var x in v){var p=v[x],y=x.match(/(.+)\/([^\/]+)$/);if(y){var Q=y[2];y=y[1]+"/";if(p._localized){var J;if("ROOT"===m){var R=
J=p._localized;delete p._localized;R.root=p;l[n.toAbsMid(x)]=R}else J=p._localized,l[n.toAbsMid(y+Q+"/"+m)]=p;m!==e&&function(E,F,z,da){var G=[],S=[];k(e,function(t){da[t]&&(G.push(n.toAbsMid(E+t+"/"+F)),S.push(n.toAbsMid(E+F+"/"+t)))});G.length?(w++,c(G,function(){for(var t=G.length-1;0<=t;t--)z=q.mixin(q.clone(z),arguments[t]),l[S[t]]=z;l[n.toAbsMid(E+F+"/"+e)]=q.clone(z);g()})):l[n.toAbsMid(E+F+"/"+e)]=z}(y,Q,p,J)}}}g()});return!0}return!1})}c=c||n;h();B.forEach(u.config.extraLocale,h)},D=function(){},
K={},L={},M,P=function(a,b,d){var c=[];B.forEach(a,function(f){function k(e){M||(M=new Function("__bundle","__checkForLegacyModules","__mid","__amdValue","var define \x3d function(mid, factory){define.called \x3d 1; __amdValue.result \x3d factory || mid;},\t   require \x3d function(){define.called \x3d 1;};try{define.called \x3d 0;eval(__bundle);if(define.called\x3d\x3d1)return __amdValue;if((__checkForLegacyModules \x3d __checkForLegacyModules(__mid)))return __checkForLegacyModules;}catch(e){}try{return eval('('+__bundle+')');}catch(e){return e;}"));
e=M(e,D,f,K);e===K?c.push(l[g]=K.result):(e instanceof Error&&(e={}),c.push(l[g]=/nls\/[^\/]+\/[^\/]+$/.test(g)?e:{root:e,_v1x:1}))}var g=d.toUrl(f+".js");if(l[g])c.push(l[g]);else{var h=d.syncLoadNls(f);h||(h=D(f.replace(/nls\/([^\/]*)\/([^\/]*)$/,"nls/$2/$1")));if(h)c.push(h);else if(N)N.get({url:g,sync:!0,load:k,error:function(){c.push(l[g]={})}});else try{d.getText(g,!0,k)}catch(e){c.push(l[g]={})}}});b&&b.apply(null,c)};D=function(a){for(var b,d=a.split("/"),c=u.global[d[0]],f=1;c&&f<d.length-
1;c=c[d[f++]]);c&&((b=c[d[f]])||(b=c[d[f].replace(/-/g,"_")]),b&&(l[a]=b));return b};C.getLocalization=function(a,b,d){var c,f=O(a,b,d);if(L[f])return L[f];I(f,n.isXdUrl(n.toUrl(f+".js"))?n:function(k,g){P(k,g,n)},function(k){c=L[f]=k});return c};return q.mixin(C,{dynamic:!0,normalize:function(a,b){return/^\./.test(a)?b(a):a},load:I,cache:l,getL10nName:Y})});