Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (102 sloc) 3.03 KB
(function() {
var _$_moduleFns = {};
var _$_modules = {};
var _$_mainModuleId = @mainModuleId;
var _$_moduleMap = @moduleMap;
var _$_mockedModules = (typeof self !== 'undefined' ? self.jsbundleMocks : global.jsbundleMocks);
var _$_hasOwnProp = Object.prototype.hasOwnProperty;
function _$_mock(idSubstring, mockExports) {
if (!_$_mockedModules) {
_$_mockedModules = {};
}
_$_mockedModules[idSubstring] = mockExports;
}
function _$_unmock(idSubstring) {
if (_$_mockedModules[idSubstring]) {
delete _$_mockedModules[idSubstring];
} else {
throw new Error('Substring "' + idSubstring + '" not registered for module mocking, so cannot unmock.');
}
}
function _$_getModule(id) {
id = String(id);
if (_$_mockedModules) {
for (var idSubstring in _$_mockedModules) {
if (_$_hasOwnProp.call(_$_mockedModules, idSubstring)) {
if (id.indexOf(idSubstring) >= 0) {
return {
exports: _$_mockedModules[idSubstring]
};
}
}
}
}
return _$_modules[id];
}
function _$_require(id) {
var moduleFn = _$_moduleFns[id];
if (moduleFn) {
var mod = _$_getModule(id);
if (!mod) {
mod = _$_modules[id] = {
id: id,
exports: {},
bundleUrl: JSBUNDLE_URL,
mock: _$_mock,
unmock: _$_unmock
};
if (id === _$_mainModuleId) {
_$_require.main = mod;
}
moduleFn(mod, mod.exports, _$_require, id);
}
return mod.exports;
} else {
throw new Error("Cannot find module '" + id + "'.");
}
}
var _$_scriptsToLoad = @scriptsToLoad;
function _$_initIfReady() {
for (var i = 0, len = _$_scriptsToLoad.length; i < len; i++) {
if (_$_scriptsToLoad[i]) {
return;
}
}
_$_require(_$_mainModuleId);
}
(function() {
function registerScriptLoad(url, index) {
_$_scriptsToLoad[index] = null;
_$_initIfReady();
}
function loadScript(url, index) {
var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement;
var script = document.createElement('script');
script.src = url;
script.onload = script.onreadystatechange = function() {
if (!script.readyState || /loaded|complete/.test(script.readyState)) {
script.onload = script.onreadystatechange = null;
if (head && script.parentNode) {
head.removeChild(script);
}
script = null;
registerScriptLoad(url, index);
}
};
head.insertBefore(script, head.firstChild);
}
if (typeof document === 'undefined' ||
!document.createElement ||
!document.getElementsByTagName) {
// no DOM, so don't load external scripts
_$_scriptsToLoad = [];
} else {
for (var i = 0, len = _$_scriptsToLoad.length; i < len; i++) {
loadScript(_$_scriptsToLoad[i], i);
}
}
})();
@moduleDefs
@appends
_$_initIfReady();
})();
Jump to Line
Something went wrong with that request. Please try again.