{"version":3,"sources":["ocLazyLoad.js"],"names":["angular","window","regModules","regInvokes","regConfigs","modulesToLoad","recordDeclarations","broadcast","noop","runBlocks","justLoaded","ocLazyLoad","module","provider","$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider","_register","providers","registerModules","params","k","moduleName","moduleFn","tempRunBlocks","length","isString","getModuleName","indexOf","newModule","ngModuleFct","push","requires","_runBlocks","shift","isDefined","rerun","concat","_invokeQueue","reconfig","_configBlocks","pop","instanceInjector","getInstanceInjector","forEach","fn","invoke","_registerInvokeList","args","signature","data","isArray","hashCode","toString","isObject","stringify","invokeList","type","newInvoke","isUndefined","onInvoke","invokeName","hasOwnProperty","key","queue","i","len","Error","isNew","apply","callInvoke","fct","invoked","isFunction","j","jlen","name","moduleExists","e","test","message","modules","debug","events","moduleCache","value","this","Array","prototype","arguments","config","moduleConfig","_init","element","elements","names","NG_APP_CLASS_REGEXP","append","elm","document","getElementById","replace","querySelectorAll","className","match","exec","attributes","attr","jasmine","mocha","mock","console","error","addReg","mainModule","obj","cache","JSON","str","chr","hash","charCodeAt","$get","$log","$rootElement","$rootScope","$cacheFactory","$q","reject","deferred","defer","promise","filesCache","injector","eventName","$broadcast","info","_broadcast","_$log","_getFilesCache","toggleWatch","watch","getModuleConfig","copy","setModuleConfig","getModules","isLoaded","modulesNames","moduleLoaded","_getModuleName","_getModule","_loadDependencies","localParams","loadedModule","diff","promisesList","self","when","getRequires","requireEntry","files","filter","n","warn","filesLoader","then","all","inject","undefined","_addToLoadList","res","slice","loadNext","resolve","err","requireModule","bootstrapFct","bootstrap","force","configFn","exports","directive","$ocLazyLoad","$compile","$animate","$parse","restrict","terminal","priority","compile","attrs","content","innerHTML","html","$scope","$element","$attr","model","$watch","load","enter","contents","nodeType","decorator","$delegate","$window","$interval","uaCssChecked","useCssLoadPatch","anchor","getElementsByTagName","buildElement","path","el","loaded","cacheBuster","url","dc","Date","getTime","substring","get","put","createElement","rel","href","src","remove","onload","onerror","async","serie","insertBeforeElem","lastChild","insertBefore","jQuery","querySelector","parentNode","ua","navigator","userAgent","toLowerCase","platform","v","appVersion","iOSVersion","parseFloat","parseInt","join","androidVersion","versionMatch","tries","interval","sheet","cssRules","cancel","cssFiles","templatesFiles","jsFiles","promises","cachePromise","extend","pushFile","m","file_type","substr","jsLoader","cssDeferred","cssLoader","templatesDeferred","templatesLoader","jsDeferred","originalModule","errText","originalParams","deferredList","template","paths","callback","ocLazyLoadLoader","$templateCache","$http","success","node","nodeName","id","searchElement","fromIndex","TypeError","O","Object","Math","abs","Infinity","max"],"mappings":"CAOA,SAAWA,EAASC,GAChB,YAEA,IAAIC,IAAc,KAAM,eACpBC,KACAC,KACAC,KACAC,KACAC,EAAYP,EAAQQ,KACpBC,KACAC,KAEAC,EAAaX,EAAQY,OAAO,eAAgB,MAEhDD,GAAWE,SAAS,eAAgB,sBAAuB,WAAY,mBAAoB,kBAAmB,YAAa,mBAAoB,SAAUC,EAAqBC,EAAUC,EAAkBC,EAAiBC,EAAWC,GAgJlO,QAASC,GAAUC,EAAWC,EAAiBC,GAC3C,GAAID,EAAiB,CACjB,GAAIE,GACAC,EACAC,EACAC,IACJ,KAAKH,EAAIF,EAAgBM,OAAS,EAAGJ,GAAK,EAAGA,IAKzC,GAJAC,EAAaH,EAAgBE,GACxBxB,EAAQ6B,SAASJ,KAClBA,EAAaK,EAAcL,IAE1BA,GAAiD,KAAnCf,EAAWqB,QAAQN,GAAtC,CAGA,GAAIO,GAA+C,KAAnC9B,EAAW6B,QAAQN,EAOnC,IANAC,EAAWO,EAAYR,GACnBO,IAEA9B,EAAWgC,KAAKT,GAChBL,EAAUC,EAAWK,EAASS,SAAUZ,IAExCG,EAASU,WAAWR,OAAS,EAG7B,IADAnB,EAAUgB,MACHC,EAASU,WAAWR,OAAS,GAChCnB,EAAUgB,GAAYS,KAAKR,EAASU,WAAWC,QAGnDrC,GAAQsC,UAAU7B,EAAUgB,MAAiBO,GAAaT,EAAOgB,SACjEZ,EAAgBA,EAAca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,IAASA,EAAKzB,OAAS,GACxC5B,EAAQ+C,QAAQ/C,EAAQgG,QAAQ3C,GAAO,SAAUyO,GACvB,WAAlBA,EAAKC,UAAuC,qBAAdD,EAAKlO,MACnC+N,EAAe1D,IAAI6D,EAAKE,GAAIF,EAAK3F,aAIzCnM,EAAQ8D,YAAYyE,EAAWyF,IAAIL,KACnCpF,EAAW0F,IAAIN,GAAK,GAExBvF,EAAS4C,YACV7D,MAAM,SAAU8D,GACf7C,EAASD,OAAO,GAAI7D,OAAM,iCAAmCqJ,EAAM,MAAQ1C,QAG5E/C,EAAGuC,IAAI6F,GAAU9F,KAAK,WACzBiH,KACD,SAAUxG,GACTwG,EAASxG,MAGjB8B,EAAUkE,gBAAgBS,kBAAmB,EAEtC3E,SAGhB/M,SAEE0F,MAAMC,UAAU5D,UACb2D,MAAMC,UAAU5D,QAAU,SAAUkQ,EAAeC,GAC3C,GAAI1Q,EAIJ,IAAY,MAARiE,KACI,KAAM,IAAI0M,WAAU,gCAG5B,IAAIC,GAAIC,OAAO5M,MAKXpB,EAAM+N,EAAExQ,SAAW,CAGvB,IAAY,IAARyC,EACI,MAAO,EAKf,IAAIgG,IAAK6H,GAAa,CAOtB,IALII,KAAKC,IAAIlI,KAAOmI,EAAAA,IACZnI,EAAI,GAIRA,GAAKhG,EACD,MAAO,EASf,KAHA7C,EAAI8Q,KAAKG,IAAIpI,GAAK,EAAIA,EAAIhG,EAAMiO,KAAKC,IAAIlI,GAAI,GAGlChG,EAAJ7C,GAAS,CAaR,GAAIA,IAAK4Q,IAAKA,EAAE5Q,KAAOyQ,EACf,MAAOzQ,EAEfA,KAER,MAAO","file":"ocLazyLoad.min.js","sourcesContent":["/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.1\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe \n */\n(function (angular, window) {\n 'use strict';\n\n var regModules = ['ng', 'oc.lazyLoad'],\n regInvokes = {},\n regConfigs = [],\n modulesToLoad = [],\n recordDeclarations = [],\n broadcast = angular.noop,\n runBlocks = {},\n justLoaded = [];\n\n var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n var modules = {},\n providers = {\n $controllerProvider: $controllerProvider,\n $compileProvider: $compileProvider,\n $filterProvider: $filterProvider,\n $provide: $provide, // other things (constant, decorator, provider, factory, service)\n $injector: $injector,\n $animateProvider: $animateProvider\n },\n debug = false,\n events = false,\n moduleCache = [];\n\n moduleCache.push = function (value) {\n if (this.indexOf(value) === -1) {\n Array.prototype.push.apply(this, arguments);\n }\n };\n\n this.config = function (config) {\n // If we want to define modules configs\n if (angular.isDefined(config.modules)) {\n if (angular.isArray(config.modules)) {\n angular.forEach(config.modules, function (moduleConfig) {\n modules[moduleConfig.name] = moduleConfig;\n });\n } else {\n modules[config.modules.name] = config.modules;\n }\n }\n\n if (angular.isDefined(config.debug)) {\n debug = config.debug;\n }\n\n if (angular.isDefined(config.events)) {\n events = config.events;\n }\n };\n\n /**\r\n * Get the list of existing registered modules\r\n * @param element\r\n */\n this._init = function _init(element) {\n // this is probably useless now because we override angular.bootstrap\n if (modulesToLoad.length === 0) {\n var elements = [element],\n names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n append = function append(elm) {\n return elm && elements.push(elm);\n };\n\n angular.forEach(names, function (name) {\n names[name] = true;\n append(document.getElementById(name));\n name = name.replace(':', '\\\\:');\n if (element[0].querySelectorAll) {\n angular.forEach(element[0].querySelectorAll('.' + name), append);\n angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n }\n });\n\n angular.forEach(elements, function (elm) {\n if (modulesToLoad.length === 0) {\n var className = ' ' + element.className + ' ';\n var match = NG_APP_CLASS_REGEXP.exec(className);\n if (match) {\n modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n } else {\n angular.forEach(elm.attributes, function (attr) {\n if (modulesToLoad.length === 0 && names[attr.name]) {\n modulesToLoad.push(attr.value);\n }\n });\n }\n }\n });\n }\n\n if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n }\n\n var addReg = function addReg(moduleName) {\n if (regModules.indexOf(moduleName) === -1) {\n // register existing modules\n regModules.push(moduleName);\n var mainModule = angular.module(moduleName);\n\n // register existing components (directives, services, ...)\n _invokeQueue(null, mainModule._invokeQueue, moduleName);\n _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n angular.forEach(mainModule.requires, addReg);\n }\n };\n\n angular.forEach(modulesToLoad, function (moduleName) {\n addReg(moduleName);\n });\n\n modulesToLoad = []; // reset for next bootstrap\n recordDeclarations.pop(); // wait for the next lazy load\n };\n\n /**\r\n * Like JSON.stringify but that doesn't throw on circular references\r\n * @param obj\r\n */\n var stringify = function stringify(obj) {\n var cache = [];\n return JSON.stringify(obj, function (key, value) {\n if (angular.isObject(value) && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n };\n\n var hashCode = function hashCode(str) {\n var hash = 0,\n i,\n chr,\n len;\n if (str.length == 0) {\n return hash;\n }\n for (i = 0, len = str.length; i < len; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n };\n\n function _register(providers, registerModules, params) {\n if (registerModules) {\n var k,\n moduleName,\n moduleFn,\n tempRunBlocks = [];\n for (k = registerModules.length - 1; k >= 0; k--) {\n moduleName = registerModules[k];\n if (!angular.isString(moduleName)) {\n moduleName = getModuleName(moduleName);\n }\n if (!moduleName || justLoaded.indexOf(moduleName) !== -1) {\n continue;\n }\n var newModule = regModules.indexOf(moduleName) === -1;\n moduleFn = ngModuleFct(moduleName);\n if (newModule) {\n // new module\n regModules.push(moduleName);\n _register(providers, moduleFn.requires, params);\n }\n if (moduleFn._runBlocks.length > 0) {\n // new run blocks detected! Replace the old ones (if existing)\n runBlocks[moduleName] = [];\n while (moduleFn._runBlocks.length > 0) {\n runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n }\n }\n if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n }\n _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n registerModules.pop();\n justLoaded.push(moduleName);\n }\n // execute the run blocks at the end\n var instanceInjector = providers.getInstanceInjector();\n angular.forEach(tempRunBlocks, function (fn) {\n instanceInjector.invoke(fn);\n });\n }\n }\n\n function _registerInvokeList(args, moduleName) {\n var invokeList = args[2][0],\n type = args[1],\n newInvoke = false;\n if (angular.isUndefined(regInvokes[moduleName])) {\n regInvokes[moduleName] = {};\n }\n if (angular.isUndefined(regInvokes[moduleName][type])) {\n regInvokes[moduleName][type] = {};\n }\n var onInvoke = function onInvoke(invokeName, signature) {\n if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n regInvokes[moduleName][type][invokeName] = [];\n }\n if (regInvokes[moduleName][type][invokeName].indexOf(signature) === -1) {\n newInvoke = true;\n regInvokes[moduleName][type][invokeName].push(signature);\n broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n }\n };\n\n function signature(data) {\n if (angular.isArray(data)) {\n // arrays are objects, we need to test for it first\n return hashCode(data.toString());\n } else if (angular.isObject(data)) {\n // constants & values for example\n return hashCode(stringify(data));\n } else {\n if (angular.isDefined(data) && data !== null) {\n return hashCode(data.toString());\n } else {\n // null & undefined constants\n return data;\n }\n }\n }\n\n if (angular.isString(invokeList)) {\n onInvoke(invokeList, signature(args[2][1]));\n } else if (angular.isObject(invokeList)) {\n angular.forEach(invokeList, function (invoke, key) {\n if (angular.isString(invoke)) {\n // decorators for example\n onInvoke(invoke, signature(invokeList[1]));\n } else {\n // components registered as object lists {\"componentName\": function() {}}\n onInvoke(key, signature(invoke));\n }\n });\n } else {\n return false;\n }\n return newInvoke;\n }\n\n function _invokeQueue(providers, queue, moduleName, reconfig) {\n if (!queue) {\n return;\n }\n\n var i, len, args, provider;\n for (i = 0, len = queue.length; i < len; i++) {\n args = queue[i];\n if (angular.isArray(args)) {\n if (providers !== null) {\n if (providers.hasOwnProperty(args[0])) {\n provider = providers[args[0]];\n } else {\n throw new Error('unsupported provider ' + args[0]);\n }\n }\n var isNew = _registerInvokeList(args, moduleName);\n if (args[1] !== 'invoke') {\n if (isNew && angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n } else {\n // config block\n var callInvoke = function callInvoke(fct) {\n var invoked = regConfigs.indexOf('' + moduleName + '-' + fct);\n if (invoked === -1 || reconfig) {\n if (invoked === -1) {\n regConfigs.push('' + moduleName + '-' + fct);\n }\n if (angular.isDefined(provider)) {\n provider[args[1]].apply(provider, args[2]);\n }\n }\n };\n if (angular.isFunction(args[2][0])) {\n callInvoke(args[2][0]);\n } else if (angular.isArray(args[2][0])) {\n for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n if (angular.isFunction(args[2][0][j])) {\n callInvoke(args[2][0][j]);\n }\n }\n }\n }\n }\n }\n }\n\n function getModuleName(module) {\n var moduleName = null;\n if (angular.isString(module)) {\n moduleName = module;\n } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n moduleName = module.name;\n }\n return moduleName;\n }\n\n function moduleExists(moduleName) {\n if (!angular.isString(moduleName)) {\n return false;\n }\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n return false;\n }\n }\n }\n\n this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n var instanceInjector,\n filesCache = $cacheFactory('ocLazyLoad');\n\n if (!debug) {\n $log = {};\n $log['error'] = angular.noop;\n $log['warn'] = angular.noop;\n $log['info'] = angular.noop;\n }\n\n // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n providers.getInstanceInjector = function () {\n return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n };\n\n broadcast = function broadcast(eventName, params) {\n if (events) {\n $rootScope.$broadcast(eventName, params);\n }\n if (debug) {\n $log.info(eventName, params);\n }\n };\n\n function reject(e) {\n var deferred = $q.defer();\n $log.error(e.message);\n deferred.reject(e);\n return deferred.promise;\n }\n\n return {\n _broadcast: broadcast,\n\n _$log: $log,\n\n /**\r\n * Returns the files cache used by the loaders to store the files currently loading\r\n * @returns {*}\r\n */\n _getFilesCache: function getFilesCache() {\n return filesCache;\n },\n\n /**\r\n * Let the service know that it should monitor angular.module because files are loading\r\n * @param watch boolean\r\n */\n toggleWatch: function toggleWatch(watch) {\n if (watch) {\n recordDeclarations.push(true);\n } else {\n recordDeclarations.pop();\n }\n },\n\n /**\r\n * Let you get a module config object\r\n * @param moduleName String the name of the module\r\n * @returns {*}\r\n */\n getModuleConfig: function getModuleConfig(moduleName) {\n if (!angular.isString(moduleName)) {\n throw new Error('You need to give the name of the module to get');\n }\n if (!modules[moduleName]) {\n return null;\n }\n return angular.copy(modules[moduleName]);\n },\n\n /**\r\n * Let you define a module config object\r\n * @param moduleConfig Object the module config object\r\n * @returns {*}\r\n */\n setModuleConfig: function setModuleConfig(moduleConfig) {\n if (!angular.isObject(moduleConfig)) {\n throw new Error('You need to give the module config object to set');\n }\n modules[moduleConfig.name] = moduleConfig;\n return moduleConfig;\n },\n\n /**\r\n * Returns the list of loaded modules\r\n * @returns {string[]}\r\n */\n getModules: function getModules() {\n return regModules;\n },\n\n /**\r\n * Let you check if a module has been loaded into Angular or not\r\n * @param modulesNames String/Object a module name, or a list of module names\r\n * @returns {boolean}\r\n */\n isLoaded: function isLoaded(modulesNames) {\n var moduleLoaded = function moduleLoaded(module) {\n var isLoaded = regModules.indexOf(module) > -1;\n if (!isLoaded) {\n isLoaded = !!moduleExists(module);\n }\n return isLoaded;\n };\n if (angular.isString(modulesNames)) {\n modulesNames = [modulesNames];\n }\n if (angular.isArray(modulesNames)) {\n var i, len;\n for (i = 0, len = modulesNames.length; i < len; i++) {\n if (!moduleLoaded(modulesNames[i])) {\n return false;\n }\n }\n return true;\n } else {\n throw new Error('You need to define the module(s) name(s)');\n }\n },\n\n /**\r\n * Given a module, return its name\r\n * @param module\r\n * @returns {String}\r\n */\n _getModuleName: getModuleName,\n\n /**\r\n * Returns a module if it exists\r\n * @param moduleName\r\n * @returns {module}\r\n */\n _getModule: function getModule(moduleName) {\n try {\n return ngModuleFct(moduleName);\n } catch (e) {\n // this error message really suxx\n if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n }\n throw e;\n }\n },\n\n /**\r\n * Check if a module exists and returns it if it does\r\n * @param moduleName\r\n * @returns {boolean}\r\n */\n moduleExists: moduleExists,\n\n /**\r\n * Load the dependencies, and might try to load new files depending on the config\r\n * @param moduleName (String or Array of Strings)\r\n * @param localParams\r\n * @returns {*}\r\n * @private\r\n */\n _loadDependencies: function _loadDependencies(moduleName, localParams) {\n var loadedModule,\n requires,\n diff,\n promisesList = [],\n self = this;\n\n moduleName = self._getModuleName(moduleName);\n\n if (moduleName === null) {\n return $q.when();\n } else {\n try {\n loadedModule = self._getModule(moduleName);\n } catch (e) {\n return reject(e);\n }\n // get unloaded requires\n requires = self.getRequires(loadedModule);\n }\n\n angular.forEach(requires, function (requireEntry) {\n // If no configuration is provided, try and find one from a previous load.\n // If there isn't one, bail and let the normal flow run\n if (angular.isString(requireEntry)) {\n var config = self.getModuleConfig(requireEntry);\n if (config === null) {\n moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n return;\n }\n requireEntry = config;\n }\n\n // Check if this dependency has been loaded previously\n if (self.moduleExists(requireEntry.name)) {\n // compare against the already loaded module to see if the new definition adds any new files\n diff = requireEntry.files.filter(function (n) {\n return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n });\n\n // If the module was redefined, advise via the console\n if (diff.length !== 0) {\n self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n }\n\n // Push everything to the file loader, it will weed out the duplicates.\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n return;\n } else if (angular.isArray(requireEntry)) {\n requireEntry = {\n files: requireEntry\n };\n } else if (angular.isObject(requireEntry)) {\n if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n self.setModuleConfig(requireEntry);\n moduleCache.push(requireEntry['name']);\n }\n }\n\n // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n if (angular.isDefined(self.filesLoader)) {\n // if a files loader is defined\n promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n return self._loadDependencies(requireEntry);\n }));\n } else {\n return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n }\n }\n });\n\n // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n return $q.all(promisesList);\n },\n\n /**\r\n * Inject new modules into Angular\r\n * @param moduleName\r\n * @param localParams\r\n */\n inject: function inject(moduleName) {\n var localParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n deferred = $q.defer();\n if (angular.isDefined(moduleName) && moduleName !== null) {\n if (angular.isArray(moduleName)) {\n var promisesList = [];\n angular.forEach(moduleName, function (module) {\n promisesList.push(self.inject(module));\n });\n return $q.all(promisesList);\n } else {\n self._addToLoadList(self._getModuleName(moduleName), true);\n }\n }\n if (modulesToLoad.length > 0) {\n var res = modulesToLoad.slice(); // clean copy\n var loadNext = function loadNext(moduleName) {\n moduleCache.push(moduleName);\n self._loadDependencies(moduleName, localParams).then(function success() {\n try {\n justLoaded = [];\n _register(providers, moduleCache, localParams);\n } catch (e) {\n self._$log.error(e.message);\n deferred.reject(e);\n return;\n }\n\n if (modulesToLoad.length > 0) {\n loadNext(modulesToLoad.shift()); // load the next in list\n } else {\n deferred.resolve(res); // everything has been loaded, resolve\n }\n }, function error(err) {\n deferred.reject(err);\n });\n };\n\n // load the first in list\n loadNext(modulesToLoad.shift());\n } else {\n deferred.resolve();\n }\n return deferred.promise;\n },\n\n /**\r\n * Get the list of required modules/services/... for this module\r\n * @param module\r\n * @returns {Array}\r\n */\n getRequires: function getRequires(module) {\n var requires = [];\n angular.forEach(module.requires, function (requireModule) {\n if (regModules.indexOf(requireModule) === -1) {\n requires.push(requireModule);\n }\n });\n return requires;\n },\n\n /**\r\n * Invoke the new modules & component by their providers\r\n * @param providers\r\n * @param queue\r\n * @param moduleName\r\n * @param reconfig\r\n * @private\r\n */\n _invokeQueue: _invokeQueue,\n\n /**\r\n * Check if a module has been invoked and registers it if not\r\n * @param args\r\n * @param moduleName\r\n * @returns {boolean} is new\r\n */\n _registerInvokeList: _registerInvokeList,\n\n /**\r\n * Register a new module and loads it, executing the run/config blocks if needed\r\n * @param providers\r\n * @param registerModules\r\n * @param params\r\n * @private\r\n */\n _register: _register,\n\n /**\r\n * Add a module name to the list of modules that will be loaded in the next inject\r\n * @param name\r\n * @param force\r\n * @private\r\n */\n _addToLoadList: _addToLoadList\n };\n }];\n\n // Let's get the list of loaded modules & components\n this._init(angular.element(window.document));\n }]);\n\n var bootstrapFct = angular.bootstrap;\n angular.bootstrap = function (element, modules, config) {\n // we use slice to make a clean copy\n angular.forEach(modules.slice(), function (module) {\n _addToLoadList(module, true);\n });\n return bootstrapFct(element, modules, config);\n };\n\n var _addToLoadList = function _addToLoadList(name, force) {\n if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n modulesToLoad.push(name);\n }\n };\n\n var ngModuleFct = angular.module;\n angular.module = function (name, requires, configFn) {\n _addToLoadList(name);\n return ngModuleFct(name, requires, configFn);\n };\n\n // CommonJS package manager support:\n if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n module.exports = 'oc.lazyLoad';\n }\n})(angular, window);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", function ($ocLazyLoad, $compile, $animate, $parse) {\n return {\n restrict: 'A',\n terminal: true,\n priority: 1000,\n compile: function compile(element, attrs) {\n // we store the content and remove it before compilation\n var content = element[0].innerHTML;\n element.html('');\n\n return function ($scope, $element, $attr) {\n var model = $parse($attr.ocLazyLoad);\n $scope.$watch(function () {\n return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n }, function (moduleName) {\n if (angular.isDefined(moduleName)) {\n $ocLazyLoad.load(moduleName).then(function () {\n $animate.enter(content, $element);\n var contents = element.contents();\n angular.forEach(contents, function (content) {\n if (content.nodeType !== 3) {\n // 3 is a text node\n $compile(content)($scope);\n }\n });\n });\n }\n }, true);\n };\n }\n };\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n var uaCssChecked = false,\n useCssLoadPatch = false,\n anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n /**\n * Load a js/css file\n * @param type\n * @param path\n * @param params\n * @returns promise\n */\n $delegate.buildElement = function buildElement(type, path, params) {\n var deferred = $q.defer(),\n el,\n loaded,\n filesCache = $delegate._getFilesCache(),\n cacheBuster = function cacheBuster(url) {\n var dc = new Date().getTime();\n if (url.indexOf('?') >= 0) {\n if (url.substring(0, url.length - 1) === '&') {\n return '' + url + '_dc=' + dc;\n }\n return '' + url + '&_dc=' + dc;\n } else {\n return '' + url + '?_dc=' + dc;\n }\n };\n\n // Store the promise early so the file load can be detected by other parallel lazy loads\n // (ie: multiple routes on one page) a 'true' value isn't sufficient\n // as it causes false positive load results.\n if (angular.isUndefined(filesCache.get(path))) {\n filesCache.put(path, deferred.promise);\n }\n\n // Switch in case more content types are added later\n switch (type) {\n case 'css':\n el = $window.document.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.href = params.cache === false ? cacheBuster(path) : path;\n break;\n case 'js':\n el = $window.document.createElement('script');\n el.src = params.cache === false ? cacheBuster(path) : path;\n break;\n default:\n filesCache.remove(path);\n deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n break;\n }\n el.onload = el['onreadystatechange'] = function (e) {\n if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n el.onload = el['onreadystatechange'] = null;\n loaded = 1;\n $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n deferred.resolve();\n };\n el.onerror = function () {\n filesCache.remove(path);\n deferred.reject(new Error('Unable to load ' + path));\n };\n el.async = params.serie ? 0 : 1;\n\n var insertBeforeElem = anchor.lastChild;\n if (params.insertBefore) {\n var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n if (element && element.length > 0) {\n insertBeforeElem = element[0];\n }\n }\n insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n /*\n The event load or readystatechange doesn't fire in:\n - iOS < 6 (default mobile browser)\n - Android < 4.4 (default mobile browser)\n - Safari < 6 (desktop browser)\n */\n if (type == 'css') {\n if (!uaCssChecked) {\n var ua = $window.navigator.userAgent.toLowerCase();\n\n // iOS < 6\n if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n useCssLoadPatch = iOSVersion < 6;\n } else if (ua.indexOf('android') > -1) {\n // Android < 4.4\n var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8));\n useCssLoadPatch = androidVersion < 4.4;\n } else if (ua.indexOf('safari') > -1) {\n var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n }\n }\n\n if (useCssLoadPatch) {\n var tries = 1000; // * 20 = 20000 miliseconds\n var interval = $interval(function () {\n try {\n el.sheet.cssRules;\n $interval.cancel(interval);\n el.onload();\n } catch (e) {\n if (--tries <= 0) {\n el.onerror();\n }\n }\n }, 20);\n }\n }\n\n return deferred.promise;\n };\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\n * The function that loads new files\n * @param config\n * @param params\n * @returns {*}\n */\n $delegate.filesLoader = function filesLoader(config) {\n var params = arguments[1] === undefined ? {} : arguments[1];\n\n var cssFiles = [],\n templatesFiles = [],\n jsFiles = [],\n promises = [],\n cachePromise = null,\n filesCache = $delegate._getFilesCache();\n\n $delegate.toggleWatch(true); // start watching angular.module calls\n\n angular.extend(params, config);\n\n var pushFile = function pushFile(path) {\n var file_type = null,\n m;\n if (angular.isObject(path)) {\n file_type = path.type;\n path = path.path;\n }\n cachePromise = filesCache.get(path);\n if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n // always check for requirejs syntax just in case\n if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n // Detect file type using preceding type declaration (ala requireJS)\n file_type = m[1];\n path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n }\n\n if (!file_type) {\n if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n // Detect file type via file extension\n file_type = m[1];\n } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('load')) {\n // requirejs\n file_type = 'js';\n } else {\n $delegate._$log.error('File type could not be determined. ' + path);\n return;\n }\n }\n\n if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n cssFiles.push(path);\n } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n templatesFiles.push(path);\n } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n jsFiles.push(path);\n } else {\n $delegate._$log.error('File type is not valid. ' + path);\n }\n } else if (cachePromise) {\n promises.push(cachePromise);\n }\n };\n\n if (params.serie) {\n pushFile(params.files.shift());\n } else {\n angular.forEach(params.files, function (path) {\n pushFile(path);\n });\n }\n\n if (cssFiles.length > 0) {\n var cssDeferred = $q.defer();\n $delegate.cssLoader(cssFiles, function (err) {\n if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n cssDeferred.reject(err);\n } else {\n cssDeferred.resolve();\n }\n }, params);\n promises.push(cssDeferred.promise);\n }\n\n if (templatesFiles.length > 0) {\n var templatesDeferred = $q.defer();\n $delegate.templatesLoader(templatesFiles, function (err) {\n if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n templatesDeferred.reject(err);\n } else {\n templatesDeferred.resolve();\n }\n }, params);\n promises.push(templatesDeferred.promise);\n }\n\n if (jsFiles.length > 0) {\n var jsDeferred = $q.defer();\n $delegate.jsLoader(jsFiles, function (err) {\n if (angular.isDefined(err) && $delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader')) {\n $delegate._$log.error(err);\n jsDeferred.reject(err);\n } else {\n jsDeferred.resolve();\n }\n }, params);\n promises.push(jsDeferred.promise);\n }\n\n if (promises.length === 0) {\n var deferred = $q.defer(),\n err = 'Error: no file to load has been found, if you\\'re trying to load an existing module you should use the \\'inject\\' method instead of \\'load\\'.';\n $delegate._$log.error(err);\n deferred.reject(err);\n return deferred.promise;\n } else if (params.serie && params.files.length > 0) {\n return $q.all(promises).then(function () {\n return $delegate.filesLoader(config, params);\n });\n } else {\n return $q.all(promises)['finally'](function (res) {\n $delegate.toggleWatch(false); // stop watching angular.module calls\n return res;\n });\n }\n };\n\n /**\n * Load a module or a list of modules into Angular\n * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n * @param params Object optional parameters\n * @returns promise\n */\n $delegate.load = function (originalModule) {\n var originalParams = arguments[1] === undefined ? {} : arguments[1];\n\n var self = this,\n config = null,\n deferredList = [],\n deferred = $q.defer(),\n errText;\n\n // clean copy\n var module = angular.copy(originalModule);\n var params = angular.copy(originalParams);\n\n // If module is an array, break it down\n if (angular.isArray(module)) {\n // Resubmit each entry as a single module\n angular.forEach(module, function (m) {\n deferredList.push(self.load(m, params));\n });\n\n // Resolve the promise once everything has loaded\n $q.all(deferredList).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n }\n\n // Get or Set a configuration depending on what was passed in\n if (angular.isString(module)) {\n config = self.getModuleConfig(module);\n if (!config) {\n config = {\n files: [module]\n };\n }\n } else if (angular.isObject(module)) {\n // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n config = {\n files: [module]\n };\n } else {\n config = self.setModuleConfig(module);\n }\n }\n\n if (config === null) {\n var moduleName = self._getModuleName(module);\n errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n $delegate._$log.error(errText);\n deferred.reject(new Error(errText));\n return deferred.promise;\n } else {\n // deprecated\n if (angular.isDefined(config.template)) {\n if (angular.isUndefined(config.files)) {\n config.files = [];\n }\n if (angular.isString(config.template)) {\n config.files.push(config.template);\n } else if (angular.isArray(config.template)) {\n config.files.concat(config.template);\n }\n }\n }\n\n var localParams = angular.extend({}, params, config);\n\n // if someone used an external loader and called the load function with just the module name\n if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n return $delegate.inject(config.name, localParams);\n }\n\n $delegate.filesLoader(config, localParams).then(function () {\n $delegate.inject(null, localParams).then(function (res) {\n deferred.resolve(res);\n }, function (err) {\n deferred.reject(err);\n });\n }, function (err) {\n deferred.reject(err);\n });\n\n return deferred.promise;\n };\n\n // return the patched service\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * cssLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite cssLoader and it will probably not use promises :(\r\n */\n $delegate.cssLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('css', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.cssLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n /**\r\n * jsLoader function\r\n * @type Function\r\n * @param paths array list of js files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters\r\n * because the user can overwrite jsLoader and it will probably not use promises :(\r\n */\n $delegate.jsLoader = function (paths, callback, params) {\n var promises = [];\n angular.forEach(paths, function (path) {\n promises.push($delegate.buildElement('js', path, params));\n });\n $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.jsLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n(function (angular) {\n 'use strict';\n\n angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n /**\r\n * templatesLoader function\r\n * @type Function\r\n * @param paths array list of css files to load\r\n * @param callback to call when everything is loaded. We use a callback and not a promise\r\n * @param params object config parameters for $http\r\n * because the user can overwrite templatesLoader and it will probably not use promises :(\r\n */\n $delegate.templatesLoader = function (paths, callback, params) {\n var promises = [],\n filesCache = $delegate._getFilesCache();\n\n angular.forEach(paths, function (url) {\n var deferred = $q.defer();\n promises.push(deferred.promise);\n $http.get(url, params).success(function (data) {\n if (angular.isString(data) && data.length > 0) {\n angular.forEach(angular.element(data), function (node) {\n if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n $templateCache.put(node.id, node.innerHTML);\n }\n });\n }\n if (angular.isUndefined(filesCache.get(url))) {\n filesCache.put(url, true);\n }\n deferred.resolve();\n }).error(function (err) {\n deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n });\n });\n return $q.all(promises).then(function () {\n callback();\n }, function (err) {\n callback(err);\n });\n };\n $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n return $delegate;\n }]);\n }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n var k;\n\n // 1. Let O be the result of calling ToObject passing\n // the this value as the argument.\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get\n // internal method of O with the argument \"length\".\n // 3. Let len be ToUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If len is 0, return -1.\n if (len === 0) {\n return -1;\n }\n\n // 5. If argument fromIndex was passed let n be\n // ToInteger(fromIndex); else let n be 0.\n var n = +fromIndex || 0;\n\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n\n // 6. If n >= len, return -1.\n if (n >= len) {\n return -1;\n }\n\n // 7. If n >= 0, then Let k be n.\n // 8. Else, n<0, Let k be len - abs(n).\n // If k is less than 0, then let k be 0.\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n // 9. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator\n // b. Let kPresent be the result of calling the\n // HasProperty internal method of O with argument Pk.\n // This step can be combined with c\n // c. If kPresent is true, then\n // i. Let elementK be the result of calling the Get\n // internal method of O with the argument ToString(k).\n // ii. Let same be the result of applying the\n // Strict Equality Comparison Algorithm to\n // searchElement and elementK.\n // iii. If same is true, return k.\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n}\n//# sourceMappingURL=ocLazyLoad.js.map"],"sourceRoot":"/source/"}