if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/intl/intl.js']) { __coverage__['build/intl/intl.js'] = {"path":"build/intl/intl.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":35}}},"2":{"name":"(anonymous_2)","line":33,"loc":{"start":{"line":33,"column":11},"end":{"line":33,"column":28}}},"3":{"name":"(anonymous_3)","line":51,"loc":{"start":{"line":51,"column":14},"end":{"line":51,"column":37}}},"4":{"name":"(anonymous_4)","line":72,"loc":{"start":{"line":72,"column":14},"end":{"line":72,"column":31}}},"5":{"name":"(anonymous_5)","line":86,"loc":{"start":{"line":86,"column":10},"end":{"line":86,"column":42}}},"6":{"name":"(anonymous_6)","line":105,"loc":{"start":{"line":105,"column":10},"end":{"line":105,"column":38}}},"7":{"name":"(anonymous_7)","line":123,"loc":{"start":{"line":123,"column":24},"end":{"line":123,"column":41}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":150,"column":61}},"2":{"start":{"line":3,"column":0},"end":{"line":7,"column":14}},"3":{"start":{"line":22,"column":0},"end":{"line":130,"column":3}},"4":{"start":{"line":34,"column":8},"end":{"line":36,"column":9}},"5":{"start":{"line":35,"column":12},"end":{"line":35,"column":31}},"6":{"start":{"line":37,"column":8},"end":{"line":37,"column":29}},"7":{"start":{"line":52,"column":8},"end":{"line":54,"column":35}},"8":{"start":{"line":56,"column":8},"end":{"line":59,"column":9}},"9":{"start":{"line":57,"column":12},"end":{"line":57,"column":38}},"10":{"start":{"line":58,"column":12},"end":{"line":58,"column":120}},"11":{"start":{"line":61,"column":8},"end":{"line":61,"column":22}},"12":{"start":{"line":73,"column":8},"end":{"line":73,"column":50}},"13":{"start":{"line":74,"column":8},"end":{"line":74,"column":48}},"14":{"start":{"line":87,"column":8},"end":{"line":87,"column":33}},"15":{"start":{"line":88,"column":8},"end":{"line":88,"column":42}},"16":{"start":{"line":89,"column":8},"end":{"line":89,"column":35}},"17":{"start":{"line":106,"column":8},"end":{"line":107,"column":17}},"18":{"start":{"line":109,"column":8},"end":{"line":109,"column":40}},"19":{"start":{"line":110,"column":8},"end":{"line":110,"column":31}},"20":{"start":{"line":112,"column":8},"end":{"line":112,"column":49}},"21":{"start":{"line":124,"column":8},"end":{"line":126,"column":36}},"22":{"start":{"line":127,"column":8},"end":{"line":127,"column":47}},"23":{"start":{"line":132,"column":0},"end":{"line":132,"column":33}},"24":{"start":{"line":147,"column":0},"end":{"line":147,"column":53}}},"branchMap":{"1":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":8},"end":{"line":34,"column":8}},{"start":{"line":34,"column":8},"end":{"line":34,"column":8}}]},"2":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":8},"end":{"line":56,"column":8}},{"start":{"line":56,"column":8},"end":{"line":56,"column":8}}]},"3":{"line":56,"type":"binary-expr","locations":[{"start":{"line":56,"column":12},"end":{"line":56,"column":18}},{"start":{"line":56,"column":22},"end":{"line":56,"column":39}}]},"4":{"line":58,"type":"cond-expr","locations":[{"start":{"line":58,"column":108},"end":{"line":58,"column":110}},{"start":{"line":58,"column":113},"end":{"line":58,"column":117}}]},"5":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":38},"end":{"line":74,"column":40}},{"start":{"line":74,"column":43},"end":{"line":74,"column":47}}]},"6":{"line":87,"type":"binary-expr","locations":[{"start":{"line":87,"column":15},"end":{"line":87,"column":19}},{"start":{"line":87,"column":23},"end":{"line":87,"column":32}}]},"7":{"line":109,"type":"binary-expr","locations":[{"start":{"line":109,"column":15},"end":{"line":109,"column":19}},{"start":{"line":109,"column":23},"end":{"line":109,"column":39}}]},"8":{"line":110,"type":"binary-expr","locations":[{"start":{"line":110,"column":15},"end":{"line":110,"column":24}},{"start":{"line":110,"column":28},"end":{"line":110,"column":30}}]},"9":{"line":112,"type":"cond-expr","locations":[{"start":{"line":112,"column":23},"end":{"line":112,"column":32}},{"start":{"line":112,"column":35},"end":{"line":112,"column":48}}]},"10":{"line":125,"type":"binary-expr","locations":[{"start":{"line":125,"column":18},"end":{"line":125,"column":24}},{"start":{"line":125,"column":28},"end":{"line":125,"column":53}}]},"11":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":20},"end":{"line":126,"column":23}},{"start":{"line":126,"column":27},"end":{"line":126,"column":35}}]},"12":{"line":127,"type":"cond-expr","locations":[{"start":{"line":127,"column":25},"end":{"line":127,"column":39}},{"start":{"line":127,"column":42},"end":{"line":127,"column":46}}]}},"code":["(function () { YUI.add('intl', function (Y, NAME) {","","var _mods = {},",""," ROOT_LANG = \"yuiRootLang\","," ACTIVE_LANG = \"yuiActiveLang\","," NONE = [];","","/**"," * Provides utilities to support the management of localized resources (strings and formatting patterns)."," *"," * @module intl"," */","","/**"," * The Intl utility provides a central location for managing sets of localized resources (strings and formatting patterns)."," *"," * @class Intl"," * @uses EventTarget"," * @static"," */","Y.mix(Y.namespace(\"Intl\"), {",""," /**"," * Private method to retrieve the language hash for a given module."," *"," * @method _mod"," * @private"," *"," * @param {String} module The name of the module"," * @return {Object} The hash of localized resources for the module, keyed by BCP language tag"," */"," _mod : function(module) {"," if (!_mods[module]) {"," _mods[module] = {};"," }"," return _mods[module];"," },",""," /**"," * Sets the active language for the given module."," *"," * Returns false on failure, which would happen if the language had not been registered through the add() method."," *"," * @method setLang"," *"," * @param {String} module The module name."," * @param {String} lang The BCP 47 language tag."," * @return boolean true if successful, false if not."," */"," setLang : function(module, lang) {"," var langs = this._mod(module),"," currLang = langs[ACTIVE_LANG],"," exists = !!langs[lang];",""," if (exists && lang !== currLang) {"," langs[ACTIVE_LANG] = lang;"," this.fire(\"intl:langChange\", {module: module, prevVal: currLang, newVal: (lang === ROOT_LANG) ? \"\" : lang});"," }",""," return exists;"," },",""," /**"," * Get the currently active language for the given module."," *"," * @method getLang"," *"," * @param {String} module The module name."," * @return {String} The BCP 47 language tag."," */"," getLang : function(module) {"," var lang = this._mod(module)[ACTIVE_LANG];"," return (lang === ROOT_LANG) ? \"\" : lang;"," },",""," /**"," * Register a hash of localized resources for the given module and language"," *"," * @method add"," *"," * @param {String} module The module name."," * @param {String} lang The BCP 47 language tag."," * @param {Object} strings The hash of localized values, keyed by the string name."," */"," add : function(module, lang, strings) {"," lang = lang || ROOT_LANG;"," this._mod(module)[lang] = strings;"," this.setLang(module, lang);"," },",""," /**"," * Gets the module's localized resources for the currently active language (as provided by the getLang method)."," *
"," * Optionally, the localized resources for alternate languages which have been added to Intl (see the add method) can"," * be retrieved by providing the BCP 47 language tag as the lang parameter."," *
"," * @method get"," *"," * @param {String} module The module name."," * @param {String} key Optional. A single resource key. If not provided, returns a copy (shallow clone) of all resources."," * @param {String} lang Optional. The BCP 47 language tag. If not provided, the module's currently active language is used."," * @return String | Object A copy of the module's localized resources, or a single value if key is provided."," */"," get : function(module, key, lang) {"," var mod = this._mod(module),"," strs;",""," lang = lang || mod[ACTIVE_LANG];"," strs = mod[lang] || {};",""," return (key) ? strs[key] : Y.merge(strs);"," },",""," /**"," * Gets the list of languages for which localized resources are available for a given module, based on the module"," * meta-data (part of loader). If loader is not on the page, returns an empty array."," *"," * @method getAvailableLangs"," * @param {String} module The name of the module"," * @return {Array} The array of languages available."," */"," getAvailableLangs : function(module) {"," var loader = Y.Env._loader,"," mod = loader && loader.moduleInfo[module],"," langs = mod && mod.lang;"," return (langs) ? langs.concat() : NONE;",""," }","});","","Y.augment(Y.Intl, Y.EventTarget);","","/**"," * Notification event to indicate when the lang for a module has changed. There is no default behavior associated with this event,"," * so the on and after moments are equivalent."," *"," * @event intl:langChange"," * @param {EventFacade} e The event facade"," *The event facade contains:
"," *