(function(context){'use strict';if(context.define){throw'define is already defined in the global scope, cannot continue';}if(context.require){throw'require is already defined in the global scope, cannot continue';}var mocks={},modules={},definitions={},processing={},arrType=Array,funcType=Function,strType='string',yes=true,nil=null,define,require;function process(id,reqId,optional){var module=modules[id],mock=mocks[id],pid=processing[reqId],dependencies,chain='',x,y,p,moduleDependencies,dependency;if(module){return mock?override(module,mock):module;}if(!pid){pid={length:0};}else if(pid[id]){for(p in pid){if(pid.hasOwnProperty(p)&&p!=='length'){chain+=p+'->';}}throw'circular dependency: '+chain+id;}pid[id]=yes;pid.length+=1;processing[reqId]=pid;module=definitions[id];if(module&&module.def){dependencies=[];if(module.dep instanceof arrType){moduleDependencies=module.dep;for(x=0,y=moduleDependencies.length;x