text: function define(e,n,t){if("string"!=typeof e)throw new TypeError("Expected string, got: "+e);if(2==arguments.length&&(t=n),e in define.modules)throw new Error("Module already defined: "+e);define.modules[e]=t}function Domain(){this.modules={},this._currentModule=null}define.modules={},function(){function e(e){for(var n=e.split("/"),t=1;t<n.length;)".."===n[t]?n.splice(t-1,1):"."===n[t]?n.splice(t,1):t++;return n.join("/")}function n(e,n){return e=e.trim(),n=n.trim(),/^\//.test(n)?n:e.replace(/\/*$/,"/")+n}function t(e){var n=e.split("/");return n.pop(),n.join("/")}Domain.prototype.require=function(e,n){if(Array.isArray(e)){var t=e.map(function(e){return this.lookup(e)},this);return void(n&&n.apply(null,t))}return this.lookup(e)},Domain.prototype.lookup=function(r){if(/^\./.test(r)&&(r=e(n(t(this._currentModule),r))),r in this.modules){var i=this.modules[r];return i}if(!(r in define.modules))throw new Error("Module not defined: "+r);var i=define.modules[r];if("function"==typeof i){var a={},o=this._currentModule;this._currentModule=r,i(this.require.bind(this),a,{id:r,uri:""}),this._currentModule=o,i=a}return this.modules[r]=i,i}}(),define.Domain=Domain,define.globalDomain=new Domain;var require=define.globalDomain.require.bind(define.globalDomain);