text: shadow$provide.module$node_modules$mathjs$lib$cjs$type$unit$Unit=function(global,require,module,exports){function _typeof(obj$jscomp$0){"@babel/helpers - typeof";_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"===typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};return _typeof(obj$jscomp$0)}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=
  arguments[i],key;for(key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};return _extends.apply(this,arguments)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}));keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=
  1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){var value=source[key];key in target?Object.defineProperty(target,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):target[key]=value}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}
  Object.defineProperty(exports,"__esModule",{value:!0});exports.createUnitClass=void 0;var _is=require("module$node_modules$mathjs$lib$cjs$utils$is");global=require("module$node_modules$mathjs$lib$cjs$utils$factory");var _function=require("module$node_modules$mathjs$lib$cjs$utils$function"),_string=require("module$node_modules$mathjs$lib$cjs$utils$string"),_object=require("module$node_modules$mathjs$lib$cjs$utils$object"),_constants=require("module$node_modules$mathjs$lib$cjs$utils$bignumber$constants");
  require=(0,global.factory)("Unit","?on config addScalar subtract multiplyScalar divideScalar pow abs fix round equal isNumeric format number Complex BigNumber Fraction".split(" "),function(_ref){function Unit(value,name){if(!(this instanceof Unit))throw Error("Constructor must be called with the new operator");if(null!==value&&void 0!==value&&!isNumeric(value)&&!(0,_is.isComplex)(value))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");
  if(void 0!==name&&("string"!==typeof name||""===name))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==name)name=Unit.parse(name),this.units=name.units,this.dimensions=name.dimensions;else for(this.units=[{unit:UNIT_NONE,prefix:PREFIXES.NONE,power:0}],this.dimensions=[],name=0;name<BASE_DIMENSIONS.length;name++)this.dimensions[name]=0;this.value=void 0!==value&&null!==value?this._normalize(value):null;this.fixPrefix=!1;this.skipAutomaticSimplification=!0}function skipWhitespace(){for(;" "===
  c$jscomp$0||"\t"===c$jscomp$0;)next()}function isDigit(c){return"0"<=c&&"9">=c}function next(){index++;c$jscomp$0=text.charAt(index)}function revert(oldIndex){index=oldIndex;c$jscomp$0=text.charAt(index)}function parseNumber(){var number="",oldIndex=index;"+"===c$jscomp$0?next():"-"===c$jscomp$0&&(number+=c$jscomp$0,next());if(!("0"<=c$jscomp$0&&"9">=c$jscomp$0||"."===c$jscomp$0))return revert(oldIndex),null;if("."===c$jscomp$0){if(number+=c$jscomp$0,next(),!isDigit(c$jscomp$0))return revert(oldIndex),
  null}else{for(;isDigit(c$jscomp$0);)number+=c$jscomp$0,next();"."===c$jscomp$0&&(number+=c$jscomp$0,next())}for(;isDigit(c$jscomp$0);)number+=c$jscomp$0,next();if("E"===c$jscomp$0||"e"===c$jscomp$0){var tentativeIndex=index;oldIndex=""+c$jscomp$0;next();if("+"===c$jscomp$0||"-"===c$jscomp$0)oldIndex+=c$jscomp$0,next();if(!isDigit(c$jscomp$0))return revert(tentativeIndex),number;for(number+=oldIndex;isDigit(c$jscomp$0);)number+=c$jscomp$0,next()}return number}function parseCharacter(toFind){return c$jscomp$0===
  toFind?(next(),toFind):null}function getNumericIfUnitless(unit){return unit.equalBase(BASE_UNITS.NONE)&&null!==unit.value&&!config$jscomp$0.predictable?unit.value:unit}function calculateAngleValues(config){"BigNumber"===config.number?(config=(0,_constants.createBigNumberPi)(_BigNumber),UNITS.rad.value=new _BigNumber(1),UNITS.deg.value=config.div(180),UNITS.grad.value=config.div(200),UNITS.cycle.value=config.times(2),UNITS.arcsec.value=config.div(648E3),UNITS.arcmin.value=config.div(10800)):(UNITS.rad.value=
  1,UNITS.deg.value=Math.PI/180,UNITS.grad.value=Math.PI/200,UNITS.cycle.value=2*Math.PI,UNITS.arcsec.value=Math.PI/648E3,UNITS.arcmin.value=Math.PI/10800);UNITS.radian.value=UNITS.rad.value;UNITS.degree.value=UNITS.deg.value;UNITS.gradian.value=UNITS.grad.value}var on=_ref.on,config$jscomp$0=_ref.config,addScalar=_ref.addScalar,subtract=_ref.subtract,multiplyScalar=_ref.multiplyScalar,divideScalar=_ref.divideScalar,pow=_ref.pow,abs=_ref.abs,fix=_ref.fix,round=_ref.round,equal=_ref.equal,isNumeric=
  _ref.isNumeric,format=_ref.format,Complex=_ref.Complex,_BigNumber=_ref.BigNumber,_Fraction=_ref.Fraction,toNumber=_ref.number;Unit.prototype.type="Unit";Unit.prototype.isUnit=!0;var text,index,c$jscomp$0;Unit.parse=function(str,options){options=options||{};text=str;index=-1;c$jscomp$0="";if("string"!==typeof text)throw new TypeError("Invalid argument in Unit.parse, string expected");var unit=new Unit;unit.units=[];var powerMultiplierCurrent=1,expectingUnit=!1;next();skipWhitespace();var valueStr=
  parseNumber(),value=null;if(valueStr){if("BigNumber"===config$jscomp$0.number)value=new _BigNumber(valueStr);else if("Fraction"===config$jscomp$0.number)try{value=new _Fraction(valueStr)}catch(err){value=parseFloat(valueStr)}else value=parseFloat(valueStr);skipWhitespace();parseCharacter("*")?(powerMultiplierCurrent=1,expectingUnit=!0):parseCharacter("/")&&(powerMultiplierCurrent=-1,expectingUnit=!0)}valueStr=[];for(var powerMultiplierStackProduct=1;;){for(skipWhitespace();"("===c$jscomp$0;)valueStr.push(powerMultiplierCurrent),
  powerMultiplierStackProduct*=powerMultiplierCurrent,powerMultiplierCurrent=1,next(),skipWhitespace();if(c$jscomp$0){var oldC=c$jscomp$0;for(expectingUnit="";isDigit(c$jscomp$0)||Unit.isValidAlpha(c$jscomp$0);)expectingUnit+=c$jscomp$0,next();var firstC=expectingUnit.charAt(0);expectingUnit=Unit.isValidAlpha(firstC)?expectingUnit:null;if(null===expectingUnit)throw new SyntaxError('Unexpected "'+oldC+'" in "'+text+'" at index '+index.toString());}else break;oldC=_findUnit(expectingUnit);if(null===oldC)throw new SyntaxError('Unit "'+
  expectingUnit+'" not found.');powerMultiplierCurrent*=powerMultiplierStackProduct;skipWhitespace();if(parseCharacter("^")){skipWhitespace();expectingUnit=parseNumber();if(null===expectingUnit)throw new SyntaxError('In "'+str+'", "^" must be followed by a floating-point number');powerMultiplierCurrent*=expectingUnit}unit.units.push({unit:oldC.unit,prefix:oldC.prefix,power:powerMultiplierCurrent});for(expectingUnit=0;expectingUnit<BASE_DIMENSIONS.length;expectingUnit++)unit.dimensions[expectingUnit]+=
  (oldC.unit.dimensions[expectingUnit]||0)*powerMultiplierCurrent;for(skipWhitespace();")"===c$jscomp$0;){if(0===valueStr.length)throw new SyntaxError('Unmatched ")" in "'+text+'" at index '+index.toString());powerMultiplierStackProduct/=valueStr.pop();next();skipWhitespace()}expectingUnit=!1;parseCharacter("*")?(powerMultiplierCurrent=1,expectingUnit=!0):parseCharacter("/")?(powerMultiplierCurrent=-1,expectingUnit=!0):powerMultiplierCurrent=1;oldC.unit.base&&(UNIT_SYSTEMS.auto[oldC.unit.base.key]=
  {unit:oldC.unit,prefix:oldC.prefix})}skipWhitespace();if(c$jscomp$0)throw new SyntaxError('Could not parse: "'+str+'"');if(expectingUnit)throw new SyntaxError('Trailing characters: "'+str+'"');if(0!==valueStr.length)throw new SyntaxError('Unmatched "(" in "'+text+'"');if(0===unit.units.length&&!options.allowNoUnits)throw new SyntaxError('"'+str+'" contains no units');unit.value=void 0!==value?unit._normalize(value):null;return unit};Unit.prototype.clone=function(){var unit=new Unit;unit.fixPrefix=
  this.fixPrefix;unit.skipAutomaticSimplification=this.skipAutomaticSimplification;unit.value=(0,_object.clone)(this.value);unit.dimensions=this.dimensions.slice(0);unit.units=[];for(var i=0;i<this.units.length;i++){unit.units[i]={};for(var p in this.units[i])(0,_object.hasOwnProperty)(this.units[i],p)&&(unit.units[i][p]=this.units[i][p])}return unit};Unit.prototype._isDerived=function(){return 0===this.units.length?!1:1<this.units.length||1E-15<Math.abs(this.units[0].power-1)};Unit.prototype._normalize=
  function(value){if(null===value||void 0===value||0===this.units.length)return value;if(this._isDerived()){var unitOffset=value;var convert=Unit._getNumberConverter((0,_is.typeOf)(value));for(var i=0;i<this.units.length;i++){var unitValue=convert(this.units[i].unit.value);var unitPrefixValue=convert(this.units[i].prefix.value);value=convert(this.units[i].power);unitOffset=multiplyScalar(unitOffset,pow(multiplyScalar(unitValue,unitPrefixValue),value))}return unitOffset}convert=Unit._getNumberConverter((0,
  _is.typeOf)(value));unitValue=convert(this.units[0].unit.value);unitOffset=convert(this.units[0].unit.offset);unitPrefixValue=convert(this.units[0].prefix.value);return multiplyScalar(addScalar(value,unitOffset),multiplyScalar(unitValue,unitPrefixValue))};Unit.prototype._denormalize=function(value,prefixValue){if(null===value||void 0===value||0===this.units.length)return value;if(this._isDerived()){prefixValue=value;var unitOffset=Unit._getNumberConverter((0,_is.typeOf)(value));for(var i=0;i<this.units.length;i++){var unitValue=
  unitOffset(this.units[i].unit.value);var unitPrefixValue=unitOffset(this.units[i].prefix.value);value=unitOffset(this.units[i].power);prefixValue=divideScalar(prefixValue,pow(multiplyScalar(unitValue,unitPrefixValue),value))}return prefixValue}unitOffset=Unit._getNumberConverter((0,_is.typeOf)(value));unitValue=unitOffset(this.units[0].unit.value);unitPrefixValue=unitOffset(this.units[0].prefix.value);unitOffset=unitOffset(this.units[0].unit.offset);return void 0===prefixValue||null===prefixValue?
  subtract(divideScalar(divideScalar(value,unitValue),unitPrefixValue),unitOffset):subtract(divideScalar(divideScalar(value,unitValue),prefixValue),unitOffset)};var _findUnit=(0,_function.memoize)(function(str){if((0,_object.hasOwnProperty)(UNITS,str))return str=UNITS[str],{unit:str,prefix:str.prefixes[""]};for(var _name in UNITS)if((0,_object.hasOwnProperty)(UNITS,_name)&&(0,_string.endsWith)(str,_name)){var _unit=UNITS[_name],prefixName=str.substring(0,str.length-_name.length);prefixName=(0,_object.hasOwnProperty)(_unit.prefixes,
  prefixName)?_unit.prefixes[prefixName]:void 0;if(void 0!==prefixName)return{unit:_unit,prefix:prefixName}}return null},{hasher:function(args){return args[0]},limit:100});Unit.isValuelessUnit=function(name){return null!==_findUnit(name)};Unit.prototype.hasBase=function(base){"string"===typeof base&&(base=BASE_UNITS[base]);if(!base)return!1;for(var i=0;i<BASE_DIMENSIONS.length;i++)if(1E-12<Math.abs((this.dimensions[i]||0)-(base.dimensions[i]||0)))return!1;return!0};Unit.prototype.equalBase=function(other){for(var i=
  0;i<BASE_DIMENSIONS.length;i++)if(1E-12<Math.abs((this.dimensions[i]||0)-(other.dimensions[i]||0)))return!1;return!0};Unit.prototype.equals=function(other){return this.equalBase(other)&&equal(this.value,other.value)};Unit.prototype.multiply=function(other){for(var res=this.clone(),i=0;i<BASE_DIMENSIONS.length;i++)res.dimensions[i]=(this.dimensions[i]||0)+(other.dimensions[i]||0);for(i=0;i<other.units.length;i++){var inverted=_objectSpread({},other.units[i]);res.units.push(inverted)}null!==this.value||
  null!==other.value?(i=null===this.value?this._normalize(1):this.value,other=null===other.value?other._normalize(1):other.value,res.value=multiplyScalar(i,other)):res.value=null;res.skipAutomaticSimplification=!1;return getNumericIfUnitless(res)};Unit.prototype.divide=function(other){for(var res=this.clone(),i=0;i<BASE_DIMENSIONS.length;i++)res.dimensions[i]=(this.dimensions[i]||0)-(other.dimensions[i]||0);for(i=0;i<other.units.length;i++){var inverted=_objectSpread(_objectSpread({},other.units[i]),
  {},{power:-other.units[i].power});res.units.push(inverted)}null!==this.value||null!==other.value?(i=null===this.value?this._normalize(1):this.value,other=null===other.value?other._normalize(1):other.value,res.value=divideScalar(i,other)):res.value=null;res.skipAutomaticSimplification=!1;return getNumericIfUnitless(res)};Unit.prototype.pow=function(p){for(var res=this.clone(),i=0;i<BASE_DIMENSIONS.length;i++)res.dimensions[i]=(this.dimensions[i]||0)*p;for(i=0;i<res.units.length;i++)res.units[i].power*=
  p;res.value=null!==res.value?pow(res.value,p):null;res.skipAutomaticSimplification=!1;return getNumericIfUnitless(res)};Unit.prototype.abs=function(){var ret=this.clone();ret.value=null!==ret.value?abs(ret.value):null;for(var i in ret.units)if("VA"===ret.units[i].unit.name||"VAR"===ret.units[i].unit.name)ret.units[i].unit=UNITS.W;return ret};Unit.prototype.to=function(valuelessUnit){var value=null===this.value?this._normalize(1):this.value;if("string"===typeof valuelessUnit){valuelessUnit=Unit.parse(valuelessUnit);
  if(!this.equalBase(valuelessUnit))throw Error("Units do not match ('".concat(valuelessUnit.toString(),"' !\x3d '").concat(this.toString(),"')"));if(null!==valuelessUnit.value)throw Error("Cannot convert to a unit with a value");valuelessUnit.value=(0,_object.clone)(value);valuelessUnit.fixPrefix=!0;valuelessUnit.skipAutomaticSimplification=!0;return valuelessUnit}if((0,_is.isUnit)(valuelessUnit)){if(!this.equalBase(valuelessUnit))throw Error("Units do not match ('".concat(valuelessUnit.toString(),
  "' !\x3d '").concat(this.toString(),"')"));if(null!==valuelessUnit.value)throw Error("Cannot convert to a unit with a value");valuelessUnit=valuelessUnit.clone();valuelessUnit.value=(0,_object.clone)(value);valuelessUnit.fixPrefix=!0;valuelessUnit.skipAutomaticSimplification=!0;return valuelessUnit}throw Error("String or Unit expected as parameter");};Unit.prototype.toNumber=function(valuelessUnit){return toNumber(this.toNumeric(valuelessUnit))};Unit.prototype.toNumeric=function(valuelessUnit){valuelessUnit=
  valuelessUnit?this.to(valuelessUnit):this.clone();return valuelessUnit._isDerived()||0===valuelessUnit.units.length?valuelessUnit._denormalize(valuelessUnit.value):valuelessUnit._denormalize(valuelessUnit.value,valuelessUnit.units[0].prefix.value)};Unit.prototype.toString=function(){return this.format()};Unit.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}};Unit.fromJSON=function(json){var unit=new Unit(json.value,
  json.unit);unit.fixPrefix=json.fixPrefix||!1;return unit};Unit.prototype.valueOf=Unit.prototype.toString;Unit.prototype.simplify=function(){var ret=this.clone(),proposedUnitList=[],key;for(key in currentUnitSystem)if((0,_object.hasOwnProperty)(currentUnitSystem,key)&&ret.hasBase(BASE_UNITS[key])){var matchingBase=key;break}if("NONE"===matchingBase)ret.units=[];else{var matchingUnit;matchingBase&&(0,_object.hasOwnProperty)(currentUnitSystem,matchingBase)&&(matchingUnit=currentUnitSystem[matchingBase]);
  if(matchingUnit)ret.units=[{unit:matchingUnit.unit,prefix:matchingUnit.prefix,power:1}];else{matchingBase=!1;for(key=0;key<BASE_DIMENSIONS.length;key++)matchingUnit=BASE_DIMENSIONS[key],1E-12<Math.abs(ret.dimensions[key]||0)&&((0,_object.hasOwnProperty)(currentUnitSystem,matchingUnit)?proposedUnitList.push({unit:currentUnitSystem[matchingUnit].unit,prefix:currentUnitSystem[matchingUnit].prefix,power:ret.dimensions[key]||0}):matchingBase=!0);proposedUnitList.length<ret.units.length&&!matchingBase&&
  (ret.units=proposedUnitList)}}return ret};Unit.prototype.toSI=function(){for(var ret=this.clone(),proposedUnitList=[],i=0;i<BASE_DIMENSIONS.length;i++){var baseDim=BASE_DIMENSIONS[i];if(1E-12<Math.abs(ret.dimensions[i]||0))if((0,_object.hasOwnProperty)(UNIT_SYSTEMS.si,baseDim))proposedUnitList.push({unit:UNIT_SYSTEMS.si[baseDim].unit,prefix:UNIT_SYSTEMS.si[baseDim].prefix,power:ret.dimensions[i]||0});else throw Error("Cannot express custom unit "+baseDim+" in SI units");}ret.units=proposedUnitList;
  ret.fixPrefix=!0;ret.skipAutomaticSimplification=!0;return ret};Unit.prototype.formatUnits=function(){for(var strNum="",strDen="",nNum=0,nDen=0,i=0;i<this.units.length;i++)0<this.units[i].power?(nNum++,strNum+=" "+this.units[i].prefix.name+this.units[i].unit.name,1E-15<Math.abs(this.units[i].power-1)&&(strNum+="^"+this.units[i].power)):0>this.units[i].power&&nDen++;if(0<nDen)for(i=0;i<this.units.length;i++)0>this.units[i].power&&(0<nNum?(strDen+=" "+this.units[i].prefix.name+this.units[i].unit.name,
  1E-15<Math.abs(this.units[i].power+1)&&(strDen+="^"+-this.units[i].power)):(strDen+=" "+this.units[i].prefix.name+this.units[i].unit.name,strDen+="^"+this.units[i].power));strNum=strNum.substr(1);strDen=strDen.substr(1);1<nNum&&0<nDen&&(strNum="("+strNum+")");1<nDen&&0<nNum&&(strDen="("+strDen+")");0<nNum&&0<nDen&&(strNum+=" / ");return strNum+strDen};Unit.prototype.format=function(options){var simp=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),isImaginary=!1;"undefined"!==
  typeof simp.value&&null!==simp.value&&(0,_is.isComplex)(simp.value)&&(isImaginary=1E-14>Math.abs(simp.value.re));for(var i in simp.units)(0,_object.hasOwnProperty)(simp.units,i)&&simp.units[i].unit&&("VA"===simp.units[i].unit.name&&isImaginary?simp.units[i].unit=UNITS.VAR:"VAR"!==simp.units[i].unit.name||isImaginary||(simp.units[i].unit=UNITS.VA));1===simp.units.length&&!simp.fixPrefix&&1E-14>Math.abs(simp.units[0].power-Math.round(simp.units[0].power))&&(simp.units[0].prefix=simp._bestPrefix());
  isImaginary=simp._denormalize(simp.value);options=null!==simp.value?format(isImaginary,options||{}):"";isImaginary=simp.formatUnits();simp.value&&(0,_is.isComplex)(simp.value)&&(options="("+options+")");0<isImaginary.length&&0<options.length&&(options+=" ");return options+isImaginary};Unit.prototype._bestPrefix=function(){if(1!==this.units.length)throw Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(1E-14<=Math.abs(this.units[0].power-
  Math.round(this.units[0].power)))throw Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var absValue=null!==this.value?abs(this.value):0,absUnitValue=abs(this.units[0].unit.value),bestPrefix=this.units[0].prefix;if(0===absValue)return bestPrefix;var power=this.units[0].power,bestDiff=Math.log(absValue/Math.pow(bestPrefix.value*absUnitValue,power))/Math.LN10-1.2;if(-2.200001<bestDiff&&1.800001>bestDiff)return bestPrefix;bestDiff=Math.abs(bestDiff);
  var prefixes=this.units[0].unit.prefixes,p;for(p in prefixes)if((0,_object.hasOwnProperty)(prefixes,p)){var prefix=prefixes[p];if(prefix.scientific){var diff=Math.abs(Math.log(absValue/Math.pow(prefix.value*absUnitValue,power))/Math.LN10-1.2);if(diff<bestDiff||diff===bestDiff&&prefix.name.length<bestPrefix.name.length)bestPrefix=prefix,bestDiff=diff}}return bestPrefix};Unit.prototype.splitUnit=function(parts){for(var x=this.clone(),ret=[],i=0;i<parts.length;i++){x=x.to(parts[i]);if(i===parts.length-
  1)break;var xNumeric=x.toNumeric(),xRounded=round(xNumeric);xNumeric=equal(xRounded,xNumeric)?xRounded:fix(x.toNumeric());xNumeric=new Unit(xNumeric,parts[i].toString());ret.push(xNumeric);x=subtract(x,xNumeric)}for(i=parts=0;i<ret.length;i++)parts=addScalar(parts,ret[i].value);equal(parts,this.value)&&(x.value=0);ret.push(x);return ret};var PREFIXES={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},
  k:{name:"k",value:1E3,scientific:!0},M:{name:"M",value:1E6,scientific:!0},G:{name:"G",value:1E9,scientific:!0},T:{name:"T",value:1E12,scientific:!0},P:{name:"P",value:1E15,scientific:!0},E:{name:"E",value:1E18,scientific:!0},Z:{name:"Z",value:1E21,scientific:!0},Y:{name:"Y",value:1E24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1E-6,scientific:!0},n:{name:"n",value:1E-9,scientific:!0},p:{name:"p",value:1E-12,
  scientific:!0},f:{name:"f",value:1E-15,scientific:!0},a:{name:"a",value:1E-18,scientific:!0},z:{name:"z",value:1E-21,scientific:!0},y:{name:"y",value:1E-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1E3,scientific:!0},mega:{name:"mega",value:1E6,scientific:!0},giga:{name:"giga",value:1E9,scientific:!0},tera:{name:"tera",value:1E12,scientific:!0},peta:{name:"peta",value:1E15,
  scientific:!0},exa:{name:"exa",value:1E18,scientific:!0},zetta:{name:"zetta",value:1E21,scientific:!0},yotta:{name:"yotta",value:1E24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1E-6,scientific:!0},nano:{name:"nano",value:1E-9,scientific:!0},pico:{name:"pico",value:1E-12,scientific:!0},femto:{name:"femto",value:1E-15,scientific:!0},atto:{name:"atto",value:1E-18,scientific:!0},
  zepto:{name:"zepto",value:1E-21,scientific:!0},yocto:{name:"yocto",value:1E-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1E4,scientific:!1},k:{name:"k",value:1E6,scientific:!0},M:{name:"M",value:1E12,scientific:!0},G:{name:"G",value:1E18,scientific:!0},T:{name:"T",value:1E24,scientific:!0},P:{name:"P",value:1E30,scientific:!0},E:{name:"E",value:1E36,scientific:!0},Z:{name:"Z",value:1E42,scientific:!0},Y:{name:"Y",value:1E48,
  scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1E-4,scientific:!1},m:{name:"m",value:1E-6,scientific:!0},u:{name:"u",value:1E-12,scientific:!0},n:{name:"n",value:1E-18,scientific:!0},p:{name:"p",value:1E-24,scientific:!0},f:{name:"f",value:1E-30,scientific:!0},a:{name:"a",value:1E-36,scientific:!0},z:{name:"z",value:1E-42,scientific:!0},y:{name:"y",value:1E-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1E3,scientific:!1},h:{name:"h",value:1E6,
  scientific:!1},k:{name:"k",value:1E9,scientific:!0},M:{name:"M",value:1E18,scientific:!0},G:{name:"G",value:1E27,scientific:!0},T:{name:"T",value:1E36,scientific:!0},P:{name:"P",value:1E45,scientific:!0},E:{name:"E",value:1E54,scientific:!0},Z:{name:"Z",value:1E63,scientific:!0},Y:{name:"Y",value:1E72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1E-6,scientific:!1},m:{name:"m",value:1E-9,scientific:!0},u:{name:"u",value:1E-18,scientific:!0},n:{name:"n",value:1E-27,scientific:!0},
  p:{name:"p",value:1E-36,scientific:!0},f:{name:"f",value:1E-45,scientific:!0},a:{name:"a",value:1E-54,scientific:!0},z:{name:"z",value:1E-63,scientific:!0},y:{name:"y",value:1E-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1E3,scientific:!0},M:{name:"M",value:1E6,scientific:!0},G:{name:"G",value:1E9,scientific:!0},T:{name:"T",value:1E12,scientific:!0},P:{name:"P",value:1E15,scientific:!0},E:{name:"E",value:1E18,scientific:!0},Z:{name:"Z",value:1E21,scientific:!0},
  Y:{name:"Y",value:1E24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",
  value:1,scientific:!0},kilo:{name:"kilo",value:1E3,scientific:!0},mega:{name:"mega",value:1E6,scientific:!0},giga:{name:"giga",value:1E9,scientific:!0},tera:{name:"tera",value:1E12,scientific:!0},peta:{name:"peta",value:1E15,scientific:!0},exa:{name:"exa",value:1E18,scientific:!0},zetta:{name:"zetta",value:1E21,scientific:!0},yotta:{name:"yotta",value:1E24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,
  2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1E6,scientific:!0}}};PREFIXES.SHORTLONG=_extends({},PREFIXES.SHORT,PREFIXES.LONG);PREFIXES.BINARY_SHORT=
  _extends({},PREFIXES.BINARY_SHORT_SI,PREFIXES.BINARY_SHORT_IEC);PREFIXES.BINARY_LONG=_extends({},PREFIXES.BINARY_LONG_SI,PREFIXES.BINARY_LONG_IEC);var BASE_DIMENSIONS="MASS LENGTH TIME CURRENT TEMPERATURE LUMINOUS_INTENSITY AMOUNT_OF_SUBSTANCE ANGLE BIT".split(" "),BASE_UNITS={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,
  0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,
  2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}},key$jscomp$0;for(key$jscomp$0 in BASE_UNITS)(0,_object.hasOwnProperty)(BASE_UNITS,key$jscomp$0)&&
  (BASE_UNITS[key$jscomp$0].key=key$jscomp$0);var UNIT_NONE={name:"",base:{},value:1,offset:0,dimensions:BASE_DIMENSIONS.map(function(x){return 0})},UNITS={meter:{name:"meter",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.LONG,value:1,offset:0},inch:{name:"inch",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.0254,offset:0},foot:{name:"foot",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.3048,offset:0},yard:{name:"yard",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.9144,offset:0},mile:{name:"mile",
  base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:1609.344,offset:0},link:{name:"link",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.201168,offset:0},rod:{name:"rod",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:5.0292,offset:0},chain:{name:"chain",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:1E-10,offset:0},m:{name:"m",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.SHORT,value:1,offset:0},
  "in":{name:"in",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.0254,offset:0},ft:{name:"ft",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.3048,offset:0},yd:{name:"yd",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.9144,offset:0},mi:{name:"mi",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:1609.344,offset:0},li:{name:"li",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:.201168,offset:0},rd:{name:"rd",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:5.02921,offset:0},
  ch:{name:"ch",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:20.1168,offset:0},mil:{name:"mil",base:BASE_UNITS.LENGTH,prefixes:PREFIXES.NONE,value:2.54E-5,offset:0},m2:{name:"m2",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:6.4516E-4,offset:0},sqft:{name:"sqft",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:.83612736,
  offset:0},sqmi:{name:"sqmi",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:6.4516E-10,offset:0},acre:{name:"acre",base:BASE_UNITS.SURFACE,prefixes:PREFIXES.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:BASE_UNITS.SURFACE,
  prefixes:PREFIXES.NONE,value:1E4,offset:0},m3:{name:"m3",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.CUBIC,value:1,offset:0},L:{name:"L",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.SHORT,value:.001,offset:0},l:{name:"l",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.SHORT,value:.001,offset:0},litre:{name:"litre",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.LONG,value:.001,offset:0},cuin:{name:"cuin",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:1.6387064E-5,offset:0},cuft:{name:"cuft",base:BASE_UNITS.VOLUME,
  prefixes:PREFIXES.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:5E-6,offset:0},tablespoon:{name:"tablespoon",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:1.5E-5,offset:0},drop:{name:"drop",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:5E-8,offset:0},gtt:{name:"gtt",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:5E-8,offset:0},
  minim:{name:"minim",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:6.161152E-8,offset:0},fluiddram:{name:"fluiddram",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:3.6966911E-6,offset:0},fluidounce:{name:"fluidounce",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:2.957353E-5,offset:0},gill:{name:"gill",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:1.182941E-4,offset:0},cc:{name:"cc",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:1E-6,offset:0},cup:{name:"cup",base:BASE_UNITS.VOLUME,
  prefixes:PREFIXES.NONE,value:2.365882E-4,offset:0},pint:{name:"pint",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:4.731765E-4,offset:0},quart:{name:"quart",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:9.463529E-4,offset:0},gallon:{name:"gallon",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,
  value:.1589873,offset:0},hogshead:{name:"hogshead",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:3.6966911E-6,offset:0},floz:{name:"floz",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:2.957353E-5,offset:0},gi:{name:"gi",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:1.182941E-4,offset:0},cp:{name:"cp",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:2.365882E-4,offset:0},pt:{name:"pt",base:BASE_UNITS.VOLUME,
  prefixes:PREFIXES.NONE,value:4.731765E-4,offset:0},qt:{name:"qt",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:9.463529E-4,offset:0},gal:{name:"gal",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.1173478,offset:0},obl:{name:"obl",base:BASE_UNITS.VOLUME,prefixes:PREFIXES.NONE,value:.1589873,offset:0},g:{name:"g",base:BASE_UNITS.MASS,prefixes:PREFIXES.SHORT,value:.001,offset:0},gram:{name:"gram",base:BASE_UNITS.MASS,
  prefixes:PREFIXES.LONG,value:.001,offset:0},ton:{name:"ton",base:BASE_UNITS.MASS,prefixes:PREFIXES.SHORT,value:907.18474,offset:0},t:{name:"t",base:BASE_UNITS.MASS,prefixes:PREFIXES.SHORT,value:1E3,offset:0},tonne:{name:"tonne",base:BASE_UNITS.MASS,prefixes:PREFIXES.LONG,value:1E3,offset:0},grain:{name:"grain",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:6.479891E-5,offset:0},dram:{name:"dram",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:BASE_UNITS.MASS,
  prefixes:PREFIXES.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:45.359237,offset:0},stick:{name:"stick",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.115,offset:0},stone:{name:"stone",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:6.479891E-5,
  offset:0},dr:{name:"dr",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:BASE_UNITS.MASS,prefixes:PREFIXES.NONE,value:45.359237,offset:0},s:{name:"s",base:BASE_UNITS.TIME,prefixes:PREFIXES.SHORT,value:1,offset:0},min:{name:"min",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:60,
  offset:0},h:{name:"h",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:3600,offset:0},second:{name:"second",base:BASE_UNITS.TIME,prefixes:PREFIXES.LONG,value:1,offset:0},sec:{name:"sec",base:BASE_UNITS.TIME,prefixes:PREFIXES.LONG,value:1,offset:0},minute:{name:"minute",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:60,offset:0},hour:{name:"hour",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:3600,offset:0},day:{name:"day",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:86400,offset:0},week:{name:"week",
  base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:604800,offset:0},month:{name:"month",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:2629800,offset:0},year:{name:"year",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:31557600,offset:0},decade:{name:"decade",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:315576E3,offset:0},century:{name:"century",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:315576E4,offset:0},millennium:{name:"millennium",base:BASE_UNITS.TIME,prefixes:PREFIXES.NONE,value:315576E5,
  offset:0},hertz:{name:"Hertz",base:BASE_UNITS.FREQUENCY,prefixes:PREFIXES.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:BASE_UNITS.FREQUENCY,prefixes:PREFIXES.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.SHORT,value:1,offset:0},radian:{name:"radian",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.LONG,value:1,offset:0},deg:{name:"deg",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.SHORT,value:null,offset:0},degree:{name:"degree",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.LONG,
  value:null,offset:0},grad:{name:"grad",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.SHORT,value:null,offset:0},gradian:{name:"gradian",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.LONG,value:null,offset:0},cycle:{name:"cycle",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:BASE_UNITS.ANGLE,prefixes:PREFIXES.NONE,value:null,offset:0},A:{name:"A",base:BASE_UNITS.CURRENT,prefixes:PREFIXES.SHORT,
  value:1,offset:0},ampere:{name:"ampere",base:BASE_UNITS.CURRENT,prefixes:PREFIXES.LONG,value:1,offset:0},K:{name:"K",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1,offset:0},degC:{name:"degC",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1,offset:273.15},degF:{name:"degF",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:BASE_UNITS.TEMPERATURE,
  prefixes:PREFIXES.NONE,value:1,offset:0},celsius:{name:"celsius",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:BASE_UNITS.TEMPERATURE,prefixes:PREFIXES.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:BASE_UNITS.AMOUNT_OF_SUBSTANCE,prefixes:PREFIXES.SHORT,value:1,offset:0},mole:{name:"mole",base:BASE_UNITS.AMOUNT_OF_SUBSTANCE,prefixes:PREFIXES.LONG,
  value:1,offset:0},cd:{name:"cd",base:BASE_UNITS.LUMINOUS_INTENSITY,prefixes:PREFIXES.SHORT,value:1,offset:0},candela:{name:"candela",base:BASE_UNITS.LUMINOUS_INTENSITY,prefixes:PREFIXES.LONG,value:1,offset:0},N:{name:"N",base:BASE_UNITS.FORCE,prefixes:PREFIXES.SHORT,value:1,offset:0},newton:{name:"newton",base:BASE_UNITS.FORCE,prefixes:PREFIXES.LONG,value:1,offset:0},dyn:{name:"dyn",base:BASE_UNITS.FORCE,prefixes:PREFIXES.SHORT,value:1E-5,offset:0},dyne:{name:"dyne",base:BASE_UNITS.FORCE,prefixes:PREFIXES.LONG,
  value:1E-5,offset:0},lbf:{name:"lbf",base:BASE_UNITS.FORCE,prefixes:PREFIXES.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:BASE_UNITS.FORCE,prefixes:PREFIXES.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:BASE_UNITS.FORCE,prefixes:PREFIXES.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:BASE_UNITS.FORCE,prefixes:PREFIXES.NONE,value:9.80665,offset:0},J:{name:"J",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.SHORT,value:1,offset:0},joule:{name:"joule",
  base:BASE_UNITS.ENERGY,prefixes:PREFIXES.SHORT,value:1,offset:0},erg:{name:"erg",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.NONE,value:1E-7,offset:0},Wh:{name:"Wh",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.SHORT,value:1.602176565E-19,offset:0},electronvolt:{name:"electronvolt",base:BASE_UNITS.ENERGY,prefixes:PREFIXES.LONG,value:1.602176565E-19,
  offset:0},W:{name:"W",base:BASE_UNITS.POWER,prefixes:PREFIXES.SHORT,value:1,offset:0},watt:{name:"watt",base:BASE_UNITS.POWER,prefixes:PREFIXES.LONG,value:1,offset:0},hp:{name:"hp",base:BASE_UNITS.POWER,prefixes:PREFIXES.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:BASE_UNITS.POWER,prefixes:PREFIXES.SHORT,value:Complex.I,offset:0},VA:{name:"VA",base:BASE_UNITS.POWER,prefixes:PREFIXES.SHORT,value:1,offset:0},Pa:{name:"Pa",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.SHORT,value:1,offset:0},
  psi:{name:"psi",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,value:101325,offset:0},bar:{name:"bar",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.SHORTLONG,value:1E5,offset:0},torr:{name:"torr",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,
  value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:BASE_UNITS.PRESSURE,prefixes:PREFIXES.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:BASE_UNITS.ELECTRIC_CHARGE,prefixes:PREFIXES.LONG,value:1,offset:0},C:{name:"C",base:BASE_UNITS.ELECTRIC_CHARGE,prefixes:PREFIXES.SHORT,value:1,offset:0},farad:{name:"farad",base:BASE_UNITS.ELECTRIC_CAPACITANCE,prefixes:PREFIXES.LONG,value:1,offset:0},F:{name:"F",base:BASE_UNITS.ELECTRIC_CAPACITANCE,prefixes:PREFIXES.SHORT,value:1,offset:0},volt:{name:"volt",
  base:BASE_UNITS.ELECTRIC_POTENTIAL,prefixes:PREFIXES.LONG,value:1,offset:0},V:{name:"V",base:BASE_UNITS.ELECTRIC_POTENTIAL,prefixes:PREFIXES.SHORT,value:1,offset:0},ohm:{name:"ohm",base:BASE_UNITS.ELECTRIC_RESISTANCE,prefixes:PREFIXES.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:BASE_UNITS.ELECTRIC_INDUCTANCE,prefixes:PREFIXES.LONG,value:1,offset:0},H:{name:"H",base:BASE_UNITS.ELECTRIC_INDUCTANCE,prefixes:PREFIXES.SHORT,value:1,offset:0},siemens:{name:"siemens",base:BASE_UNITS.ELECTRIC_CONDUCTANCE,
  prefixes:PREFIXES.LONG,value:1,offset:0},S:{name:"S",base:BASE_UNITS.ELECTRIC_CONDUCTANCE,prefixes:PREFIXES.SHORT,value:1,offset:0},weber:{name:"weber",base:BASE_UNITS.MAGNETIC_FLUX,prefixes:PREFIXES.LONG,value:1,offset:0},Wb:{name:"Wb",base:BASE_UNITS.MAGNETIC_FLUX,prefixes:PREFIXES.SHORT,value:1,offset:0},tesla:{name:"tesla",base:BASE_UNITS.MAGNETIC_FLUX_DENSITY,prefixes:PREFIXES.LONG,value:1,offset:0},T:{name:"T",base:BASE_UNITS.MAGNETIC_FLUX_DENSITY,prefixes:PREFIXES.SHORT,value:1,offset:0},b:{name:"b",
  base:BASE_UNITS.BIT,prefixes:PREFIXES.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:BASE_UNITS.BIT,prefixes:PREFIXES.BINARY_LONG,value:1,offset:0},B:{name:"B",base:BASE_UNITS.BIT,prefixes:PREFIXES.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:BASE_UNITS.BIT,prefixes:PREFIXES.BINARY_LONG,value:8,offset:0}};_ref={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",
  teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",
  sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",
  coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits","byte":"bytes"};calculateAngleValues(config$jscomp$0);on&&on("config",function(curr,prev){curr.number!==prev.number&&calculateAngleValues(curr)});var UNIT_SYSTEMS={si:{NONE:{unit:UNIT_NONE,prefix:PREFIXES.NONE[""]},LENGTH:{unit:UNITS.m,prefix:PREFIXES.SHORT[""]},MASS:{unit:UNITS.g,prefix:PREFIXES.SHORT.k},TIME:{unit:UNITS.s,prefix:PREFIXES.SHORT[""]},CURRENT:{unit:UNITS.A,
  prefix:PREFIXES.SHORT[""]},TEMPERATURE:{unit:UNITS.K,prefix:PREFIXES.SHORT[""]},LUMINOUS_INTENSITY:{unit:UNITS.cd,prefix:PREFIXES.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:UNITS.mol,prefix:PREFIXES.SHORT[""]},ANGLE:{unit:UNITS.rad,prefix:PREFIXES.SHORT[""]},BIT:{unit:UNITS.bits,prefix:PREFIXES.SHORT[""]},FORCE:{unit:UNITS.N,prefix:PREFIXES.SHORT[""]},ENERGY:{unit:UNITS.J,prefix:PREFIXES.SHORT[""]},POWER:{unit:UNITS.W,prefix:PREFIXES.SHORT[""]},PRESSURE:{unit:UNITS.Pa,prefix:PREFIXES.SHORT[""]},ELECTRIC_CHARGE:{unit:UNITS.C,
  prefix:PREFIXES.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:UNITS.F,prefix:PREFIXES.SHORT[""]},ELECTRIC_POTENTIAL:{unit:UNITS.V,prefix:PREFIXES.SHORT[""]},ELECTRIC_RESISTANCE:{unit:UNITS.ohm,prefix:PREFIXES.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:UNITS.H,prefix:PREFIXES.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:UNITS.S,prefix:PREFIXES.SHORT[""]},MAGNETIC_FLUX:{unit:UNITS.Wb,prefix:PREFIXES.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:UNITS.T,prefix:PREFIXES.SHORT[""]},FREQUENCY:{unit:UNITS.Hz,prefix:PREFIXES.SHORT[""]}}};
  UNIT_SYSTEMS.cgs=JSON.parse(JSON.stringify(UNIT_SYSTEMS.si));UNIT_SYSTEMS.cgs.LENGTH={unit:UNITS.m,prefix:PREFIXES.SHORT.c};UNIT_SYSTEMS.cgs.MASS={unit:UNITS.g,prefix:PREFIXES.SHORT[""]};UNIT_SYSTEMS.cgs.FORCE={unit:UNITS.dyn,prefix:PREFIXES.SHORT[""]};UNIT_SYSTEMS.cgs.ENERGY={unit:UNITS.erg,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.us=JSON.parse(JSON.stringify(UNIT_SYSTEMS.si));UNIT_SYSTEMS.us.LENGTH={unit:UNITS.ft,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.us.MASS={unit:UNITS.lbm,prefix:PREFIXES.NONE[""]};
  UNIT_SYSTEMS.us.TEMPERATURE={unit:UNITS.degF,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.us.FORCE={unit:UNITS.lbf,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.us.ENERGY={unit:UNITS.BTU,prefix:PREFIXES.BTU[""]};UNIT_SYSTEMS.us.POWER={unit:UNITS.hp,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.us.PRESSURE={unit:UNITS.psi,prefix:PREFIXES.NONE[""]};UNIT_SYSTEMS.auto=JSON.parse(JSON.stringify(UNIT_SYSTEMS.si));var currentUnitSystem=UNIT_SYSTEMS.auto;Unit.setUnitSystem=function(name){if((0,_object.hasOwnProperty)(UNIT_SYSTEMS,
  name))currentUnitSystem=UNIT_SYSTEMS[name];else throw Error("Unit system "+name+" does not exist. Choices are: "+Object.keys(UNIT_SYSTEMS).join(", "));};Unit.getUnitSystem=function(){for(var _key in UNIT_SYSTEMS)if((0,_object.hasOwnProperty)(UNIT_SYSTEMS,_key)&&UNIT_SYSTEMS[_key]===currentUnitSystem)return _key};Unit.typeConverters={BigNumber:function(x){return new _BigNumber(x+"")},Fraction:function(x){return new _Fraction(x)},Complex:function(x){return x},number:function(x){return x}};Unit._getNumberConverter=
  function(type){if(!Unit.typeConverters[type])throw new TypeError('Unsupported type "'+type+'"');return Unit.typeConverters[type]};for(var _key2 in UNITS)(0,_object.hasOwnProperty)(UNITS,_key2)&&(on=UNITS[_key2],on.dimensions=on.base.dimensions);for(var _name2 in _ref)if((0,_object.hasOwnProperty)(_ref,_name2)){_key2=UNITS[_ref[_name2]];on={};for(var _key3 in _key2)(0,_object.hasOwnProperty)(_key2,_key3)&&(on[_key3]=_key2[_key3]);on.name=_name2;UNITS[_name2]=on}Unit.isValidAlpha=function(c){return/^[a-zA-Z]$/.test(c)};
  Unit.createUnit=function(obj,options){if("object"!==_typeof(obj))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(options&&options.override)for(var _key4 in obj)if((0,_object.hasOwnProperty)(obj,_key4)&&Unit.deleteUnit(_key4),obj[_key4].aliases)for(options=0;options<obj[_key4].aliases.length;options++)Unit.deleteUnit(obj[_key4].aliases[options]);var lastUnit,_key5;for(_key5 in obj)(0,_object.hasOwnProperty)(obj,_key5)&&(lastUnit=Unit.createUnitSingle(_key5,obj[_key5]));
  return lastUnit};Unit.createUnitSingle=function(name,obj,options){if("undefined"===typeof obj||null===obj)obj={};if("string"!==typeof name)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if((0,_object.hasOwnProperty)(UNITS,name))throw Error('Cannot create unit "'+name+'": a unit with that name already exists');for(options=0;options<name.length;options++){c$jscomp$0=name.charAt(options);if(0===options&&!Unit.isValidAlpha(c$jscomp$0))throw Error('Invalid unit name (must begin with alpha character): "'+
  name+'"');if(0<options&&!Unit.isValidAlpha(c$jscomp$0)&&!isDigit(c$jscomp$0))throw Error('Invalid unit name (only alphanumeric characters are allowed): "'+name+'"');}var defUnit=null;options=[];var offset=0,definition;if(obj&&"Unit"===obj.type)defUnit=obj.clone();else if("string"===typeof obj)""!==obj&&(definition=obj);else if("object"===_typeof(obj)){definition=obj.definition;var prefixes=obj.prefixes;offset=obj.offset;var baseName=obj.baseName;obj.aliases&&(options=obj.aliases.valueOf())}else throw new TypeError('Cannot create unit "'+
  name+'" from "'+obj.toString()+'": expecting "string" or "Unit" or "Object"');if(options)for(obj=0;obj<options.length;obj++)if((0,_object.hasOwnProperty)(UNITS,options[obj]))throw Error('Cannot create alias "'+options[obj]+'": a unit with that name already exists');if(definition&&"string"===typeof definition&&!defUnit)try{defUnit=Unit.parse(definition,{allowNoUnits:!0})}catch(ex){throw ex.message='Could not create unit "'+name+'" from "'+definition+'": '+ex.message,ex;}else definition&&"Unit"===definition.type&&
  (defUnit=definition.clone());options=options||[];offset=offset||0;prefixes=prefixes&&prefixes.toUpperCase?PREFIXES[prefixes.toUpperCase()]||PREFIXES.NONE:PREFIXES.NONE;if(defUnit){prefixes={name:name,value:defUnit.value,dimensions:defUnit.dimensions.slice(0),prefixes:prefixes,offset:offset};offset=!1;for(var _i7 in BASE_UNITS)if((0,_object.hasOwnProperty)(BASE_UNITS,_i7)){definition=!0;for(var j=0;j<BASE_DIMENSIONS.length;j++)if(1E-12<Math.abs((prefixes.dimensions[j]||0)-(BASE_UNITS[_i7].dimensions[j]||
  0))){definition=!1;break}if(definition){offset=!0;prefixes.base=BASE_UNITS[_i7];break}}offset||(baseName=baseName||name+"_STUFF",_i7={dimensions:defUnit.dimensions.slice(0)},_i7.key=baseName,BASE_UNITS[baseName]=_i7,currentUnitSystem[baseName]={unit:prefixes,prefix:PREFIXES.NONE[""]},prefixes.base=BASE_UNITS[baseName])}else{baseName=baseName||name+"_STUFF";if(0<=BASE_DIMENSIONS.indexOf(baseName))throw Error('Cannot create new base unit "'+name+'": a base unit with that name already exists (and cannot be overridden)');
  BASE_DIMENSIONS.push(baseName);for(j in BASE_UNITS)(0,_object.hasOwnProperty)(BASE_UNITS,j)&&(BASE_UNITS[j].dimensions[BASE_DIMENSIONS.length-1]=0);_i7={dimensions:[]};for(defUnit=0;defUnit<BASE_DIMENSIONS.length;defUnit++)_i7.dimensions[defUnit]=0;_i7.dimensions[BASE_DIMENSIONS.length-1]=1;_i7.key=baseName;BASE_UNITS[baseName]=_i7;prefixes={name:name,value:1,dimensions:BASE_UNITS[baseName].dimensions.slice(0),prefixes:prefixes,offset:offset,base:BASE_UNITS[baseName]};currentUnitSystem[baseName]=
  {unit:prefixes,prefix:PREFIXES.NONE[""]}}Unit.UNITS[name]=prefixes;for(baseName=0;baseName<options.length;baseName++){_i7=options[baseName];defUnit={};for(var _key6 in prefixes)(0,_object.hasOwnProperty)(prefixes,_key6)&&(defUnit[_key6]=prefixes[_key6]);defUnit.name=_i7;Unit.UNITS[_i7]=defUnit}delete _findUnit.cache;return new Unit(null,name)};Unit.deleteUnit=function(name){delete Unit.UNITS[name]};Unit.PREFIXES=PREFIXES;Unit.BASE_DIMENSIONS=BASE_DIMENSIONS;Unit.BASE_UNITS=BASE_UNITS;Unit.UNIT_SYSTEMS=
  UNIT_SYSTEMS;Unit.UNITS=UNITS;return Unit},{isClass:!0});exports.createUnitClass=require}
  //# sourceMappingURL=module$node_modules$mathjs$lib$cjs$type$unit$Unit.js.map
  