-
Notifications
You must be signed in to change notification settings - Fork 0
/
math-sign-x.min.js
15 lines (15 loc) · 13.9 KB
/
math-sign-x.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*!
{
"author": "Graham Fairweather",
"copywrite": "Copyright (c) 2017",
"date": "2019-09-04T22:59:23.337Z",
"describe": "",
"description": "Shim for Math.sign.",
"file": "math-sign-x.min.js",
"hash": "46faf3052038ab79e3fa",
"license": "MIT",
"version": "4.2.2"
}
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mathSignX=e():t.mathSignX=e()}(function(){"use strict";var t,e={}.constructor,n=e.prototype,r=e.defineProperty,o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0},i=function(){return this};try{return r?r(n,"$$globalThis$$",{get:i,configurable:!0}):n.__defineGetter__("$$globalThis$$",i),t="undefined"==typeof $$globalThis$$?o():$$globalThis$$,delete n.$$globalThis$$,t}catch(t){return o()}}(),function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e,n){"use strict";var r=Object.prototype.toString;if(n(3)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==r.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";var r=String.prototype.valueOf,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t||"object"==typeof t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object String]"===o.call(t))}},function(t,e,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},function(t,e,n){"use strict";(function(e){var r=e.Symbol,o=n(5);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,n(4))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=function(t){return"object"===i(t)?null===t:"function"!=typeof t},c=n(1),s=n.n(c),f={}.constructor("a"),a="a"===f[0]&&0 in f,l=function(){}.bind,p="function"==typeof l&&function(){var t=null,e=null,n=null,r=[];try{var o=l.apply(function(r,o){return n=this,t=r,e=o,arguments},[r,1]),i=o(2);return 1===o.length&&2===i.length&&1===t&&2===e&&n===r}catch(t){return!1}}()&&function(){var t=null,e=null,n=null,r=[1,2,3],o=function(o,i){return t=o,e=i,n=this,r};try{var i=l.apply(o,[null]),u=new i(1,2);return i.length===o.length&&u===r&&1===t&&2===e&&n!==r}catch(t){return!1}}(),y="".split,b=Math.max,d=u.bind,g=u.call,h=p?d.call(g,y):function(t,e){return y.call(t,e)},m=function(t){return s()(t)?h(t,""):t},v=function(t,e){var n=arguments.length>2?arguments[2]:[];if("string"!=typeof t&&u(t))return n;for(var r=a?t:m(t),o=r.length,i=b(0,e)||0;i<o;i+=1)n[n.length]=t[i];return n};function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var w=v.bind,j=v.call,O={},T=O.constructor,$=O.toString,x=function(t,e){return t>=e?t:e},E=function(t){if("function"!=typeof t&&"[object Function]"!==$.apply(t))throw new TypeError("bind called on incompatible "+t)},P=[function(t){return function(){return t.apply(this,v(arguments))}},function(t,e){return function(n){return t.apply(this,v(arguments,e,[n]))}},function(t,e){return function(n,r){return t.apply(this,v(arguments,e,[n,r]))}},function(t,e){return function(n,r,o){return t.apply(this,v(arguments,e,[n,r,o]))}},function(t,e){return function(n,r,o,i){return t.apply(this,v(arguments,e,[n,r,o,i]))}},function(t,e){return function(n,r,o,i,u){return t.apply(this,v(arguments,e,[n,r,o,i,u]))}},function(t,e){return function(n,r,o,i,u,c){return t.apply(this,v(arguments,e,[n,r,o,i,u,c]))}},function(t,e){return function(n,r,o,i,u,c,s){return t.apply(this,v(arguments,e,[n,r,o,i,u,c,s]))}},function(t,e){return function(n,r,o,i,u,c,s,f){return t.apply(this,v(arguments,e,[n,r,o,i,u,c,s,f]))}}],F=function(t){var e=S(t,3),n=e[0],r=e[1],o=e[2],i=x(0,r.length-x(0,o.length-2)),u=P[i],c=u?u(n,i):P[0](n);if(r.prototype){var s=function(){};s.prototype=r.prototype,c.prototype=new s,s.prototype=null}return c},N=function(t,e){var n=t.apply(this,e);return T(n)===n?n:this},_=p?j.bind(w):function(t,e){E(t);var n,r=arguments,o=function(){var o=v(arguments,0,v(r,2));return this instanceof n?N.apply(this,[t,o]):t.apply(e,o)};return n=F([o,t,r])},M=TypeError,C=_.apply,k=_(_.call,C),D=_(C,{}.toString),A=function(t){if("function"!=typeof t&&"[object Function]"!==D(t))throw new M(t+" is not a function");return t},I=function(t,e){return k(A(t),e,v(arguments[2]))},X=function(t){try{return{threw:!1,value:I(t,this,v(arguments,1))}}catch(t){return{threw:!0,value:t}}};for(var q=X(function(){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0),"function"==typeof Symbol&&o()(Symbol(""))}.bind(void 0)),G=!1===q.threw&&!0===q.value,L=n(2),z=n.n(L),B=function(t){return!!t},H={}.toString,R=function(t){return function(t){if("function"!=typeof t&&"[object Function]"!==I(H,t))throw new TypeError("methodize called on incompatible "+t)}(t),function(){return I(t,arguments[0],v(arguments,1))}},U=R({}.toString),V=function(t){return null===t?"[object Null]":void 0===t?"[object Undefined]":U(t)},J=G&&o()(Symbol.toStringTag),K=function(t){return null==t},Q=function(t){if(K(t))throw new TypeError("Cannot call method on ".concat(t));return t},W="Cannot convert a Symbol value to a string".constructor,Y=function(t){if(o()(t))throw new TypeError("Cannot convert a Symbol value to a string");return W(t)},Z=function(t){return Y(Q(t))},tt=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:""},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],et="",nt=tt.length,rt=0;rt<nt;rt+=1)tt[rt].es2016&&tt[rt].string,tt[rt].es2018&&(et+=tt[rt].string);var ot=et,it=new(0,/none/.constructor)("^[".concat(ot,"]+")),ut=R("".replace),ct=function(t){return ut(Z(t),it,"")},st=new(0,/none/.constructor)("[".concat(ot,"]+$")),ft=R("".replace),at=function(t){return ft(Z(t),st,"")},lt=function(t){return ct(at(t))},pt=new(0,/none/.constructor)("[".concat(ot,"]+"),"g"),yt=R(" ".replace),bt=function(t){return yt(lt(t),pt," ")},dt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,gt=R("".replace),ht=function(t,e){return gt(Z(t),dt,arguments.length>1?Y(e):"")},mt=X.constructor,vt=R(X.toString),St=/^class /,wt=R(St.test),jt=!1===X(function(){return mt('"use strict"; return class My {};')()}).threw,Ot=function(t){return wt(St,bt(ht(vt(t)," ")))},Tt=function(t){var e=X(Ot,t);return!1===e.threw&&e.value},$t=function(t,e){return!u(t)&&(J?function(t,e){return!(jt&&!1===e&&Tt(t)||!1!==X(function(){return vt(t)}).threw)}(t,B(e)):(!jt||!1!==B(e)||!Tt(t))&&function(t){var e=V(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e}(t))},xt="string".constructor,Et=(0).constructor,Pt=G&&Symbol.toPrimitive,Ft=G&&Symbol.prototype.valueOf,Nt=["toString","valueOf"],_t=["valueOf","toString"],Mt=function(t,e){Q(t),function(t){if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"')}(e);for(var n="string"===e?Nt:_t,r=0;r<2;r+=1){var o=t[n[r]];if($t(o)){var i=I(o,t);if(u(i))return i}}throw new TypeError("No default value")},Ct=function(t,e){if(e){if(t===xt)return"string";if(t===Et)return"number"}return"default"},kt=function(t){if(G){if(Pt)return function(t,e){var n=t[e];if(!1===K(n)){if(!1===$t(n))throw new TypeError("".concat(n," returned for property ").concat(e," of object ").concat(t," is not a function"));return n}}(t,Pt);if(o()(t))return Ft}},Dt=function(t){var e=t.exoticToPrim,n=t.input,r=t.hint,o=I(e,n,[r]);if(u(o))return o;throw new TypeError("unable to convert exotic object to primitive")},At=function(t,e){var n="default"===e&&(z()(t)||o()(t))?"string":e;return Mt(t,"default"===n?"number":n)},It=function(t,e){if(u(t))return t;var n=Ct(e,arguments.length>1),r=kt(t);return void 0===r?At(t,n):Dt({exoticToPrim:r,input:t,hint:n})},Xt=parseInt,qt=(0).constructor,Gt=R("".charAt),Lt=/^[-+]?0[xX]/,zt=R(Lt.test),Bt=function(t,e){var n=ct(Y(t));return""===Gt(n,0)?NaN:Xt(n,qt(e)||(zt(Lt,n)?16:10))},Ht=2..constructor,Rt=R("Cannot convert a Symbol value to a number".slice),Ut=/^0b[01]+$/i,Vt=Ut.constructor,Jt=R(Ut.test),Kt=/^0o[0-7]+$/i,Qt=new Vt("[
]","g"),Wt=/^[-+]0x[0-9a-f]+$/i,Yt=function(t,e){return Bt(Rt(t,2),e)},Zt=function(t,e){return function(t){return Jt(Ut,t)}(e)?t(Yt(e,2)):function(t){return Jt(Kt,t)}(e)?t(Yt(e,8)):null},te=function(t,e){var n=Zt(t,e);if(null!==n)return n;if(function(t){return Jt(Qt,t)}(e)||function(t){return Jt(Wt,t)}(e))return NaN;var r=lt(e);return r!==e?t(r):null},ee=function t(e){var n=function(t){if(o()(t))throw new TypeError("Cannot convert a Symbol value to a number");return t}(It(e,Ht));if("string"==typeof n){var r=te(t,n);if(null!==r)return r}return Ht(n)},ne=function(t){return t!=t};e.default=function(t){var e=ee(t);return 0===e||ne(e)?e:e>0?1:-1}}])});
//# sourceMappingURL=math-sign-x.min.js.map