NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / loader / loader-debug.js
blob97854d1aecbf14433abcf6f5424e93c4c2d1bf56
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 YUI.add('loader-base', function (Y, NAME) {
10 /**
11  * The YUI loader core
12  * @module loader
13  * @submodule loader-base
14  */
16 (function() {
17     var VERSION = Y.version,
18         BUILD = '/build/',
19         ROOT = VERSION + '/',
20         CDN_BASE = Y.Env.base,
21         GALLERY_VERSION = 'gallery-2013.10.02-20-26',
22         TNT = '2in3',
23         TNT_VERSION = '4',
24         YUI2_VERSION = '2.9.0',
25         COMBO_BASE = CDN_BASE + 'combo?',
26         META = {
27             version: VERSION,
28             root: ROOT,
29             base: Y.Env.base,
30             comboBase: COMBO_BASE,
31             skin: {
32                 defaultSkin: 'sam',
33                 base: 'assets/skins/',
34                 path: 'skin.css',
35                 after: [
36                     'cssreset',
37                     'cssfonts',
38                     'cssgrids',
39                     'cssbase',
40                     'cssreset-context',
41                     'cssfonts-context'
42                 ]
43             },
44             groups: {},
45             patterns: {}
46         },
47         groups = META.groups,
48         yui2Update = function(tnt, yui2, config) {
49             var root = TNT + '.' +
50                     (tnt || TNT_VERSION) + '/' +
51                     (yui2 || YUI2_VERSION) + BUILD,
52                 base = (config && config.base) ? config.base : CDN_BASE,
53                 combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
55             groups.yui2.base = base + root;
56             groups.yui2.root = root;
57             groups.yui2.comboBase = combo;
58         },
59         galleryUpdate = function(tag, config) {
60             var root = (tag || GALLERY_VERSION) + BUILD,
61                 base = (config && config.base) ? config.base : CDN_BASE,
62                 combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
64             groups.gallery.base = base + root;
65             groups.gallery.root = root;
66             groups.gallery.comboBase = combo;
67         };
70     groups[VERSION] = {};
72     groups.gallery = {
73         ext: false,
74         combine: true,
75         comboBase: COMBO_BASE,
76         update: galleryUpdate,
77         patterns: {
78             'gallery-': {},
79             'lang/gallery-': {},
80             'gallerycss-': {
81                 type: 'css'
82             }
83         }
84     };
86     groups.yui2 = {
87         combine: true,
88         ext: false,
89         comboBase: COMBO_BASE,
90         update: yui2Update,
91         patterns: {
92             'yui2-': {
93                 configFn: function(me) {
94                     if (/-skin|reset|fonts|grids|base/.test(me.name)) {
95                         me.type = 'css';
96                         me.path = me.path.replace(/\.js/, '.css');
97                         // this makes skins in builds earlier than
98                         // 2.6.0 work as long as combine is false
99                         me.path = me.path.replace(/\/yui2-skin/,
100                                             '/assets/skins/sam/yui2-skin');
101                     }
102                 }
103             }
104         }
105     };
107     galleryUpdate();
108     yui2Update();
110     if (YUI.Env[VERSION]) {
111         Y.mix(META, YUI.Env[VERSION], false, [
112             'modules',
113             'groups',
114             'skin'
115         ], 0, true);
116     }
118     YUI.Env[VERSION] = META;
119 }());
120 /*jslint forin: true, maxlen: 350 */
123  * Loader dynamically loads script and css files.  It includes the dependency
124  * information for the version of the library in use, and will automatically pull in
125  * dependencies for the modules requested. It can also load the
126  * files from the Yahoo! CDN, and it can utilize the combo service provided on
127  * this network to reduce the number of http connections required to download
128  * YUI files.
130  * @module loader
131  * @main loader
132  * @submodule loader-base
133  */
135 var NOT_FOUND = {},
136     NO_REQUIREMENTS = [],
137     MAX_URL_LENGTH = 1024,
138     GLOBAL_ENV = YUI.Env,
139     GLOBAL_LOADED = GLOBAL_ENV._loaded,
140     CSS = 'css',
141     JS = 'js',
142     INTL = 'intl',
143     DEFAULT_SKIN = 'sam',
144     VERSION = Y.version,
145     ROOT_LANG = '',
146     YObject = Y.Object,
147     oeach = YObject.each,
148     yArray = Y.Array,
149     _queue = GLOBAL_ENV._loaderQueue,
150     META = GLOBAL_ENV[VERSION],
151     SKIN_PREFIX = 'skin-',
152     L = Y.Lang,
153     ON_PAGE = GLOBAL_ENV.mods,
154     modulekey,
155     _path = function(dir, file, type, nomin) {
156         var path = dir + '/' + file;
157         if (!nomin) {
158             path += '-min';
159         }
160         path += '.' + (type || CSS);
162         return path;
163     };
166     if (!YUI.Env._cssLoaded) {
167         YUI.Env._cssLoaded = {};
168     }
172  * The component metadata is stored in Y.Env.meta.
173  * Part of the loader module.
174  * @property meta
175  * @for YUI
176  */
177 Y.Env.meta = META;
180  * Loader dynamically loads script and css files.  It includes the dependency
181  * info for the version of the library in use, and will automatically pull in
182  * dependencies for the modules requested. It can load the
183  * files from the Yahoo! CDN, and it can utilize the combo service provided on
184  * this network to reduce the number of http connections required to download
185  * YUI files. You can also specify an external, custom combo service to host
186  * your modules as well.
188         var Y = YUI();
189         var loader = new Y.Loader({
190             filter: 'debug',
191             base: '../../',
192             root: 'build/',
193             combine: true,
194             require: ['node', 'dd', 'console']
195         });
196         var out = loader.resolve(true);
198  * @constructor
199  * @class Loader
200  * @param {Object} config an optional set of configuration options.
201  * @param {String} config.base The base dir which to fetch this module from
202  * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
203  * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
204  * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
205  * @param {Object} config.filters Per-component filter specification.  If specified for a given component, this overrides the filter config.
206  * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
207  * @param {Boolean} [config.async=true] Fetch files in async
208  * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
209  * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
210  * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
211  * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
212  * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
213  * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes.  If not set, there is no timeout
214  * @param {Object} config.context Execution context for all callbacks
215  * @param {Function} config.onSuccess Callback for the 'success' event
216  * @param {Function} config.onFailure Callback for the 'failure' event
217  * @param {Function} config.onCSS Callback for the 'CSSComplete' event.  When loading YUI components with CSS the CSS is loaded first, then the script.  This provides a moment you can tie into to improve the presentation of the page while the script is loading.
218  * @param {Function} config.onTimeout Callback for the 'timeout' event
219  * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
220  * @param {Object} config.modules A list of module definitions.  See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
221  * @param {Object} config.groups A list of group definitions.  Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
222  * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use.  The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers.  These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
223  * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use.  Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
224  */
225 Y.Loader = function(o) {
227     var self = this;
229     //Catch no config passed.
230     o = o || {};
232     modulekey = META.md5;
234     /**
235      * Internal callback to handle multiple internal insert() calls
236      * so that css is inserted prior to js
237      * @property _internalCallback
238      * @private
239      */
240     // self._internalCallback = null;
242     /**
243      * Callback that will be executed when the loader is finished
244      * with an insert
245      * @method onSuccess
246      * @type function
247      */
248     // self.onSuccess = null;
250     /**
251      * Callback that will be executed if there is a failure
252      * @method onFailure
253      * @type function
254      */
255     // self.onFailure = null;
257     /**
258      * Callback for the 'CSSComplete' event.  When loading YUI components
259      * with CSS the CSS is loaded first, then the script.  This provides
260      * a moment you can tie into to improve the presentation of the page
261      * while the script is loading.
262      * @method onCSS
263      * @type function
264      */
265     // self.onCSS = null;
267     /**
268      * Callback executed each time a script or css file is loaded
269      * @method onProgress
270      * @type function
271      */
272     // self.onProgress = null;
274     /**
275      * Callback that will be executed if a timeout occurs
276      * @method onTimeout
277      * @type function
278      */
279     // self.onTimeout = null;
281     /**
282      * The execution context for all callbacks
283      * @property context
284      * @default {YUI} the YUI instance
285      */
286     self.context = Y;
288     /**
289      * Data that is passed to all callbacks
290      * @property data
291      */
292     // self.data = null;
294     /**
295      * Node reference or id where new nodes should be inserted before
296      * @property insertBefore
297      * @type string|HTMLElement
298      */
299     // self.insertBefore = null;
301     /**
302      * The charset attribute for inserted nodes
303      * @property charset
304      * @type string
305      * @deprecated , use cssAttributes or jsAttributes.
306      */
307     // self.charset = null;
309     /**
310      * An object literal containing attributes to add to link nodes
311      * @property cssAttributes
312      * @type object
313      */
314     // self.cssAttributes = null;
316     /**
317      * An object literal containing attributes to add to script nodes
318      * @property jsAttributes
319      * @type object
320      */
321     // self.jsAttributes = null;
323     /**
324      * The base directory.
325      * @property base
326      * @type string
327      * @default http://yui.yahooapis.com/[YUI VERSION]/build/
328      */
329     self.base = Y.Env.meta.base + Y.Env.meta.root;
331     /**
332      * Base path for the combo service
333      * @property comboBase
334      * @type string
335      * @default http://yui.yahooapis.com/combo?
336      */
337     self.comboBase = Y.Env.meta.comboBase;
339     /*
340      * Base path for language packs.
341      */
342     // self.langBase = Y.Env.meta.langBase;
343     // self.lang = "";
345     /**
346      * If configured, the loader will attempt to use the combo
347      * service for YUI resources and configured external resources.
348      * @property combine
349      * @type boolean
350      * @default true if a base dir isn't in the config
351      */
352     self.combine = o.base &&
353         (o.base.indexOf(self.comboBase.substr(0, 20)) > -1);
355     /**
356     * The default seperator to use between files in a combo URL
357     * @property comboSep
358     * @type {String}
359     * @default Ampersand
360     */
361     self.comboSep = '&';
362     /**
363      * Max url length for combo urls.  The default is 1024. This is the URL
364      * limit for the Yahoo! hosted combo servers.  If consuming
365      * a different combo service that has a different URL limit
366      * it is possible to override this default by supplying
367      * the maxURLLength config option.  The config option will
368      * only take effect if lower than the default.
369      *
370      * @property maxURLLength
371      * @type int
372      */
373     self.maxURLLength = MAX_URL_LENGTH;
375     /**
376      * Ignore modules registered on the YUI global
377      * @property ignoreRegistered
378      * @default false
379      */
380     self.ignoreRegistered = o.ignoreRegistered;
382     /**
383      * Root path to prepend to module path for the combo
384      * service
385      * @property root
386      * @type string
387      * @default [YUI VERSION]/build/
388      */
389     self.root = Y.Env.meta.root;
391     /**
392      * Timeout value in milliseconds.  If set, self value will be used by
393      * the get utility.  the timeout event will fire if
394      * a timeout occurs.
395      * @property timeout
396      * @type int
397      */
398     self.timeout = 0;
400     /**
401      * A list of modules that should not be loaded, even if
402      * they turn up in the dependency tree
403      * @property ignore
404      * @type string[]
405      */
406     // self.ignore = null;
408     /**
409      * A list of modules that should always be loaded, even
410      * if they have already been inserted into the page.
411      * @property force
412      * @type string[]
413      */
414     // self.force = null;
416     self.forceMap = {};
418     /**
419      * Should we allow rollups
420      * @property allowRollup
421      * @type boolean
422      * @default false
423      */
424     self.allowRollup = false;
426     /**
427      * A filter to apply to result urls.  This filter will modify the default
428      * path for all modules.  The default path for the YUI library is the
429      * minified version of the files (e.g., event-min.js).  The filter property
430      * can be a predefined filter or a custom filter.  The valid predefined
431      * filters are:
432      * <dl>
433      *  <dt>DEBUG</dt>
434      *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
435      *      This option will automatically include the Logger widget</dd>
436      *  <dt>RAW</dt>
437      *  <dd>Selects the non-minified version of the library (e.g., event.js).
438      *  </dd>
439      * </dl>
440      * You can also define a custom filter, which must be an object literal
441      * containing a search expression and a replace string:
442      *
443      *      myFilter: {
444      *          'searchExp': "-min\\.js",
445      *          'replaceStr': "-debug.js"
446      *      }
447      *
448      * @property filter
449      * @type string| {searchExp: string, replaceStr: string}
450      */
451     // self.filter = null;
453     /**
454      * per-component filter specification.  If specified for a given
455      * component, this overrides the filter config.
456      * @property filters
457      * @type object
458      */
459     self.filters = {};
461     /**
462      * The list of requested modules
463      * @property required
464      * @type {string: boolean}
465      */
466     self.required = {};
468     /**
469      * If a module name is predefined when requested, it is checked againsts
470      * the patterns provided in this property.  If there is a match, the
471      * module is added with the default configuration.
472      *
473      * At the moment only supporting module prefixes, but anticipate
474      * supporting at least regular expressions.
475      * @property patterns
476      * @type Object
477      */
478     // self.patterns = Y.merge(Y.Env.meta.patterns);
479     self.patterns = {};
481     /**
482      * The library metadata
483      * @property moduleInfo
484      */
485     // self.moduleInfo = Y.merge(Y.Env.meta.moduleInfo);
486     self.moduleInfo = {};
488     self.groups = Y.merge(Y.Env.meta.groups);
490     /**
491      * Provides the information used to skin the skinnable components.
492      * The following skin definition would result in 'skin1' and 'skin2'
493      * being loaded for calendar (if calendar was requested), and
494      * 'sam' for all other skinnable components:
495      *
496      *      skin: {
497      *          // The default skin, which is automatically applied if not
498      *          // overriden by a component-specific skin definition.
499      *          // Change this in to apply a different skin globally
500      *          defaultSkin: 'sam',
501      *
502      *          // This is combined with the loader base property to get
503      *          // the default root directory for a skin. ex:
504      *          // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
505      *          base: 'assets/skins/',
506      *
507      *          // Any component-specific overrides can be specified here,
508      *          // making it possible to load different skins for different
509      *          // components.  It is possible to load more than one skin
510      *          // for a given component as well.
511      *          overrides: {
512      *              calendar: ['skin1', 'skin2']
513      *          }
514      *      }
515      * @property skin
516      * @type {Object}
517      */
518     self.skin = Y.merge(Y.Env.meta.skin);
520     /*
521      * Map of conditional modules
522      * @since 3.2.0
523      */
524     self.conditions = {};
526     // map of modules with a hash of modules that meet the requirement
527     // self.provides = {};
529     self.config = o;
530     self._internal = true;
532     self._populateCache();
534     /**
535      * Set when beginning to compute the dependency tree.
536      * Composed of what YUI reports to be loaded combined
537      * with what has been loaded by any instance on the page
538      * with the version number specified in the metadata.
539      * @property loaded
540      * @type {string: boolean}
541      */
542     self.loaded = GLOBAL_LOADED[VERSION];
545     /**
546     * Should Loader fetch scripts in `async`, defaults to `true`
547     * @property async
548     */
550     self.async = true;
552     self._inspectPage();
554     self._internal = false;
556     self._config(o);
558     self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
560     self.testresults = null;
562     if (Y.config.tests) {
563         self.testresults = Y.config.tests;
564     }
566     /**
567      * List of rollup files found in the library metadata
568      * @property rollups
569      */
570     // self.rollups = null;
572     /**
573      * Whether or not to load optional dependencies for
574      * the requested modules
575      * @property loadOptional
576      * @type boolean
577      * @default false
578      */
579     // self.loadOptional = false;
581     /**
582      * All of the derived dependencies in sorted order, which
583      * will be populated when either calculate() or insert()
584      * is called
585      * @property sorted
586      * @type string[]
587      */
588     self.sorted = [];
590     /*
591      * A list of modules to attach to the YUI instance when complete.
592      * If not supplied, the sorted list of dependencies are applied.
593      * @property attaching
594      */
595     // self.attaching = null;
597     /**
598      * Flag to indicate the dependency tree needs to be recomputed
599      * if insert is called again.
600      * @property dirty
601      * @type boolean
602      * @default true
603      */
604     self.dirty = true;
606     /**
607      * List of modules inserted by the utility
608      * @property inserted
609      * @type {string: boolean}
610      */
611     self.inserted = {};
613     /**
614      * List of skipped modules during insert() because the module
615      * was not defined
616      * @property skipped
617      */
618     self.skipped = {};
620     // Y.on('yui:load', self.loadNext, self);
622     self.tested = {};
624     /*
625      * Cached sorted calculate results
626      * @property results
627      * @since 3.2.0
628      */
629     //self.results = {};
631     if (self.ignoreRegistered) {
632         //Clear inpage already processed modules.
633         self._resetModules();
634     }
638 Y.Loader.prototype = {
639     /**
640     * Checks the cache for modules and conditions, if they do not exist
641     * process the default metadata and populate the local moduleInfo hash.
642     * @method _populateCache
643     * @private
644     */
645     _populateCache: function() {
646         var self = this,
647             defaults = META.modules,
648             cache = GLOBAL_ENV._renderedMods,
649             i;
651         if (cache && !self.ignoreRegistered) {
652             for (i in cache) {
653                 if (cache.hasOwnProperty(i)) {
654                     self.moduleInfo[i] = Y.merge(cache[i]);
655                 }
656             }
658             cache = GLOBAL_ENV._conditions;
659             for (i in cache) {
660                 if (cache.hasOwnProperty(i)) {
661                     self.conditions[i] = Y.merge(cache[i]);
662                 }
663             }
665         } else {
666             for (i in defaults) {
667                 if (defaults.hasOwnProperty(i)) {
668                     self.addModule(defaults[i], i);
669                 }
670             }
671         }
673     },
674     /**
675     * Reset modules in the module cache to a pre-processed state so additional
676     * computations with a different skin or language will work as expected.
677     * @method _resetModules
678     * @private
679     */
680     _resetModules: function() {
681         var self = this, i, o,
682             mod, name, details;
683         for (i in self.moduleInfo) {
684             if (self.moduleInfo.hasOwnProperty(i)) {
685                 mod = self.moduleInfo[i];
686                 name = mod.name;
687                 details  = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
689                 if (details) {
690                     self.moduleInfo[name]._reset = true;
691                     self.moduleInfo[name].requires = details.requires || [];
692                     self.moduleInfo[name].optional = details.optional || [];
693                     self.moduleInfo[name].supersedes = details.supercedes || [];
694                 }
696                 if (mod.defaults) {
697                     for (o in mod.defaults) {
698                         if (mod.defaults.hasOwnProperty(o)) {
699                             if (mod[o]) {
700                                 mod[o] = mod.defaults[o];
701                             }
702                         }
703                     }
704                 }
705                 delete mod.langCache;
706                 delete mod.skinCache;
707                 if (mod.skinnable) {
708                     self._addSkin(self.skin.defaultSkin, mod.name);
709                 }
710             }
711         }
712     },
713     /**
714     Regex that matches a CSS URL. Used to guess the file type when it's not
715     specified.
717     @property REGEX_CSS
718     @type RegExp
719     @final
720     @protected
721     @since 3.5.0
722     **/
723     REGEX_CSS: /\.css(?:[?;].*)?$/i,
725     /**
726     * Default filters for raw and debug
727     * @property FILTER_DEFS
728     * @type Object
729     * @final
730     * @protected
731     */
732     FILTER_DEFS: {
733         RAW: {
734             'searchExp': '-min\\.js',
735             'replaceStr': '.js'
736         },
737         DEBUG: {
738             'searchExp': '-min\\.js',
739             'replaceStr': '-debug.js'
740         },
741         COVERAGE: {
742             'searchExp': '-min\\.js',
743             'replaceStr': '-coverage.js'
744         }
745     },
746     /*
747     * Check the pages meta-data and cache the result.
748     * @method _inspectPage
749     * @private
750     */
751     _inspectPage: function() {
752         var self = this, v, m, req, mr, i;
754         //Inspect the page for CSS only modules and mark them as loaded.
755         for (i in self.moduleInfo) {
756             if (self.moduleInfo.hasOwnProperty(i)) {
757                 v = self.moduleInfo[i];
758                 if (v.type && v.type === CSS) {
759                     if (self.isCSSLoaded(v.name)) {
760                         Y.log('Found CSS module on page: ' + v.name, 'info', 'loader');
761                         self.loaded[i] = true;
762                     }
763                 }
764             }
765         }
766         for (i in ON_PAGE) {
767             if (ON_PAGE.hasOwnProperty(i)) {
768                 v = ON_PAGE[i];
769                 if (v.details) {
770                     m = self.moduleInfo[v.name];
771                     req = v.details.requires;
772                     mr = m && m.requires;
774                    if (m) {
775                        if (!m._inspected && req && mr.length !== req.length) {
776                            // console.log('deleting ' + m.name);
777                            delete m.expanded;
778                        }
779                    } else {
780                        m = self.addModule(v.details, i);
781                    }
782                    m._inspected = true;
783                }
784             }
785         }
786     },
787     /*
788     * returns true if b is not loaded, and is required directly or by means of modules it supersedes.
789     * @private
790     * @method _requires
791     * @param {String} mod1 The first module to compare
792     * @param {String} mod2 The second module to compare
793     */
794    _requires: function(mod1, mod2) {
796         var i, rm, after_map, s,
797             info = this.moduleInfo,
798             m = info[mod1],
799             other = info[mod2];
801         if (!m || !other) {
802             return false;
803         }
805         rm = m.expanded_map;
806         after_map = m.after_map;
808         // check if this module should be sorted after the other
809         // do this first to short circut circular deps
810         if (after_map && (mod2 in after_map)) {
811             return true;
812         }
814         after_map = other.after_map;
816         // and vis-versa
817         if (after_map && (mod1 in after_map)) {
818             return false;
819         }
821         // check if this module requires one the other supersedes
822         s = info[mod2] && info[mod2].supersedes;
823         if (s) {
824             for (i = 0; i < s.length; i++) {
825                 if (this._requires(mod1, s[i])) {
826                     return true;
827                 }
828             }
829         }
831         s = info[mod1] && info[mod1].supersedes;
832         if (s) {
833             for (i = 0; i < s.length; i++) {
834                 if (this._requires(mod2, s[i])) {
835                     return false;
836                 }
837             }
838         }
840         // check if this module requires the other directly
841         // if (r && yArray.indexOf(r, mod2) > -1) {
842         if (rm && (mod2 in rm)) {
843             return true;
844         }
846         // external css files should be sorted below yui css
847         if (m.ext && m.type === CSS && !other.ext && other.type === CSS) {
848             return true;
849         }
851         return false;
852     },
853     /**
854     * Apply a new config to the Loader instance
855     * @method _config
856     * @private
857     * @param {Object} o The new configuration
858     */
859     _config: function(o) {
860         var i, j, val, a, f, group, groupName, self = this,
861             mods = [], mod;
862         // apply config values
863         if (o) {
864             for (i in o) {
865                 if (o.hasOwnProperty(i)) {
866                     val = o[i];
867                     //TODO This should be a case
868                     if (i === 'require') {
869                         self.require(val);
870                     } else if (i === 'skin') {
871                         //If the config.skin is a string, format to the expected object
872                         if (typeof val === 'string') {
873                             self.skin.defaultSkin = o.skin;
874                             val = {
875                                 defaultSkin: val
876                             };
877                         }
879                         Y.mix(self.skin, val, true);
880                     } else if (i === 'groups') {
881                         for (j in val) {
882                             if (val.hasOwnProperty(j)) {
883                                 // Y.log('group: ' + j);
884                                 groupName = j;
885                                 group = val[j];
886                                 self.addGroup(group, groupName);
887                                 if (group.aliases) {
888                                     for (a in group.aliases) {
889                                         if (group.aliases.hasOwnProperty(a)) {
890                                             self.addAlias(group.aliases[a], a);
891                                         }
892                                     }
893                                 }
894                             }
895                         }
897                     } else if (i === 'modules') {
898                         // add a hash of module definitions
899                         for (j in val) {
900                             if (val.hasOwnProperty(j)) {
901                                 self.addModule(val[j], j);
902                             }
903                         }
904                     } else if (i === 'aliases') {
905                         for (j in val) {
906                             if (val.hasOwnProperty(j)) {
907                                 self.addAlias(val[j], j);
908                             }
909                         }
910                     } else if (i === 'gallery') {
911                         if (this.groups.gallery.update) {
912                             this.groups.gallery.update(val, o);
913                         }
914                     } else if (i === 'yui2' || i === '2in3') {
915                         if (this.groups.yui2.update) {
916                             this.groups.yui2.update(o['2in3'], o.yui2, o);
917                         }
918                     } else {
919                         self[i] = val;
920                     }
921                 }
922             }
923         }
925         // fix filter
926         f = self.filter;
928         if (L.isString(f)) {
929             f = f.toUpperCase();
930             self.filterName = f;
931             self.filter = self.FILTER_DEFS[f];
932             if (f === 'DEBUG') {
933                 self.require('yui-log', 'dump');
934             }
935         }
937         if (self.filterName && self.coverage) {
938             if (self.filterName === 'COVERAGE' && L.isArray(self.coverage) && self.coverage.length) {
939                 for (i = 0; i < self.coverage.length; i++) {
940                     mod = self.coverage[i];
941                     if (self.moduleInfo[mod] && self.moduleInfo[mod].use) {
942                         mods = [].concat(mods, self.moduleInfo[mod].use);
943                     } else {
944                         mods.push(mod);
945                     }
946                 }
947                 self.filters = self.filters || {};
948                 Y.Array.each(mods, function(mod) {
949                     self.filters[mod] = self.FILTER_DEFS.COVERAGE;
950                 });
951                 self.filterName = 'RAW';
952                 self.filter = self.FILTER_DEFS[self.filterName];
953             }
954         }
956     },
958     /**
959      * Returns the skin module name for the specified skin name.  If a
960      * module name is supplied, the returned skin module name is
961      * specific to the module passed in.
962      * @method formatSkin
963      * @param {string} skin the name of the skin.
964      * @param {string} mod optional: the name of a module to skin.
965      * @return {string} the full skin module name.
966      */
967     formatSkin: function(skin, mod) {
968         var s = SKIN_PREFIX + skin;
969         if (mod) {
970             s = s + '-' + mod;
971         }
973         return s;
974     },
976     /**
977      * Adds the skin def to the module info
978      * @method _addSkin
979      * @param {string} skin the name of the skin.
980      * @param {string} mod the name of the module.
981      * @param {string} parent parent module if this is a skin of a
982      * submodule or plugin.
983      * @return {string} the module name for the skin.
984      * @private
985      */
986     _addSkin: function(skin, mod, parent) {
987         var mdef, pkg, name, nmod,
988             info = this.moduleInfo,
989             sinf = this.skin,
990             ext = info[mod] && info[mod].ext;
992         // Add a module definition for the module-specific skin css
993         if (mod) {
994             name = this.formatSkin(skin, mod);
995             if (!info[name]) {
996                 mdef = info[mod];
997                 pkg = mdef.pkg || mod;
998                 nmod = {
999                     skin: true,
1000                     name: name,
1001                     group: mdef.group,
1002                     type: 'css',
1003                     after: sinf.after,
1004                     path: (parent || pkg) + '/' + sinf.base + skin +
1005                           '/' + mod + '.css',
1006                     ext: ext
1007                 };
1008                 if (mdef.base) {
1009                     nmod.base = mdef.base;
1010                 }
1011                 if (mdef.configFn) {
1012                     nmod.configFn = mdef.configFn;
1013                 }
1014                 this.addModule(nmod, name);
1016                 Y.log('Adding skin (' + name + '), ' + parent + ', ' + pkg + ', ' + info[name].path, 'info', 'loader');
1017             }
1018         }
1020         return name;
1021     },
1022     /**
1023     * Adds an alias module to the system
1024     * @method addAlias
1025     * @param {Array} use An array of modules that makes up this alias
1026     * @param {String} name The name of the alias
1027     * @example
1028     *       var loader = new Y.Loader({});
1029     *       loader.addAlias([ 'node', 'yql' ], 'davglass');
1030     *       loader.require(['davglass']);
1031     *       var out = loader.resolve(true);
1032     *
1033     *       //out.js will contain Node and YQL modules
1034     */
1035     addAlias: function(use, name) {
1036         YUI.Env.aliases[name] = use;
1037         this.addModule({
1038             name: name,
1039             use: use
1040         });
1041     },
1042     /**
1043      * Add a new module group
1044      * @method addGroup
1045      * @param {Object} config An object containing the group configuration data
1046      * @param {String} config.name required, the group name
1047      * @param {String} config.base The base directory for this module group
1048      * @param {String} config.root The root path to add to each combo resource path
1049      * @param {Boolean} config.combine Should the request be combined
1050      * @param {String} config.comboBase Combo service base path
1051      * @param {Object} config.modules The group of modules
1052      * @param {String} name the group name.
1053      * @example
1054      *      var loader = new Y.Loader({});
1055      *      loader.addGroup({
1056      *          name: 'davglass',
1057      *          combine: true,
1058      *          comboBase: '/combo?',
1059      *          root: '',
1060      *          modules: {
1061      *              //Module List here
1062      *          }
1063      *      }, 'davglass');
1064      */
1065     addGroup: function(o, name) {
1066         var mods = o.modules,
1067             self = this, i, v;
1069         name = name || o.name;
1070         o.name = name;
1071         self.groups[name] = o;
1073         if (o.patterns) {
1074             for (i in o.patterns) {
1075                 if (o.patterns.hasOwnProperty(i)) {
1076                     o.patterns[i].group = name;
1077                     self.patterns[i] = o.patterns[i];
1078                 }
1079             }
1080         }
1082         if (mods) {
1083             for (i in mods) {
1084                 if (mods.hasOwnProperty(i)) {
1085                     v = mods[i];
1086                     if (typeof v === 'string') {
1087                         v = { name: i, fullpath: v };
1088                     }
1089                     v.group = name;
1090                     self.addModule(v, i);
1091                 }
1092             }
1093         }
1094     },
1096     /**
1097      * Add a new module to the component metadata.
1098      * @method addModule
1099      * @param {Object} config An object containing the module data.
1100      * @param {String} config.name Required, the component name
1101      * @param {String} config.type Required, the component type (js or css)
1102      * @param {String} config.path Required, the path to the script from `base`
1103      * @param {Array} config.requires Array of modules required by this component
1104      * @param {Array} [config.optional] Array of optional modules for this component
1105      * @param {Array} [config.supersedes] Array of the modules this component replaces
1106      * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
1107      * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
1108      * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
1109      * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
1110      * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
1111      * @param {Object} [config.submodules] Hash of submodules
1112      * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
1113      * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
1114      * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to four fields:
1115      * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
1116      * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
1117      * @param {String} [config.condition.ua] The UA name of <a href="UA.html">Y.UA</a> object that returns true when the module is to be loaded. e.g., `"ie"`, `"nodejs"`.
1118      * @param {String} [config.condition.when] Specifies the load order of the conditional module
1119      *  with regard to the position of the trigger module.
1120      *  This should be one of three values: `before`, `after`, or `instead`.  The default is `after`.
1121      * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
1122      * @param {Function} [config.configFn] A function to exectute when configuring this module
1123      * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
1124      * @param {String} [name] The module name, required if not in the module data.
1125      * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
1126      */
1127     addModule: function(o, name) {
1128         name = name || o.name;
1130         if (typeof o === 'string') {
1131             o = { name: name, fullpath: o };
1132         }
1135         var subs, i, l, t, sup, s, smod, plugins, plug,
1136             j, langs, packName, supName, flatSup, flatLang, lang, ret,
1137             overrides, skinname, when, g, p,
1138             conditions = this.conditions, trigger;
1140         //Only merge this data if the temp flag is set
1141         //from an earlier pass from a pattern or else
1142         //an override module (YUI_config) can not be used to
1143         //replace a default module.
1144         if (this.moduleInfo[name] && this.moduleInfo[name].temp) {
1145             //This catches temp modules loaded via a pattern
1146             // The module will be added twice, once from the pattern and
1147             // Once from the actual add call, this ensures that properties
1148             // that were added to the module the first time around (group: gallery)
1149             // are also added the second time around too.
1150             o = Y.merge(this.moduleInfo[name], o);
1151         }
1153         o.name = name;
1155         if (!o || !o.name) {
1156             return null;
1157         }
1159         if (!o.type) {
1160             //Always assume it's javascript unless the CSS pattern is matched.
1161             o.type = JS;
1162             p = o.path || o.fullpath;
1163             if (p && this.REGEX_CSS.test(p)) {
1164                 Y.log('Auto determined module type as CSS', 'warn', 'loader');
1165                 o.type = CSS;
1166             }
1167         }
1169         if (!o.path && !o.fullpath) {
1170             o.path = _path(name, name, o.type);
1171         }
1172         o.supersedes = o.supersedes || o.use;
1174         o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
1176         // Handle submodule logic
1177         subs = o.submodules;
1179         this.moduleInfo[name] = o;
1181         o.requires = o.requires || [];
1183         /*
1184         Only allowing the cascade of requires information, since
1185         optional and supersedes are far more fine grained than
1186         a blanket requires is.
1187         */
1188         if (this.requires) {
1189             for (i = 0; i < this.requires.length; i++) {
1190                 o.requires.push(this.requires[i]);
1191             }
1192         }
1193         if (o.group && this.groups && this.groups[o.group]) {
1194             g = this.groups[o.group];
1195             if (g.requires) {
1196                 for (i = 0; i < g.requires.length; i++) {
1197                     o.requires.push(g.requires[i]);
1198                 }
1199             }
1200         }
1203         if (!o.defaults) {
1204             o.defaults = {
1205                 requires: o.requires ? [].concat(o.requires) : null,
1206                 supersedes: o.supersedes ? [].concat(o.supersedes) : null,
1207                 optional: o.optional ? [].concat(o.optional) : null
1208             };
1209         }
1211         if (o.skinnable && o.ext && o.temp) {
1212             skinname = this._addSkin(this.skin.defaultSkin, name);
1213             o.requires.unshift(skinname);
1214         }
1216         if (o.requires.length) {
1217             o.requires = this.filterRequires(o.requires) || [];
1218         }
1220         if (!o.langPack && o.lang) {
1221             langs = yArray(o.lang);
1222             for (j = 0; j < langs.length; j++) {
1223                 lang = langs[j];
1224                 packName = this.getLangPackName(lang, name);
1225                 smod = this.moduleInfo[packName];
1226                 if (!smod) {
1227                     smod = this._addLangPack(lang, o, packName);
1228                 }
1229             }
1230         }
1233         if (subs) {
1234             sup = o.supersedes || [];
1235             l = 0;
1237             for (i in subs) {
1238                 if (subs.hasOwnProperty(i)) {
1239                     s = subs[i];
1241                     s.path = s.path || _path(name, i, o.type);
1242                     s.pkg = name;
1243                     s.group = o.group;
1245                     if (s.supersedes) {
1246                         sup = sup.concat(s.supersedes);
1247                     }
1249                     smod = this.addModule(s, i);
1250                     sup.push(i);
1252                     if (smod.skinnable) {
1253                         o.skinnable = true;
1254                         overrides = this.skin.overrides;
1255                         if (overrides && overrides[i]) {
1256                             for (j = 0; j < overrides[i].length; j++) {
1257                                 skinname = this._addSkin(overrides[i][j],
1258                                          i, name);
1259                                 sup.push(skinname);
1260                             }
1261                         }
1262                         skinname = this._addSkin(this.skin.defaultSkin,
1263                                         i, name);
1264                         sup.push(skinname);
1265                     }
1267                     // looks like we are expected to work out the metadata
1268                     // for the parent module language packs from what is
1269                     // specified in the child modules.
1270                     if (s.lang && s.lang.length) {
1272                         langs = yArray(s.lang);
1273                         for (j = 0; j < langs.length; j++) {
1274                             lang = langs[j];
1275                             packName = this.getLangPackName(lang, name);
1276                             supName = this.getLangPackName(lang, i);
1277                             smod = this.moduleInfo[packName];
1279                             if (!smod) {
1280                                 smod = this._addLangPack(lang, o, packName);
1281                             }
1283                             flatSup = flatSup || yArray.hash(smod.supersedes);
1285                             if (!(supName in flatSup)) {
1286                                 smod.supersedes.push(supName);
1287                             }
1289                             o.lang = o.lang || [];
1291                             flatLang = flatLang || yArray.hash(o.lang);
1293                             if (!(lang in flatLang)) {
1294                                 o.lang.push(lang);
1295                             }
1297 // Y.log('pack ' + packName + ' should supersede ' + supName);
1298 // Add rollup file, need to add to supersedes list too
1300                             // default packages
1301                             packName = this.getLangPackName(ROOT_LANG, name);
1302                             supName = this.getLangPackName(ROOT_LANG, i);
1304                             smod = this.moduleInfo[packName];
1306                             if (!smod) {
1307                                 smod = this._addLangPack(lang, o, packName);
1308                             }
1310                             if (!(supName in flatSup)) {
1311                                 smod.supersedes.push(supName);
1312                             }
1314 // Y.log('pack ' + packName + ' should supersede ' + supName);
1315 // Add rollup file, need to add to supersedes list too
1317                         }
1318                     }
1320                     l++;
1321                 }
1322             }
1323             //o.supersedes = YObject.keys(yArray.hash(sup));
1324             o.supersedes = yArray.dedupe(sup);
1325             if (this.allowRollup) {
1326                 o.rollup = (l < 4) ? l : Math.min(l - 1, 4);
1327             }
1328         }
1330         plugins = o.plugins;
1331         if (plugins) {
1332             for (i in plugins) {
1333                 if (plugins.hasOwnProperty(i)) {
1334                     plug = plugins[i];
1335                     plug.pkg = name;
1336                     plug.path = plug.path || _path(name, i, o.type);
1337                     plug.requires = plug.requires || [];
1338                     plug.group = o.group;
1339                     this.addModule(plug, i);
1340                     if (o.skinnable) {
1341                         this._addSkin(this.skin.defaultSkin, i, name);
1342                     }
1344                 }
1345             }
1346         }
1348         if (o.condition) {
1349             t = o.condition.trigger;
1350             if (YUI.Env.aliases[t]) {
1351                 t = YUI.Env.aliases[t];
1352             }
1353             if (!Y.Lang.isArray(t)) {
1354                 t = [t];
1355             }
1357             for (i = 0; i < t.length; i++) {
1358                 trigger = t[i];
1359                 when = o.condition.when;
1360                 conditions[trigger] = conditions[trigger] || {};
1361                 conditions[trigger][name] = o.condition;
1362                 // the 'when' attribute can be 'before', 'after', or 'instead'
1363                 // the default is after.
1364                 if (when && when !== 'after') {
1365                     if (when === 'instead') { // replace the trigger
1366                         o.supersedes = o.supersedes || [];
1367                         o.supersedes.push(trigger);
1368                     }
1369                     // before the trigger
1370                         // the trigger requires the conditional mod,
1371                         // so it should appear before the conditional
1372                         // mod if we do not intersede.
1373                 } else { // after the trigger
1374                     o.after = o.after || [];
1375                     o.after.push(trigger);
1376                 }
1377             }
1378         }
1380         if (o.supersedes) {
1381             o.supersedes = this.filterRequires(o.supersedes);
1382         }
1384         if (o.after) {
1385             o.after = this.filterRequires(o.after);
1386             o.after_map = yArray.hash(o.after);
1387         }
1389         // this.dirty = true;
1391         if (o.configFn) {
1392             ret = o.configFn(o);
1393             if (ret === false) {
1394                 Y.log('Config function returned false for ' + name + ', skipping.', 'info', 'loader');
1395                 delete this.moduleInfo[name];
1396                 delete GLOBAL_ENV._renderedMods[name];
1397                 o = null;
1398             }
1399         }
1400         //Add to global cache
1401         if (o) {
1402             if (!GLOBAL_ENV._renderedMods) {
1403                 GLOBAL_ENV._renderedMods = {};
1404             }
1405             GLOBAL_ENV._renderedMods[name] = Y.mix(GLOBAL_ENV._renderedMods[name] || {}, o);
1406             GLOBAL_ENV._conditions = conditions;
1407         }
1409         return o;
1410     },
1412     /**
1413      * Add a requirement for one or more module
1414      * @method require
1415      * @param {string[] | string*} what the modules to load.
1416      */
1417     require: function(what) {
1418         var a = (typeof what === 'string') ? yArray(arguments) : what;
1419         this.dirty = true;
1420         this.required = Y.merge(this.required, yArray.hash(this.filterRequires(a)));
1422         this._explodeRollups();
1423     },
1424     /**
1425     * Grab all the items that were asked for, check to see if the Loader
1426     * meta-data contains a "use" array. If it doesm remove the asked item and replace it with
1427     * the content of the "use".
1428     * This will make asking for: "dd"
1429     * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin"
1430     * @private
1431     * @method _explodeRollups
1432     */
1433     _explodeRollups: function() {
1434         var self = this, m, m2, i, a, v, len, len2,
1435         r = self.required;
1437         if (!self.allowRollup) {
1438             for (i in r) {
1439                 if (r.hasOwnProperty(i)) {
1440                     m = self.getModule(i);
1441                     if (m && m.use) {
1442                         len = m.use.length;
1443                         for (a = 0; a < len; a++) {
1444                             m2 = self.getModule(m.use[a]);
1445                             if (m2 && m2.use) {
1446                                 len2 = m2.use.length;
1447                                 for (v = 0; v < len2; v++) {
1448                                     r[m2.use[v]] = true;
1449                                 }
1450                             } else {
1451                                 r[m.use[a]] = true;
1452                             }
1453                         }
1454                     }
1455                 }
1456             }
1457             self.required = r;
1458         }
1460     },
1461     /**
1462     * Explodes the required array to remove aliases and replace them with real modules
1463     * @method filterRequires
1464     * @param {Array} r The original requires array
1465     * @return {Array} The new array of exploded requirements
1466     */
1467     filterRequires: function(r) {
1468         if (r) {
1469             if (!Y.Lang.isArray(r)) {
1470                 r = [r];
1471             }
1472             r = Y.Array(r);
1473             var c = [], i, mod, o, m;
1475             for (i = 0; i < r.length; i++) {
1476                 mod = this.getModule(r[i]);
1477                 if (mod && mod.use) {
1478                     for (o = 0; o < mod.use.length; o++) {
1479                         //Must walk the other modules in case a module is a rollup of rollups (datatype)
1480                         m = this.getModule(mod.use[o]);
1481                         if (m && m.use && (m.name !== mod.name)) {
1482                             c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use)));
1483                         } else {
1484                             c.push(mod.use[o]);
1485                         }
1486                     }
1487                 } else {
1488                     c.push(r[i]);
1489                 }
1490             }
1491             r = c;
1492         }
1493         return r;
1494     },
1495     /**
1496      * Returns an object containing properties for all modules required
1497      * in order to load the requested module
1498      * @method getRequires
1499      * @param {object}  mod The module definition from moduleInfo.
1500      * @return {array} the expanded requirement list.
1501      */
1502     getRequires: function(mod) {
1504         if (!mod) {
1505             //console.log('returning no reqs for ' + mod.name);
1506             return NO_REQUIREMENTS;
1507         }
1509         if (mod._parsed) {
1510             //console.log('returning requires for ' + mod.name, mod.requires);
1511             return mod.expanded || NO_REQUIREMENTS;
1512         }
1514         //TODO add modue cache here out of scope..
1516         var i, m, j, add, packName, lang, testresults = this.testresults,
1517             name = mod.name, cond,
1518             adddef = ON_PAGE[name] && ON_PAGE[name].details,
1519             d, go, def,
1520             r, old_mod,
1521             o, skinmod, skindef, skinpar, skinname,
1522             intl = mod.lang || mod.intl,
1523             info = this.moduleInfo,
1524             ftests = Y.Features && Y.Features.tests.load,
1525             hash, reparse;
1527         // console.log(name);
1529         // pattern match leaves module stub that needs to be filled out
1530         if (mod.temp && adddef) {
1531             old_mod = mod;
1532             mod = this.addModule(adddef, name);
1533             mod.group = old_mod.group;
1534             mod.pkg = old_mod.pkg;
1535             delete mod.expanded;
1536         }
1538         // console.log('cache: ' + mod.langCache + ' == ' + this.lang);
1540         //If a skin or a lang is different, reparse..
1541         reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
1543         if (mod.expanded && !reparse) {
1544             //Y.log('Already expanded ' + name + ', ' + mod.expanded);
1545             return mod.expanded;
1546         }
1549         d = [];
1550         hash = {};
1551         r = this.filterRequires(mod.requires);
1552         if (mod.lang) {
1553             //If a module has a lang attribute, auto add the intl requirement.
1554             d.unshift('intl');
1555             r.unshift('intl');
1556             intl = true;
1557         }
1558         o = this.filterRequires(mod.optional);
1560         // Y.log("getRequires: " + name + " (dirty:" + this.dirty +
1561         // ", expanded:" + mod.expanded + ")");
1563         mod._parsed = true;
1564         mod.langCache = this.lang;
1565         mod.skinCache = this.skin.defaultSkin;
1567         for (i = 0; i < r.length; i++) {
1568             //Y.log(name + ' requiring ' + r[i], 'info', 'loader');
1569             if (!hash[r[i]]) {
1570                 d.push(r[i]);
1571                 hash[r[i]] = true;
1572                 m = this.getModule(r[i]);
1573                 if (m) {
1574                     add = this.getRequires(m);
1575                     intl = intl || (m.expanded_map &&
1576                         (INTL in m.expanded_map));
1577                     for (j = 0; j < add.length; j++) {
1578                         d.push(add[j]);
1579                     }
1580                 }
1581             }
1582         }
1584         // get the requirements from superseded modules, if any
1585         r = this.filterRequires(mod.supersedes);
1586         if (r) {
1587             for (i = 0; i < r.length; i++) {
1588                 if (!hash[r[i]]) {
1589                     // if this module has submodules, the requirements list is
1590                     // expanded to include the submodules.  This is so we can
1591                     // prevent dups when a submodule is already loaded and the
1592                     // parent is requested.
1593                     if (mod.submodules) {
1594                         d.push(r[i]);
1595                     }
1597                     hash[r[i]] = true;
1598                     m = this.getModule(r[i]);
1600                     if (m) {
1601                         add = this.getRequires(m);
1602                         intl = intl || (m.expanded_map &&
1603                             (INTL in m.expanded_map));
1604                         for (j = 0; j < add.length; j++) {
1605                             d.push(add[j]);
1606                         }
1607                     }
1608                 }
1609             }
1610         }
1612         if (o && this.loadOptional) {
1613             for (i = 0; i < o.length; i++) {
1614                 if (!hash[o[i]]) {
1615                     d.push(o[i]);
1616                     hash[o[i]] = true;
1617                     m = info[o[i]];
1618                     if (m) {
1619                         add = this.getRequires(m);
1620                         intl = intl || (m.expanded_map &&
1621                             (INTL in m.expanded_map));
1622                         for (j = 0; j < add.length; j++) {
1623                             d.push(add[j]);
1624                         }
1625                     }
1626                 }
1627             }
1628         }
1630         cond = this.conditions[name];
1632         if (cond) {
1633             //Set the module to not parsed since we have conditionals and this could change the dependency tree.
1634             mod._parsed = false;
1635             if (testresults && ftests) {
1636                 oeach(testresults, function(result, id) {
1637                     var condmod = ftests[id].name;
1638                     if (!hash[condmod] && ftests[id].trigger === name) {
1639                         if (result && ftests[id]) {
1640                             hash[condmod] = true;
1641                             d.push(condmod);
1642                         }
1643                     }
1644                 });
1645             } else {
1646                 for (i in cond) {
1647                     if (cond.hasOwnProperty(i)) {
1648                         if (!hash[i]) {
1649                             def = cond[i];
1650                             //first see if they've specfied a ua check
1651                             //then see if they've got a test fn & if it returns true
1652                             //otherwise just having a condition block is enough
1653                             go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
1654                                         (def.test && def.test(Y, r)));
1656                             if (go) {
1657                                 hash[i] = true;
1658                                 d.push(i);
1659                                 m = this.getModule(i);
1660                                 if (m) {
1661                                     add = this.getRequires(m);
1662                                     for (j = 0; j < add.length; j++) {
1663                                         d.push(add[j]);
1664                                     }
1666                                 }
1667                             }
1668                         }
1669                     }
1670                 }
1671             }
1672         }
1674         // Create skin modules
1675         if (mod.skinnable) {
1676             skindef = this.skin.overrides;
1677             for (i in YUI.Env.aliases) {
1678                 if (YUI.Env.aliases.hasOwnProperty(i)) {
1679                     if (Y.Array.indexOf(YUI.Env.aliases[i], name) > -1) {
1680                         skinpar = i;
1681                     }
1682                 }
1683             }
1684             if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) {
1685                 skinname = name;
1686                 if (skindef[skinpar]) {
1687                     skinname = skinpar;
1688                 }
1689                 for (i = 0; i < skindef[skinname].length; i++) {
1690                     skinmod = this._addSkin(skindef[skinname][i], name);
1691                     if (!this.isCSSLoaded(skinmod, this._boot)) {
1692                         d.push(skinmod);
1693                     }
1694                 }
1695             } else {
1696                 skinmod = this._addSkin(this.skin.defaultSkin, name);
1697                 if (!this.isCSSLoaded(skinmod, this._boot)) {
1698                     d.push(skinmod);
1699                 }
1700             }
1701         }
1703         mod._parsed = false;
1705         if (intl) {
1707             if (mod.lang && !mod.langPack && Y.Intl) {
1708                 lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
1709                 //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang);
1710                 packName = this.getLangPackName(lang, name);
1711                 if (packName) {
1712                     d.unshift(packName);
1713                 }
1714             }
1715             d.unshift(INTL);
1716         }
1718         mod.expanded_map = yArray.hash(d);
1720         mod.expanded = YObject.keys(mod.expanded_map);
1722         return mod.expanded;
1723     },
1724     /**
1725     * Check to see if named css module is already loaded on the page
1726     * @method isCSSLoaded
1727     * @param {String} name The name of the css file
1728     * @return Boolean
1729     */
1730     isCSSLoaded: function(name, skip) {
1731         //TODO - Make this call a batching call with name being an array
1732         if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
1733             Y.log('isCSSLoaded was skipped for ' + name, 'warn', 'loader');
1734             return false;
1735         }
1736         var el = YUI.Env.cssStampEl,
1737             ret = false,
1738             mod = YUI.Env._cssLoaded[name],
1739             style = el.currentStyle; //IE
1742         if (mod !== undefined) {
1743             //Y.log('isCSSLoaded was cached for ' + name, 'warn', 'loader');
1744             return mod;
1745         }
1747         //Add the classname to the element
1748         el.className = name;
1750         if (!style) {
1751             style = Y.config.doc.defaultView.getComputedStyle(el, null);
1752         }
1754         if (style && style.display === 'none') {
1755             ret = true;
1756         }
1758         Y.log('Has Skin? ' + name + ' : ' + ret, 'info', 'loader');
1760         el.className = ''; //Reset the classname to ''
1762         YUI.Env._cssLoaded[name] = ret;
1764         return ret;
1765     },
1767     /**
1768      * Returns a hash of module names the supplied module satisfies.
1769      * @method getProvides
1770      * @param {string} name The name of the module.
1771      * @return {object} what this module provides.
1772      */
1773     getProvides: function(name) {
1774         var m = this.getModule(name), o, s;
1775             // supmap = this.provides;
1777         if (!m) {
1778             return NOT_FOUND;
1779         }
1781         if (m && !m.provides) {
1782             o = {};
1783             s = m.supersedes;
1785             if (s) {
1786                 yArray.each(s, function(v) {
1787                     Y.mix(o, this.getProvides(v));
1788                 }, this);
1789             }
1791             o[name] = true;
1792             m.provides = o;
1794         }
1796         return m.provides;
1797     },
1799     /**
1800      * Calculates the dependency tree, the result is stored in the sorted
1801      * property.
1802      * @method calculate
1803      * @param {object} o optional options object.
1804      * @param {string} type optional argument to prune modules.
1805      */
1806     calculate: function(o, type) {
1807         if (o || type || this.dirty) {
1809             if (o) {
1810                 this._config(o);
1811             }
1813             if (!this._init) {
1814                 this._setup();
1815             }
1817             this._explode();
1819             if (this.allowRollup) {
1820                 this._rollup();
1821             } else {
1822                 this._explodeRollups();
1823             }
1824             this._reduce();
1825             this._sort();
1826         }
1827     },
1828     /**
1829     * Creates a "psuedo" package for languages provided in the lang array
1830     * @method _addLangPack
1831     * @private
1832     * @param {String} lang The language to create
1833     * @param {Object} m The module definition to create the language pack around
1834     * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
1835     * @return {Object} The module definition
1836     */
1837     _addLangPack: function(lang, m, packName) {
1838         var name = m.name,
1839             packPath, conf,
1840             existing = this.moduleInfo[packName];
1842         if (!existing) {
1844             packPath = _path((m.pkg || name), packName, JS, true);
1846             conf = {
1847                 path: packPath,
1848                 intl: true,
1849                 langPack: true,
1850                 ext: m.ext,
1851                 group: m.group,
1852                 supersedes: []
1853             };
1854             if (m.root) {
1855                 conf.root = m.root;
1856             }
1857             if (m.base) {
1858                 conf.base = m.base;
1859             }
1861             if (m.configFn) {
1862                 conf.configFn = m.configFn;
1863             }
1865             this.addModule(conf, packName);
1867             if (lang) {
1868                 Y.Env.lang = Y.Env.lang || {};
1869                 Y.Env.lang[lang] = Y.Env.lang[lang] || {};
1870                 Y.Env.lang[lang][name] = true;
1871             }
1872         }
1874         return this.moduleInfo[packName];
1875     },
1877     /**
1878      * Investigates the current YUI configuration on the page.  By default,
1879      * modules already detected will not be loaded again unless a force
1880      * option is encountered.  Called by calculate()
1881      * @method _setup
1882      * @private
1883      */
1884     _setup: function() {
1885         var info = this.moduleInfo, name, i, j, m, l,
1886             packName;
1888         for (name in info) {
1889             if (info.hasOwnProperty(name)) {
1890                 m = info[name];
1891                 if (m) {
1893                     // remove dups
1894                     //m.requires = YObject.keys(yArray.hash(m.requires));
1895                     m.requires = yArray.dedupe(m.requires);
1897                     // Create lang pack modules
1898                     //if (m.lang && m.lang.length) {
1899                     if (m.lang) {
1900                         // Setup root package if the module has lang defined,
1901                         // it needs to provide a root language pack
1902                         packName = this.getLangPackName(ROOT_LANG, name);
1903                         this._addLangPack(null, m, packName);
1904                     }
1906                 }
1907             }
1908         }
1911         //l = Y.merge(this.inserted);
1912         l = {};
1914         // available modules
1915         if (!this.ignoreRegistered) {
1916             Y.mix(l, GLOBAL_ENV.mods);
1917         }
1919         // add the ignore list to the list of loaded packages
1920         if (this.ignore) {
1921             Y.mix(l, yArray.hash(this.ignore));
1922         }
1924         // expand the list to include superseded modules
1925         for (j in l) {
1926             if (l.hasOwnProperty(j)) {
1927                 Y.mix(l, this.getProvides(j));
1928             }
1929         }
1931         // remove modules on the force list from the loaded list
1932         if (this.force) {
1933             for (i = 0; i < this.force.length; i++) {
1934                 if (this.force[i] in l) {
1935                     delete l[this.force[i]];
1936                 }
1937             }
1938         }
1940         Y.mix(this.loaded, l);
1942         this._init = true;
1943     },
1945     /**
1946      * Builds a module name for a language pack
1947      * @method getLangPackName
1948      * @param {string} lang the language code.
1949      * @param {string} mname the module to build it for.
1950      * @return {string} the language pack module name.
1951      */
1952     getLangPackName: function(lang, mname) {
1953         return ('lang/' + mname + ((lang) ? '_' + lang : ''));
1954     },
1955     /**
1956      * Inspects the required modules list looking for additional
1957      * dependencies.  Expands the required list to include all
1958      * required modules.  Called by calculate()
1959      * @method _explode
1960      * @private
1961      */
1962     _explode: function() {
1963         //TODO Move done out of scope
1964         var r = this.required, m, reqs, done = {},
1965             self = this, name, expound;
1967         // the setup phase is over, all modules have been created
1968         self.dirty = false;
1970         self._explodeRollups();
1971         r = self.required;
1973         for (name in r) {
1974             if (r.hasOwnProperty(name)) {
1975                 if (!done[name]) {
1976                     done[name] = true;
1977                     m = self.getModule(name);
1978                     if (m) {
1979                         expound = m.expound;
1981                         if (expound) {
1982                             r[expound] = self.getModule(expound);
1983                             reqs = self.getRequires(r[expound]);
1984                             Y.mix(r, yArray.hash(reqs));
1985                         }
1987                         reqs = self.getRequires(m);
1988                         Y.mix(r, yArray.hash(reqs));
1989                     }
1990                 }
1991             }
1992         }
1994         // Y.log('After explode: ' + YObject.keys(r));
1995     },
1996     /**
1997     * The default method used to test a module against a pattern
1998     * @method _patternTest
1999     * @private
2000     * @param {String} mname The module being tested
2001     * @param {String} pname The pattern to match
2002     */
2003     _patternTest: function(mname, pname) {
2004         return (mname.indexOf(pname) > -1);
2005     },
2006     /**
2007     * Get's the loader meta data for the requested module
2008     * @method getModule
2009     * @param {String} mname The module name to get
2010     * @return {Object} The module metadata
2011     */
2012     getModule: function(mname) {
2013         //TODO: Remove name check - it's a quick hack to fix pattern WIP
2014         if (!mname) {
2015             return null;
2016         }
2018         var p, found, pname,
2019             m = this.moduleInfo[mname],
2020             patterns = this.patterns;
2022         // check the patterns library to see if we should automatically add
2023         // the module with defaults
2024         if (!m || (m && m.ext)) {
2025            // Y.log('testing patterns ' + YObject.keys(patterns));
2026             for (pname in patterns) {
2027                 if (patterns.hasOwnProperty(pname)) {
2028                     // Y.log('testing pattern ' + i);
2029                     p = patterns[pname];
2031                     //There is no test method, create a default one that tests
2032                     // the pattern against the mod name
2033                     if (!p.test) {
2034                         p.test = this._patternTest;
2035                     }
2037                     if (p.test(mname, pname)) {
2038                         // use the metadata supplied for the pattern
2039                         // as the module definition.
2040                         found = p;
2041                         break;
2042                     }
2043                 }
2044             }
2045         }
2047         if (!m) {
2048             if (found) {
2049                 if (p.action) {
2050                     // Y.log('executing pattern action: ' + pname);
2051                     p.action.call(this, mname, pname);
2052                 } else {
2053 Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
2054     pname, 'info', 'loader');
2055                     // ext true or false?
2056                     m = this.addModule(Y.merge(found), mname);
2057                     if (found.configFn) {
2058                         m.configFn = found.configFn;
2059                     }
2060                     m.temp = true;
2061                 }
2062             }
2063         } else {
2064             if (found && m && found.configFn && !m.configFn) {
2065                 m.configFn = found.configFn;
2066                 m.configFn(m);
2067             }
2068         }
2070         return m;
2071     },
2073     // impl in rollup submodule
2074     _rollup: function() { },
2076     /**
2077      * Remove superceded modules and loaded modules.  Called by
2078      * calculate() after we have the mega list of all dependencies
2079      * @method _reduce
2080      * @return {object} the reduced dependency hash.
2081      * @private
2082      */
2083     _reduce: function(r) {
2085         r = r || this.required;
2087         var i, j, s, m, type = this.loadType,
2088         ignore = this.ignore ? yArray.hash(this.ignore) : false;
2090         for (i in r) {
2091             if (r.hasOwnProperty(i)) {
2092                 m = this.getModule(i);
2093                 // remove if already loaded
2094                 if (((this.loaded[i] || ON_PAGE[i]) &&
2095                         !this.forceMap[i] && !this.ignoreRegistered) ||
2096                         (type && m && m.type !== type)) {
2097                     delete r[i];
2098                 }
2099                 if (ignore && ignore[i]) {
2100                     delete r[i];
2101                 }
2102                 // remove anything this module supersedes
2103                 s = m && m.supersedes;
2104                 if (s) {
2105                     for (j = 0; j < s.length; j++) {
2106                         if (s[j] in r) {
2107                             delete r[s[j]];
2108                         }
2109                     }
2110                 }
2111             }
2112         }
2114         return r;
2115     },
2116     /**
2117     * Handles the queue when a module has been loaded for all cases
2118     * @method _finish
2119     * @private
2120     * @param {String} msg The message from Loader
2121     * @param {Boolean} success A boolean denoting success or failure
2122     */
2123     _finish: function(msg, success) {
2124         Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' +
2125             this.data, 'info', 'loader');
2127         _queue.running = false;
2129         var onEnd = this.onEnd;
2130         if (onEnd) {
2131             onEnd.call(this.context, {
2132                 msg: msg,
2133                 data: this.data,
2134                 success: success
2135             });
2136         }
2137         this._continue();
2138     },
2139     /**
2140     * The default Loader onSuccess handler, calls this.onSuccess with a payload
2141     * @method _onSuccess
2142     * @private
2143     */
2144     _onSuccess: function() {
2145         var self = this, skipped = Y.merge(self.skipped), fn,
2146             failed = [], rreg = self.requireRegistration,
2147             success, msg, i, mod;
2149         for (i in skipped) {
2150             if (skipped.hasOwnProperty(i)) {
2151                 delete self.inserted[i];
2152             }
2153         }
2155         self.skipped = {};
2157         for (i in self.inserted) {
2158             if (self.inserted.hasOwnProperty(i)) {
2159                 mod = self.getModule(i);
2160                 if (mod && rreg && mod.type === JS && !(i in YUI.Env.mods)) {
2161                     failed.push(i);
2162                 } else {
2163                     Y.mix(self.loaded, self.getProvides(i));
2164                 }
2165             }
2166         }
2168         fn = self.onSuccess;
2169         msg = (failed.length) ? 'notregistered' : 'success';
2170         success = !(failed.length);
2171         if (fn) {
2172             fn.call(self.context, {
2173                 msg: msg,
2174                 data: self.data,
2175                 success: success,
2176                 failed: failed,
2177                 skipped: skipped
2178             });
2179         }
2180         self._finish(msg, success);
2181     },
2182     /**
2183     * The default Loader onProgress handler, calls this.onProgress with a payload
2184     * @method _onProgress
2185     * @private
2186     */
2187     _onProgress: function(e) {
2188         var self = this, i;
2189         //set the internal cache to what just came in.
2190         if (e.data && e.data.length) {
2191             for (i = 0; i < e.data.length; i++) {
2192                 e.data[i] = self.getModule(e.data[i].name);
2193             }
2194         }
2195         if (self.onProgress) {
2196             self.onProgress.call(self.context, {
2197                 name: e.url,
2198                 data: e.data
2199             });
2200         }
2201     },
2202     /**
2203     * The default Loader onFailure handler, calls this.onFailure with a payload
2204     * @method _onFailure
2205     * @private
2206     */
2207     _onFailure: function(o) {
2208         var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
2210         for (i; i < len; i++) {
2211             msg.push(o.errors[i].error);
2212         }
2214         msg = msg.join(',');
2216         Y.log('load error: ' + msg + ', ' + Y.id, 'error', 'loader');
2218         if (f) {
2219             f.call(this.context, {
2220                 msg: msg,
2221                 data: this.data,
2222                 success: false
2223             });
2224         }
2226         this._finish(msg, false);
2228     },
2230     /**
2231     * The default Loader onTimeout handler, calls this.onTimeout with a payload
2232     * @method _onTimeout
2233     * @param {Get.Transaction} transaction The Transaction object from `Y.Get`
2234     * @private
2235     */
2236     _onTimeout: function(transaction) {
2237         Y.log('loader timeout: ' + Y.id, 'error', 'loader');
2238         var f = this.onTimeout;
2239         if (f) {
2240             f.call(this.context, {
2241                 msg: 'timeout',
2242                 data: this.data,
2243                 success: false,
2244                 transaction: transaction
2245             });
2246         }
2247     },
2249     /**
2250      * Sorts the dependency tree.  The last step of calculate()
2251      * @method _sort
2252      * @private
2253      */
2254     _sort: function() {
2256         // create an indexed list
2257         var s = YObject.keys(this.required),
2258             // loaded = this.loaded,
2259             //TODO Move this out of scope
2260             done = {},
2261             p = 0, l, a, b, j, k, moved, doneKey;
2263         // keep going until we make a pass without moving anything
2264         for (;;) {
2266             l = s.length;
2267             moved = false;
2269             // start the loop after items that are already sorted
2270             for (j = p; j < l; j++) {
2272                 // check the next module on the list to see if its
2273                 // dependencies have been met
2274                 a = s[j];
2276                 // check everything below current item and move if we
2277                 // find a requirement for the current item
2278                 for (k = j + 1; k < l; k++) {
2279                     doneKey = a + s[k];
2281                     if (!done[doneKey] && this._requires(a, s[k])) {
2283                         // extract the dependency so we can move it up
2284                         b = s.splice(k, 1);
2286                         // insert the dependency above the item that
2287                         // requires it
2288                         s.splice(j, 0, b[0]);
2290                         // only swap two dependencies once to short circut
2291                         // circular dependencies
2292                         done[doneKey] = true;
2294                         // keep working
2295                         moved = true;
2297                         break;
2298                     }
2299                 }
2301                 // jump out of loop if we moved something
2302                 if (moved) {
2303                     break;
2304                 // this item is sorted, move our pointer and keep going
2305                 } else {
2306                     p++;
2307                 }
2308             }
2310             // when we make it here and moved is false, we are
2311             // finished sorting
2312             if (!moved) {
2313                 break;
2314             }
2316         }
2318         this.sorted = s;
2319     },
2321     /**
2322     * Handles the actual insertion of script/link tags
2323     * @method _insert
2324     * @private
2325     * @param {Object} source The YUI instance the request came from
2326     * @param {Object} o The metadata to include
2327     * @param {String} type JS or CSS
2328     * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta
2329     */
2330     _insert: function(source, o, type, skipcalc) {
2332         Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader");
2334         // restore the state at the time of the request
2335         if (source) {
2336             this._config(source);
2337         }
2339         // build the dependency list
2340         // don't include type so we can process CSS and script in
2341         // one pass when the type is not specified.
2343         var modules = this.resolve(!skipcalc),
2344             self = this, comp = 0, actions = 0,
2345             mods = {}, deps, complete;
2347         self._refetch = [];
2349         if (type) {
2350             //Filter out the opposite type and reset the array so the checks later work
2351             modules[((type === JS) ? CSS : JS)] = [];
2352         }
2353         if (!self.fetchCSS) {
2354             modules.css = [];
2355         }
2356         if (modules.js.length) {
2357             comp++;
2358         }
2359         if (modules.css.length) {
2360             comp++;
2361         }
2363         //console.log('Resolved Modules: ', modules);
2365         complete = function(d) {
2366             actions++;
2367             var errs = {}, i = 0, o = 0, u = '', fn,
2368                 modName, resMods;
2370             if (d && d.errors) {
2371                 for (i = 0; i < d.errors.length; i++) {
2372                     if (d.errors[i].request) {
2373                         u = d.errors[i].request.url;
2374                     } else {
2375                         u = d.errors[i];
2376                     }
2377                     errs[u] = u;
2378                 }
2379             }
2381             if (d && d.data && d.data.length && (d.type === 'success')) {
2382                 for (i = 0; i < d.data.length; i++) {
2383                     self.inserted[d.data[i].name] = true;
2384                     //If the external module has a skin or a lang, reprocess it
2385                     if (d.data[i].lang || d.data[i].skinnable) {
2386                         delete self.inserted[d.data[i].name];
2387                         self._refetch.push(d.data[i].name);
2388                     }
2389                 }
2390             }
2392             if (actions === comp) {
2393                 self._loading = null;
2394                 Y.log('Loader actions complete!', 'info', 'loader');
2395                 if (self._refetch.length) {
2396                     //Get the deps for the new meta-data and reprocess
2397                     Y.log('Found potential modules to refetch', 'info', 'loader');
2398                     for (i = 0; i < self._refetch.length; i++) {
2399                         deps = self.getRequires(self.getModule(self._refetch[i]));
2400                         for (o = 0; o < deps.length; o++) {
2401                             if (!self.inserted[deps[o]]) {
2402                                 //We wouldn't be to this point without the module being here
2403                                 mods[deps[o]] = deps[o];
2404                             }
2405                         }
2406                     }
2407                     mods = Y.Object.keys(mods);
2408                     if (mods.length) {
2409                         Y.log('Refetching modules with new meta-data', 'info', 'loader');
2410                         self.require(mods);
2411                         resMods = self.resolve(true);
2412                         if (resMods.cssMods.length) {
2413                             for (i=0; i <  resMods.cssMods.length; i++) {
2414                                 modName = resMods.cssMods[i].name;
2415                                 delete YUI.Env._cssLoaded[modName];
2416                                 if (self.isCSSLoaded(modName)) {
2417                                     self.inserted[modName] = true;
2418                                     delete self.required[modName];
2419                                 }
2420                             }
2421                             self.sorted = [];
2422                             self._sort();
2423                         }
2424                         d = null; //bail
2425                         self._insert(); //insert the new deps
2426                     }
2427                 }
2428                 if (d && d.fn) {
2429                     Y.log('Firing final Loader callback!', 'info', 'loader');
2430                     fn = d.fn;
2431                     delete d.fn;
2432                     fn.call(self, d);
2433                 }
2434             }
2435         };
2437         this._loading = true;
2439         if (!modules.js.length && !modules.css.length) {
2440             Y.log('No modules resolved..', 'warn', 'loader');
2441             actions = -1;
2442             complete({
2443                 fn: self._onSuccess
2444             });
2445             return;
2446         }
2449         if (modules.css.length) { //Load CSS first
2450             Y.log('Loading CSS modules', 'info', 'loader');
2451             Y.Get.css(modules.css, {
2452                 data: modules.cssMods,
2453                 attributes: self.cssAttributes,
2454                 insertBefore: self.insertBefore,
2455                 charset: self.charset,
2456                 timeout: self.timeout,
2457                 context: self,
2458                 onProgress: function(e) {
2459                     self._onProgress.call(self, e);
2460                 },
2461                 onTimeout: function(d) {
2462                     self._onTimeout.call(self, d);
2463                 },
2464                 onSuccess: function(d) {
2465                     d.type = 'success';
2466                     d.fn = self._onSuccess;
2467                     complete.call(self, d);
2468                 },
2469                 onFailure: function(d) {
2470                     d.type = 'failure';
2471                     d.fn = self._onFailure;
2472                     complete.call(self, d);
2473                 }
2474             });
2475         }
2477         if (modules.js.length) {
2478             Y.log('Loading JS modules', 'info', 'loader');
2479             Y.Get.js(modules.js, {
2480                 data: modules.jsMods,
2481                 insertBefore: self.insertBefore,
2482                 attributes: self.jsAttributes,
2483                 charset: self.charset,
2484                 timeout: self.timeout,
2485                 autopurge: false,
2486                 context: self,
2487                 async: self.async,
2488                 onProgress: function(e) {
2489                     self._onProgress.call(self, e);
2490                 },
2491                 onTimeout: function(d) {
2492                     self._onTimeout.call(self, d);
2493                 },
2494                 onSuccess: function(d) {
2495                     d.type = 'success';
2496                     d.fn = self._onSuccess;
2497                     complete.call(self, d);
2498                 },
2499                 onFailure: function(d) {
2500                     d.type = 'failure';
2501                     d.fn = self._onFailure;
2502                     complete.call(self, d);
2503                 }
2504             });
2505         }
2506     },
2507     /**
2508     * Once a loader operation is completely finished, process any additional queued items.
2509     * @method _continue
2510     * @private
2511     */
2512     _continue: function() {
2513         if (!(_queue.running) && _queue.size() > 0) {
2514             _queue.running = true;
2515             _queue.next()();
2516         }
2517     },
2519     /**
2520      * inserts the requested modules and their dependencies.
2521      * <code>type</code> can be "js" or "css".  Both script and
2522      * css are inserted if type is not provided.
2523      * @method insert
2524      * @param {object} o optional options object.
2525      * @param {string} type the type of dependency to insert.
2526      */
2527     insert: function(o, type, skipsort) {
2528          Y.log('public insert() ' + (type || '') + ', ' +
2529          Y.Object.keys(this.required), "info", "loader");
2530         var self = this, copy = Y.merge(this);
2531         delete copy.require;
2532         delete copy.dirty;
2533         _queue.add(function() {
2534             self._insert(copy, o, type, skipsort);
2535         });
2536         this._continue();
2537     },
2539     /**
2540      * Executed every time a module is loaded, and if we are in a load
2541      * cycle, we attempt to load the next script.  Public so that it
2542      * is possible to call this if using a method other than
2543      * Y.register to determine when scripts are fully loaded
2544      * @method loadNext
2545      * @deprecated
2546      * @param {string} mname optional the name of the module that has
2547      * been loaded (which is usually why it is time to load the next
2548      * one).
2549      */
2550     loadNext: function() {
2551         Y.log('loadNext was called..', 'error', 'loader');
2552         return;
2553     },
2555     /**
2556      * Apply filter defined for this instance to a url/path
2557      * @method _filter
2558      * @param {string} u the string to filter.
2559      * @param {string} name the name of the module, if we are processing
2560      * a single module as opposed to a combined url.
2561      * @return {string} the filtered string.
2562      * @private
2563      */
2564     _filter: function(u, name, group) {
2565         var f = this.filter,
2566             hasFilter = name && (name in this.filters),
2567             modFilter = hasFilter && this.filters[name],
2568             groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
2570         if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
2571             modFilter = this.groups[groupName].filter;
2572             hasFilter = true;
2573         }
2575         if (u) {
2576             if (hasFilter) {
2577                 f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter;
2578             }
2579             if (f) {
2580                 u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr);
2581             }
2582         }
2583         return u;
2584     },
2586     /**
2587      * Generates the full url for a module
2588      * @method _url
2589      * @param {string} path the path fragment.
2590      * @param {String} name The name of the module
2591      * @param {String} [base=self.base] The base url to use
2592      * @return {string} the full url.
2593      * @private
2594      */
2595     _url: function(path, name, base) {
2596         return this._filter((base || this.base || '') + path, name);
2597     },
2598     /**
2599     * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules.
2600     * @method resolve
2601     * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
2602     * @param {Array} [s=loader.sorted] An override for the loader.sorted array
2603     * @return {Object} Object hash (js and css) of two arrays of file lists
2604     * @example This method can be used as an off-line dep calculator
2605     *
2606     *        var Y = YUI();
2607     *        var loader = new Y.Loader({
2608     *            filter: 'debug',
2609     *            base: '../../',
2610     *            root: 'build/',
2611     *            combine: true,
2612     *            require: ['node', 'dd', 'console']
2613     *        });
2614     *        var out = loader.resolve(true);
2615     *
2616     */
2617     resolve: function(calc, s) {
2619         var len, i, m, url, group, groupName, j, frag,
2620             comboSource, comboSources, mods, comboBase,
2621             base, urls, u = [], tmpBase, baseLen, resCombos = {},
2622             self = this, comboSep, maxURLLength,
2623             inserted = (self.ignoreRegistered) ? {} : self.inserted,
2624             resolved = { js: [], jsMods: [], css: [], cssMods: [] },
2625             type = self.loadType || 'js', addSingle;
2627         if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
2628             self._resetModules();
2629         }
2631         if (calc) {
2632             self.calculate();
2633         }
2634         s = s || self.sorted;
2636         addSingle = function(m) {
2638             if (m) {
2639                 group = (m.group && self.groups[m.group]) || NOT_FOUND;
2641                 //Always assume it's async
2642                 if (group.async === false) {
2643                     m.async = group.async;
2644                 }
2646                 url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
2647                       self._url(m.path, s[i], group.base || m.base);
2649                 if (m.attributes || m.async === false) {
2650                     url = {
2651                         url: url,
2652                         async: m.async
2653                     };
2654                     if (m.attributes) {
2655                         url.attributes = m.attributes;
2656                     }
2657                 }
2658                 resolved[m.type].push(url);
2659                 resolved[m.type + 'Mods'].push(m);
2660             } else {
2661                 Y.log('Undefined Module', 'warn', 'loader');
2662             }
2664         };
2666         len = s.length;
2668         // the default combo base
2669         comboBase = self.comboBase;
2671         url = comboBase;
2673         comboSources = {};
2675         for (i = 0; i < len; i++) {
2676             comboSource = comboBase;
2677             m = self.getModule(s[i]);
2678             groupName = m && m.group;
2679             group = self.groups[groupName];
2680             if (groupName && group) {
2682                 if (!group.combine || m.fullpath) {
2683                     //This is not a combo module, skip it and load it singly later.
2684                     addSingle(m);
2685                     continue;
2686                 }
2687                 m.combine = true;
2688                 if (group.comboBase) {
2689                     comboSource = group.comboBase;
2690                 }
2692                 if ("root" in group && L.isValue(group.root)) {
2693                     m.root = group.root;
2694                 }
2695                 m.comboSep = group.comboSep || self.comboSep;
2696                 m.maxURLLength = group.maxURLLength || self.maxURLLength;
2697             } else {
2698                 if (!self.combine) {
2699                     //This is not a combo module, skip it and load it singly later.
2700                     addSingle(m);
2701                     continue;
2702                 }
2703             }
2705             comboSources[comboSource] = comboSources[comboSource] || [];
2706             comboSources[comboSource].push(m);
2707         }
2709         for (j in comboSources) {
2710             if (comboSources.hasOwnProperty(j)) {
2711                 resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
2712                 url = j;
2713                 mods = comboSources[j];
2714                 len = mods.length;
2716                 if (len) {
2717                     for (i = 0; i < len; i++) {
2718                         if (inserted[mods[i]]) {
2719                             continue;
2720                         }
2721                         m = mods[i];
2722                         // Do not try to combine non-yui JS unless combo def
2723                         // is found
2724                         if (m && (m.combine || !m.ext)) {
2725                             resCombos[j].comboSep = m.comboSep;
2726                             resCombos[j].group = m.group;
2727                             resCombos[j].maxURLLength = m.maxURLLength;
2728                             frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
2729                             frag = self._filter(frag, m.name);
2730                             resCombos[j][m.type].push(frag);
2731                             resCombos[j][m.type + 'Mods'].push(m);
2732                         } else {
2733                             //Add them to the next process..
2734                             if (mods[i]) {
2735                                 addSingle(mods[i]);
2736                             }
2737                         }
2739                     }
2740                 }
2741             }
2742         }
2745         for (j in resCombos) {
2746             if (resCombos.hasOwnProperty(j)) {
2747                 base = j;
2748                 comboSep = resCombos[base].comboSep || self.comboSep;
2749                 maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
2750                 Y.log('Using maxURLLength of ' + maxURLLength, 'info', 'loader');
2751                 for (type in resCombos[base]) {
2752                     if (type === JS || type === CSS) {
2753                         urls = resCombos[base][type];
2754                         mods = resCombos[base][type + 'Mods'];
2755                         len = urls.length;
2756                         tmpBase = base + urls.join(comboSep);
2757                         baseLen = tmpBase.length;
2758                         if (maxURLLength <= base.length) {
2759                             Y.log('maxURLLength (' + maxURLLength + ') is lower than the comboBase length (' + base.length + '), resetting to default (' + MAX_URL_LENGTH + ')', 'error', 'loader');
2760                             maxURLLength = MAX_URL_LENGTH;
2761                         }
2763                         if (len) {
2764                             if (baseLen > maxURLLength) {
2765                                 Y.log('Exceeded maxURLLength (' + maxURLLength + ') for ' + type + ', splitting', 'info', 'loader');
2766                                 u = [];
2767                                 for (s = 0; s < len; s++) {
2768                                     u.push(urls[s]);
2769                                     tmpBase = base + u.join(comboSep);
2771                                     if (tmpBase.length > maxURLLength) {
2772                                         m = u.pop();
2773                                         tmpBase = base + u.join(comboSep);
2774                                         resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
2775                                         u = [];
2776                                         if (m) {
2777                                             u.push(m);
2778                                         }
2779                                     }
2780                                 }
2781                                 if (u.length) {
2782                                     tmpBase = base + u.join(comboSep);
2783                                     resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
2784                                 }
2785                             } else {
2786                                 resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
2787                             }
2788                         }
2789                         resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
2790                     }
2791                 }
2792             }
2793         }
2795         resCombos = null;
2797         return resolved;
2798     },
2799     /**
2800     Shortcut to calculate, resolve and load all modules.
2802         var loader = new Y.Loader({
2803             ignoreRegistered: true,
2804             modules: {
2805                 mod: {
2806                     path: 'mod.js'
2807                 }
2808             },
2809             requires: [ 'mod' ]
2810         });
2811         loader.load(function() {
2812             console.log('All modules have loaded..');
2813         });
2816     @method load
2817     @param {Callback} cb Executed after all load operations are complete
2818     */
2819     load: function(cb) {
2820         if (!cb) {
2821             Y.log('No callback supplied to load()', 'error', 'loader');
2822             return;
2823         }
2824         var self = this,
2825             out = self.resolve(true);
2827         self.data = out;
2829         self.onEnd = function() {
2830             cb.apply(self.context || self, arguments);
2831         };
2833         self.insert();
2834     }
2839 }, '3.13.0', {"requires": ["get", "features"]});
2840 YUI.add('loader-rollup', function (Y, NAME) {
2843  * Optional automatic rollup logic for reducing http connections
2844  * when not using a combo service.
2845  * @module loader
2846  * @submodule rollup
2847  */
2850  * Look for rollup packages to determine if all of the modules a
2851  * rollup supersedes are required.  If so, include the rollup to
2852  * help reduce the total number of connections required.  Called
2853  * by calculate().  This is an optional feature, and requires the
2854  * appropriate submodule to function.
2855  * @method _rollup
2856  * @for Loader
2857  * @private
2858  */
2859 Y.Loader.prototype._rollup = function() {
2860     var i, j, m, s, r = this.required, roll,
2861         info = this.moduleInfo, rolled, c, smod;
2863     // find and cache rollup modules
2864     if (this.dirty || !this.rollups) {
2865         this.rollups = {};
2866         for (i in info) {
2867             if (info.hasOwnProperty(i)) {
2868                 m = this.getModule(i);
2869                 // if (m && m.rollup && m.supersedes) {
2870                 if (m && m.rollup) {
2871                     this.rollups[i] = m;
2872                 }
2873             }
2874         }
2875     }
2877     // make as many passes as needed to pick up rollup rollups
2878     for (;;) {
2879         rolled = false;
2881         // go through the rollup candidates
2882         for (i in this.rollups) {
2883             if (this.rollups.hasOwnProperty(i)) {
2884                 // there can be only one, unless forced
2885                 if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) {
2886                     m = this.getModule(i);
2887                     s = m.supersedes || [];
2888                     roll = false;
2890                     // @TODO remove continue
2891                     if (!m.rollup) {
2892                         continue;
2893                     }
2895                     c = 0;
2897                     // check the threshold
2898                     for (j = 0; j < s.length; j++) {
2899                         smod = info[s[j]];
2901                         // if the superseded module is loaded, we can't
2902                         // load the rollup unless it has been forced.
2903                         if (this.loaded[s[j]] && !this.forceMap[s[j]]) {
2904                             roll = false;
2905                             break;
2906                         // increment the counter if this module is required.
2907                         // if we are beyond the rollup threshold, we will
2908                         // use the rollup module
2909                         } else if (r[s[j]] && m.type === smod.type) {
2910                             c++;
2911                             // Y.log("adding to thresh: " + c + ", " + s[j]);
2912                             roll = (c >= m.rollup);
2913                             if (roll) {
2914                                 // Y.log("over thresh " + c + ", " + s[j]);
2915                                 break;
2916                             }
2917                         }
2918                     }
2920                     if (roll) {
2921                         // Y.log("adding rollup: " +  i);
2922                         // add the rollup
2923                         r[i] = true;
2924                         rolled = true;
2926                         // expand the rollup's dependencies
2927                         this.getRequires(m);
2928                     }
2929                 }
2930             }
2931         }
2933         // if we made it here w/o rolling up something, we are done
2934         if (!rolled) {
2935             break;
2936         }
2937     }
2941 }, '3.13.0', {"requires": ["loader-base"]});
2942 YUI.add('loader-yui3', function (Y, NAME) {
2944 /* This file is auto-generated by (yogi.js loader --mix --yes) */
2946 /*jshint maxlen:900, eqeqeq: false */
2949  * YUI 3 module metadata
2950  * @module loader
2951  * @submodule loader-yui3
2952  */
2953 YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {};
2954 Y.mix(YUI.Env[Y.version].modules, {
2955     "align-plugin": {
2956         "requires": [
2957             "node-screen",
2958             "node-pluginhost"
2959         ]
2960     },
2961     "anim": {
2962         "use": [
2963             "anim-base",
2964             "anim-color",
2965             "anim-curve",
2966             "anim-easing",
2967             "anim-node-plugin",
2968             "anim-scroll",
2969             "anim-xy"
2970         ]
2971     },
2972     "anim-base": {
2973         "requires": [
2974             "base-base",
2975             "node-style"
2976         ]
2977     },
2978     "anim-color": {
2979         "requires": [
2980             "anim-base"
2981         ]
2982     },
2983     "anim-curve": {
2984         "requires": [
2985             "anim-xy"
2986         ]
2987     },
2988     "anim-easing": {
2989         "requires": [
2990             "anim-base"
2991         ]
2992     },
2993     "anim-node-plugin": {
2994         "requires": [
2995             "node-pluginhost",
2996             "anim-base"
2997         ]
2998     },
2999     "anim-scroll": {
3000         "requires": [
3001             "anim-base"
3002         ]
3003     },
3004     "anim-shape": {
3005         "requires": [
3006             "anim-base",
3007             "anim-easing",
3008             "anim-color",
3009             "matrix"
3010         ]
3011     },
3012     "anim-shape-transform": {
3013         "use": [
3014             "anim-shape"
3015         ]
3016     },
3017     "anim-xy": {
3018         "requires": [
3019             "anim-base",
3020             "node-screen"
3021         ]
3022     },
3023     "app": {
3024         "use": [
3025             "app-base",
3026             "app-content",
3027             "app-transitions",
3028             "lazy-model-list",
3029             "model",
3030             "model-list",
3031             "model-sync-rest",
3032             "model-sync-local",
3033             "router",
3034             "view",
3035             "view-node-map"
3036         ]
3037     },
3038     "app-base": {
3039         "requires": [
3040             "classnamemanager",
3041             "pjax-base",
3042             "router",
3043             "view"
3044         ]
3045     },
3046     "app-content": {
3047         "requires": [
3048             "app-base",
3049             "pjax-content"
3050         ]
3051     },
3052     "app-transitions": {
3053         "requires": [
3054             "app-base"
3055         ]
3056     },
3057     "app-transitions-css": {
3058         "type": "css"
3059     },
3060     "app-transitions-native": {
3061         "condition": {
3062             "name": "app-transitions-native",
3063             "test": function (Y) {
3064     var doc  = Y.config.doc,
3065         node = doc ? doc.documentElement : null;
3067     if (node && node.style) {
3068         return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
3069     }
3071     return false;
3073             "trigger": "app-transitions"
3074         },
3075         "requires": [
3076             "app-transitions",
3077             "app-transitions-css",
3078             "parallel",
3079             "transition"
3080         ]
3081     },
3082     "array-extras": {
3083         "requires": [
3084             "yui-base"
3085         ]
3086     },
3087     "array-invoke": {
3088         "requires": [
3089             "yui-base"
3090         ]
3091     },
3092     "arraylist": {
3093         "requires": [
3094             "yui-base"
3095         ]
3096     },
3097     "arraylist-add": {
3098         "requires": [
3099             "arraylist"
3100         ]
3101     },
3102     "arraylist-filter": {
3103         "requires": [
3104             "arraylist"
3105         ]
3106     },
3107     "arraysort": {
3108         "requires": [
3109             "yui-base"
3110         ]
3111     },
3112     "async-queue": {
3113         "requires": [
3114             "event-custom"
3115         ]
3116     },
3117     "attribute": {
3118         "use": [
3119             "attribute-base",
3120             "attribute-complex"
3121         ]
3122     },
3123     "attribute-base": {
3124         "requires": [
3125             "attribute-core",
3126             "attribute-observable",
3127             "attribute-extras"
3128         ]
3129     },
3130     "attribute-complex": {
3131         "requires": [
3132             "attribute-base"
3133         ]
3134     },
3135     "attribute-core": {
3136         "requires": [
3137             "oop"
3138         ]
3139     },
3140     "attribute-events": {
3141         "use": [
3142             "attribute-observable"
3143         ]
3144     },
3145     "attribute-extras": {
3146         "requires": [
3147             "oop"
3148         ]
3149     },
3150     "attribute-observable": {
3151         "requires": [
3152             "event-custom"
3153         ]
3154     },
3155     "autocomplete": {
3156         "use": [
3157             "autocomplete-base",
3158             "autocomplete-sources",
3159             "autocomplete-list",
3160             "autocomplete-plugin"
3161         ]
3162     },
3163     "autocomplete-base": {
3164         "optional": [
3165             "autocomplete-sources"
3166         ],
3167         "requires": [
3168             "array-extras",
3169             "base-build",
3170             "escape",
3171             "event-valuechange",
3172             "node-base"
3173         ]
3174     },
3175     "autocomplete-filters": {
3176         "requires": [
3177             "array-extras",
3178             "text-wordbreak"
3179         ]
3180     },
3181     "autocomplete-filters-accentfold": {
3182         "requires": [
3183             "array-extras",
3184             "text-accentfold",
3185             "text-wordbreak"
3186         ]
3187     },
3188     "autocomplete-highlighters": {
3189         "requires": [
3190             "array-extras",
3191             "highlight-base"
3192         ]
3193     },
3194     "autocomplete-highlighters-accentfold": {
3195         "requires": [
3196             "array-extras",
3197             "highlight-accentfold"
3198         ]
3199     },
3200     "autocomplete-list": {
3201         "after": [
3202             "autocomplete-sources"
3203         ],
3204         "lang": [
3205             "en",
3206             "es",
3207             "hu",
3208             "it"
3209         ],
3210         "requires": [
3211             "autocomplete-base",
3212             "event-resize",
3213             "node-screen",
3214             "selector-css3",
3215             "shim-plugin",
3216             "widget",
3217             "widget-position",
3218             "widget-position-align"
3219         ],
3220         "skinnable": true
3221     },
3222     "autocomplete-list-keys": {
3223         "condition": {
3224             "name": "autocomplete-list-keys",
3225             "test": function (Y) {
3226     // Only add keyboard support to autocomplete-list if this doesn't appear to
3227     // be an iOS or Android-based mobile device.
3228     //
3229     // There's currently no feasible way to actually detect whether a device has
3230     // a hardware keyboard, so this sniff will have to do. It can easily be
3231     // overridden by manually loading the autocomplete-list-keys module.
3232     //
3233     // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
3234     // doesn't fire the keyboard events used by AutoCompleteList, so there's
3235     // no point loading the -keys module even when a bluetooth keyboard may be
3236     // available.
3237     return !(Y.UA.ios || Y.UA.android);
3239             "trigger": "autocomplete-list"
3240         },
3241         "requires": [
3242             "autocomplete-list",
3243             "base-build"
3244         ]
3245     },
3246     "autocomplete-plugin": {
3247         "requires": [
3248             "autocomplete-list",
3249             "node-pluginhost"
3250         ]
3251     },
3252     "autocomplete-sources": {
3253         "optional": [
3254             "io-base",
3255             "json-parse",
3256             "jsonp",
3257             "yql"
3258         ],
3259         "requires": [
3260             "autocomplete-base"
3261         ]
3262     },
3263     "axes": {
3264         "use": [
3265             "axis-numeric",
3266             "axis-category",
3267             "axis-time",
3268             "axis-stacked"
3269         ]
3270     },
3271     "axes-base": {
3272         "use": [
3273             "axis-numeric-base",
3274             "axis-category-base",
3275             "axis-time-base",
3276             "axis-stacked-base"
3277         ]
3278     },
3279     "axis": {
3280         "requires": [
3281             "dom",
3282             "widget",
3283             "widget-position",
3284             "widget-stack",
3285             "graphics",
3286             "axis-base"
3287         ]
3288     },
3289     "axis-base": {
3290         "requires": [
3291             "classnamemanager",
3292             "datatype-number",
3293             "datatype-date",
3294             "base",
3295             "event-custom"
3296         ]
3297     },
3298     "axis-category": {
3299         "requires": [
3300             "axis",
3301             "axis-category-base"
3302         ]
3303     },
3304     "axis-category-base": {
3305         "requires": [
3306             "axis-base"
3307         ]
3308     },
3309     "axis-numeric": {
3310         "requires": [
3311             "axis",
3312             "axis-numeric-base"
3313         ]
3314     },
3315     "axis-numeric-base": {
3316         "requires": [
3317             "axis-base"
3318         ]
3319     },
3320     "axis-stacked": {
3321         "requires": [
3322             "axis-numeric",
3323             "axis-stacked-base"
3324         ]
3325     },
3326     "axis-stacked-base": {
3327         "requires": [
3328             "axis-numeric-base"
3329         ]
3330     },
3331     "axis-time": {
3332         "requires": [
3333             "axis",
3334             "axis-time-base"
3335         ]
3336     },
3337     "axis-time-base": {
3338         "requires": [
3339             "axis-base"
3340         ]
3341     },
3342     "base": {
3343         "use": [
3344             "base-base",
3345             "base-pluginhost",
3346             "base-build"
3347         ]
3348     },
3349     "base-base": {
3350         "requires": [
3351             "attribute-base",
3352             "base-core",
3353             "base-observable"
3354         ]
3355     },
3356     "base-build": {
3357         "requires": [
3358             "base-base"
3359         ]
3360     },
3361     "base-core": {
3362         "requires": [
3363             "attribute-core"
3364         ]
3365     },
3366     "base-observable": {
3367         "requires": [
3368             "attribute-observable"
3369         ]
3370     },
3371     "base-pluginhost": {
3372         "requires": [
3373             "base-base",
3374             "pluginhost"
3375         ]
3376     },
3377     "button": {
3378         "requires": [
3379             "button-core",
3380             "cssbutton",
3381             "widget"
3382         ]
3383     },
3384     "button-core": {
3385         "requires": [
3386             "attribute-core",
3387             "classnamemanager",
3388             "node-base",
3389             "escape"
3390         ]
3391     },
3392     "button-group": {
3393         "requires": [
3394             "button-plugin",
3395             "cssbutton",
3396             "widget"
3397         ]
3398     },
3399     "button-plugin": {
3400         "requires": [
3401             "button-core",
3402             "cssbutton",
3403             "node-pluginhost"
3404         ]
3405     },
3406     "cache": {
3407         "use": [
3408             "cache-base",
3409             "cache-offline",
3410             "cache-plugin"
3411         ]
3412     },
3413     "cache-base": {
3414         "requires": [
3415             "base"
3416         ]
3417     },
3418     "cache-offline": {
3419         "requires": [
3420             "cache-base",
3421             "json"
3422         ]
3423     },
3424     "cache-plugin": {
3425         "requires": [
3426             "plugin",
3427             "cache-base"
3428         ]
3429     },
3430     "calendar": {
3431         "requires": [
3432             "calendar-base",
3433             "calendarnavigator"
3434         ],
3435         "skinnable": true
3436     },
3437     "calendar-base": {
3438         "lang": [
3439             "de",
3440             "en",
3441             "es",
3442             "es-AR",
3443             "fr",
3444             "hu",
3445             "it",
3446             "ja",
3447             "nb-NO",
3448             "nl",
3449             "pt-BR",
3450             "ru",
3451             "zh-Hans",
3452             "zh-Hans-CN",
3453             "zh-Hant",
3454             "zh-Hant-HK",
3455             "zh-HANT-TW"
3456         ],
3457         "requires": [
3458             "widget",
3459             "datatype-date",
3460             "datatype-date-math",
3461             "cssgrids"
3462         ],
3463         "skinnable": true
3464     },
3465     "calendarnavigator": {
3466         "requires": [
3467             "plugin",
3468             "classnamemanager",
3469             "datatype-date",
3470             "node"
3471         ],
3472         "skinnable": true
3473     },
3474     "charts": {
3475         "use": [
3476             "charts-base"
3477         ]
3478     },
3479     "charts-base": {
3480         "requires": [
3481             "dom",
3482             "event-mouseenter",
3483             "event-touch",
3484             "graphics-group",
3485             "axes",
3486             "series-pie",
3487             "series-line",
3488             "series-marker",
3489             "series-area",
3490             "series-spline",
3491             "series-column",
3492             "series-bar",
3493             "series-areaspline",
3494             "series-combo",
3495             "series-combospline",
3496             "series-line-stacked",
3497             "series-marker-stacked",
3498             "series-area-stacked",
3499             "series-spline-stacked",
3500             "series-column-stacked",
3501             "series-bar-stacked",
3502             "series-areaspline-stacked",
3503             "series-combo-stacked",
3504             "series-combospline-stacked"
3505         ]
3506     },
3507     "charts-legend": {
3508         "requires": [
3509             "charts-base"
3510         ]
3511     },
3512     "classnamemanager": {
3513         "requires": [
3514             "yui-base"
3515         ]
3516     },
3517     "clickable-rail": {
3518         "requires": [
3519             "slider-base"
3520         ]
3521     },
3522     "collection": {
3523         "use": [
3524             "array-extras",
3525             "arraylist",
3526             "arraylist-add",
3527             "arraylist-filter",
3528             "array-invoke"
3529         ]
3530     },
3531     "color": {
3532         "use": [
3533             "color-base",
3534             "color-hsl",
3535             "color-harmony"
3536         ]
3537     },
3538     "color-base": {
3539         "requires": [
3540             "yui-base"
3541         ]
3542     },
3543     "color-harmony": {
3544         "requires": [
3545             "color-hsl"
3546         ]
3547     },
3548     "color-hsl": {
3549         "requires": [
3550             "color-base"
3551         ]
3552     },
3553     "color-hsv": {
3554         "requires": [
3555             "color-base"
3556         ]
3557     },
3558     "console": {
3559         "lang": [
3560             "en",
3561             "es",
3562             "hu",
3563             "it",
3564             "ja"
3565         ],
3566         "requires": [
3567             "yui-log",
3568             "widget"
3569         ],
3570         "skinnable": true
3571     },
3572     "console-filters": {
3573         "requires": [
3574             "plugin",
3575             "console"
3576         ],
3577         "skinnable": true
3578     },
3579     "content-editable": {
3580         "requires": [
3581             "node-base",
3582             "editor-selection",
3583             "stylesheet",
3584             "plugin"
3585         ]
3586     },
3587     "controller": {
3588         "use": [
3589             "router"
3590         ]
3591     },
3592     "cookie": {
3593         "requires": [
3594             "yui-base"
3595         ]
3596     },
3597     "createlink-base": {
3598         "requires": [
3599             "editor-base"
3600         ]
3601     },
3602     "cssbase": {
3603         "after": [
3604             "cssreset",
3605             "cssfonts",
3606             "cssgrids",
3607             "cssreset-context",
3608             "cssfonts-context",
3609             "cssgrids-context"
3610         ],
3611         "type": "css"
3612     },
3613     "cssbase-context": {
3614         "after": [
3615             "cssreset",
3616             "cssfonts",
3617             "cssgrids",
3618             "cssreset-context",
3619             "cssfonts-context",
3620             "cssgrids-context"
3621         ],
3622         "type": "css"
3623     },
3624     "cssbutton": {
3625         "type": "css"
3626     },
3627     "cssfonts": {
3628         "type": "css"
3629     },
3630     "cssfonts-context": {
3631         "type": "css"
3632     },
3633     "cssgrids": {
3634         "optional": [
3635             "cssnormalize"
3636         ],
3637         "type": "css"
3638     },
3639     "cssgrids-base": {
3640         "optional": [
3641             "cssnormalize"
3642         ],
3643         "type": "css"
3644     },
3645     "cssgrids-responsive": {
3646         "optional": [
3647             "cssnormalize"
3648         ],
3649         "requires": [
3650             "cssgrids",
3651             "cssgrids-responsive-base"
3652         ],
3653         "type": "css"
3654     },
3655     "cssgrids-units": {
3656         "optional": [
3657             "cssnormalize"
3658         ],
3659         "requires": [
3660             "cssgrids-base"
3661         ],
3662         "type": "css"
3663     },
3664     "cssnormalize": {
3665         "type": "css"
3666     },
3667     "cssnormalize-context": {
3668         "type": "css"
3669     },
3670     "cssreset": {
3671         "type": "css"
3672     },
3673     "cssreset-context": {
3674         "type": "css"
3675     },
3676     "dataschema": {
3677         "use": [
3678             "dataschema-base",
3679             "dataschema-json",
3680             "dataschema-xml",
3681             "dataschema-array",
3682             "dataschema-text"
3683         ]
3684     },
3685     "dataschema-array": {
3686         "requires": [
3687             "dataschema-base"
3688         ]
3689     },
3690     "dataschema-base": {
3691         "requires": [
3692             "base"
3693         ]
3694     },
3695     "dataschema-json": {
3696         "requires": [
3697             "dataschema-base",
3698             "json"
3699         ]
3700     },
3701     "dataschema-text": {
3702         "requires": [
3703             "dataschema-base"
3704         ]
3705     },
3706     "dataschema-xml": {
3707         "requires": [
3708             "dataschema-base"
3709         ]
3710     },
3711     "datasource": {
3712         "use": [
3713             "datasource-local",
3714             "datasource-io",
3715             "datasource-get",
3716             "datasource-function",
3717             "datasource-cache",
3718             "datasource-jsonschema",
3719             "datasource-xmlschema",
3720             "datasource-arrayschema",
3721             "datasource-textschema",
3722             "datasource-polling"
3723         ]
3724     },
3725     "datasource-arrayschema": {
3726         "requires": [
3727             "datasource-local",
3728             "plugin",
3729             "dataschema-array"
3730         ]
3731     },
3732     "datasource-cache": {
3733         "requires": [
3734             "datasource-local",
3735             "plugin",
3736             "cache-base"
3737         ]
3738     },
3739     "datasource-function": {
3740         "requires": [
3741             "datasource-local"
3742         ]
3743     },
3744     "datasource-get": {
3745         "requires": [
3746             "datasource-local",
3747             "get"
3748         ]
3749     },
3750     "datasource-io": {
3751         "requires": [
3752             "datasource-local",
3753             "io-base"
3754         ]
3755     },
3756     "datasource-jsonschema": {
3757         "requires": [
3758             "datasource-local",
3759             "plugin",
3760             "dataschema-json"
3761         ]
3762     },
3763     "datasource-local": {
3764         "requires": [
3765             "base"
3766         ]
3767     },
3768     "datasource-polling": {
3769         "requires": [
3770             "datasource-local"
3771         ]
3772     },
3773     "datasource-textschema": {
3774         "requires": [
3775             "datasource-local",
3776             "plugin",
3777             "dataschema-text"
3778         ]
3779     },
3780     "datasource-xmlschema": {
3781         "requires": [
3782             "datasource-local",
3783             "plugin",
3784             "datatype-xml",
3785             "dataschema-xml"
3786         ]
3787     },
3788     "datatable": {
3789         "use": [
3790             "datatable-core",
3791             "datatable-table",
3792             "datatable-head",
3793             "datatable-body",
3794             "datatable-base",
3795             "datatable-column-widths",
3796             "datatable-message",
3797             "datatable-mutable",
3798             "datatable-sort",
3799             "datatable-datasource"
3800         ]
3801     },
3802     "datatable-base": {
3803         "requires": [
3804             "datatable-core",
3805             "datatable-table",
3806             "datatable-head",
3807             "datatable-body",
3808             "base-build",
3809             "widget"
3810         ],
3811         "skinnable": true
3812     },
3813     "datatable-body": {
3814         "requires": [
3815             "datatable-core",
3816             "view",
3817             "classnamemanager"
3818         ]
3819     },
3820     "datatable-column-widths": {
3821         "requires": [
3822             "datatable-base"
3823         ]
3824     },
3825     "datatable-core": {
3826         "requires": [
3827             "escape",
3828             "model-list",
3829             "node-event-delegate"
3830         ]
3831     },
3832     "datatable-datasource": {
3833         "requires": [
3834             "datatable-base",
3835             "plugin",
3836             "datasource-local"
3837         ]
3838     },
3839     "datatable-foot": {
3840         "requires": [
3841             "datatable-core",
3842             "view"
3843         ]
3844     },
3845     "datatable-formatters": {
3846         "requires": [
3847             "datatable-body",
3848             "datatype-number-format",
3849             "datatype-date-format",
3850             "escape"
3851         ]
3852     },
3853     "datatable-head": {
3854         "requires": [
3855             "datatable-core",
3856             "view",
3857             "classnamemanager"
3858         ]
3859     },
3860     "datatable-highlight": {
3861         "requires": [
3862             "datatable-base",
3863             "event-hover"
3864         ],
3865         "skinnable": true
3866     },
3867     "datatable-message": {
3868         "lang": [
3869             "en",
3870             "fr",
3871             "es",
3872             "hu",
3873             "it"
3874         ],
3875         "requires": [
3876             "datatable-base"
3877         ],
3878         "skinnable": true
3879     },
3880     "datatable-mutable": {
3881         "requires": [
3882             "datatable-base"
3883         ]
3884     },
3885     "datatable-paginator": {
3886         "lang": [
3887             "en",
3888             "fr"
3889         ],
3890         "requires": [
3891             "model",
3892             "view",
3893             "paginator-core",
3894             "datatable-foot",
3895             "datatable-paginator-templates"
3896         ],
3897         "skinnable": true
3898     },
3899     "datatable-paginator-templates": {
3900         "requires": [
3901             "template"
3902         ]
3903     },
3904     "datatable-scroll": {
3905         "requires": [
3906             "datatable-base",
3907             "datatable-column-widths",
3908             "dom-screen"
3909         ],
3910         "skinnable": true
3911     },
3912     "datatable-sort": {
3913         "lang": [
3914             "en",
3915             "fr",
3916             "es",
3917             "hu"
3918         ],
3919         "requires": [
3920             "datatable-base"
3921         ],
3922         "skinnable": true
3923     },
3924     "datatable-table": {
3925         "requires": [
3926             "datatable-core",
3927             "datatable-head",
3928             "datatable-body",
3929             "view",
3930             "classnamemanager"
3931         ]
3932     },
3933     "datatype": {
3934         "use": [
3935             "datatype-date",
3936             "datatype-number",
3937             "datatype-xml"
3938         ]
3939     },
3940     "datatype-date": {
3941         "use": [
3942             "datatype-date-parse",
3943             "datatype-date-format",
3944             "datatype-date-math"
3945         ]
3946     },
3947     "datatype-date-format": {
3948         "lang": [
3949             "ar",
3950             "ar-JO",
3951             "ca",
3952             "ca-ES",
3953             "da",
3954             "da-DK",
3955             "de",
3956             "de-AT",
3957             "de-DE",
3958             "el",
3959             "el-GR",
3960             "en",
3961             "en-AU",
3962             "en-CA",
3963             "en-GB",
3964             "en-IE",
3965             "en-IN",
3966             "en-JO",
3967             "en-MY",
3968             "en-NZ",
3969             "en-PH",
3970             "en-SG",
3971             "en-US",
3972             "es",
3973             "es-AR",
3974             "es-BO",
3975             "es-CL",
3976             "es-CO",
3977             "es-EC",
3978             "es-ES",
3979             "es-MX",
3980             "es-PE",
3981             "es-PY",
3982             "es-US",
3983             "es-UY",
3984             "es-VE",
3985             "fi",
3986             "fi-FI",
3987             "fr",
3988             "fr-BE",
3989             "fr-CA",
3990             "fr-FR",
3991             "hi",
3992             "hi-IN",
3993             "hu",
3994             "id",
3995             "id-ID",
3996             "it",
3997             "it-IT",
3998             "ja",
3999             "ja-JP",
4000             "ko",
4001             "ko-KR",
4002             "ms",
4003             "ms-MY",
4004             "nb",
4005             "nb-NO",
4006             "nl",
4007             "nl-BE",
4008             "nl-NL",
4009             "pl",
4010             "pl-PL",
4011             "pt",
4012             "pt-BR",
4013             "ro",
4014             "ro-RO",
4015             "ru",
4016             "ru-RU",
4017             "sv",
4018             "sv-SE",
4019             "th",
4020             "th-TH",
4021             "tr",
4022             "tr-TR",
4023             "vi",
4024             "vi-VN",
4025             "zh-Hans",
4026             "zh-Hans-CN",
4027             "zh-Hant",
4028             "zh-Hant-HK",
4029             "zh-Hant-TW"
4030         ]
4031     },
4032     "datatype-date-math": {
4033         "requires": [
4034             "yui-base"
4035         ]
4036     },
4037     "datatype-date-parse": {},
4038     "datatype-number": {
4039         "use": [
4040             "datatype-number-parse",
4041             "datatype-number-format"
4042         ]
4043     },
4044     "datatype-number-format": {},
4045     "datatype-number-parse": {},
4046     "datatype-xml": {
4047         "use": [
4048             "datatype-xml-parse",
4049             "datatype-xml-format"
4050         ]
4051     },
4052     "datatype-xml-format": {},
4053     "datatype-xml-parse": {},
4054     "dd": {
4055         "use": [
4056             "dd-ddm-base",
4057             "dd-ddm",
4058             "dd-ddm-drop",
4059             "dd-drag",
4060             "dd-proxy",
4061             "dd-constrain",
4062             "dd-drop",
4063             "dd-scroll",
4064             "dd-delegate"
4065         ]
4066     },
4067     "dd-constrain": {
4068         "requires": [
4069             "dd-drag"
4070         ]
4071     },
4072     "dd-ddm": {
4073         "requires": [
4074             "dd-ddm-base",
4075             "event-resize"
4076         ]
4077     },
4078     "dd-ddm-base": {
4079         "requires": [
4080             "node",
4081             "base",
4082             "yui-throttle",
4083             "classnamemanager"
4084         ]
4085     },
4086     "dd-ddm-drop": {
4087         "requires": [
4088             "dd-ddm"
4089         ]
4090     },
4091     "dd-delegate": {
4092         "requires": [
4093             "dd-drag",
4094             "dd-drop-plugin",
4095             "event-mouseenter"
4096         ]
4097     },
4098     "dd-drag": {
4099         "requires": [
4100             "dd-ddm-base"
4101         ]
4102     },
4103     "dd-drop": {
4104         "requires": [
4105             "dd-drag",
4106             "dd-ddm-drop"
4107         ]
4108     },
4109     "dd-drop-plugin": {
4110         "requires": [
4111             "dd-drop"
4112         ]
4113     },
4114     "dd-gestures": {
4115         "condition": {
4116             "name": "dd-gestures",
4117             "trigger": "dd-drag",
4118             "ua": "touchEnabled"
4119         },
4120         "requires": [
4121             "dd-drag",
4122             "event-synthetic",
4123             "event-gestures"
4124         ]
4125     },
4126     "dd-plugin": {
4127         "optional": [
4128             "dd-constrain",
4129             "dd-proxy"
4130         ],
4131         "requires": [
4132             "dd-drag"
4133         ]
4134     },
4135     "dd-proxy": {
4136         "requires": [
4137             "dd-drag"
4138         ]
4139     },
4140     "dd-scroll": {
4141         "requires": [
4142             "dd-drag"
4143         ]
4144     },
4145     "dial": {
4146         "lang": [
4147             "en",
4148             "es",
4149             "hu"
4150         ],
4151         "requires": [
4152             "widget",
4153             "dd-drag",
4154             "event-mouseenter",
4155             "event-move",
4156             "event-key",
4157             "transition",
4158             "intl"
4159         ],
4160         "skinnable": true
4161     },
4162     "dom": {
4163         "use": [
4164             "dom-base",
4165             "dom-screen",
4166             "dom-style",
4167             "selector-native",
4168             "selector"
4169         ]
4170     },
4171     "dom-base": {
4172         "requires": [
4173             "dom-core"
4174         ]
4175     },
4176     "dom-core": {
4177         "requires": [
4178             "oop",
4179             "features"
4180         ]
4181     },
4182     "dom-screen": {
4183         "requires": [
4184             "dom-base",
4185             "dom-style"
4186         ]
4187     },
4188     "dom-style": {
4189         "requires": [
4190             "dom-base",
4191             "color-base"
4192         ]
4193     },
4194     "dom-style-ie": {
4195         "condition": {
4196             "name": "dom-style-ie",
4197             "test": function (Y) {
4199     var testFeature = Y.Features.test,
4200         addFeature = Y.Features.add,
4201         WINDOW = Y.config.win,
4202         DOCUMENT = Y.config.doc,
4203         DOCUMENT_ELEMENT = 'documentElement',
4204         ret = false;
4206     addFeature('style', 'computedStyle', {
4207         test: function() {
4208             return WINDOW && 'getComputedStyle' in WINDOW;
4209         }
4210     });
4212     addFeature('style', 'opacity', {
4213         test: function() {
4214             return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
4215         }
4216     });
4218     ret =  (!testFeature('style', 'opacity') &&
4219             !testFeature('style', 'computedStyle'));
4221     return ret;
4223             "trigger": "dom-style"
4224         },
4225         "requires": [
4226             "dom-style"
4227         ]
4228     },
4229     "dump": {
4230         "requires": [
4231             "yui-base"
4232         ]
4233     },
4234     "editor": {
4235         "use": [
4236             "frame",
4237             "editor-selection",
4238             "exec-command",
4239             "editor-base",
4240             "editor-para",
4241             "editor-br",
4242             "editor-bidi",
4243             "editor-tab",
4244             "createlink-base"
4245         ]
4246     },
4247     "editor-base": {
4248         "requires": [
4249             "base",
4250             "frame",
4251             "node",
4252             "exec-command",
4253             "editor-selection"
4254         ]
4255     },
4256     "editor-bidi": {
4257         "requires": [
4258             "editor-base"
4259         ]
4260     },
4261     "editor-br": {
4262         "requires": [
4263             "editor-base"
4264         ]
4265     },
4266     "editor-inline": {
4267         "requires": [
4268             "editor-base",
4269             "content-editable"
4270         ]
4271     },
4272     "editor-lists": {
4273         "requires": [
4274             "editor-base"
4275         ]
4276     },
4277     "editor-para": {
4278         "requires": [
4279             "editor-para-base"
4280         ]
4281     },
4282     "editor-para-base": {
4283         "requires": [
4284             "editor-base"
4285         ]
4286     },
4287     "editor-para-ie": {
4288         "condition": {
4289             "name": "editor-para-ie",
4290             "trigger": "editor-para",
4291             "ua": "ie",
4292             "when": "instead"
4293         },
4294         "requires": [
4295             "editor-para-base"
4296         ]
4297     },
4298     "editor-selection": {
4299         "requires": [
4300             "node"
4301         ]
4302     },
4303     "editor-tab": {
4304         "requires": [
4305             "editor-base"
4306         ]
4307     },
4308     "escape": {
4309         "requires": [
4310             "yui-base"
4311         ]
4312     },
4313     "event": {
4314         "after": [
4315             "node-base"
4316         ],
4317         "use": [
4318             "event-base",
4319             "event-delegate",
4320             "event-synthetic",
4321             "event-mousewheel",
4322             "event-mouseenter",
4323             "event-key",
4324             "event-focus",
4325             "event-resize",
4326             "event-hover",
4327             "event-outside",
4328             "event-touch",
4329             "event-move",
4330             "event-flick",
4331             "event-valuechange",
4332             "event-tap"
4333         ]
4334     },
4335     "event-base": {
4336         "after": [
4337             "node-base"
4338         ],
4339         "requires": [
4340             "event-custom-base"
4341         ]
4342     },
4343     "event-base-ie": {
4344         "after": [
4345             "event-base"
4346         ],
4347         "condition": {
4348             "name": "event-base-ie",
4349             "test": function(Y) {
4350     var imp = Y.config.doc && Y.config.doc.implementation;
4351     return (imp && (!imp.hasFeature('Events', '2.0')));
4353             "trigger": "node-base"
4354         },
4355         "requires": [
4356             "node-base"
4357         ]
4358     },
4359     "event-contextmenu": {
4360         "requires": [
4361             "event-synthetic",
4362             "dom-screen"
4363         ]
4364     },
4365     "event-custom": {
4366         "use": [
4367             "event-custom-base",
4368             "event-custom-complex"
4369         ]
4370     },
4371     "event-custom-base": {
4372         "requires": [
4373             "oop"
4374         ]
4375     },
4376     "event-custom-complex": {
4377         "requires": [
4378             "event-custom-base"
4379         ]
4380     },
4381     "event-delegate": {
4382         "requires": [
4383             "node-base"
4384         ]
4385     },
4386     "event-flick": {
4387         "requires": [
4388             "node-base",
4389             "event-touch",
4390             "event-synthetic"
4391         ]
4392     },
4393     "event-focus": {
4394         "requires": [
4395             "event-synthetic"
4396         ]
4397     },
4398     "event-gestures": {
4399         "use": [
4400             "event-flick",
4401             "event-move"
4402         ]
4403     },
4404     "event-hover": {
4405         "requires": [
4406             "event-mouseenter"
4407         ]
4408     },
4409     "event-key": {
4410         "requires": [
4411             "event-synthetic"
4412         ]
4413     },
4414     "event-mouseenter": {
4415         "requires": [
4416             "event-synthetic"
4417         ]
4418     },
4419     "event-mousewheel": {
4420         "requires": [
4421             "node-base"
4422         ]
4423     },
4424     "event-move": {
4425         "requires": [
4426             "node-base",
4427             "event-touch",
4428             "event-synthetic"
4429         ]
4430     },
4431     "event-outside": {
4432         "requires": [
4433             "event-synthetic"
4434         ]
4435     },
4436     "event-resize": {
4437         "requires": [
4438             "node-base",
4439             "event-synthetic"
4440         ]
4441     },
4442     "event-simulate": {
4443         "requires": [
4444             "event-base"
4445         ]
4446     },
4447     "event-synthetic": {
4448         "requires": [
4449             "node-base",
4450             "event-custom-complex"
4451         ]
4452     },
4453     "event-tap": {
4454         "requires": [
4455             "node-base",
4456             "event-base",
4457             "event-touch",
4458             "event-synthetic"
4459         ]
4460     },
4461     "event-touch": {
4462         "requires": [
4463             "node-base"
4464         ]
4465     },
4466     "event-valuechange": {
4467         "requires": [
4468             "event-focus",
4469             "event-synthetic"
4470         ]
4471     },
4472     "exec-command": {
4473         "requires": [
4474             "frame"
4475         ]
4476     },
4477     "features": {
4478         "requires": [
4479             "yui-base"
4480         ]
4481     },
4482     "file": {
4483         "requires": [
4484             "file-flash",
4485             "file-html5"
4486         ]
4487     },
4488     "file-flash": {
4489         "requires": [
4490             "base"
4491         ]
4492     },
4493     "file-html5": {
4494         "requires": [
4495             "base"
4496         ]
4497     },
4498     "frame": {
4499         "requires": [
4500             "base",
4501             "node",
4502             "plugin",
4503             "selector-css3",
4504             "yui-throttle"
4505         ]
4506     },
4507     "gesture-simulate": {
4508         "requires": [
4509             "async-queue",
4510             "event-simulate",
4511             "node-screen"
4512         ]
4513     },
4514     "get": {
4515         "requires": [
4516             "yui-base"
4517         ]
4518     },
4519     "graphics": {
4520         "requires": [
4521             "node",
4522             "event-custom",
4523             "pluginhost",
4524             "matrix",
4525             "classnamemanager"
4526         ]
4527     },
4528     "graphics-canvas": {
4529         "condition": {
4530             "name": "graphics-canvas",
4531             "test": function(Y) {
4532     var DOCUMENT = Y.config.doc,
4533         useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
4534                 canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4535         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4536     return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
4538             "trigger": "graphics"
4539         },
4540         "requires": [
4541             "graphics"
4542         ]
4543     },
4544     "graphics-canvas-default": {
4545         "condition": {
4546             "name": "graphics-canvas-default",
4547             "test": function(Y) {
4548     var DOCUMENT = Y.config.doc,
4549         useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
4550                 canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4551         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4552     return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
4554             "trigger": "graphics"
4555         }
4556     },
4557     "graphics-group": {
4558         "requires": [
4559             "graphics"
4560         ]
4561     },
4562     "graphics-svg": {
4563         "condition": {
4564             "name": "graphics-svg",
4565             "test": function(Y) {
4566     var DOCUMENT = Y.config.doc,
4567         useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
4568                 canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4569         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4570     
4571     return svg && (useSVG || !canvas);
4573             "trigger": "graphics"
4574         },
4575         "requires": [
4576             "graphics"
4577         ]
4578     },
4579     "graphics-svg-default": {
4580         "condition": {
4581             "name": "graphics-svg-default",
4582             "test": function(Y) {
4583     var DOCUMENT = Y.config.doc,
4584         useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
4585                 canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4586         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4587     
4588     return svg && (useSVG || !canvas);
4590             "trigger": "graphics"
4591         }
4592     },
4593     "graphics-vml": {
4594         "condition": {
4595             "name": "graphics-vml",
4596             "test": function(Y) {
4597     var DOCUMENT = Y.config.doc,
4598                 canvas = DOCUMENT && DOCUMENT.createElement("canvas");
4599     return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
4601             "trigger": "graphics"
4602         },
4603         "requires": [
4604             "graphics"
4605         ]
4606     },
4607     "graphics-vml-default": {
4608         "condition": {
4609             "name": "graphics-vml-default",
4610             "test": function(Y) {
4611     var DOCUMENT = Y.config.doc,
4612                 canvas = DOCUMENT && DOCUMENT.createElement("canvas");
4613     return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
4615             "trigger": "graphics"
4616         }
4617     },
4618     "handlebars": {
4619         "use": [
4620             "handlebars-compiler"
4621         ]
4622     },
4623     "handlebars-base": {
4624         "requires": []
4625     },
4626     "handlebars-compiler": {
4627         "requires": [
4628             "handlebars-base"
4629         ]
4630     },
4631     "highlight": {
4632         "use": [
4633             "highlight-base",
4634             "highlight-accentfold"
4635         ]
4636     },
4637     "highlight-accentfold": {
4638         "requires": [
4639             "highlight-base",
4640             "text-accentfold"
4641         ]
4642     },
4643     "highlight-base": {
4644         "requires": [
4645             "array-extras",
4646             "classnamemanager",
4647             "escape",
4648             "text-wordbreak"
4649         ]
4650     },
4651     "history": {
4652         "use": [
4653             "history-base",
4654             "history-hash",
4655             "history-hash-ie",
4656             "history-html5"
4657         ]
4658     },
4659     "history-base": {
4660         "requires": [
4661             "event-custom-complex"
4662         ]
4663     },
4664     "history-hash": {
4665         "after": [
4666             "history-html5"
4667         ],
4668         "requires": [
4669             "event-synthetic",
4670             "history-base",
4671             "yui-later"
4672         ]
4673     },
4674     "history-hash-ie": {
4675         "condition": {
4676             "name": "history-hash-ie",
4677             "test": function (Y) {
4678     var docMode = Y.config.doc && Y.config.doc.documentMode;
4680     return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
4681             !docMode || docMode < 8);
4683             "trigger": "history-hash"
4684         },
4685         "requires": [
4686             "history-hash",
4687             "node-base"
4688         ]
4689     },
4690     "history-html5": {
4691         "optional": [
4692             "json"
4693         ],
4694         "requires": [
4695             "event-base",
4696             "history-base",
4697             "node-base"
4698         ]
4699     },
4700     "imageloader": {
4701         "requires": [
4702             "base-base",
4703             "node-style",
4704             "node-screen"
4705         ]
4706     },
4707     "intl": {
4708         "requires": [
4709             "intl-base",
4710             "event-custom"
4711         ]
4712     },
4713     "intl-base": {
4714         "requires": [
4715             "yui-base"
4716         ]
4717     },
4718     "io": {
4719         "use": [
4720             "io-base",
4721             "io-xdr",
4722             "io-form",
4723             "io-upload-iframe",
4724             "io-queue"
4725         ]
4726     },
4727     "io-base": {
4728         "requires": [
4729             "event-custom-base",
4730             "querystring-stringify-simple"
4731         ]
4732     },
4733     "io-form": {
4734         "requires": [
4735             "io-base",
4736             "node-base"
4737         ]
4738     },
4739     "io-nodejs": {
4740         "condition": {
4741             "name": "io-nodejs",
4742             "trigger": "io-base",
4743             "ua": "nodejs"
4744         },
4745         "requires": [
4746             "io-base"
4747         ]
4748     },
4749     "io-queue": {
4750         "requires": [
4751             "io-base",
4752             "queue-promote"
4753         ]
4754     },
4755     "io-upload-iframe": {
4756         "requires": [
4757             "io-base",
4758             "node-base"
4759         ]
4760     },
4761     "io-xdr": {
4762         "requires": [
4763             "io-base",
4764             "datatype-xml-parse"
4765         ]
4766     },
4767     "json": {
4768         "use": [
4769             "json-parse",
4770             "json-stringify"
4771         ]
4772     },
4773     "json-parse": {
4774         "requires": [
4775             "yui-base"
4776         ]
4777     },
4778     "json-parse-shim": {
4779         "condition": {
4780             "name": "json-parse-shim",
4781             "test": function (Y) {
4782     var _JSON = Y.config.global.JSON,
4783         Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
4784         nativeSupport = Y.config.useNativeJSONParse !== false && !!Native;
4786     function workingNative( k, v ) {
4787         return k === "ok" ? true : v;
4788     }
4789     
4790     // Double check basic functionality.  This is mainly to catch early broken
4791     // implementations of the JSON API in Firefox 3.1 beta1 and beta2
4792     if ( nativeSupport ) {
4793         try {
4794             nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok;
4795         }
4796         catch ( e ) {
4797             nativeSupport = false;
4798         }
4799     }
4801     return !nativeSupport;
4803             "trigger": "json-parse"
4804         },
4805         "requires": [
4806             "json-parse"
4807         ]
4808     },
4809     "json-stringify": {
4810         "requires": [
4811             "yui-base"
4812         ]
4813     },
4814     "json-stringify-shim": {
4815         "condition": {
4816             "name": "json-stringify-shim",
4817             "test": function (Y) {
4818     var _JSON = Y.config.global.JSON,
4819         Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
4820         nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native;
4822     // Double check basic native functionality.  This is primarily to catch broken
4823     // early JSON API implementations in Firefox 3.1 beta1 and beta2.
4824     if ( nativeSupport ) {
4825         try {
4826             nativeSupport = ( '0' === Native.stringify(0) );
4827         } catch ( e ) {
4828             nativeSupport = false;
4829         }
4830     }
4833     return !nativeSupport;
4835             "trigger": "json-stringify"
4836         },
4837         "requires": [
4838             "json-stringify"
4839         ]
4840     },
4841     "jsonp": {
4842         "requires": [
4843             "get",
4844             "oop"
4845         ]
4846     },
4847     "jsonp-url": {
4848         "requires": [
4849             "jsonp"
4850         ]
4851     },
4852     "lazy-model-list": {
4853         "requires": [
4854             "model-list"
4855         ]
4856     },
4857     "loader": {
4858         "use": [
4859             "loader-base",
4860             "loader-rollup",
4861             "loader-yui3"
4862         ]
4863     },
4864     "loader-base": {
4865         "requires": [
4866             "get",
4867             "features"
4868         ]
4869     },
4870     "loader-rollup": {
4871         "requires": [
4872             "loader-base"
4873         ]
4874     },
4875     "loader-yui3": {
4876         "requires": [
4877             "loader-base"
4878         ]
4879     },
4880     "matrix": {
4881         "requires": [
4882             "yui-base"
4883         ]
4884     },
4885     "model": {
4886         "requires": [
4887             "base-build",
4888             "escape",
4889             "json-parse"
4890         ]
4891     },
4892     "model-list": {
4893         "requires": [
4894             "array-extras",
4895             "array-invoke",
4896             "arraylist",
4897             "base-build",
4898             "escape",
4899             "json-parse",
4900             "model"
4901         ]
4902     },
4903     "model-sync-local": {
4904         "requires": [
4905             "model",
4906             "json-stringify"
4907         ]
4908     },
4909     "model-sync-rest": {
4910         "requires": [
4911             "model",
4912             "io-base",
4913             "json-stringify"
4914         ]
4915     },
4916     "node": {
4917         "use": [
4918             "node-base",
4919             "node-event-delegate",
4920             "node-pluginhost",
4921             "node-screen",
4922             "node-style"
4923         ]
4924     },
4925     "node-base": {
4926         "requires": [
4927             "event-base",
4928             "node-core",
4929             "dom-base",
4930             "dom-style"
4931         ]
4932     },
4933     "node-core": {
4934         "requires": [
4935             "dom-core",
4936             "selector"
4937         ]
4938     },
4939     "node-event-delegate": {
4940         "requires": [
4941             "node-base",
4942             "event-delegate"
4943         ]
4944     },
4945     "node-event-html5": {
4946         "requires": [
4947             "node-base"
4948         ]
4949     },
4950     "node-event-simulate": {
4951         "requires": [
4952             "node-base",
4953             "event-simulate",
4954             "gesture-simulate"
4955         ]
4956     },
4957     "node-flick": {
4958         "requires": [
4959             "classnamemanager",
4960             "transition",
4961             "event-flick",
4962             "plugin"
4963         ],
4964         "skinnable": true
4965     },
4966     "node-focusmanager": {
4967         "requires": [
4968             "attribute",
4969             "node",
4970             "plugin",
4971             "node-event-simulate",
4972             "event-key",
4973             "event-focus"
4974         ]
4975     },
4976     "node-load": {
4977         "requires": [
4978             "node-base",
4979             "io-base"
4980         ]
4981     },
4982     "node-menunav": {
4983         "requires": [
4984             "node",
4985             "classnamemanager",
4986             "plugin",
4987             "node-focusmanager"
4988         ],
4989         "skinnable": true
4990     },
4991     "node-pluginhost": {
4992         "requires": [
4993             "node-base",
4994             "pluginhost"
4995         ]
4996     },
4997     "node-screen": {
4998         "requires": [
4999             "dom-screen",
5000             "node-base"
5001         ]
5002     },
5003     "node-scroll-info": {
5004         "requires": [
5005             "array-extras",
5006             "base-build",
5007             "event-resize",
5008             "node-pluginhost",
5009             "plugin",
5010             "selector"
5011         ]
5012     },
5013     "node-style": {
5014         "requires": [
5015             "dom-style",
5016             "node-base"
5017         ]
5018     },
5019     "oop": {
5020         "requires": [
5021             "yui-base"
5022         ]
5023     },
5024     "overlay": {
5025         "requires": [
5026             "widget",
5027             "widget-stdmod",
5028             "widget-position",
5029             "widget-position-align",
5030             "widget-stack",
5031             "widget-position-constrain"
5032         ],
5033         "skinnable": true
5034     },
5035     "paginator": {
5036         "requires": [
5037             "paginator-core"
5038         ]
5039     },
5040     "paginator-core": {
5041         "requires": [
5042             "base"
5043         ]
5044     },
5045     "paginator-url": {
5046         "requires": [
5047             "paginator"
5048         ]
5049     },
5050     "panel": {
5051         "requires": [
5052             "widget",
5053             "widget-autohide",
5054             "widget-buttons",
5055             "widget-modality",
5056             "widget-position",
5057             "widget-position-align",
5058             "widget-position-constrain",
5059             "widget-stack",
5060             "widget-stdmod"
5061         ],
5062         "skinnable": true
5063     },
5064     "parallel": {
5065         "requires": [
5066             "yui-base"
5067         ]
5068     },
5069     "pjax": {
5070         "requires": [
5071             "pjax-base",
5072             "pjax-content"
5073         ]
5074     },
5075     "pjax-base": {
5076         "requires": [
5077             "classnamemanager",
5078             "node-event-delegate",
5079             "router"
5080         ]
5081     },
5082     "pjax-content": {
5083         "requires": [
5084             "io-base",
5085             "node-base",
5086             "router"
5087         ]
5088     },
5089     "pjax-plugin": {
5090         "requires": [
5091             "node-pluginhost",
5092             "pjax",
5093             "plugin"
5094         ]
5095     },
5096     "plugin": {
5097         "requires": [
5098             "base-base"
5099         ]
5100     },
5101     "pluginhost": {
5102         "use": [
5103             "pluginhost-base",
5104             "pluginhost-config"
5105         ]
5106     },
5107     "pluginhost-base": {
5108         "requires": [
5109             "yui-base"
5110         ]
5111     },
5112     "pluginhost-config": {
5113         "requires": [
5114             "pluginhost-base"
5115         ]
5116     },
5117     "promise": {
5118         "requires": [
5119             "timers"
5120         ]
5121     },
5122     "querystring": {
5123         "use": [
5124             "querystring-parse",
5125             "querystring-stringify"
5126         ]
5127     },
5128     "querystring-parse": {
5129         "requires": [
5130             "yui-base",
5131             "array-extras"
5132         ]
5133     },
5134     "querystring-parse-simple": {
5135         "requires": [
5136             "yui-base"
5137         ]
5138     },
5139     "querystring-stringify": {
5140         "requires": [
5141             "yui-base"
5142         ]
5143     },
5144     "querystring-stringify-simple": {
5145         "requires": [
5146             "yui-base"
5147         ]
5148     },
5149     "queue-promote": {
5150         "requires": [
5151             "yui-base"
5152         ]
5153     },
5154     "range-slider": {
5155         "requires": [
5156             "slider-base",
5157             "slider-value-range",
5158             "clickable-rail"
5159         ]
5160     },
5161     "recordset": {
5162         "use": [
5163             "recordset-base",
5164             "recordset-sort",
5165             "recordset-filter",
5166             "recordset-indexer"
5167         ]
5168     },
5169     "recordset-base": {
5170         "requires": [
5171             "base",
5172             "arraylist"
5173         ]
5174     },
5175     "recordset-filter": {
5176         "requires": [
5177             "recordset-base",
5178             "array-extras",
5179             "plugin"
5180         ]
5181     },
5182     "recordset-indexer": {
5183         "requires": [
5184             "recordset-base",
5185             "plugin"
5186         ]
5187     },
5188     "recordset-sort": {
5189         "requires": [
5190             "arraysort",
5191             "recordset-base",
5192             "plugin"
5193         ]
5194     },
5195     "resize": {
5196         "use": [
5197             "resize-base",
5198             "resize-proxy",
5199             "resize-constrain"
5200         ]
5201     },
5202     "resize-base": {
5203         "requires": [
5204             "base",
5205             "widget",
5206             "event",
5207             "oop",
5208             "dd-drag",
5209             "dd-delegate",
5210             "dd-drop"
5211         ],
5212         "skinnable": true
5213     },
5214     "resize-constrain": {
5215         "requires": [
5216             "plugin",
5217             "resize-base"
5218         ]
5219     },
5220     "resize-plugin": {
5221         "optional": [
5222             "resize-constrain"
5223         ],
5224         "requires": [
5225             "resize-base",
5226             "plugin"
5227         ]
5228     },
5229     "resize-proxy": {
5230         "requires": [
5231             "plugin",
5232             "resize-base"
5233         ]
5234     },
5235     "router": {
5236         "optional": [
5237             "querystring-parse"
5238         ],
5239         "requires": [
5240             "array-extras",
5241             "base-build",
5242             "history"
5243         ]
5244     },
5245     "scrollview": {
5246         "requires": [
5247             "scrollview-base",
5248             "scrollview-scrollbars"
5249         ]
5250     },
5251     "scrollview-base": {
5252         "requires": [
5253             "widget",
5254             "event-gestures",
5255             "event-mousewheel",
5256             "transition"
5257         ],
5258         "skinnable": true
5259     },
5260     "scrollview-base-ie": {
5261         "condition": {
5262             "name": "scrollview-base-ie",
5263             "trigger": "scrollview-base",
5264             "ua": "ie"
5265         },
5266         "requires": [
5267             "scrollview-base"
5268         ]
5269     },
5270     "scrollview-list": {
5271         "requires": [
5272             "plugin",
5273             "classnamemanager"
5274         ],
5275         "skinnable": true
5276     },
5277     "scrollview-paginator": {
5278         "requires": [
5279             "plugin",
5280             "classnamemanager"
5281         ]
5282     },
5283     "scrollview-scrollbars": {
5284         "requires": [
5285             "classnamemanager",
5286             "transition",
5287             "plugin"
5288         ],
5289         "skinnable": true
5290     },
5291     "selector": {
5292         "requires": [
5293             "selector-native"
5294         ]
5295     },
5296     "selector-css2": {
5297         "condition": {
5298             "name": "selector-css2",
5299             "test": function (Y) {
5300     var DOCUMENT = Y.config.doc,
5301         ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);
5303     return ret;
5305             "trigger": "selector"
5306         },
5307         "requires": [
5308             "selector-native"
5309         ]
5310     },
5311     "selector-css3": {
5312         "requires": [
5313             "selector-native",
5314             "selector-css2"
5315         ]
5316     },
5317     "selector-native": {
5318         "requires": [
5319             "dom-base"
5320         ]
5321     },
5322     "series-area": {
5323         "requires": [
5324             "series-cartesian",
5325             "series-fill-util"
5326         ]
5327     },
5328     "series-area-stacked": {
5329         "requires": [
5330             "series-stacked",
5331             "series-area"
5332         ]
5333     },
5334     "series-areaspline": {
5335         "requires": [
5336             "series-area",
5337             "series-curve-util"
5338         ]
5339     },
5340     "series-areaspline-stacked": {
5341         "requires": [
5342             "series-stacked",
5343             "series-areaspline"
5344         ]
5345     },
5346     "series-bar": {
5347         "requires": [
5348             "series-marker",
5349             "series-histogram-base"
5350         ]
5351     },
5352     "series-bar-stacked": {
5353         "requires": [
5354             "series-stacked",
5355             "series-bar"
5356         ]
5357     },
5358     "series-base": {
5359         "requires": [
5360             "graphics",
5361             "axis-base"
5362         ]
5363     },
5364     "series-candlestick": {
5365         "requires": [
5366             "series-range"
5367         ]
5368     },
5369     "series-cartesian": {
5370         "requires": [
5371             "series-base"
5372         ]
5373     },
5374     "series-column": {
5375         "requires": [
5376             "series-marker",
5377             "series-histogram-base"
5378         ]
5379     },
5380     "series-column-stacked": {
5381         "requires": [
5382             "series-stacked",
5383             "series-column"
5384         ]
5385     },
5386     "series-combo": {
5387         "requires": [
5388             "series-cartesian",
5389             "series-line-util",
5390             "series-plot-util",
5391             "series-fill-util"
5392         ]
5393     },
5394     "series-combo-stacked": {
5395         "requires": [
5396             "series-stacked",
5397             "series-combo"
5398         ]
5399     },
5400     "series-combospline": {
5401         "requires": [
5402             "series-combo",
5403             "series-curve-util"
5404         ]
5405     },
5406     "series-combospline-stacked": {
5407         "requires": [
5408             "series-combo-stacked",
5409             "series-curve-util"
5410         ]
5411     },
5412     "series-curve-util": {},
5413     "series-fill-util": {},
5414     "series-histogram-base": {
5415         "requires": [
5416             "series-cartesian",
5417             "series-plot-util"
5418         ]
5419     },
5420     "series-line": {
5421         "requires": [
5422             "series-cartesian",
5423             "series-line-util"
5424         ]
5425     },
5426     "series-line-stacked": {
5427         "requires": [
5428             "series-stacked",
5429             "series-line"
5430         ]
5431     },
5432     "series-line-util": {},
5433     "series-marker": {
5434         "requires": [
5435             "series-cartesian",
5436             "series-plot-util"
5437         ]
5438     },
5439     "series-marker-stacked": {
5440         "requires": [
5441             "series-stacked",
5442             "series-marker"
5443         ]
5444     },
5445     "series-ohlc": {
5446         "requires": [
5447             "series-range"
5448         ]
5449     },
5450     "series-pie": {
5451         "requires": [
5452             "series-base",
5453             "series-plot-util"
5454         ]
5455     },
5456     "series-plot-util": {},
5457     "series-range": {
5458         "requires": [
5459             "series-cartesian"
5460         ]
5461     },
5462     "series-spline": {
5463         "requires": [
5464             "series-line",
5465             "series-curve-util"
5466         ]
5467     },
5468     "series-spline-stacked": {
5469         "requires": [
5470             "series-stacked",
5471             "series-spline"
5472         ]
5473     },
5474     "series-stacked": {
5475         "requires": [
5476             "axis-stacked"
5477         ]
5478     },
5479     "shim-plugin": {
5480         "requires": [
5481             "node-style",
5482             "node-pluginhost"
5483         ]
5484     },
5485     "slider": {
5486         "use": [
5487             "slider-base",
5488             "slider-value-range",
5489             "clickable-rail",
5490             "range-slider"
5491         ]
5492     },
5493     "slider-base": {
5494         "requires": [
5495             "widget",
5496             "dd-constrain",
5497             "event-key"
5498         ],
5499         "skinnable": true
5500     },
5501     "slider-value-range": {
5502         "requires": [
5503             "slider-base"
5504         ]
5505     },
5506     "sortable": {
5507         "requires": [
5508             "dd-delegate",
5509             "dd-drop-plugin",
5510             "dd-proxy"
5511         ]
5512     },
5513     "sortable-scroll": {
5514         "requires": [
5515             "dd-scroll",
5516             "sortable"
5517         ]
5518     },
5519     "stylesheet": {
5520         "requires": [
5521             "yui-base"
5522         ]
5523     },
5524     "substitute": {
5525         "optional": [
5526             "dump"
5527         ],
5528         "requires": [
5529             "yui-base"
5530         ]
5531     },
5532     "swf": {
5533         "requires": [
5534             "event-custom",
5535             "node",
5536             "swfdetect",
5537             "escape"
5538         ]
5539     },
5540     "swfdetect": {
5541         "requires": [
5542             "yui-base"
5543         ]
5544     },
5545     "tabview": {
5546         "requires": [
5547             "widget",
5548             "widget-parent",
5549             "widget-child",
5550             "tabview-base",
5551             "node-pluginhost",
5552             "node-focusmanager"
5553         ],
5554         "skinnable": true
5555     },
5556     "tabview-base": {
5557         "requires": [
5558             "node-event-delegate",
5559             "classnamemanager"
5560         ]
5561     },
5562     "tabview-plugin": {
5563         "requires": [
5564             "tabview-base"
5565         ]
5566     },
5567     "template": {
5568         "use": [
5569             "template-base",
5570             "template-micro"
5571         ]
5572     },
5573     "template-base": {
5574         "requires": [
5575             "yui-base"
5576         ]
5577     },
5578     "template-micro": {
5579         "requires": [
5580             "escape"
5581         ]
5582     },
5583     "test": {
5584         "requires": [
5585             "event-simulate",
5586             "event-custom",
5587             "json-stringify"
5588         ]
5589     },
5590     "test-console": {
5591         "requires": [
5592             "console-filters",
5593             "test",
5594             "array-extras"
5595         ],
5596         "skinnable": true
5597     },
5598     "text": {
5599         "use": [
5600             "text-accentfold",
5601             "text-wordbreak"
5602         ]
5603     },
5604     "text-accentfold": {
5605         "requires": [
5606             "array-extras",
5607             "text-data-accentfold"
5608         ]
5609     },
5610     "text-data-accentfold": {
5611         "requires": [
5612             "yui-base"
5613         ]
5614     },
5615     "text-data-wordbreak": {
5616         "requires": [
5617             "yui-base"
5618         ]
5619     },
5620     "text-wordbreak": {
5621         "requires": [
5622             "array-extras",
5623             "text-data-wordbreak"
5624         ]
5625     },
5626     "timers": {
5627         "requires": [
5628             "yui-base"
5629         ]
5630     },
5631     "transition": {
5632         "requires": [
5633             "node-style"
5634         ]
5635     },
5636     "transition-timer": {
5637         "condition": {
5638             "name": "transition-timer",
5639             "test": function (Y) {
5640     var DOCUMENT = Y.config.doc,
5641         node = (DOCUMENT) ? DOCUMENT.documentElement: null,
5642         ret = true;
5644     if (node && node.style) {
5645         ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
5646     }
5648     return ret;
5650             "trigger": "transition"
5651         },
5652         "requires": [
5653             "transition"
5654         ]
5655     },
5656     "tree": {
5657         "requires": [
5658             "base-build",
5659             "tree-node"
5660         ]
5661     },
5662     "tree-labelable": {
5663         "requires": [
5664             "tree"
5665         ]
5666     },
5667     "tree-lazy": {
5668         "requires": [
5669             "base-pluginhost",
5670             "plugin",
5671             "tree"
5672         ]
5673     },
5674     "tree-node": {},
5675     "tree-openable": {
5676         "requires": [
5677             "tree"
5678         ]
5679     },
5680     "tree-selectable": {
5681         "requires": [
5682             "tree"
5683         ]
5684     },
5685     "tree-sortable": {
5686         "requires": [
5687             "tree"
5688         ]
5689     },
5690     "uploader": {
5691         "requires": [
5692             "uploader-html5",
5693             "uploader-flash"
5694         ]
5695     },
5696     "uploader-flash": {
5697         "requires": [
5698             "swfdetect",
5699             "escape",
5700             "widget",
5701             "base",
5702             "cssbutton",
5703             "node",
5704             "event-custom",
5705             "uploader-queue"
5706         ]
5707     },
5708     "uploader-html5": {
5709         "requires": [
5710             "widget",
5711             "node-event-simulate",
5712             "file-html5",
5713             "uploader-queue"
5714         ]
5715     },
5716     "uploader-queue": {
5717         "requires": [
5718             "base"
5719         ]
5720     },
5721     "view": {
5722         "requires": [
5723             "base-build",
5724             "node-event-delegate"
5725         ]
5726     },
5727     "view-node-map": {
5728         "requires": [
5729             "view"
5730         ]
5731     },
5732     "widget": {
5733         "use": [
5734             "widget-base",
5735             "widget-htmlparser",
5736             "widget-skin",
5737             "widget-uievents"
5738         ]
5739     },
5740     "widget-anim": {
5741         "requires": [
5742             "anim-base",
5743             "plugin",
5744             "widget"
5745         ]
5746     },
5747     "widget-autohide": {
5748         "requires": [
5749             "base-build",
5750             "event-key",
5751             "event-outside",
5752             "widget"
5753         ]
5754     },
5755     "widget-base": {
5756         "requires": [
5757             "attribute",
5758             "base-base",
5759             "base-pluginhost",
5760             "classnamemanager",
5761             "event-focus",
5762             "node-base",
5763             "node-style"
5764         ],
5765         "skinnable": true
5766     },
5767     "widget-base-ie": {
5768         "condition": {
5769             "name": "widget-base-ie",
5770             "trigger": "widget-base",
5771             "ua": "ie"
5772         },
5773         "requires": [
5774             "widget-base"
5775         ]
5776     },
5777     "widget-buttons": {
5778         "requires": [
5779             "button-plugin",
5780             "cssbutton",
5781             "widget-stdmod"
5782         ]
5783     },
5784     "widget-child": {
5785         "requires": [
5786             "base-build",
5787             "widget"
5788         ]
5789     },
5790     "widget-htmlparser": {
5791         "requires": [
5792             "widget-base"
5793         ]
5794     },
5795     "widget-modality": {
5796         "requires": [
5797             "base-build",
5798             "event-outside",
5799             "widget"
5800         ],
5801         "skinnable": true
5802     },
5803     "widget-parent": {
5804         "requires": [
5805             "arraylist",
5806             "base-build",
5807             "widget"
5808         ]
5809     },
5810     "widget-position": {
5811         "requires": [
5812             "base-build",
5813             "node-screen",
5814             "widget"
5815         ]
5816     },
5817     "widget-position-align": {
5818         "requires": [
5819             "widget-position"
5820         ]
5821     },
5822     "widget-position-constrain": {
5823         "requires": [
5824             "widget-position"
5825         ]
5826     },
5827     "widget-skin": {
5828         "requires": [
5829             "widget-base"
5830         ]
5831     },
5832     "widget-stack": {
5833         "requires": [
5834             "base-build",
5835             "widget"
5836         ],
5837         "skinnable": true
5838     },
5839     "widget-stdmod": {
5840         "requires": [
5841             "base-build",
5842             "widget"
5843         ]
5844     },
5845     "widget-uievents": {
5846         "requires": [
5847             "node-event-delegate",
5848             "widget-base"
5849         ]
5850     },
5851     "yql": {
5852         "requires": [
5853             "oop"
5854         ]
5855     },
5856     "yql-jsonp": {
5857         "condition": {
5858             "name": "yql-jsonp",
5859             "test": function (Y) {
5860     /* Only load the JSONP module when not in nodejs or winjs
5861     TODO Make the winjs module a CORS module
5862     */
5863     return (!Y.UA.nodejs && !Y.UA.winjs);
5865             "trigger": "yql",
5866             "when": "after"
5867         },
5868         "requires": [
5869             "jsonp",
5870             "jsonp-url"
5871         ]
5872     },
5873     "yql-nodejs": {
5874         "condition": {
5875             "name": "yql-nodejs",
5876             "trigger": "yql",
5877             "ua": "nodejs",
5878             "when": "after"
5879         }
5880     },
5881     "yql-winjs": {
5882         "condition": {
5883             "name": "yql-winjs",
5884             "trigger": "yql",
5885             "ua": "winjs",
5886             "when": "after"
5887         }
5888     },
5889     "yui": {},
5890     "yui-base": {},
5891     "yui-later": {
5892         "requires": [
5893             "yui-base"
5894         ]
5895     },
5896     "yui-log": {
5897         "requires": [
5898             "yui-base"
5899         ]
5900     },
5901     "yui-throttle": {
5902         "requires": [
5903             "yui-base"
5904         ]
5905     }
5907 YUI.Env[Y.version].md5 = '3cf02e5f307a6e9470df4ea0dc7eb41e';
5910 }, '3.13.0', {"requires": ["loader-base"]});
5911 YUI.add('loader', function (Y, NAME) {}, '3.13.0', {"use": ["loader-base", "loader-rollup", "loader-yui3"]});