YUI.add("loader-pathogen-combohandler",function(e,t){var n=";",r="+",i=",",s=/-(min|debug).js/,o=/\.(?:js|css)$/,u,a=/^(?:yui:)?gallery-([^\/]+)/,f={js:!0,css:!0},l;e.mix(e.Loader.prototype,{_pathogenEncodeComboSources:function(t){var n=this.combine,r,i,s,o,u,a,c,h;if(!n)for(c in this.groups)if(this.groups.hasOwnProperty(c)&&!n&&c.combine){n=c.combine;break}e.config.customComboBase&&(l=e.config.customComboBase);if(l&&n){i=this.maxURLLength;for(h in f){if(!f.hasOwnProperty(h))continue;u=h,a=h+"Mods",t[u]=r=t[u]||[],t[a]=s=t[a]||[],o=this._customResolve(s,h),t[h]=t[h].concat(o)}}return t},_customResolve:function(t,n){var r=this._aggregateGroups(t),i=this._sortAggregatedGroups(r),o=[],u,a,f,c;a||(f=s.exec(e.config.loaderPath),a=f&&f[1]||"raw",a=n==="css"&&a==="debug"?"raw":"min",u=a==="min"?"":"."+a,u=u+"."+n),c=this._buildCombo(i,l,u);while(c)o.push(c),c=this._buildCombo(i,l,u);return o},_aggregateGroups:function(e){var t={},n,i,s,f,l,c,h;for(h=0,c=e.length;h<c;h+=1){f=e[h],s=f.name,i=this.groups&&this.groups[f.group];if(i){if(!i.combine||f.fullpath)continue}else if(!this.combine)continue;if(!f.combine&&f.ext)continue;f.group?f.group==="gallery"?(u||(n=a.exec(this.groups.gallery.root),u=n&&n[1]),s=s.split("gallery-").pop(),l="g"+r+u):f.path.indexOf(s+"/"+s)===0?(l=i.root,l.charAt(0)==="/"&&(l=l.slice(1)),l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),l="r"+r+l):(s=f.path.split(o).shift(),i&&i.root&&(s=i.root+s),s.charAt(0)==="/"&&(s=s.slice(1)),l="path"+r+s):l="c"+r+YUI.version,t[l]=t[l]||[],t[l].push(s)}return t},_buildCombo:function(e,t,s){var o=t,u=t.length+s.length,a,f,l,c,h,p,d,v;for(v=0,d=e.length;v<d;v+=1){p=e[v],a=o===t?"":n,f=p.key,c=p.modules;while(c.length){l=a+f,l=l?l+r:i,p.key.indexOf("path")===0&&(l=a),h=l+c[0];if(!(u+h.length<this.maxURLLength))return o+s;o+=h,u+=h.length,c.shift(),a=f=""}}return o+=s,o.length===t.length+s.length&&(o=null),o},_sortAggregatedGroups:function(e){var t=[],n,r,i;for(n in e)e.hasOwnProperty(n)&&t.push({key:n,modules:e[n]});t.sort(function(e,t){return e.key<t.key?-1:e.key>t.key?1:0});for(i=0,r=t.length;i<r;i+=1)t[i].modules.sort();return t}},!0)},"@VERSION@");
