//>>built
define("dojox/date/islamic/locale","dojox/main dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./Date dojo/i18n!dojo/cldr/nls/islamic".split(" "),function(z,t,q,A,r,B,u,C,F){function D(d,c,e,h,k){return k.replace(/([a-z])\1*/ig,function(a){var f=a.charAt(0);a=a.length;var g=["abbr","wide","narrow"];switch(f){case "G":var b=c.eraAbbr[0];break;case "y":b=String(d.getFullYear());break;case "M":b=d.getMonth();if(3>a){b+=1;var m=!0}else f=["months-format",g[a-3]].join("-"),
b=c[f][b];break;case "d":b=d.getDate(!0);m=!0;break;case "E":b=d.getDay();3>a?(b+=1,m=!0):(f=["days-format",g[a-3]].join("-"),b=c[f][b]);break;case "a":b=12>d.getHours()?"am":"pm";b=c["dayPeriods-format-wide-"+b];break;case "h":case "H":case "K":case "k":m=d.getHours();switch(f){case "h":b=m%12||12;break;case "H":b=m;break;case "K":b=m%12;break;case "k":b=m||24}m=!0;break;case "m":b=d.getMinutes();m=!0;break;case "s":b=d.getSeconds();m=!0;break;case "S":b=Math.round(d.getMilliseconds()*Math.pow(10,
a-3));m=!0;break;case "z":if(b=A.getTimezoneName(d.toGregorian()))break;a=4;case "Z":b=d.toGregorian().getTimezoneOffset();b=[0>=b?"+":"-",u.pad(Math.floor(Math.abs(b)/60),2),u.pad(Math.abs(b)%60,2)];4==a&&(b.splice(0,0,"GMT"),b.splice(3,0,":"));b=b.join("");break;default:throw Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+k);}m&&(b=u.pad(b,a));return b})}function v(d,c,e,h){var k=function(g){return g};c=c||k;e=e||k;h=h||k;var a=d.match(/(''|[^'])+/g),f="'"==d.charAt(0);
q.forEach(a,function(g,b){g?(a[b]=(f?e:c)(g),f=!f):a[b]=""});return h(a.join(""))}function E(d,c,e,h){h=B.escapeString(h);r.normalizeLocale(e.locale);return h.replace(/([a-z])\1*/ig,function(k){var a=k.charAt(0);var f=k.length,g="";e.strict?1<f&&(g="0{"+(f-1)+"}"):g="0?";switch(a){case "y":a="\\d+";break;case "M":a=2<f?"\\S+ ?\\S+":g+"[1-9]|1[0-2]";break;case "d":a="[12]\\d|"+g+"[1-9]|3[01]";break;case "E":a="\\S+";break;case "h":a=g+"[1-9]|1[0-2]";break;case "k":a=g+"\\d|1[01]";break;case "H":a=
g+"\\d|1\\d|2[0-3]";break;case "K":a=g+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":a=g+"\\d|[0-5]\\d";break;case "S":a="\\d{"+f+"}";break;case "a":f=e.am||c["dayPeriods-format-wide-am"];g=e.pm||c["dayPeriods-format-wide-pm"];e.strict?a=f+"|"+g:(a=f+"|"+g,f!=f.toLowerCase()&&(a+="|"+f.toLowerCase()),g!=g.toLowerCase()&&(a+="|"+g.toLowerCase()));break;default:a=".*"}d&&d.push(k);return"("+a+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var l=t.getObject("date.islamic.locale",!0,z);l.format=function(d,c){c=
c||{};var e=r.normalizeLocale(c.locale),h=c.formatLength||"short",k=l._getIslamicBundle(e),a=[];e=t.hitch(this,D,d,k,e,c.fullYear);if("year"==c.selector)return d.getFullYear();if("time"!=c.selector){var f=c.datePattern||k["dateFormat-"+h];f&&a.push(v(f,e))}"date"!=c.selector&&(h=c.timePattern||k["timeFormat-"+h])&&a.push(v(h,e));return a.join(" ")};l.regexp=function(d){return l._parseInfo(d).regexp};l._parseInfo=function(d){d=d||{};var c=r.normalizeLocale(d.locale);c=l._getIslamicBundle(c);var e=
d.formatLength||"short",h=d.datePattern||c["dateFormat-"+e];e=d.timePattern||c["timeFormat-"+e];var k=[];return{regexp:v("date"==d.selector?h:"time"==d.selector?e:"undefined"==typeof e?h:h+" "+e,t.hitch(this,E,k,c,d)),tokens:k,bundle:c}};l.parse=function(d,c){d=d.replace(/[\u200E\u200F\u202A\u202E]/g,"");c||(c={});var e=l._parseInfo(c),h=e.tokens,k=e.bundle;e=e.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");e=(new RegExp("^"+e+"$")).exec(d);r.normalizeLocale(c.locale);if(!e)return null;var a=[1389,
0,1,0,0,0,0],f="",g=["abbr","wide","narrow"];q.every(e,function(b,m){if(!m)return!0;var n=h[m-1],p=n.length;switch(n.charAt(0)){case "y":a[0]=Number(b);break;case "M":if(2<p){if(n=k["months-format-"+g[p-3]].concat(),c.strict||(b=b.replace(".","").toLowerCase(),n=q.map(n,function(w){return w?w.replace(".","").toLowerCase():w})),b=q.indexOf(n,b),-1==b)return!1}else b--;a[1]=Number(b);break;case "D":a[1]=0;case "d":a[2]=Number(b);break;case "a":n=c.am||k["dayPeriods-format-wide-am"];p=c.pm||k["dayPeriods-format-wide-pm"];
if(!c.strict){var x=/\./g;b=b.replace(x,"").toLowerCase();n=n.replace(x,"").toLowerCase();p=p.replace(x,"").toLowerCase()}if(c.strict&&b!=n&&b!=p)return!1;f=b==p?"p":b==n?"a":"";break;case "K":24==b&&(b=0);case "h":case "H":case "k":a[3]=Number(b);break;case "m":a[4]=Number(b);break;case "s":a[5]=Number(b);break;case "S":a[6]=Number(b)}return!0});e=+a[3];"p"===f&&12>e?a[3]=e+12:"a"===f&&12==e&&(a[3]=0);return new C(a[0],a[1],a[2],a[3],a[4],a[5],a[6])};var y=[];l.addCustomFormats=function(d,c){y.push({pkg:d,
name:c})};l._getIslamicBundle=function(d){var c={};q.forEach(y,function(e){e=r.getLocalization(e.pkg,e.name,d);c=t.mixin(c,e)},this);return c};l.addCustomFormats("dojo.cldr","islamic");l.getNames=function(d,c,e,h,k){h=l._getIslamicBundle(h);d=[d,e,c];if("standAlone"==e){e=d.join("-");var a=h[e];1==a[0]&&(a=void 0)}d[1]="format";return(a||h[d.join("-")]).concat()};l.weekDays=l.getNames("days","wide","format");l.months=l.getNames("months","wide","format");return l});