{"version":3,"sources":["jsdelivr-header.js","/npm/angular-initializer@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCAO,SAAS,cAAc,GAC7B,MAAM,EAAmB,CAAC,EAAK,KAC9B,MAAM,EAAa,EAAG,aAAe,GACrC,OAAI,EAAG,MACC,EAAI,OAAO,EAAY,EAAG,MAAM,OAAO,EAAkB,KAE1D,EAAI,OAAO,EAAU,EAG7B,MAAO,IAAI,IAAI,IAAI,EAAU,OAAO,EAAkB,KACvD,QAQO,SAAS,kBAAkB,EAAU,GAI3C,GAFA,EAAS,qBAAuB,EAAS,sBAAwB,CAAC,EAE9D,EAAS,WACZ,MAAM,IAAI,MAAM,mDAGb,EAAS,OACZ,EAAS,MAAM,SAAQ,GAAM,kBAAkB,EAAU,KAI1D,CAAC,YAAa,aAAc,WAAY,YAAa,UAAW,SAAU,WAAY,UAAW,SAAS,SAAQ,IACjH,MAAM,EAAa,EAAS,IAAM,GAClC,GAAI,EAAS,KAAe,EAC3B,MAAM,IAAI,MAAM,kCAAkC,sBAA8B,EAAS,GAAW,UAErG,GAAI,EAAY,CAEf,IAAI,EACJ,IAAI,EAAW,MAAQ,EAAW,OAAS,IAAM,EAGhD,MAAM,IAAI,MAAM,sBAAsB,kDAFtC,EAAO,EAAW,KAKnB,EAAS,qBAAqB,GAAa,EAAS,qBAAqB,IAAc,GAElF,EAAS,qBAAqB,GAAW,SAAS,KACtD,EAAS,GAAW,EAAM,GAC1B,EAAS,qBAAqB,GAAW,KAAK,GAEhD,KAGG,EAAS,SACZ,EAAS,OAAO,EAAS,SAGtB,EAAS,MACZ,EAAS,IAAI,EAAS,KAExB","file":"/npm/angular-initializer@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/angular-initializer@1.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\n * Extract out a set of ngModuleDeps from an array of esModules\n * for creating an angular app module within an entry file.\n * @param {array} esModules array of objects\n * @return a flattened, unique array of angular module dependencies\n */\nexport function getModuleDeps(esModules) {\n\tconst reduceModuleDeps = (acc, el) => {\n\t\tconst moduleDeps = el.$moduleDeps || []\n\t\tif (el.$deps) {\n\t\t\treturn acc.concat(moduleDeps, el.$deps.reduce(reduceModuleDeps, []))\n\t\t}\n\t\treturn acc.concat(moduleDeps)\n\t}\n\n\treturn [...new Set(esModules.reduce(reduceModuleDeps, []))]\n}\n\n/*\n * Pass it an object with exported angular assets such as a directive\n * or component and it will initialize it for the given module name.\n * @param {string} ngModul angular app module instance\n * @param {object} esModule with named exports\n */\nexport function initializeExports(ngModule, esModule) {\n\t// Keep track of what's already been initialized to avoid dupes\n\tngModule.initializedProviders = ngModule.initializedProviders || {}\n\n\tif (esModule.moduleDeps) {\n\t\tthrow new Error('You forgot $ prefix when exporting $moduleDeps.')\n\t}\n\t// Recurse into the dependencies\n\tif (esModule.$deps) {\n\t\tesModule.$deps.forEach(el => initializeExports(ngModule, el))\n\t}\n\t// Prefix with $ to avoid conflicts with non-angular named\n\t// exports and to make it clear these are angular exports\n\t['component', 'controller', 'constant', 'directive', 'factory', 'filter', 'provider', 'service', 'value'].forEach(exportKey => {\n\t\tconst exportData = esModule['$' + exportKey]\n\t\tif (esModule[exportKey] && !exportData) {\n\t\t\tthrow new Error(`Forgot the $ in named export \"$${exportKey}\" for asset name \"${esModule[exportKey].name}\".`)\n\t\t}\n\t\tif (exportData) {\n\t\t\t// Figure out the provider name\n\t\t\tlet name\n\t\t\tif (exportData.name && exportData.name !== '$' + exportKey) {\n\t\t\t\tname = exportData.name\n\t\t\t} else {\n\t\t\t\tthrow new Error(`Directly importing ${exportKey} but it has no name from which to initialize.`)\n\t\t\t}\n\n\t\t\tngModule.initializedProviders[exportKey] = ngModule.initializedProviders[exportKey] || []\n\t\t\t// Initialize the provider, ignoring dupes\n\t\t\tif (!ngModule.initializedProviders[exportKey].includes(name)) {\n\t\t\t\tngModule[exportKey](name, exportData)\n\t\t\t\tngModule.initializedProviders[exportKey].push(name)\n\t\t\t}\n\t\t}\n\t})\n\n\tif (esModule.$config) {\n\t\tngModule.config(esModule.$config)\n\t}\n\n\tif (esModule.$run) {\n\t\tngModule.run(esModule.$run)\n\t}\n}\n"]}