{"version":3,"sources":["webpack:///./node_modules/aurelia-loader/dist/native-modules/aurelia-loader.js"],"names":["_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","TemplateDependency","src","name","this","TemplateRegistryEntry","address","templateIsLoaded","factoryIsReady","resources","dependencies","onReady","_template","_factory","addDependency","finalSrc","get","moduleId","push","set","value","requires","current","content","querySelectorAll","Array","ii","getAttribute","Error","parentNode","removeChild","Loader","templateRegistry","map","id","source","normalizeSync","relativeTo","normalize","loadModule","loadAllModules","ids","loadTemplate","url","loadText","applyPluginToUrl","pluginName","addPlugin","implementation","getOrCreateTemplateRegistryEntry"],"mappings":"0FAAA,mHAAIA,EAAe,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,IAAIE,EAAaH,EAAMC,GAAIE,EAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,UAAWF,IAAYA,EAAWG,UAAW,GAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAAiB,OAAO,SAAUO,EAAaC,EAAYC,GAAiJ,OAA9HD,GAAYb,EAAiBY,EAAYG,UAAWF,GAAiBC,GAAad,EAAiBY,EAAaE,GAAqBF,GAA7gB,GAORI,EAAqB,SAA4BC,EAAKC,GAG/DC,KAAKF,IAAMA,EACXE,KAAKD,KAAOA,GAGHE,EAAwB,WACjC,SAASA,EAAsBC,GAG7BF,KAAKG,kBAAmB,EACxBH,KAAKI,gBAAiB,EACtBJ,KAAKK,UAAY,KACjBL,KAAKM,aAAe,KAEpBN,KAAKE,QAAUA,EACfF,KAAKO,QAAU,KACfP,KAAKQ,UAAY,KACjBR,KAAKS,SAAW,KAqDlB,OAlDAR,EAAsBL,UAAUc,cAAgB,SAAuBZ,EAAKC,GAC1E,IAAIY,EAA0B,iBAARb,EAAmB,yBAAeA,EAAKE,KAAKE,SAAW,SAA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AGlBG,EAAO/B,UAAU0C,aAAe,SAAsBC,GACpD,MAAM,IAAIf,MAAM,6CAGlBG,EAAO/B,UAAU4C,SAAW,SAAkBD,GAC5C,MAAM,IAAIf,MAAM,yCAGlBG,EAAO/B,UAAU6C,iBAAmB,SAA0BF,EAAKG,GACjE,MAAM,IAAIlB,MAAM,6DAGlBG,EAAO/B,UAAU+C,UAAY,SAAmBD,EAAYE,GAC1D,MAAM,IAAIpB,MAAM,iEAGlBG,EAAO/B,UAAUiD,iCAAmC,SAA0C3C,GAC5F,OAAOF,KAAK4B,iBAAiB1B,KAAaF,KAAK4B,iBAAiB1B,GAAW,IAAID,EAAsBC,KAGhGyB,EA/CW","file":"npm.aurelia-loader.d9cb695f65b6e618020c.js","sourcesContent":["var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\n\nimport { relativeToFile } from 'aurelia-path';\nimport { Origin } from 'aurelia-metadata';\n\nexport var TemplateDependency = function TemplateDependency(src, name) {\n \n\n this.src = src;\n this.name = name;\n};\n\nexport var TemplateRegistryEntry = function () {\n function TemplateRegistryEntry(address) {\n \n\n this.templateIsLoaded = false;\n this.factoryIsReady = false;\n this.resources = null;\n this.dependencies = null;\n\n this.address = address;\n this.onReady = null;\n this._template = null;\n this._factory = null;\n }\n\n TemplateRegistryEntry.prototype.addDependency = function addDependency(src, name) {\n var finalSrc = typeof src === 'string' ? relativeToFile(src, this.address) : Origin.get(src).moduleId;\n\n this.dependencies.push(new TemplateDependency(finalSrc, name));\n };\n\n _createClass(TemplateRegistryEntry, [{\n key: 'template',\n get: function get() {\n return this._template;\n },\n set: function set(value) {\n var address = this.address;\n var requires = void 0;\n var current = void 0;\n var src = void 0;\n var dependencies = void 0;\n\n this._template = value;\n this.templateIsLoaded = true;\n\n requires = value.content.querySelectorAll('require');\n dependencies = this.dependencies = new Array(requires.length);\n\n for (var i = 0, ii = requires.length; i < ii; ++i) {\n current = requires[i];\n src = current.getAttribute('from');\n\n if (!src) {\n throw new Error(' element in ' + address + ' has no \"from\" attribute.');\n }\n\n dependencies[i] = new TemplateDependency(relativeToFile(src, address), current.getAttribute('as'));\n\n if (current.parentNode) {\n current.parentNode.removeChild(current);\n }\n }\n }\n }, {\n key: 'factory',\n get: function get() {\n return this._factory;\n },\n set: function set(value) {\n this._factory = value;\n this.factoryIsReady = true;\n }\n }]);\n\n return TemplateRegistryEntry;\n}();\n\nexport var Loader = function () {\n function Loader() {\n \n\n this.templateRegistry = {};\n }\n\n Loader.prototype.map = function map(id, source) {\n throw new Error('Loaders must implement map(id, source).');\n };\n\n Loader.prototype.normalizeSync = function normalizeSync(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalizeSync(moduleId, relativeTo).');\n };\n\n Loader.prototype.normalize = function normalize(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalize(moduleId: string, relativeTo: string): Promise.');\n };\n\n Loader.prototype.loadModule = function loadModule(id) {\n throw new Error('Loaders must implement loadModule(id).');\n };\n\n Loader.prototype.loadAllModules = function loadAllModules(ids) {\n throw new Error('Loader must implement loadAllModules(ids).');\n };\n\n Loader.prototype.loadTemplate = function loadTemplate(url) {\n throw new Error('Loader must implement loadTemplate(url).');\n };\n\n Loader.prototype.loadText = function loadText(url) {\n throw new Error('Loader must implement loadText(url).');\n };\n\n Loader.prototype.applyPluginToUrl = function applyPluginToUrl(url, pluginName) {\n throw new Error('Loader must implement applyPluginToUrl(url, pluginName).');\n };\n\n Loader.prototype.addPlugin = function addPlugin(pluginName, implementation) {\n throw new Error('Loader must implement addPlugin(pluginName, implementation).');\n };\n\n Loader.prototype.getOrCreateTemplateRegistryEntry = function getOrCreateTemplateRegistryEntry(address) {\n return this.templateRegistry[address] || (this.templateRegistry[address] = new TemplateRegistryEntry(address));\n };\n\n return Loader;\n}();"],"sourceRoot":""}