forked from olark/lightningjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lightningjs-bootstrap.min.js
1 lines (1 loc) · 1.61 KB
/
lightningjs-bootstrap.min.js
1
window.lightningjs||function(r,e){var o=r.lightningjs={modules:e.modules},i=e.modules;o.expensive=function(r){return r._waitforload=!0,r},o.require=e.require,o.provide=function(e,n){function t(){var e=r.console;if(e&&e.error)try{e.error.apply(e,arguments)}catch(r){}else if(r.opera)try{r.opera.postError.apply(r.opera,arguments)}catch(r){}}o.require(e);var f=i[e];if(f.provided)t("deferred module '"+e+"' is already defined");else{f.provided=!0;var a=(f._.s||[]).slice(),d={0:n},l=[],s={},u=!1;if(a&&a[0]){var h=a[0][1];d[h]=n}n._load=function(){u=!0;for(var r=l.shift();r;)c(r),r=l.shift()},f._.s={push:function(r){a.push(r),v()}},v()}function p(r){if(u)return!1;r[0];var e,o=r[1],i=o>0?d[o]:n,t=Array.prototype.slice.call(r[2]).shift(),f=!!s[o];return i?!!(e=i[t])&&!!e._waitforload:!!f}function c(r){var e,o,i,a=r[0],l=r[1],s=l>0?d[l]:n,u=Array.prototype.slice.call(r[2]),h=u.shift(),p=f._.fh[a]=f._.fh[a]||[],c=f._.eh[a]=f._.eh[a]||[];f._.ph[a]=f._.ph[a]||[];if(s){if(e=s[h])try{o=e.apply(e,u)}catch(r){i=r}else t((i=new Error("unknown deferred method '"+h+"'")).toString());if(o&&(d[a]=o),i){for(;c.length;){var v=c.shift();try{v(i)}catch(r){t(r)}}c.push=function(r){r(i)}}else{for(;p.length;){var y=p.shift();try{y(o)}catch(r){t(r)}}p.push=function(r){r(o)}}}else t("cannot call deferred method '"+h+"' on 'undefined'")}function v(){for(var r,e,o=a.shift();o;)p(o)?(e=void 0,e=(r=o)[0],s[e]=!0,l.push(r)):c(o),o=a.shift()}},i.lightningjs.provided||o.provide("lightningjs",{load:function(){var r,o=e.modules;for(var i in o)(r=o[i])._&&r("_load")}}),"undefined"!=typeof module&&module.exports&&(module.exports=o)}(window,window.parent.lightningjs);