(function(){var parsers={json:JSON.decode};Locale.Set.defineParser=function(name,fn){parsers[name]=fn};Locale.Set.from=function(set,type){if(instanceOf(set,Locale.Set)){return set}if(!type&&typeOf(set)=="string"){type="json"}if(parsers[type]){set=parsers[type](set)}var locale=new Locale.Set;locale.sets=set.sets||{};if(set.inherits){locale.inherits.locales=Array.from(set.inherits.locales);locale.inherits.sets=set.inherits.sets||{}}return locale}})();