{"version":3,"file":"templates.min.js","sources":["https:\/\/formacion.cordoba-acoge.com\/lib\/amd\/src\/templates.js"],"sourcesContent":["\/\/ This file is part of Moodle - http:\/\/moodle.org\/\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\n\/**\n * Template renderer for Moodle. Load and render Moodle templates with Mustache.\n *\n * @module core\/templates\n * @copyright 2015 Damyon Wiese \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n * @since 2.9\n *\/\ndefine([\n 'core\/mustache',\n 'jquery',\n 'core\/ajax',\n 'core\/str',\n 'core\/notification',\n 'core\/url',\n 'core\/config',\n 'core\/localstorage',\n 'core\/icon_system',\n 'core_filters\/events',\n 'core\/yui',\n 'core\/log',\n 'core\/truncate',\n 'core\/user_date',\n 'core\/pending',\n],\nfunction(\n mustache,\n $,\n ajax,\n str,\n notification,\n coreurl,\n config,\n storage,\n IconSystem,\n filterEvents,\n Y,\n Log,\n Truncate,\n UserDate,\n Pending\n) {\n\n \/\/ Module variables.\n \/** @var {Number} uniqInstances Count of times this constructor has been called. *\/\n var uniqInstances = 0;\n\n \/** @var {String[]} templateCache - Cache of already loaded template strings *\/\n var templateCache = {};\n\n \/** @var {Promise[]} templatePromises - Cache of already loaded template promises *\/\n var templatePromises = {};\n\n \/** @var {Promise[]} cachePartialPromises - Cache of already loaded template partial promises *\/\n var cachePartialPromises = {};\n\n \/** @var {Object} iconSystem - Object extending core\/iconsystem *\/\n var iconSystem = {};\n\n \/** @var {Object[]} loadTemplateBuffer - List of templates to be loaded *\/\n var loadTemplateBuffer = [];\n\n \/** @var {Bool} isLoadingTemplates - Whether templates are currently being loaded *\/\n var isLoadingTemplates = false;\n\n \/** @var {Array} disallowedNestedHelpers - List of helpers that can't be called within other helpers *\/\n var disallowedNestedHelpers = ['js'];\n\n \/**\n * Normalise the provided component such that '', 'moodle', and 'core' are treated consistently.\n *\n * @param {String} component\n * @returns {String}\n *\/\n var getNormalisedComponent = function(component) {\n if (component) {\n if (component !== 'moodle' && component !== 'core') {\n return component;\n }\n }\n\n return 'core';\n };\n\n \/**\n * Search the various caches for a template promise for the given search key.\n * The search key should be in the format \/\/