-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFastClass.min.js
4 lines (4 loc) · 4.15 KB
/
FastClass.min.js
1
2
3
4
(function(){function u(){}function a(){}var p=typeof global!="undefined",i,f,v;String.prototype.format||(i={},String.prototype.format=function(){for(var t=this,r=arguments,n=r.length;--n>=0;)t=t.replace(i[n]||(i[n]=RegExp("\\{"+n+"\\}","gm")),r[n]);return t},String.format||(String.format=function(n){for(var r=arguments,t=r.length;--t;)n=n.replace(i[t-1]||(i[t-1]=RegExp("\\{"+(t-1)+"\\}","gm")),r[t]);return n}));var t=Function.prototype,h=Array.prototype,r=h.forEach,c=Object.defineProperty,l=typeof Object.defineProperties=="function",n={};if(n=n.__proto__===Object.prototype,n)try{n={};n.__proto__={Object:1};n=n.Object===1}catch(b){n=!1}if(typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=n?function(n){return n.__proto__}:function(n){return n==null||!n.constructor||n===Object.prototype?null:n.constructor.prototype===n?Object.prototype:n.constructor.prototype}),r||(h.forEach=r=function(n,t){for(var i=0,r=this.length;i<r;++i)n.call(t||this,this[i],i,this)}),t.fastClass=function(n){var u=this,f=this.prototype,r,i;return n=n||function(){this.constructor=function(){return u.apply(this,arguments)||this}},n.prototype=f,r=new n(f,this),r.hasOwnProperty("constructor")||(r.constructor=function(){return u.apply(this,arguments)||this}),i=r.constructor,i.prototype=r,n=null,arguments.length>1&&t.define.apply(i,arguments),i.constructor=i,i},t.inheritWith=n?function(n){var u=this,r=(typeof n=="function"?n.call(this,this.prototype,this):n)||{},i=r.hasOwnProperty("constructor")?r.constructor:function(){return u.apply(this,arguments)||this};return i.prototype=r,r.__proto__=this.prototype,n=null,arguments.length>1&&t.define.apply(i,arguments),i.constructor=i,i}:function(n){var f=this,r=(typeof n=="function"?n.call(this,this.prototype,this):n)||{},i=r.hasOwnProperty("constructor")?r.constructor:function(){return f.apply(this,arguments)||this},e;return u.prototype=this.prototype,i.prototype=e=new u,n=r,t.define.apply(i,arguments),i.constructor=i,i},t.define=function(n,t){var e=this,i=this.prototype,o=n,f;if(n)if(typeof n=="function"&&(n=n.call(i,this.prototype,this)),n.enumerable===!1)for(f in n)f!=="enumerable"&&Object.defineProperty(i,f,{enumerable:!1,value:n[f]});else for(f in n)i[f]=n[f];return n=null,(arguments.length>2||t)&&(i.hasOwnProperty("__mixins__")||(l?c(i,"__mixins__",{enumerable:!1,value:[],writeable:!1}).__mixins__.__hidden=!0:i.__mixins__=[]))&&r.call(arguments,function(n,t,r,f){if(f=typeof n=="function",f?(u.prototype=n.prototype,r=new n(i,e)):r=n,r){f&&i.__mixins__.push(n);for(var o in r)o!="constructor"&&o!="prototype"&&(i[o]=r[o])}}),this},Function.define=function(n,i){var u,r=n||function(){},f=arguments.length>1;return typeof n!="function"?(r=n.hasOwnProperty("constructor")?n.constructor:function(){},r.prototype=n,f=!0):(n=i,i=null),f&&t.define.apply(r,arguments),u=function(){return Function.initMixins(this),r.apply(this,arguments)||this},u.prototype=r.prototype,u.constructor=u.prototype.constructor=r.constructor=r.prototype.constructor=u,u},t.defineStatic=function(n){var t;if(typeof n=="object"&&n.enumerable===!1)for(t in n)t!=="enumerable"&&Object.defineProperty(this,t,{enumerable:!1,configurable:!0,value:n[t]});for(t in n)this[t]=n[t];return this},a.defineStatic({abstract:!0}),Function.abstract=function(n,t){return n||t?function(){typeof n=="function"&&n.apply(this,arguments);typeof t=="function"&&t.apply(this,arguments)}.defineStatic({abstract:!0}):a},Function.initMixins=n?function(n){if(n&&!n.__initMixins__){var t=n,u,f,i,r,e={};for(n.__initMixins__=1;t;)if(t=t.__proto__,t&&t.hasOwnProperty("__mixins__")&&(u=t.__mixins__)&&(f=u.length))for(i=0;r=u[i],i<f;i++)r in e||(e[r]=1,r.call(n,t,t.constructor));n.__initMixins__=undefined}}:function(n){if(n&&!n.__initMixins__){var t=n,u,f,i,r,e={};for(n.__initMixins__=1;t;)if(t=Object.getPrototypeOf(t),t&&t.hasOwnProperty("__mixins__")&&(u=t.__mixins__)&&(f=u.length))for(i=0;r=u[i],i<f;i++)r in e||(e[r]=1,r.call(n,t,t.constructor));n.__initMixins__=undefined}},l){f={0:[Function,"initMixins","define","abstract"],1:[t,"fastClass","inheritWith","define","defineStatic"]};for(v in f)for(var e=f[v],y=e[0],o=1,s;s=e[o],o<e.length;o++)c(y,s,{enumerable:!1,value:y[s]})}})();
/*
//# sourceMappingURL=FastClass.min.js.map
*/