PHP Classes

File: src/js/Importer.min.js

Recommend this page to a friend!
  Classes of Nikos M.  >  Importer  >  src/js/Importer.min.js  >  Download  
File: src/js/Importer.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Importer
Load classes, images, CSS and JavaScript
Author: By
Last change: v.1.1.5

* fix js load(class) when fewer arguments are provided
* in browser script assets ensure execution order
* various edits
Date: 1 year ago
Size: 20,099 bytes
 

Contents

Class file image Download
/**
*  Importer
*  a simple loader manager for classes and assets with dependencies for PHP, Python, Javascript
*
*  @version 1.1.5
*  https://github.com/foo123/Importer
**/
!function(t,e,l){"use strict";"undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import?(t.$deps=t.$deps||{})&&(t.EXPORTED_SYMBOLS=[e])&&(t[e]=t.$deps[e]=l.call(t)):"object"==typeof module&&module.exports?(module.$deps=module.$deps||{})&&(module.exports=module.$deps[e]=l.call(t)):"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified(e)?define(e,["module"],function(e){return l.moduleUri=e.uri,l.call(t)}):e in t||(t[e]=l.call(t)||1)&&"function"==typeof define&&define.amd&&define(function(){return t[e]})}("undefined"!=typeof self?self:this,"Importer",function(){"use strict";var e="prototype",k=Object[e].hasOwnProperty,T="setAttribute",I="toLowerCase",l=Object[e].toString,c=Array[e].map,i=Object.keys,n=String[e].startsWith?function(e,t,l){return e.startsWith(t,l||0)}:function(e,t,l){return l=l||0,t===e.substr(l,t.length+l)},m="undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import,g=!m&&"undefined"!=typeof global&&"[object global]"===l.call(global),y=!m&&!g&&"undefined"!=typeof WorkerGlobalScope&&"function"==typeof importScripts&&navigator instanceof WorkerNavigator,A=!m&&!g&&!y&&"undefined"!=typeof navigator,s=m?Components.utils:null,p=m?Components.classes:null,u=m?Components.interfaces:null;m&&(s.import("resource://gre/modules/NetUtil.jsm"),s.import("resource://gre/modules/osfile.jsm"));function r(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}function d(e){return p["@mozilla.org/network/io-service;1"].getService(u.nsIIOService).newURI(e,null,null).QueryInterface(u.nsIFileURL).file}var t,b=m?this:g?global:y?this:window,a=g?require("fs"):null,v=m?function(e,t,l){return s.import(t,l),l[e]}:g?function(e,t){return require(t)}:y?function(e,t,l){return importScripts(t),l[e]}:function(){},h=/\/|\\/g,f="://",_="#PROTOCOL#",N=/[\-.\/\\:]+/g,x=m?((t=p["@mozilla.org/file/directory_service;1"].getService(u.nsIProperties).get("ProfD",u.nsIFile)).append("abc"),t.append("abc"),t.path.substr(t.path.length-"abc".length-1,1)):g?require("path").sep:"/",C=m?function(e,t,l){var n=d(e),s=p["@mozilla.org/network/file-input-stream;1"].createInstance(u.nsIFileInputStream);if("binary"===t){var r=p["@mozilla.org/binaryinputstream;1"].createInstance(u.nsIBinaryInputStream);s.init(n,-1,-1,!1),e=s.available(),r.setInputStream(s),r.readByteArray(e,c=new Uint8Array(e)),r.close()}else{var i,a=p["@mozilla.org/intl/converter-input-stream;1"].createInstance(u.nsIConverterInputStream),o={value:""},c=null;for(s.init(n,-1,0,0),a.init(s,t,0,0);i=a.readString(4294967295,o),null===c&&(c=""),c+=o.value,0!=i;);a.close(),null===c&&(c=null!=l?l:"")}return c}:g?function(e,t,l){e=a.readFileSync(e,"binary"===t?{}:{encoding:t});return e||("binary"===t?null!=l?l:null:null!=l?l:"")}:function(e,t,l){var n=r();return n.open("GET",e,!1),"binary"===t?y&&(n.responseType="arraybuffer"):(y&&(n.responseType="text"),n.setRequestHeader("Content-Type","text/plain; charset="+t),n.overrideMimeType("text/plain; charset="+t)),n.send(null),200===n.status?"binary"===t?n.response:n.responseText:"binary"===t?null!=l?l:null:null!=l?l:""},S=m?function(e,s,r,i){return NetUtil.asyncFetch(d(e),function(e,t){var l,n=null;Components.isSuccessCode(t)?"binary"===s?(l=p["@mozilla.org/binaryinputstream;1"].createInstance(u.nsIBinaryInputStream),t=e.available(),l.setInputStream(e),l.readByteArray(t,n=new Uint8Array(t)),l.close()):n=NetUtil.readInputStreamToString(e,e.available(),{charset:s}):n="binary"===s?null!=i?i:null:null!=i?i:"",r&&r(n)}),""}:g?function(e,t,l,n){return"binary"===t?a.readFile(e,function(e,t){l&&l(e?null!=n?n:null:t)}):a.readFile(e,{encoding:t},function(e,t){l&&l(e?null!=n?n:"":t)}),""}:function(e,t,l,n){var s=r();return s.open("GET",e,!0),"binary"===t?(s.responseType="arraybuffer",s.onload=function(){l&&l(200===s.status?s.response:null!=n?n:null)}):(s.responseType="text",s.setRequestHeader("Content-Type","text/plain; charset="+t),s.overrideMimeType("text/plain; charset="+t),s.onload=function(){l&&l(200===s.status?s.responseText:null!=n?n:"")}),s.send(null),""};function j(e){return"function"==typeof e}function w(e){return e instanceof String||"[object String]"===l.call(e)}function q(e){return e instanceof Array||"[object Array]"===l.call(e)}function O(e){if(!e)return 1;var t=l.call(e);return(e instanceof Array||e instanceof String||"[object Array]"===t||"[object String]"===t)&&!e.length}function R(e){return q(e)?e:[e]}function B(e,t){for(var l=i(t),n=0,s=l.length;n<s;n++)e[l[n]]=t[l[n]];return e}function E(e,t){if(!e)return t||"";var l=i(e);if(t){for(s=0,r=l.length;s<r;s++)t[T](l[s],!0===e[l[s]]?l[s]:e[l[s]]);return t}for(var n=[],s=0,r=l.length;s<r;s++)n.push(l[s]+(!0===e[l[s]]?"":'="'+e[l[s]]+'"'));return n.join(" ")}function L(e){return document.getElementById(e)}function U(e){return document.createElement(e)}function F(e,t){e=document.getElementsByTagName(e);return 1<arguments.length?t<0?e[e.length+t]:e[t]:e}function P(e,t,l,n){var s,r,i,a=null,o=null;if("html"===e){for((i=U("div")).innerHTML=t;i.firstChild;)"SCRIPT"!==a.firstChild.nodeName&&"STYLE"!==a.firstChild.nodeName&&"LINK"!==a.firstChild.nodeName||(a=i.firstChild),document.head.appendChild(i.firstChild);return a}switch(e){case"tpl-link":case"tpl":a=U("script"),n?E(n,a):a[T]("type","text/x-template"),a.appendChild(document.createTextNode(t)),document.head.appendChild(a);break;case"script-link":if(l)for(s=(r=F("script")).length-1;0<=s;s--)if(r[s].src&&t===r[s].src){o=r[s];break}o?a=o:(a=U("script"),n?E(n,a):a[T]("type","text/javascript"),a[T]("src",t),document.head.appendChild(a));break;case"script":a=U("script"),n?E(n,a):a[T]("type","text/javascript"),a.appendChild(document.createTextNode(t)),document.head.appendChild(a);break;case"style-link":if(l)for(s=(r=F("link")).length-1;0<=s;s--)if(t===r[s].href){o=r[s];break}o?a=o:((a=U("link"))[T]("rel","stylesheet"),n?E(n,a):(a[T]("type","text/css"),a[T]("media","all")),a[T]("href",t),document.head.appendChild(a));break;case"style":default:a=U("style"),n?E(n,a):(a[T]("type","text/css"),a[T]("media","all")),a.appendChild(document.createTextNode("")),document.head.appendChild(a),t&&function(e,t){var l,n,s,r,i,a=typeof t;if("object"==a)for(l in n=0,t)k.call(t,l)&&(r=(s=t[l]).selector,i=[].concat(s.rules).join("; "),"insertRule"in e.sheet?(e.sheet.insertRule(r+"{"+i+"}",n),s.css=e.sheet.cssRules[n]):"addRule"in e.sheet&&(e.sheet.addRule(r,i,n),s.css=e.sheet.rules[n]),n++);else"string"==a&&(e.styleSheet?e.styleSheet.cssText=(e.styleSheet.cssText||"")+t:e.appendChild(document.createTextNode(t)))}(a,t)}return a}function M(e){return e.split(f).join(_)}function o(){var e,t,l,n,s,r,i,a=arguments,o=x;if(!a.length)return".";if(!(t=(e=c.call(a,M).join(o)).length))return".";for(a=e.charAt(0),t=e.charAt(t-1),n=[],s=0,r=(l=e.split(h).filter(Boolean)).length-1;0<=r;)".."===(i=l[r])?s++:"."!==i&&(s?s--:n.push(l[r])),r--;return(e=n.reverse().join(o))||a||(e="."),e&&t===o&&(e+=o),(a===o?o:"")+e.split(_).join(f)}function D(){var e,t=x;return x="/",e=o.apply(null,arguments),x=t,e}return(t=function e(t,l){var n=this;if(!(n instanceof e))return new e(t,l);n.base="",n.base_url="",n.base_path(t,l),n._classmap={__global__:{}},n._classes={__global__:{}},n._assets={__global__:{}},n._hooks={__global__:{}},n._cache={}}).VERSION="1.1.5",t.BASE="./",t.path_join=function(){var e,t=arguments,l=".";return t.length?l=m?OS.Path.join.apply(OS.Path,t):g?(e=require("path")).join.apply(e,t):o.apply(null,t):l},t.join_path=o,t.join_path_url=D,t.attributes=E,t[e]={constructor:t,base:null,base_url:null,_classmap:null,_classes:null,_assets:null,_hooks:null,_cache:null,dispose:function(){var e=this;return e._classmap=null,e._classes=null,e._assets=null,e._hooks=null,e._cache=null,e.base=null,e.base_url=null,e},on:function(e,t,l,n){var s=this;return null==l&&(l="__global__"),l&&!O(e)&&j(t)&&(k.call(s._hooks,l)||(s._hooks[l]={}),k.call(s._hooks[l],e)||(s._hooks[l][e]=[]),s._hooks[l][e].push([t,!0===n,0])),s},one:function(e,t,l){return this.on(e,t,l,!0)},off:function(e,t,l){var n,s,r=this;if(null==l&&(l="__global__"),l&&k.call(r._hooks,l)&&!O(e)&&!O(r._hooks[l][e]))if(!0===t)delete r._hooks[l][e];else if(t)for(s=(n=r._hooks[l][e]).length-1;0<=s;s--)t===n[s][0]&&n.splice(s,1);return r},trigger:function(e,t,l){var n,s,r;if(null==l&&(l="__global__"),l&&k.call(this._hooks,l)&&!O(e)&&!O(this._hooks[l][e])){for(n=this._hooks[l][e],t=t||[],s=0;s<n.length&&((r=n[s])[1]&&r[2]||!(r[2]=1)!==r[0].apply(null,t));s++);for(s=n.length-1;0<=s;s--)n[s][1]&&n[s][2]&&n.splice(s,1)}return this},base_path:function(e,t){var l=this;return w(e)&&e.length?l.base=e:!1===e&&(l.base=""),w(t)&&t.length?l.base_url=t:!1===t&&(l.base_url=""),l},get_path:function(e,t,l){return O(e)?t||"":!O(t)&&(n(e,"./")||n(e,"../")||n(e,".\\")||n(e,"..\\"))?(!0===l?D:o)(t,e):e},path:function(e){return this.get_path(e||"",g?this.base:this.base_url)},path_url:function(e){return this.get_path(e||"",this.base_url,!0)},register:function(e,t,l){var n,s,r,i,a,o,c,p,u,d,h=this,f=h._classes,_=h._classmap,m=h._assets;if(null==l&&(l="__global__"),e=String(e).toLowerCase(),l&&q(t)&&t.length)if(q(t[0])||(t=[t]),"classes"===e)for(n=0,s=t.length;n<s;n++)r=(i=t[n])[0],a=i[1],o=i[2],c=i[3]?i[3]:[],O(r)||O(a)||O(o)||(k.call(f,l)||(f[l]={}),k.call(_,l)||(_[l]={}),o=h.path(o),f[l][a]=[r,a,o,R(c),!1],_[l][r]=[o,a]);else if("assets"===e)for(n=0,s=t.length;n<s;n++)u=(i=t[n])[0],a=i[1],d=i[2],c=i[3]?i[3]:[],p=i[4]?i[4]:{},O(u)||O(a)||O(d)||("scripts-composite"===(u=u[I]())||"styles-composite"===u||"scripts-alt"===u||"styles-alt"===u?d=R(d):w(d)&&(d=h.path_url(d)),k.call(m,l)||(m[l]={}),m[l][a]=[u,a,d,R(c),p,!1,!1]);return h},import_class:function(e,n,s){var t,l,r,i,a,o,c,p,u,d=this,h=d._classes,f="class-"+e,_=d._cache;if(null==s&&(s="__global__"),k.call(_,s+"--"+f))j(n)&&n.call(d,_[s+"--"+f]);else{for(l=!1,c=[],t=[e];t.length;)if(e=t[0],p=k.call(h,s)&&k.call(h[s],e)?s:"__global__",k.call(h[p],e)&&!h[p][e][4])if(l=!0,k.call(b,h[p][e][0]))t.shift(),h[p][e][4]=!0,c.push({id:e,type:"class",cache_id:"class-"+e,name:h[p][e][0],path:h[p][e][2],ctx:s,loaded:b[h[p][e][0]]});else{if(O(o=h[p][e][3]))t.shift();else{for(r=!1,i=o.length-1;0<=i;i--)a=o[i],u=k.call(h,s)&&k.call(h[s],a)?s:"__global__",k.call(h[u],a)&&!h[u][a][4]&&(r=!0,t.unshift(a));if(r)continue;t.shift()}h[p][e][4]=!0,c.push({id:e,type:"class",cache_id:"class-"+e,name:h[p][e][0],path:h[p][e][2],ctx:s})}else k.call(h[p],e)&&(l=!0),t.shift();l&&c.length?function(l,n,a,s,r){var i,o,e,c,p,t,u=s.length,d=new Array(u);if(m||g||y){for(i=0;i<u;i++)k.call(s[i],"loaded")?(d[i]=s[i].loaded,l.trigger("import-class",[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx).trigger("import-class-"+s[i].id,[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx)):k.call(a,s[i].ctx+"--"+s[i].cache_id)?d[i]=a[s[i].ctx+"--"+s[i].cache_id]:"class"!==s[i].type?d[i]=a[s[i].ctx+"--"+s[i].cache_id]=C(s[i].path,m?"UTF-8":"utf8"):s[i].name in n?d[i]=n[s[i].name]:(d[i]=v(s[i].name,s[i].path,n)||null,l.trigger("import-class",[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx).trigger("import-class-"+s[i].id,[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx));return r.apply(n,d)}for(c=F("head",0),i=o=0,p=function(t,l,n,e,s){var r,i;"style"===n||"script"===n?(i=L(t))&&n===i.tagName[I]()?s():S(e,"utf8",function(e){a[l+"--"+t]=e,P(n,e)[T]("id",t),s()}):"class"!==n?"template"===n&&(i=L(t))&&"script"===i.tagName[I]()?s():S(e,"utf8",function(e){a[l+"--"+t]=e,"template"!==n||L(t)||P("tpl",e)[T]("id",t),s()}):(i=L(t))&&"script"===i.tagName[I]()?s():(r=0,(i=U("script"))[T]("id",t),i[T]("type","text/javascript"),i.onload=i.onreadystatechange=function(){r||i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(r=1,i.onload=i.onreadystatechange=null,s())},i[T]("src",e),c.appendChild(i))},t=function e(){var t;k.call(s[i],"loaded")||(t=k.call(a,s[i].ctx+"--"+s[i].cache_id))||s[i].name in n?(d[i]=(k.call(s[i],"loaded")?s[i].loaded:t?a[s[i].ctx+"--"+s[i].cache_id]:n[s[i].name])||null,l.trigger("import-class",[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx).trigger("import-class-"+s[i].id,[l,s[i].id,s[i].name,s[i].path,d[i]],s[i].ctx),++i>=u?r.apply(n,d):k.call(s[i],"loaded")||(t=k.call(a,s[i].ctx+"--"+s[i].cache_id))||s[i].name in n?(d[i]=(k.call(s[i],"loaded")?s[i].loaded:t?a[s[i].ctx+"--"+s[i].cache_id]:n[s[i].name])||null,e()):(n[s[i].name]=null,p(s[i].cache_id,s[i].ctx,s[i].type,s[i].path,e))):++o<4?setTimeout(e,20):(o=0,n[s[i].name]=null,l.trigger("import-class",[l,s[i].id,s[i].name,s[i].path,null],s[i].ctx).trigger("import-class-"+s[i].id,[l,s[i].id,s[i].name,s[i].path,null],s[i].ctx),i++,e())};i<u&&(k.call(s[i],"loaded")||(e=k.call(a,s[i].ctx+"--"+s[i].cache_id))||s[i].name in n);)d[i]=(k.call(s[i],"loaded")?s[i].loaded:e?a[s[i].ctx+"--"+s[i].cache_id]:n[s[i].name])||null,i++;i<u?p(s[i].cache_id,s[i].ctx,s[i].type,s[i].path,t):r.apply(n,d)}(d,b,_,c,function(){for(var e=arguments,t=0,l=e.length;t<l;t++)_[s+"--"+c[t].cache_id]=e[t];j(n)&&n.call(d,_[s+"--"+f])}):j(n)&&n.call(d,null)}return d},import_asset:function(e,u){var t,l,n,s,r,i,a,o,c,p,d,h,f,_,m,g,y,b,v=this,x=[e],C=v._assets,S=[],j=[];for(null==u&&(u="__global__");x.length;)if(e=x[0],y=k.call(C,u)&&k.call(C[u],e)?u:"__global__",k.call(C[y],e)&&C[y][e][5]&&!C[y][e][6]){if(h=(d=C[y][e])[0],e=d[1],a=d[2],t=d[3],l=d[4],t&&t.length){for(s=!1,r=t.length-1;0<=r;r--)i=t[r],b=k.call(C,u)&&k.call(C[u],i)?u:"__global__",k.call(C[b],i)&&!C[b][i][6]&&(s=C[b][i][5]=!0,x.unshift(i));if(s)continue;x.shift()}if(d[6]=!0,g={},v.trigger("import-asset",[v,e,h,a,g],u).trigger("import-asset-"+e,[v,e,h,a,g],u),null!=g.return)S.push(g.return);else if(c="styles"===h||"styles-composite"===h,p="scripts"===h||"scripts-composite"===h,y="templates"===h,d="scripts-alt"===h||"styles-alt"===h,h=!(g="scripts-composite"===h||"styles-composite"===h)&&!d&&q(a),o=e.replace(N,"_"),c)if(n=B({type:"text/css",media:"all"},l),A)if(h)S.push(m=L("importer-inline-style-"+o)||P("style",a[0],!1,n)),m[T]("id","importer-inline-style-"+o);else if(g)for(f=0,_=a.length;f<_;f++)q(a[f])?(S.push(m=L("importer-inline-style-"+o+"-part-"+f)||P("style",a[f][0],!1,n)),m[T]("id","importer-inline-style-"+o+"-part-"+f)):(S.push(m=L("importer-style-"+o+"-part-"+f)||P("style-link",v.path_url(a[f]),!0,n)),m[T]("id","importer-style-"+o+"-part-"+f));else d?S.push(m=L("importer-style-"+o)||P("html",a[0])):S.push(m=L("importer-style-"+o)||P("style-link",v.path_url(a),!0,n)),m[T]("id","importer-style-"+o);else if(n=E(n),h)S.push('<style id="importer-inline-style-'+o+'" '+n+">"+a[0]+"</style>");else if(g)for(f=0,_=a.length;f<_;f++)q(a[f])?S.push('<style id="importer-inline-style-'+o+"-part-"+f+'" '+n+">"+a[f][0]+"</style>"):S.push('<link id="importer-style-'+o+"-part-"+f+'" href="'+v.path_url(a[f])+'" rel="stylesheet" '+n+" />");else d?S.push(a[0]):S.push('<link id="importer-style-'+o+'" href="'+v.path_url(a)+'" rel="stylesheet" '+n+" />");else if(p)if(n=B({type:"text/javascript"},l),A)!h&&!g&&d?(S.push(m=L("importer-script-"+o)||P("html",a[0])),m[T]("id","importer-script-"+o)):j.push(e);else if(n=E(n),h)S.push('<script id="importer-inline-script-'+o+'" '+n+">/*<![CDATA[*/ "+a[0]+" /*]]>*/<\/script>");else if(g)for(f=0,_=a.length;f<_;f++)q(a[f])?S.push('<script id="importer-inline-script-'+o+"-part-"+f+'" '+n+">/*<![CDATA[*/ "+a[f][0]+" /*]]>*/<\/script>"):S.push('<script id="importer-script-'+o+"-part-"+f+'" src="'+v.path_url(a[f])+'" '+n+"><\/script>");else d?S.push(a[0]):S.push('<script id="importer-script-'+o+'" src="'+v.path_url(a)+'" '+n+"><\/script>");else y?(n=B({type:"text/x-template"},l),A?(S.push(m=h?L("importer-inline-tpl-"+o)||P("tpl",a[0],!1,n):L("importer-inline-tpl-"+o)||P("tpl",v.get(a),!1,n)),m[T]("id","importer-inline-tpl-"+o)):(n=E(n),S.push(h?'<script id="importer-inline-tpl-'+o+'" '+n+">"+a[0]+"<\/script>":'<script id="importer-inline-tpl-'+o+'" '+n+">"+v.get(a)+"<\/script>"))):S.push(h?a[0]:v.get(a))}else x.shift();return A&&j.length&&function o(c,t,l,p){var n,s,r,e,u=F("head",0);p=p||"",n=function(t,l){if(!t)return l();var e,n,s,r,i,a;"scripts-composite"===t.type?(t.asset=R(t.asset),r=0,a=function e(){++r>=i?l():o(c,{id:t.id,type:"scripts",asset:t.asset[r],atts:t.atts,ctx:t.ctx},e,"-part-"+r)},(i=t.asset.length)?o(c,{id:t.id,type:"scripts",asset:t.asset[r],atts:t.atts,ctx:t.ctx},a,"-part-"+r):l()):"scripts"===t.type&&(q(t.asset)?(s="importer-inline-script-"+t.id.replace(N,"_")+p,(n=L(s))&&"script"===n.tagName[I]()||(E(t.atts,n=U("script")),n[T]("type","text/javascript"),n[T]("id",s),n.appendChild(document.createTextNode("/*<![CDATA[*/ "+t.asset[0]+" /*]]>*/")),u.appendChild(n),c.trigger("import-asset",[c,t.id,t.type,t.asset,{}],t.ctx).trigger("import-asset-"+t.id,[c,t.id,t.type,t.asset,{}],t.ctx)),l()):(s="importer-script-"+t.id.replace(N,"_")+p,(n=L(s))&&"script"===n.tagName[I]()?l():(e=0,E(t.atts,n=U("script")),n[T]("type","text/javascript"),n[T]("id",s),n.onload=n.onreadystatechange=function(){e||n.readyState&&"loaded"!=n.readyState&&"complete"!=n.readyState||(e=1,n.onload=n.onreadystatechange=null,c.trigger("import-asset",[c,t.id,t.type,t.asset,{}],t.ctx).trigger("import-asset-"+t.id,[c,t.id,t.type,t.asset,{}],t.ctx),l())},n[T]("src",c.path_url(t.asset)),u.appendChild(n))))},t&&t.deps&&t.deps.length?(s=t.deps.length,r=0,e=function e(){++r>=s?n(t,l):o(c,t.deps[r],e)},o(c,t.deps[0],e)):n(t,l)}(v,function e(t){var l=[],n=k.call(C,u)&&k.call(C[u],t)?u:"__global__";if(k.call(C[n],t)&&C[n][t][5]&&-1<j.indexOf(t)){var s,r,i,a=C[n][t],o=a[0],t=a[1],c=a[2],p=a[3],n=a[4];if(p&&p.length)for(r=p.length-1;0<=r;r--)s=p[r],i=k.call(C,u)&&k.call(C[u],s)?u:"__global__",k.call(C[i],s)&&-1<j.indexOf(s)&&(C[i][s][5]=!0,l.push(e(s)));return a[6]=!0,{id:t,type:o,asset:c,deps:l,atts:n,ctx:u}}return null}(j[j.length-1]),function(){}),S},assets:function(e,t){var l,n,s,r,i,a,o,c=this._assets,p=[];if(arguments.length||(e="scripts",t="__global__"),null==t&&(t="__global__"),!t||!k.call(c,t))return"";for(n in a=(e=e[I]())+"-composite",o=e+"-alt",c[t])k.call(c[t],n)&&(e!==(s=c[t][n])[0]&&a!==s[0]&&o!==s[0]||!s[5]||s[6]||p.push(s[1]));if(A){for(r=0,i=p.length;r<i;r++)this.import_asset(p[r],t);l=""}else{for(l=[],r=0,i=p.length;r<i;r++)l=l.concat(this.import_asset(p[r],t));l=l.join("\n")}return l},enqueue:function(e,t,l,n){var s=this,r=s._assets,i=null,a=null,o=null;return q(l)?(i=l[0]||null,a=l[1]||null,o=l[2]||null):n=l,null==n&&(n="__global__"),!n||O(e)||O(t)||(l=k.call(r,n)&&k.call(r[n],t)?n:"__global__",k.call(r,l)&&k.call(r[l],t)?(r[l][t][5]=!0,s.trigger("enqueue-asset",[s,t,e,r[l][t][2]],n).trigger("enqueue-asset-"+t,[s,t,e,r[l][t][2]],n)):O(i)||(s.register("assets",[e,t,i,a,o],n),r[n][t][5]=!0,s.trigger("enqueue-asset",[s,t,e,r[n][t][2]],n).trigger("enqueue-asset-"+t,[s,t,e,r[n][t][2]],n))),s},get:function(e,t,l){var n,s,r;return t=t||{},r=k.call(t,"default")?t.default:"",n=t.encoding||(m?"UTF-8":"utf8"),O(t.binary)||(n="binary"),l=l||t.complete||j(t)&&t,A?(s=this.path(e),S(s,n,function(e){j(l)&&l(e)},r)):(s=this.path(e),j(l)?S(s,n,l,r):C(s,n,r))},load:function(l,e,n,s){var r,i,a,o=this,t=null,c=null;return q(l)?(j(e)?(s=n,n=e):s=e,null==s&&(s="__global__"),r=l.length,i=new Array(r),a=0,function e(t){arguments.length&&(i[a]=t||null,a++),a<r?o.import_class(l[a],e,s):j(n)&&n.apply(o,i)}()):(j(e)?(s=n,n=e,e=null):q(e)?(t=e[0]||null,c=e[1]||null):2===arguments.length&&(s=e),null==s&&(s="__global__"),k.call(o._classes,s)&&k.call(o._classes[s],l)||k.call(o._classes.__global__,l)||O(t)||o.register("classes",[l,l,o.path(t),c],s),c=k.call(o._classes,s)&&k.call(o._classes[s],l)?s:"__global__",k.call(o._classes[c],l)&&!o._classes[c][l][4]?o.import_class(l,n,c):j(n)&&n.call(o,o._cache[c+"--class-"+l]||null)),o}},t.BASE=m?"./":g?__dirname:(y?this.location.href:F("script",-1).src||"./").split("/").slice(0,-1).join("/"),t});
For more information send a message to info at phpclasses dot org.