]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/javascript/yui3/build/loader/loader.js
Release 6.2.2
[Github/sugarcrm.git] / include / javascript / yui3 / build / loader / loader.js
1 /*
2  Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3  Code licensed under the BSD License:
4  http://developer.yahoo.com/yui/license.html
5  version: 3.3.0
6  build: 3167
7  */
8 YUI.add('loader-base',function(Y){if(!YUI.Env[Y.version]){(function(){var VERSION=Y.version,BUILD='/build/',ROOT=VERSION+BUILD,CDN_BASE=Y.Env.base,GALLERY_VERSION='gallery-2010.12.16-18-24',TNT='2in3',TNT_VERSION='4',YUI2_VERSION='2.8.2',COMBO_BASE=CDN_BASE+'combo?',META={version:VERSION,root:ROOT,base:Y.Env.base,comboBase:COMBO_BASE,skin:{defaultSkin:'sam',base:'assets/skins/',path:'skin.css',after:['cssreset','cssfonts','cssgrids','cssbase','cssreset-context','cssfonts-context']},groups:{},patterns:{}},groups=META.groups,yui2Update=function(tnt,yui2){var root=TNT+'.'+
9 (tnt||TNT_VERSION)+'/'+
10 (yui2||YUI2_VERSION)+BUILD;groups.yui2.base=CDN_BASE+root;groups.yui2.root=root;},galleryUpdate=function(tag){var root=(tag||GALLERY_VERSION)+BUILD;groups.gallery.base=CDN_BASE+root;groups.gallery.root=root;};groups[VERSION]={};groups.gallery={ext:false,combine:true,comboBase:COMBO_BASE,update:galleryUpdate,patterns:{'gallery-':{},'gallerycss-':{type:'css'}}};groups.yui2={combine:true,ext:false,comboBase:COMBO_BASE,update:yui2Update,patterns:{'yui2-':{configFn:function(me){if(/-skin|reset|fonts|grids|base/.test(me.name)){me.type='css';me.path=me.path.replace(/\.js/,'.css');me.path=me.path.replace(/\/yui2-skin/,'/assets/skins/sam/yui2-skin');}}}}};galleryUpdate();yui2Update();YUI.Env[VERSION]=META;}());}
11 var NOT_FOUND={},NO_REQUIREMENTS=[],MAX_URL_LENGTH=(Y.UA.ie)?2048:8192,GLOBAL_ENV=YUI.Env,GLOBAL_LOADED=GLOBAL_ENV._loaded,CSS='css',JS='js',INTL='intl',VERSION=Y.version,ROOT_LANG='',YObject=Y.Object,oeach=YObject.each,YArray=Y.Array,_queue=GLOBAL_ENV._loaderQueue,META=GLOBAL_ENV[VERSION],SKIN_PREFIX='skin-',L=Y.Lang,ON_PAGE=GLOBAL_ENV.mods,modulekey,cache,_path=function(dir,file,type,nomin){var path=dir+'/'+file;if(!nomin){path+='-min';}
12 path+='.'+(type||CSS);return path;};Y.Env.meta=META;Y.Loader=function(o){var defaults=META.modules,self=this;modulekey=META.md5;self.context=Y;self.base=Y.Env.meta.base;self.comboBase=Y.Env.meta.comboBase;self.combine=o.base&&(o.base.indexOf(self.comboBase.substr(0,20))>-1);self.maxURLLength=MAX_URL_LENGTH;self.root=Y.Env.meta.root;self.timeout=0;self.forceMap={};self.allowRollup=true;self.filters={};self.required={};self.patterns={};self.moduleInfo={};self.groups=Y.merge(Y.Env.meta.groups);self.skin=Y.merge(Y.Env.meta.skin);self.conditions={};self.config=o;self._internal=true;cache=GLOBAL_ENV._renderedMods;if(cache){oeach(cache,function(v,k){self.moduleInfo[k]=Y.merge(v);});cache=GLOBAL_ENV._conditions;oeach(cache,function(v,k){self.conditions[k]=Y.merge(v);});}else{oeach(defaults,self.addModule,self);}
13 if(!GLOBAL_ENV._renderedMods){GLOBAL_ENV._renderedMods=Y.merge(self.moduleInfo);GLOBAL_ENV._conditions=Y.merge(self.conditions);}
14 self._inspectPage();self._internal=false;self._config(o);self.sorted=[];self.loaded=GLOBAL_LOADED[VERSION];self.dirty=true;self.inserted={};self.skipped={};self.tested={};};Y.Loader.prototype={FILTER_DEFS:{RAW:{'searchExp':'-min\\.js','replaceStr':'.js'},DEBUG:{'searchExp':'-min\\.js','replaceStr':'-debug.js'}},_inspectPage:function(){oeach(ON_PAGE,function(v,k){if(v.details){var m=this.moduleInfo[k],req=v.details.requires,mr=m&&m.requires;if(m){if(!m._inspected&&req&&mr.length!=req.length){delete m.expanded;}}else{m=this.addModule(v.details,k);}
15 m._inspected=true;}},this);},_requires:function(mod1,mod2){var i,rm,after_map,s,info=this.moduleInfo,m=info[mod1],other=info[mod2];if(!m||!other){return false;}
16 rm=m.expanded_map;after_map=m.after_map;if(after_map&&(mod2 in after_map)){return true;}
17 after_map=other.after_map;if(after_map&&(mod1 in after_map)){return false;}
18 s=info[mod2]&&info[mod2].supersedes;if(s){for(i=0;i<s.length;i++){if(this._requires(mod1,s[i])){return true;}}}
19 s=info[mod1]&&info[mod1].supersedes;if(s){for(i=0;i<s.length;i++){if(this._requires(mod2,s[i])){return false;}}}
20 if(rm&&(mod2 in rm)){return true;}
21 if(m.ext&&m.type==CSS&&!other.ext&&other.type==CSS){return true;}
22 return false;},_config:function(o){var i,j,val,f,group,groupName,self=this;if(o){for(i in o){if(o.hasOwnProperty(i)){val=o[i];if(i=='require'){self.require(val);}else if(i=='skin'){Y.mix(self.skin,o[i],true);}else if(i=='groups'){for(j in val){if(val.hasOwnProperty(j)){groupName=j;group=val[j];self.addGroup(group,groupName);}}}else if(i=='modules'){oeach(val,self.addModule,self);}else if(i=='gallery'){this.groups.gallery.update(val);}else if(i=='yui2'||i=='2in3'){this.groups.yui2.update(o['2in3'],o.yui2);}else if(i=='maxURLLength'){self[i]=Math.min(MAX_URL_LENGTH,val);}else{self[i]=val;}}}}
23 f=self.filter;if(L.isString(f)){f=f.toUpperCase();self.filterName=f;self.filter=self.FILTER_DEFS[f];if(f=='DEBUG'){self.require('yui-log','dump');}}},formatSkin:function(skin,mod){var s=SKIN_PREFIX+skin;if(mod){s=s+'-'+mod;}
24 return s;},_addSkin:function(skin,mod,parent){var mdef,pkg,name,info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(mod){name=this.formatSkin(skin,mod);if(!info[name]){mdef=info[mod];pkg=mdef.pkg||mod;this.addModule({name:name,group:mdef.group,type:'css',after:sinf.after,path:(parent||pkg)+'/'+sinf.base+skin+'/'+mod+'.css',ext:ext});}}
25 return name;},addGroup:function(o,name){var mods=o.modules,self=this;name=name||o.name;o.name=name;self.groups[name]=o;if(o.patterns){oeach(o.patterns,function(v,k){v.group=name;self.patterns[k]=v;});}
26 if(mods){oeach(mods,function(v,k){v.group=name;self.addModule(v,k);},self);}},addModule:function(o,name){name=name||o.name;o.name=name;if(!o||!o.name){return null;}
27 if(!o.type){o.type=JS;}
28 if(!o.path&&!o.fullpath){o.path=_path(name,name,o.type);}
29 o.supersedes=o.supersedes||o.use;o.ext=('ext'in o)?o.ext:(this._internal)?false:true;o.requires=o.requires||[];var subs=o.submodules,i,l,sup,s,smod,plugins,plug,j,langs,packName,supName,flatSup,flatLang,lang,ret,overrides,skinname,when,conditions=this.conditions,trigger;this.moduleInfo[name]=o;if(!o.langPack&&o.lang){langs=YArray(o.lang);for(j=0;j<langs.length;j++){lang=langs[j];packName=this.getLangPackName(lang,name);smod=this.moduleInfo[packName];if(!smod){smod=this._addLangPack(lang,o,packName);}}}
30 if(subs){sup=o.supersedes||[];l=0;for(i in subs){if(subs.hasOwnProperty(i)){s=subs[i];s.path=s.path||_path(name,i,o.type);s.pkg=name;s.group=o.group;if(s.supersedes){sup=sup.concat(s.supersedes);}
31 smod=this.addModule(s,i);sup.push(i);if(smod.skinnable){o.skinnable=true;overrides=this.skin.overrides;if(overrides&&overrides[i]){for(j=0;j<overrides[i].length;j++){skinname=this._addSkin(overrides[i][j],i,name);sup.push(skinname);}}
32 skinname=this._addSkin(this.skin.defaultSkin,i,name);sup.push(skinname);}
33 if(s.lang&&s.lang.length){langs=YArray(s.lang);for(j=0;j<langs.length;j++){lang=langs[j];packName=this.getLangPackName(lang,name);supName=this.getLangPackName(lang,i);smod=this.moduleInfo[packName];if(!smod){smod=this._addLangPack(lang,o,packName);}
34 flatSup=flatSup||YArray.hash(smod.supersedes);if(!(supName in flatSup)){smod.supersedes.push(supName);}
35 o.lang=o.lang||[];flatLang=flatLang||YArray.hash(o.lang);if(!(lang in flatLang)){o.lang.push(lang);}
36 packName=this.getLangPackName(ROOT_LANG,name);supName=this.getLangPackName(ROOT_LANG,i);smod=this.moduleInfo[packName];if(!smod){smod=this._addLangPack(lang,o,packName);}
37 if(!(supName in flatSup)){smod.supersedes.push(supName);}}}
38 l++;}}
39 o.supersedes=YObject.keys(YArray.hash(sup));o.rollup=(l<4)?l:Math.min(l-1,4);}
40 plugins=o.plugins;if(plugins){for(i in plugins){if(plugins.hasOwnProperty(i)){plug=plugins[i];plug.pkg=name;plug.path=plug.path||_path(name,i,o.type);plug.requires=plug.requires||[];plug.group=o.group;this.addModule(plug,i);if(o.skinnable){this._addSkin(this.skin.defaultSkin,i,name);}}}}
41 if(o.condition){trigger=o.condition.trigger;when=o.condition.when;conditions[trigger]=conditions[trigger]||{};conditions[trigger][name]=o.condition;if(when&&when!='after'){if(when=='instead'){o.supersedes=o.supersedes||[];o.supersedes.push(trigger);}else{}}else{o.after=o.after||[];o.after.push(trigger);}}
42 if(o.after){o.after_map=YArray.hash(o.after);}
43 if(o.configFn){ret=o.configFn(o);if(ret===false){delete this.moduleInfo[name];o=null;}}
44 return o;},require:function(what){var a=(typeof what==='string')?arguments:what;this.dirty=true;Y.mix(this.required,YArray.hash(a));},getRequires:function(mod){if(!mod||mod._parsed){return NO_REQUIREMENTS;}
45 var i,m,j,add,packName,lang,name=mod.name,cond,go,adddef=ON_PAGE[name]&&ON_PAGE[name].details,d,r,old_mod,o,skinmod,skindef,intl=mod.lang||mod.intl,info=this.moduleInfo,hash;if(mod.temp&&adddef){old_mod=mod;mod=this.addModule(adddef,name);mod.group=old_mod.group;mod.pkg=old_mod.pkg;delete mod.expanded;}
46 if(mod.expanded&&(!this.lang||mod.langCache===this.lang)){return mod.expanded;}
47 d=[];hash={};r=mod.requires;o=mod.optional;mod._parsed=true;for(i=0;i<r.length;i++){if(!hash[r[i]]){d.push(r[i]);hash[r[i]]=true;m=this.getModule(r[i]);if(m){add=this.getRequires(m);intl=intl||(m.expanded_map&&(INTL in m.expanded_map));for(j=0;j<add.length;j++){d.push(add[j]);}}}}
48 r=mod.supersedes;if(r){for(i=0;i<r.length;i++){if(!hash[r[i]]){if(mod.submodules){d.push(r[i]);}
49 hash[r[i]]=true;m=this.getModule(r[i]);if(m){add=this.getRequires(m);intl=intl||(m.expanded_map&&(INTL in m.expanded_map));for(j=0;j<add.length;j++){d.push(add[j]);}}}}}
50 if(o&&this.loadOptional){for(i=0;i<o.length;i++){if(!hash[o[i]]){d.push(o[i]);hash[o[i]]=true;m=info[o[i]];if(m){add=this.getRequires(m);intl=intl||(m.expanded_map&&(INTL in m.expanded_map));for(j=0;j<add.length;j++){d.push(add[j]);}}}}}
51 cond=this.conditions[name];if(cond){oeach(cond,function(def,condmod){if(!hash[condmod]){go=def&&((def.ua&&Y.UA[def.ua])||(def.test&&def.test(Y,r)));if(go){hash[condmod]=true;d.push(condmod);m=this.getModule(condmod);if(m){add=this.getRequires(m);for(j=0;j<add.length;j++){d.push(add[j]);}}}}},this);}
52 if(mod.skinnable){skindef=this.skin.overrides;if(skindef&&skindef[name]){for(i=0;i<skindef[name].length;i++){skinmod=this._addSkin(skindef[name][i],name);d.push(skinmod);}}else{skinmod=this._addSkin(this.skin.defaultSkin,name);d.push(skinmod);}}
53 mod._parsed=false;if(intl){if(mod.lang&&!mod.langPack&&Y.Intl){lang=Y.Intl.lookupBestLang(this.lang||ROOT_LANG,mod.lang);mod.langCache=this.lang;packName=this.getLangPackName(lang,name);if(packName){d.unshift(packName);}}
54 d.unshift(INTL);}
55 mod.expanded_map=YArray.hash(d);mod.expanded=YObject.keys(mod.expanded_map);return mod.expanded;},getProvides:function(name){var m=this.getModule(name),o,s;if(!m){return NOT_FOUND;}
56 if(m&&!m.provides){o={};s=m.supersedes;if(s){YArray.each(s,function(v){Y.mix(o,this.getProvides(v));},this);}
57 o[name]=true;m.provides=o;}
58 return m.provides;},calculate:function(o,type){if(o||type||this.dirty){if(o){this._config(o);}
59 if(!this._init){this._setup();}
60 this._explode();if(this.allowRollup){this._rollup();}
61 this._reduce();this._sort();}},_addLangPack:function(lang,m,packName){var name=m.name,packPath,existing=this.moduleInfo[packName];if(!existing){packPath=_path((m.pkg||name),packName,JS,true);this.addModule({path:packPath,intl:true,langPack:true,ext:m.ext,group:m.group,supersedes:[]},packName,true);if(lang){Y.Env.lang=Y.Env.lang||{};Y.Env.lang[lang]=Y.Env.lang[lang]||{};Y.Env.lang[lang][name]=true;}}
62 return this.moduleInfo[packName];},_setup:function(){var info=this.moduleInfo,name,i,j,m,l,packName;for(name in info){if(info.hasOwnProperty(name)){m=info[name];if(m){m.requires=YObject.keys(YArray.hash(m.requires));if(m.lang&&m.lang.length){packName=this.getLangPackName(ROOT_LANG,name);this._addLangPack(null,m,packName);}}}}
63 l={};if(!this.ignoreRegistered){Y.mix(l,GLOBAL_ENV.mods);}
64 if(this.ignore){Y.mix(l,YArray.hash(this.ignore));}
65 for(j in l){if(l.hasOwnProperty(j)){Y.mix(l,this.getProvides(j));}}
66 if(this.force){for(i=0;i<this.force.length;i++){if(this.force[i]in l){delete l[this.force[i]];}}}
67 Y.mix(this.loaded,l);this._init=true;},getLangPackName:function(lang,mname){return('lang/'+mname+((lang)?'_'+lang:''));},_explode:function(){var r=this.required,m,reqs,done={},self=this;self.dirty=false;oeach(r,function(v,name){if(!done[name]){done[name]=true;m=self.getModule(name);if(m){var expound=m.expound;if(expound){r[expound]=self.getModule(expound);reqs=self.getRequires(r[expound]);Y.mix(r,YArray.hash(reqs));}
68 reqs=self.getRequires(m);Y.mix(r,YArray.hash(reqs));}}});},getModule:function(mname){if(!mname){return null;}
69 var p,found,pname,m=this.moduleInfo[mname],patterns=this.patterns;if(!m){for(pname in patterns){if(patterns.hasOwnProperty(pname)){p=patterns[pname];if(mname.indexOf(pname)>-1){found=p;break;}}}
70 if(found){if(p.action){p.action.call(this,mname,pname);}else{m=this.addModule(Y.merge(found),mname);m.temp=true;}}}
71 return m;},_rollup:function(){},_reduce:function(r){r=r||this.required;var i,j,s,m,type=this.loadType;for(i in r){if(r.hasOwnProperty(i)){m=this.getModule(i);if(((this.loaded[i]||ON_PAGE[i])&&!this.forceMap[i]&&!this.ignoreRegistered)||(type&&m&&m.type!=type)){delete r[i];}
72 s=m&&m.supersedes;if(s){for(j=0;j<s.length;j++){if(s[j]in r){delete r[s[j]];}}}}}
73 return r;},_finish:function(msg,success){_queue.running=false;var onEnd=this.onEnd;if(onEnd){onEnd.call(this.context,{msg:msg,data:this.data,success:success});}
74 this._continue();},_onSuccess:function(){var self=this,skipped=Y.merge(self.skipped),fn,failed=[],rreg=self.requireRegistration,success,msg;oeach(skipped,function(k){delete self.inserted[k];});self.skipped={};oeach(self.inserted,function(v,k){var mod=self.getModule(k);if(mod&&rreg&&mod.type==JS&&!(k in YUI.Env.mods)){failed.push(k);}else{Y.mix(self.loaded,self.getProvides(k));}});fn=self.onSuccess;msg=(failed.length)?'notregistered':'success';success=!(failed.length);if(fn){fn.call(self.context,{msg:msg,data:self.data,success:success,failed:failed,skipped:skipped});}
75 self._finish(msg,success);},_onFailure:function(o){var f=this.onFailure,msg='failure: '+o.msg;if(f){f.call(this.context,{msg:msg,data:this.data,success:false});}
76 this._finish(msg,false);},_onTimeout:function(){var f=this.onTimeout;if(f){f.call(this.context,{msg:'timeout',data:this.data,success:false});}
77 this._finish('timeout',false);},_sort:function(){var s=YObject.keys(this.required),done={},p=0,l,a,b,j,k,moved,doneKey;for(;;){l=s.length;moved=false;for(j=p;j<l;j++){a=s[j];for(k=j+1;k<l;k++){doneKey=a+s[k];if(!done[doneKey]&&this._requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);done[doneKey]=true;moved=true;break;}}
78 if(moved){break;}else{p++;}}
79 if(!moved){break;}}
80 this.sorted=s;},partial:function(partial,o,type){this.sorted=partial;this.insert(o,type,true);},_insert:function(source,o,type,skipcalc){if(source){this._config(source);}
81 if(!skipcalc){this.calculate(o);}
82 this.loadType=type;if(!type){var self=this;this._internalCallback=function(){var f=self.onCSS,n,p,sib;if(this.insertBefore&&Y.UA.ie){n=Y.config.doc.getElementById(this.insertBefore);p=n.parentNode;sib=n.nextSibling;p.removeChild(n);if(sib){p.insertBefore(n,sib);}else{p.appendChild(n);}}
83 if(f){f.call(self.context,Y);}
84 self._internalCallback=null;self._insert(null,null,JS);};this._insert(null,null,CSS);return;}
85 this._loading=true;this._combineComplete={};this.loadNext();},_continue:function(){if(!(_queue.running)&&_queue.size()>0){_queue.running=true;_queue.next()();}},insert:function(o,type,skipsort){var self=this,copy=Y.merge(this);delete copy.require;delete copy.dirty;_queue.add(function(){self._insert(copy,o,type,skipsort);});this._continue();},loadNext:function(mname){if(!this._loading){return;}
86 var s,len,i,m,url,fn,msg,attr,group,groupName,j,frag,comboSource,comboSources,mods,combining,urls,comboBase,self=this,type=self.loadType,handleSuccess=function(o){self.loadNext(o.data);},handleCombo=function(o){self._combineComplete[type]=true;var i,len=combining.length;for(i=0;i<len;i++){self.inserted[combining[i]]=true;}
87 handleSuccess(o);};if(self.combine&&(!self._combineComplete[type])){combining=[];self._combining=combining;s=self.sorted;len=s.length;comboBase=self.comboBase;url=comboBase;urls=[];comboSources={};for(i=0;i<len;i++){comboSource=comboBase;m=self.getModule(s[i]);groupName=m&&m.group;if(groupName){group=self.groups[groupName];if(!group.combine){m.combine=false;continue;}
88 m.combine=true;if(group.comboBase){comboSource=group.comboBase;}
89 if(group.root){m.root=group.root;}}
90 comboSources[comboSource]=comboSources[comboSource]||[];comboSources[comboSource].push(m);}
91 for(j in comboSources){if(comboSources.hasOwnProperty(j)){url=j;mods=comboSources[j];len=mods.length;for(i=0;i<len;i++){m=mods[i];if(m&&(m.type===type)&&(m.combine||!m.ext)){frag=(m.root||self.root)+m.path;if((url!==j)&&(i<(len-1))&&((frag.length+url.length)>self.maxURLLength)){urls.push(self._filter(url));url=j;}
92 url+=frag;if(i<(len-1)){url+='&';}
93 combining.push(m.name);}}
94 if(combining.length&&(url!=j)){urls.push(self._filter(url));}}}
95 if(combining.length){if(type===CSS){fn=Y.Get.css;attr=self.cssAttributes;}else{fn=Y.Get.script;attr=self.jsAttributes;}
96 fn(urls,{data:self._loading,onSuccess:handleCombo,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,attributes:attr,timeout:self.timeout,autopurge:false,context:self});return;}else{self._combineComplete[type]=true;}}
97 if(mname){if(mname!==self._loading){return;}
98 self.inserted[mname]=true;if(self.onProgress){self.onProgress.call(self.context,{name:mname,data:self.data});}}
99 s=self.sorted;len=s.length;for(i=0;i<len;i=i+1){if(s[i]in self.inserted){continue;}
100 if(s[i]===self._loading){return;}
101 m=self.getModule(s[i]);if(!m){if(!self.skipped[s[i]]){msg='Undefined module '+s[i]+' skipped';self.skipped[s[i]]=true;}
102 continue;}
103 group=(m.group&&self.groups[m.group])||NOT_FOUND;if(!type||type===m.type){self._loading=s[i];if(m.type===CSS){fn=Y.Get.css;attr=self.cssAttributes;}else{fn=Y.Get.script;attr=self.jsAttributes;}
104 url=(m.fullpath)?self._filter(m.fullpath,s[i]):self._url(m.path,s[i],group.base||m.base);fn(url,{data:s[i],onSuccess:handleSuccess,insertBefore:self.insertBefore,charset:self.charset,attributes:attr,onFailure:self._onFailure,onTimeout:self._onTimeout,timeout:self.timeout,autopurge:false,context:self});return;}}
105 self._loading=null;fn=self._internalCallback;if(fn){self._internalCallback=null;fn.call(self);}else{self._onSuccess();}},_filter:function(u,name){var f=this.filter,hasFilter=name&&(name in this.filters),modFilter=hasFilter&&this.filters[name];if(u){if(hasFilter){f=(L.isString(modFilter))?this.FILTER_DEFS[modFilter.toUpperCase()]||null:modFilter;}
106 if(f){u=u.replace(new RegExp(f.searchExp,'g'),f.replaceStr);}}
107 return u;},_url:function(path,name,base){return this._filter((base||this.base||'')+path,name);}};},'3.3.0',{requires:['get']});YUI.add('loader-rollup',function(Y){Y.Loader.prototype._rollup=function(){var i,j,m,s,r=this.required,roll,info=this.moduleInfo,rolled,c,smod;if(this.dirty||!this.rollups){this.rollups={};for(i in info){if(info.hasOwnProperty(i)){m=this.getModule(i);if(m&&m.rollup){this.rollups[i]=m;}}}
108 this.forceMap=(this.force)?Y.Array.hash(this.force):{};}
109 for(;;){rolled=false;for(i in this.rollups){if(this.rollups.hasOwnProperty(i)){if(!r[i]&&((!this.loaded[i])||this.forceMap[i])){m=this.getModule(i);s=m.supersedes||[];roll=false;if(!m.rollup){continue;}
110 c=0;for(j=0;j<s.length;j++){smod=info[s[j]];if(this.loaded[s[j]]&&!this.forceMap[s[j]]){roll=false;break;}else if(r[s[j]]&&m.type==smod.type){c++;roll=(c>=m.rollup);if(roll){break;}}}
111 if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}}
112 if(!rolled){break;}}};},'3.3.0',{requires:['loader-base']});YUI.add('loader-yui3',function(Y){YUI.Env[Y.version].modules=YUI.Env[Y.version].modules||{"anim":{"submodules":{"anim-base":{"requires":["base-base","node-style"]},"anim-color":{"requires":["anim-base"]},"anim-curve":{"requires":["anim-xy"]},"anim-easing":{"requires":["anim-base"]},"anim-node-plugin":{"requires":["node-pluginhost","anim-base"]},"anim-scroll":{"requires":["anim-base"]},"anim-xy":{"requires":["anim-base","node-screen"]}}},"arraysort":{"requires":["yui-base"]},"async-queue":{"requires":["event-custom"]},"attribute":{"submodules":{"attribute-base":{"requires":["event-custom"]},"attribute-complex":{"requires":["attribute-base"]}}},"autocomplete":{"submodules":{"autocomplete-base":{"optional":["autocomplete-sources"],"plugins":{"autocomplete-filters":{"path":"autocomplete/autocomplete-filters-min.js","requires":["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{"path":"autocomplete/autocomplete-filters-accentfold-min.js","requires":["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{"path":"autocomplete/autocomplete-highlighters-min.js","requires":["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{"path":"autocomplete/autocomplete-highlighters-accentfold-min.js","requires":["array-extras","highlight-accentfold"]}},"requires":["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-list":{"after":"autocomplete-sources","lang":["en"],"plugins":{"autocomplete-list-keys":{"condition":{"test":function(Y){return!(Y.UA.ios||Y.UA.android);},"trigger":"autocomplete-list"},"path":"autocomplete/autocomplete-list-keys-min.js","requires":["autocomplete-list","base-build"]},"autocomplete-plugin":{"path":"autocomplete/autocomplete-plugin-min.js","requires":["autocomplete-list","node-pluginhost"]}},"requires":["autocomplete-base","selector-css3","widget","widget-position","widget-position-align","widget-stack"],"skinnable":true},"autocomplete-sources":{"optional":["io-base","json-parse","jsonp","yql"],"requires":["autocomplete-base"]}}},"base":{"submodules":{"base-base":{"after":["attribute-complex"],"requires":["attribute-base"]},"base-build":{"requires":["base-base"]},"base-pluginhost":{"requires":["base-base","pluginhost"]}}},"cache":{"submodules":{"cache-base":{"requires":["base"]},"cache-offline":{"requires":["cache-base","json"]},"cache-plugin":{"requires":["plugin","cache-base"]}}},"charts":{"requires":["dom","datatype","event-custom","event-mouseenter","widget","widget-position","widget-stack"]},"classnamemanager":{"requires":["yui-base"]},"collection":{"submodules":{"array-extras":{},"array-invoke":{},"arraylist":{},"arraylist-add":{"requires":["arraylist"]},"arraylist-filter":{"requires":["arraylist"]}}},"compat":{"requires":["event-base","dom","dump","substitute"]},"console":{"lang":["en","es"],"plugins":{"console-filters":{"requires":["plugin","console"],"skinnable":true}},"requires":["yui-log","widget","substitute"],"skinnable":true},"cookie":{"requires":["yui-base"]},"cssbase":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"path":"cssbase/base-min.css","type":"css"},"cssbase-context":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"path":"cssbase/base-context-min.css","type":"css"},"cssfonts":{"path":"cssfonts/fonts-min.css","type":"css"},"cssfonts-context":{"path":"cssfonts/fonts-context-min.css","type":"css"},"cssgrids":{"optional":["cssreset","cssfonts"],"path":"cssgrids/grids-min.css","type":"css"},"cssgrids-context-deprecated":{"optional":["cssreset-context"],"path":"cssgrids-deprecated/grids-context-min.css","requires":["cssfonts-context"],"type":"css"},"cssgrids-deprecated":{"optional":["cssreset"],"path":"cssgrids-deprecated/grids-min.css","requires":["cssfonts"],"type":"css"},"cssreset":{"path":"cssreset/reset-min.css","type":"css"},"cssreset-context":{"path":"cssreset/reset-context-min.css","type":"css"},"dataschema":{"submodules":{"dataschema-array":{"requires":["dataschema-base"]},"dataschema-base":{"requires":["base"]},"dataschema-json":{"requires":["dataschema-base","json"]},"dataschema-text":{"requires":["dataschema-base"]},"dataschema-xml":{"requires":["dataschema-base"]}}},"datasource":{"submodules":{"datasource-arrayschema":{"requires":["datasource-local","plugin","dataschema-array"]},"datasource-cache":{"requires":["datasource-local","cache-base"]},"datasource-function":{"requires":["datasource-local"]},"datasource-get":{"requires":["datasource-local","get"]},"datasource-io":{"requires":["datasource-local","io-base"]},"datasource-jsonschema":{"requires":["datasource-local","plugin","dataschema-json"]},"datasource-local":{"requires":["base"]},"datasource-polling":{"requires":["datasource-local"]},"datasource-textschema":{"requires":["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{"requires":["datasource-local","plugin","dataschema-xml"]}}},"datatable":{"submodules":{"datatable-base":{"requires":["recordset-base","widget","substitute","event-mouseenter"],"skinnable":true},"datatable-datasource":{"requires":["datatable-base","plugin","datasource-local"]},"datatable-scroll":{"requires":["datatable-base","plugin","stylesheet"]},"datatable-sort":{"lang":["en"],"requires":["datatable-base","plugin","recordset-sort"]}}},"datatype":{"submodules":{"datatype-date":{"lang":["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"],"requires":["yui-base"],"supersedes":["datatype-date-format"]},"datatype-number":{"requires":["yui-base"]},"datatype-xml":{"requires":["yui-base"]}}},"datatype-date-format":{"path":"datatype/datatype-date-format-min.js"},"dd":{"plugins":{"dd-drop-plugin":{"requires":["dd-drop"]},"dd-gestures":{"condition":{"test":function(Y){return(Y.config.win&&('ontouchstart'in Y.config.win&&!Y.UA.chrome));},"trigger":"dd-drag"},"requires":["dd-drag","event-move"]},"dd-plugin":{"optional":["dd-constrain","dd-proxy"],"requires":["dd-drag"]}},"submodules":{"dd-constrain":{"requires":["dd-drag"]},"dd-ddm":{"requires":["dd-ddm-base","event-resize"]},"dd-ddm-base":{"requires":["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{"requires":["dd-ddm"]},"dd-delegate":{"requires":["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{"requires":["dd-ddm-base"]},"dd-drop":{"requires":["dd-ddm-drop"]},"dd-proxy":{"requires":["dd-drag"]},"dd-scroll":{"requires":["dd-drag"]}}},"dial":{"lang":["en","es"],"requires":["widget","dd-drag","substitute","event-mouseenter","transition","intl"],"skinnable":true},"dom":{"plugins":{"dom-deprecated":{"requires":["dom-base"]},"dom-style-ie":{"condition":{"test":function(Y){var testFeature=Y.Features.test,addFeature=Y.Features.add,WINDOW=Y.config.win,DOCUMENT=Y.config.doc,DOCUMENT_ELEMENT='documentElement',ret=false;addFeature('style','computedStyle',{test:function(){return WINDOW&&'getComputedStyle'in WINDOW;}});addFeature('style','opacity',{test:function(){return DOCUMENT&&'opacity'in DOCUMENT[DOCUMENT_ELEMENT].style;}});ret=(!testFeature('style','opacity')&&!testFeature('style','computedStyle'));return ret;},"trigger":"dom-style"},"requires":["dom-style"]},"selector-css3":{"requires":["selector-css2"]}},"requires":["oop"],"submodules":{"dom-base":{"requires":["oop"]},"dom-screen":{"requires":["dom-base","dom-style"]},"dom-style":{"requires":["dom-base"]},"selector":{"requires":["dom-base"]},"selector-css2":{"requires":["selector-native"]},"selector-native":{"requires":["dom-base"]}}},"dump":{"requires":["yui-base"]},"editor":{"submodules":{"createlink-base":{"requires":["editor-base"]},"editor-base":{"requires":["base","frame","node","exec-command","selection"]},"editor-bidi":{"requires":["editor-base"]},"editor-br":{"requires":["node"]},"editor-lists":{"requires":["editor-base"]},"editor-para":{"requires":["node"]},"exec-command":{"requires":["frame"]},"frame":{"requires":["base","node","selector-css3","substitute"]},"selection":{"requires":["node"]}}},"escape":{},"event":{"after":"node-base","plugins":{"event-base-ie":{"after":["event-base"],"condition":{"test":function(Y){var imp=Y.config.doc&&Y.config.doc.implementation;return(imp&&(!imp.hasFeature('Events','2.0')));},"trigger":"node-base"},"requires":["node-base"]},"event-touch":{"requires":["node-base"]}},"submodules":{"event-base":{"after":"node-base","requires":["event-custom-base"]},"event-delegate":{"requires":["node-base"]},"event-focus":{"requires":["event-synthetic"]},"event-hover":{"requires":["event-synthetic"]},"event-key":{"requires":["event-synthetic"]},"event-mouseenter":{"requires":["event-synthetic"]},"event-mousewheel":{"requires":["event-synthetic"]},"event-resize":{"requires":["event-synthetic"]},"event-synthetic":{"requires":["node-base","event-custom-complex"]}}},"event-custom":{"submodules":{"event-custom-base":{"requires":["oop"]},"event-custom-complex":{"requires":["event-custom-base"]}}},"event-gestures":{"submodules":{"event-flick":{"requires":["node-base","event-touch","event-synthetic"]},"event-move":{"requires":["node-base","event-touch","event-synthetic"]}}},"event-simulate":{"requires":["event-base"]},"event-valuechange":{"requires":["event-focus","event-synthetic"]},"highlight":{"submodules":{"highlight-accentfold":{"requires":["highlight-base","text-accentfold"]},"highlight-base":{"requires":["array-extras","escape","text-wordbreak"]}}},"history":{"plugins":{"history-hash-ie":{"condition":{"test":function(Y){var docMode=Y.config.doc.documentMode;return Y.UA.ie&&(!('onhashchange'in Y.config.win)||!docMode||docMode<8);},"trigger":"history-hash"},"requires":["history-hash","node-base"]}},"submodules":{"history-base":{"after":["history-deprecated"],"requires":["event-custom-complex"]},"history-hash":{"after":["history-html5"],"requires":["event-synthetic","history-base","yui-later"]},"history-html5":{"optional":["json"],"requires":["event-base","history-base","node-base"]}}},"history-deprecated":{"requires":["node"]},"imageloader":{"requires":["base-base","node-style","node-screen"]},"intl":{"requires":["intl-base","event-custom"]},"io":{"submodules":{"io-base":{"optional":["querystring-stringify-simple"],"requires":["event-custom-base"]},"io-form":{"requires":["io-base","node-base","node-style"]},"io-queue":{"requires":["io-base","queue-promote"]},"io-upload-iframe":{"requires":["io-base","node-base"]},"io-xdr":{"requires":["io-base","datatype-xml"]}}},"json":{"submodules":{"json-parse":{"requires":["yui-base"]},"json-stringify":{"requires":["yui-base"]}}},"jsonp":{"plugins":{"jsonp-url":{"requires":["jsonp"]}},"requires":["get","oop"]},"loader":{"submodules":{"loader-base":{"requires":["get"]},"loader-rollup":{"requires":["loader-base"]},"loader-yui3":{"requires":["loader-base"]}}},"node":{"plugins":{"align-plugin":{"requires":["node-screen","node-pluginhost"]},"node-deprecated":{"requires":["node-base"]},"node-event-simulate":{"requires":["node-base","event-simulate"]},"node-load":{"requires":["node-base","io-base"]},"shim-plugin":{"requires":["node-style","node-pluginhost"]},"transition":{"requires":["transition-native","node-style"]},"transition-native":{"requires":["node-base"]}},"submodules":{"node-base":{"requires":["dom-base","selector-css2","event-base"]},"node-event-delegate":{"requires":["node-base","event-delegate"]},"node-pluginhost":{"requires":["node-base","pluginhost"]},"node-screen":{"requires":["dom-screen","node-base"]},"node-style":{"requires":["dom-style","node-base"]}}},"node-flick":{"requires":["classnamemanager","transition","event-flick","plugin"],"skinnable":true},"node-focusmanager":{"requires":["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-menunav":{"requires":["node","classnamemanager","plugin","node-focusmanager"],"skinnable":true},"oop":{"requires":["yui-base"]},"overlay":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],"skinnable":true},"plugin":{"requires":["base-base"]},"pluginhost":{"submodules":{"pluginhost-base":{"requires":["yui-base"]},"pluginhost-config":{"requires":["pluginhost-base"]}}},"profiler":{"requires":["yui-base"]},"querystring":{"submodules":{"querystring-parse":{"requires":["yui-base","array-extras"]},"querystring-stringify":{"requires":["yui-base"]}}},"querystring-parse-simple":{"path":"querystring/querystring-parse-simple-min.js","requires":["yui-base"]},"querystring-stringify-simple":{"path":"querystring/querystring-stringify-simple-min.js","requires":["yui-base"]},"queue-promote":{"requires":["yui-base"]},"queue-run":{"path":"async-queue/async-queue-min.js","requires":["event-custom"]},"recordset":{"submodules":{"recordset-base":{"requires":["base","arraylist"]},"recordset-filter":{"requires":["recordset-base","array-extras","plugin"]},"recordset-indexer":{"requires":["recordset-base","plugin"]},"recordset-sort":{"requires":["arraysort","recordset-base","plugin"]}}},"resize":{"submodules":{"resize-base":{"requires":["widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],"skinnable":true},"resize-constrain":{"requires":["plugin","resize-base"]},"resize-proxy":{"requires":["plugin","resize-base"]}}},"scrollview":{"plugins":{"scrollview-base":{"path":"scrollview/scrollview-base-min.js","requires":["widget","event-gestures","transition"],"skinnable":true},"scrollview-base-ie":{"condition":{"trigger":"scrollview-base","ua":"ie"},"requires":["scrollview-base"]},"scrollview-paginator":{"path":"scrollview/scrollview-paginator-min.js","requires":["plugin"]},"scrollview-scrollbars":{"path":"scrollview/scrollview-scrollbars-min.js","requires":["plugin"],"skinnable":true}},"requires":["scrollview-base","scrollview-scrollbars"]},"slider":{"submodules":{"clickable-rail":{"requires":["slider-base"]},"range-slider":{"requires":["slider-base","slider-value-range","clickable-rail"]},"slider-base":{"requires":["widget","dd-constrain","substitute"],"skinnable":true},"slider-value-range":{"requires":["slider-base"]}}},"sortable":{"plugins":{"sortable-scroll":{"requires":["dd-scroll"]}},"requires":["dd-delegate","dd-drop-plugin","dd-proxy"]},"stylesheet":{"requires":["yui-base"]},"substitute":{"optional":["dump"]},"swf":{"requires":["event-custom","node","swfdetect"]},"swfdetect":{},"tabview":{"plugins":{"tabview-base":{"requires":["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{"requires":["tabview-base"]}},"requires":["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],"skinnable":true},"test":{"requires":["substitute","node","json","event-simulate"],"skinnable":true},"text":{"submodules":{"text-accentfold":{"requires":["array-extras","text-data-accentfold"]},"text-data-accentfold":{},"text-data-wordbreak":{},"text-wordbreak":{"requires":["array-extras","text-data-wordbreak"]}}},"transition":{"submodules":{"transition-native":{"requires":["node-base"]},"transition-timer":{"requires":["transition-native","node-style"]}}},"uploader":{"requires":["event-custom","node","base","swf"]},"widget":{"plugins":{"widget-base-ie":{"condition":{"trigger":"widget-base","ua":"ie"},"requires":["widget-base"]},"widget-child":{"requires":["base-build","widget"]},"widget-parent":{"requires":["base-build","arraylist","widget"]},"widget-position":{"requires":["base-build","node-screen","widget"]},"widget-position-align":{"requires":["widget-position"]},"widget-position-constrain":{"requires":["widget-position"]},"widget-stack":{"requires":["base-build","widget"],"skinnable":true},"widget-stdmod":{"requires":["base-build","widget"]}},"skinnable":true,"submodules":{"widget-base":{"requires":["attribute","event-focus","base-base","base-pluginhost","node-base","node-style","classnamemanager"]},"widget-htmlparser":{"requires":["widget-base"]},"widget-skin":{"requires":["widget-base"]},"widget-uievents":{"requires":["widget-base","node-event-delegate"]}}},"widget-anim":{"requires":["plugin","anim-base","widget"]},"widget-locale":{"path":"widget/widget-locale-min.js","requires":["widget-base"]},"yql":{"requires":["jsonp","jsonp-url"]},"yui":{"submodules":{"features":{"requires":["yui-base"]},"get":{"requires":["yui-base"]},"intl-base":{"requires":["yui-base"]},"rls":{"requires":["get","features"]},"yui-base":{},"yui-later":{"requires":["yui-base"]},"yui-log":{"requires":["yui-base"]},"yui-throttle":{"requires":["yui-base"]}}}};YUI.Env[Y.version].md5='faf08d27c01d7ab5575789a63b1e36fc';},'3.3.0',{requires:['loader-base']});YUI.add('loader',function(Y){},'3.3.0',{use:['loader-base','loader-rollup','loader-yui3']});