-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsparkplug.min.js
3 lines (3 loc) · 1.02 KB
/
sparkplug.min.js
1
2
3
var g=this;function h(a){return a&&null!=a.length&&"string"!=typeof a&&"function"!=typeof a}function j(a,d){for(var b=0;b<a.length;b++)d(a[b],b)}function k(a,d){if(/^\.\.?\//.test(a)){var b=d.split("/");b.pop();j(a.split("/"),function(a){".."==a?b.pop():""!=a&&"."!=a&&b.push(a)});return b.join("/")}return a}
function l(a,d,b){var f=[],e=k(a,d),c=n[e],m={id:e,exports:{}};j(p.anonIds,function(a,b){e==a&&(c=n[b])});if(!c||c.l||!b)throw Error(c?"Circular Deps":"Cant find "+a);if(c.x)return c.x;j(c.d,function(a,c){f[c]=a==q?r(e):a==s?m[s]:a==t?m:l(a,e,b-1)});c.l=1;c.x="function"==typeof c.f?c.f.apply(g,f)||m[s]:c.f;c.l=0;return c.x}
function r(a){function d(b,f){if(h(b)){var e=[];j(b,function(a){e.push(d(a))});"function"==typeof f&&f.apply(g,e)}else return l(b,a,u)}d.toUrl=function(b){return k(b,a)};return d}var u=32,q="require",s="exports",t="module",n={},v=0,p={ids:[],anonIds:[]};(g.define=function(a,d){var b="string"==typeof a?a:v++;p.ids.push(b);n[b]={d:h(a)?a:h(d)?d:[q,s,t],f:arguments[arguments.length-1]}}).amd=p;g[q]=r("");