-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathno.min.js
1 lines (1 loc) · 3.09 KB
/
no.min.js
1
(function(){function t(e,r,n){var i=t.resolve(e);if(null==i){n=n||e,r=r||"root";var o=Error('Failed to require "'+n+'" from "'+r+'"');throw o.path=n,o.parent=r,o.require=!0,o}var s=t.modules[i];return s.exports||(s.exports={},s.client=s.component=!0,s.call(this,s.exports,t.relative(i),s)),s.exports}t.modules={},t.aliases={},t.resolve=function(e){"/"===e.charAt(0)&&(e=e.slice(1));for(var r=e+"/index.js",n=[e,e+".js",e+".json",e+"/index.js",e+"/index.json"],i=0;n.length>i;i++){var e=n[i];if(t.modules.hasOwnProperty(e))return e}return t.aliases.hasOwnProperty(r)?t.aliases[r]:void 0},t.normalize=function(t,e){var r=[];if("."!=e.charAt(0))return e;t=t.split("/"),e=e.split("/");for(var n=0;e.length>n;++n)".."==e[n]?t.pop():"."!=e[n]&&""!=e[n]&&r.push(e[n]);return t.concat(r).join("/")},t.register=function(e,r){t.modules[e]=r},t.alias=function(e,r){if(!t.modules.hasOwnProperty(e))throw Error('Failed to alias "'+e+'", it does not exist');t.aliases[r]=e},t.relative=function(e){function r(t,e){for(var r=t.length;r--;)if(t[r]===e)return r;return-1}function n(r){var i=n.resolve(r);return t(i,e,r)}var i=t.normalize(e,"..");return n.resolve=function(n){var o=n.charAt(0);if("/"==o)return n.slice(1);if("."==o)return t.normalize(i,n);var s=e.split("/"),a=r(s,"deps")+1;return a||(a=0),n=s.slice(0,a+1).join("/")+"/deps/"+n},n.exists=function(e){return t.modules.hasOwnProperty(n.resolve(e))},n},t.register("component-indexof/index.js",function(t,e,r){var n=[].indexOf;r.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;t.length>r;++r)if(t[r]===e)return r;return-1}}),t.register("component-emitter/index.js",function(t,e,r){function n(t){return t?i(t):void 0}function i(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}var o=e("indexof");r.exports=n,n.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){n.off(t,r),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},e._off=r,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks[t];if(!r)return this;if(1==arguments.length)return delete this._callbacks[t],this;var n=o(r,e._off||e);return~n&&r.splice(n,1),this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks[t];if(r){r=r.slice(0);for(var n=0,i=r.length;i>n;++n)r[n].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}}),t.register("no/dist/main.js",function(t,e,r){r.exports="no"}),t.alias("component-emitter/index.js","no/deps/emitter/index.js"),t.alias("component-indexof/index.js","component-emitter/deps/indexof/index.js"),t.alias("no/dist/main.js","no/index.js"),"object"==typeof exports?module.exports=t("no"):"function"==typeof define&&define.amd?define(function(){return t("no")}):window.no=t("no")})();