dispatch.to("Foundry/2.1 Core Plugins").at(function(e,t){e.template=function(){var t={content:"",type:"ejs"},n=function(r,i){if(r===undefined)return n.templates;var s;return typeof i=="string"?(e.isPlainObject(i)?s=i:s=e.extend({},t,{name:r,content:i}),n.templates[r]=s,s):(s=n.templates[r]||{},s.content||"")};return e.extend(n,{templates:{},remove:function(e){delete n.templates[e],delete n.loaders[e]},loaders:{},createLoader:function(t){var r=n.loaders[t]=e.Deferred().done(function(e){n(t,e)});return r.name=t,r.reset=function(){return n.createLoader(t)},r},loader:function(e){return n.loaders[e]||n.createLoader(e)}}),n}()});