@mxtommy/kip 4.0.2 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- import{b as Wt,c as jt,f as Ue,g as Yt,h as Jt,k as Xt,m as Le}from"./chunk-HIADZ4BV.js";import{d as Rt,v as Nt,w as Vt,z as Ht}from"./chunk-H3EFQCTE.js";import{D as Kt,O as Bt,P as Gt,m as xt,q as Ut,r as Lt,w as zt}from"./chunk-F75BVJPY.js";import{i as Fe,q as Pe,r as qe,s as qt}from"./chunk-SZ2GUIT5.js";import{Ab as L,Ad as At,Bb as z,Bd as Re,Dd as Dt,E as te,F as _e,Fa as q,Fb as _t,Fd as Ie,Hb as Te,Ia as pt,Jb as bt,K as st,Kb as Ee,Lb as Ae,Nd as It,Oa as ht,Pa as ft,Ua as gt,V as be,W as we,Wa as ie,Wb as wt,X as V,Xb as Ct,ab as ne,bb as ke,ca as ot,cb as Se,d as Kr,da as lt,e as Nr,ea as re,fe as Ft,ga as y,ge as Pt,hb as Me,hc as kt,ib as D,j as ee,ja as H,jb as U,ka as B,kb as yt,la as ct,na as Ce,nc as St,pc as I,qc as De,ra as ut,rb as xe,tb as j,ua as mt,ud as Ot,vb as G,w as ve,wa as dt,wb as vt,wd as Tt,xb as Oe,xc as Mt,xd as oe,yb as ae,yd as Et,z as at,zb as se}from"./chunk-OB3QLUH6.js";var Qt=Kr((ze,Ke)=>{(function(u,w){typeof ze=="object"&&typeof Ke<"u"?Ke.exports=w():typeof define=="function"&&define.amd?define(w):(u=typeof globalThis<"u"?globalThis:u||self,u.Qty=w())})(ze,function(){"use strict";function u(e){return typeof e=="string"||e instanceof String}var w=Number.isFinite||window.isFinite;function t(e){return w(e)}function n(e){return e}function s(e){var r={};return e.filter(function(i){return r.hasOwnProperty(i)?!1:r[i]=!0})}function l(e,r){if(r.length!==e.length)return!1;for(var i=0;i<e.length;i++)if(r[i].compareArray&&!r[i].compareArray(e[i])||r[i]!==e[i])return!1;return!0}function h(e,r){Object.keys(r).forEach(function(i){e[i]=r[i]})}function f(){for(var e=1,r=0,i=0;i<arguments.length;i++){var a=arguments[i];r=r+Ve(a),e*=a}return r!==0?Y(e,r):e}function v(e,r){if(r===0)throw new Error("Divide by zero");var i=Math.pow(10,Ve(r)),a=i/(i*r);return f(e,a)}function Y(e,r){return Math.round(e*Math.pow(10,r))/Math.pow(10,r)}function Ve(e){if(!isFinite(e))return 0;for(var r=0;e%1!==0;)e*=10,r++;return r}function p(){var e;if(!this)return e=Object.create(p.prototype),p.apply(e,arguments),e;e=Error.apply(this,arguments),this.name="QtyError",this.message=e.message,this.stack=e.stack}p.prototype=Object.create(Error.prototype,{constructor:{value:p}});function W(e,r){throw new p("Incompatible units: "+e+" and "+r)}var x={"<googol>":[["googol"],1e100,"prefix"],"<kibi>":[["Ki","Kibi","kibi"],Math.pow(2,10),"prefix"],"<mebi>":[["Mi","Mebi","mebi"],Math.pow(2,20),"prefix"],"<gibi>":[["Gi","Gibi","gibi"],Math.pow(2,30),"prefix"],"<tebi>":[["Ti","Tebi","tebi"],Math.pow(2,40),"prefix"],"<pebi>":[["Pi","Pebi","pebi"],Math.pow(2,50),"prefix"],"<exi>":[["Ei","Exi","exi"],Math.pow(2,60),"prefix"],"<zebi>":[["Zi","Zebi","zebi"],Math.pow(2,70),"prefix"],"<yebi>":[["Yi","Yebi","yebi"],Math.pow(2,80),"prefix"],"<yotta>":[["Y","Yotta","yotta"],1e24,"prefix"],"<zetta>":[["Z","Zetta","zetta"],1e21,"prefix"],"<exa>":[["E","Exa","exa"],1e18,"prefix"],"<peta>":[["P","Peta","peta"],1e15,"prefix"],"<tera>":[["T","Tera","tera"],1e12,"prefix"],"<giga>":[["G","Giga","giga"],1e9,"prefix"],"<mega>":[["M","Mega","mega"],1e6,"prefix"],"<kilo>":[["k","kilo"],1e3,"prefix"],"<hecto>":[["h","Hecto","hecto"],100,"prefix"],"<deca>":[["da","Deca","deca","deka"],10,"prefix"],"<deci>":[["d","Deci","deci"],.1,"prefix"],"<centi>":[["c","Centi","centi"],.01,"prefix"],"<milli>":[["m","Milli","milli"],.001,"prefix"],"<micro>":[["u","\u03BC","\xB5","Micro","mc","micro"],1e-6,"prefix"],"<nano>":[["n","Nano","nano"],1e-9,"prefix"],"<pico>":[["p","Pico","pico"],1e-12,"prefix"],"<femto>":[["f","Femto","femto"],1e-15,"prefix"],"<atto>":[["a","Atto","atto"],1e-18,"prefix"],"<zepto>":[["z","Zepto","zepto"],1e-21,"prefix"],"<yocto>":[["y","Yocto","yocto"],1e-24,"prefix"],"<1>":[["1","<1>"],1,""],"<meter>":[["m","meter","meters","metre","metres"],1,"length",["<meter>"]],"<inch>":[["in","inch","inches",'"'],.0254,"length",["<meter>"]],"<foot>":[["ft","foot","feet","'"],.3048,"length",["<meter>"]],"<yard>":[["yd","yard","yards"],.9144,"length",["<meter>"]],"<mile>":[["mi","mile","miles"],1609.344,"length",["<meter>"]],"<naut-mile>":[["nmi","naut-mile"],1852,"length",["<meter>"]],"<league>":[["league","leagues"],4828,"length",["<meter>"]],"<furlong>":[["furlong","furlongs"],201.2,"length",["<meter>"]],"<rod>":[["rd","rod","rods"],5.029,"length",["<meter>"]],"<mil>":[["mil","mils"],254e-7,"length",["<meter>"]],"<angstrom>":[["ang","angstrom","angstroms"],1e-10,"length",["<meter>"]],"<fathom>":[["fathom","fathoms"],1.829,"length",["<meter>"]],"<pica>":[["pica","picas"],.00423333333,"length",["<meter>"]],"<point>":[["pt","point","points"],.000352777778,"length",["<meter>"]],"<redshift>":[["z","red-shift","redshift"],1302773e20,"length",["<meter>"]],"<AU>":[["AU","astronomical-unit"],1495979e5,"length",["<meter>"]],"<light-second>":[["ls","light-second"],299792500,"length",["<meter>"]],"<light-minute>":[["lmin","light-minute"],1798755e4,"length",["<meter>"]],"<light-year>":[["ly","light-year"],9460528e9,"length",["<meter>"]],"<parsec>":[["pc","parsec","parsecs"],3085678e10,"length",["<meter>"]],"<datamile>":[["DM","datamile"],1828.8,"length",["<meter>"]],"<kilogram>":[["kg","kilogram","kilograms"],1,"mass",["<kilogram>"]],"<AMU>":[["u","AMU","amu"],1660538921e-36,"mass",["<kilogram>"]],"<dalton>":[["Da","Dalton","Daltons","dalton","daltons"],1660538921e-36,"mass",["<kilogram>"]],"<slug>":[["slug","slugs"],14.5939029,"mass",["<kilogram>"]],"<short-ton>":[["tn","ton","short-ton"],907.18474,"mass",["<kilogram>"]],"<metric-ton>":[["t","tonne","metric-ton"],1e3,"mass",["<kilogram>"]],"<carat>":[["ct","carat","carats"],2e-4,"mass",["<kilogram>"]],"<pound>":[["lbs","lb","pound","pounds","#"],.45359237,"mass",["<kilogram>"]],"<ounce>":[["oz","ounce","ounces"],.0283495231,"mass",["<kilogram>"]],"<gram>":[["g","gram","grams","gramme","grammes"],.001,"mass",["<kilogram>"]],"<grain>":[["grain","grains","gr"],6479891e-11,"mass",["<kilogram>"]],"<dram>":[["dram","drams","dr"],.0017718452,"mass",["<kilogram>"]],"<stone>":[["stone","stones","st"],6.35029318,"mass",["<kilogram>"]],"<hectare>":[["hectare"],1e4,"area",["<meter>","<meter>"]],"<acre>":[["acre","acres"],4046.85642,"area",["<meter>","<meter>"]],"<sqft>":[["sqft"],1,"area",["<foot>","<foot>"]],"<liter>":[["l","L","liter","liters","litre","litres"],.001,"volume",["<meter>","<meter>","<meter>"]],"<gallon>":[["gal","gallon","gallons"],.0037854118,"volume",["<meter>","<meter>","<meter>"]],"<gallon-imp>":[["galimp","gallon-imp","gallons-imp"],.00454609,"volume",["<meter>","<meter>","<meter>"]],"<quart>":[["qt","quart","quarts"],.00094635295,"volume",["<meter>","<meter>","<meter>"]],"<pint>":[["pt","pint","pints"],.000473176475,"volume",["<meter>","<meter>","<meter>"]],"<pint-imp>":[["ptimp","pint-imp","pints-imp"],.00056826125,"volume",["<meter>","<meter>","<meter>"]],"<cup>":[["cu","cup","cups"],.000236588238,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce>":[["floz","fluid-ounce","fluid-ounces"],295735297e-13,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce-imp>":[["flozimp","floz-imp","fluid-ounce-imp","fluid-ounces-imp"],284130625e-13,"volume",["<meter>","<meter>","<meter>"]],"<tablespoon>":[["tb","tbsp","tbs","tablespoon","tablespoons"],147867648e-13,"volume",["<meter>","<meter>","<meter>"]],"<teaspoon>":[["tsp","teaspoon","teaspoons"],492892161e-14,"volume",["<meter>","<meter>","<meter>"]],"<bushel>":[["bu","bsh","bushel","bushels"],.035239072,"volume",["<meter>","<meter>","<meter>"]],"<oilbarrel>":[["bbl","oilbarrel","oilbarrels","oil-barrel","oil-barrels"],.158987294928,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel>":[["bl","bl-us","beerbarrel","beerbarrels","beer-barrel","beer-barrels"],.1173477658,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel-imp>":[["blimp","bl-imp","beerbarrel-imp","beerbarrels-imp","beer-barrel-imp","beer-barrels-imp"],.16365924,"volume",["<meter>","<meter>","<meter>"]],"<kph>":[["kph"],.277777778,"speed",["<meter>"],["<second>"]],"<mph>":[["mph"],.44704,"speed",["<meter>"],["<second>"]],"<knot>":[["kt","kn","kts","knot","knots"],.514444444,"speed",["<meter>"],["<second>"]],"<fps>":[["fps"],.3048,"speed",["<meter>"],["<second>"]],"<gee>":[["gee"],9.80665,"acceleration",["<meter>"],["<second>","<second>"]],"<Gal>":[["Gal"],.01,"acceleration",["<meter>"],["<second>","<second>"]],"<kelvin>":[["degK","kelvin"],1,"temperature",["<kelvin>"]],"<celsius>":[["degC","celsius","celsius","centigrade"],1,"temperature",["<kelvin>"]],"<fahrenheit>":[["degF","fahrenheit"],5/9,"temperature",["<kelvin>"]],"<rankine>":[["degR","rankine"],5/9,"temperature",["<kelvin>"]],"<temp-K>":[["tempK","temp-K"],1,"temperature",["<temp-K>"]],"<temp-C>":[["tempC","temp-C"],1,"temperature",["<temp-K>"]],"<temp-F>":[["tempF","temp-F"],5/9,"temperature",["<temp-K>"]],"<temp-R>":[["tempR","temp-R"],5/9,"temperature",["<temp-K>"]],"<second>":[["s","sec","secs","second","seconds"],1,"time",["<second>"]],"<minute>":[["min","mins","minute","minutes"],60,"time",["<second>"]],"<hour>":[["h","hr","hrs","hour","hours"],3600,"time",["<second>"]],"<day>":[["d","day","days"],3600*24,"time",["<second>"]],"<week>":[["wk","week","weeks"],7*3600*24,"time",["<second>"]],"<fortnight>":[["fortnight","fortnights"],1209600,"time",["<second>"]],"<year>":[["y","yr","year","years","annum"],31556926,"time",["<second>"]],"<decade>":[["decade","decades"],315569260,"time",["<second>"]],"<century>":[["century","centuries"],3155692600,"time",["<second>"]],"<pascal>":[["Pa","pascal","Pascal"],1,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<bar>":[["bar","bars"],1e5,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<mmHg>":[["mmHg"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inHg>":[["inHg"],3386.3881472,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<torr>":[["torr"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<atm>":[["atm","ATM","atmosphere","atmospheres"],101325,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<psi>":[["psi"],6894.76,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<cmh2o>":[["cmH2O","cmh2o"],98.0638,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inh2o>":[["inH2O","inh2o"],249.082052,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<poise>":[["P","poise"],.1,"viscosity",["<kilogram>"],["<meter>","<second>"]],"<stokes>":[["St","stokes"],1e-4,"viscosity",["<meter>","<meter>"],["<second>"]],"<mole>":[["mol","mole"],1,"substance",["<mole>"]],"<molar>":[["M","molar"],1e3,"molar_concentration",["<mole>"],["<meter>","<meter>","<meter>"]],"<wtpercent>":[["wt%","wtpercent"],10,"molar_concentration",["<kilogram>"],["<meter>","<meter>","<meter>"]],"<katal>":[["kat","katal","Katal"],1,"activity",["<mole>"],["<second>"]],"<unit>":[["U","enzUnit","unit"],16667e-19,"activity",["<mole>"],["<second>"]],"<farad>":[["F","farad","Farad"],1,"capacitance",["<second>","<second>","<second>","<second>","<ampere>","<ampere>"],["<meter>","<meter>","<kilogram>"]],"<coulomb>":[["C","coulomb","Coulomb"],1,"charge",["<ampere>","<second>"]],"<Ah>":[["Ah"],3600,"charge",["<ampere>","<second>"]],"<ampere>":[["A","Ampere","ampere","amp","amps"],1,"current",["<ampere>"]],"<siemens>":[["S","Siemens","siemens"],1,"conductance",["<second>","<second>","<second>","<ampere>","<ampere>"],["<kilogram>","<meter>","<meter>"]],"<henry>":[["H","Henry","henry"],1,"inductance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>","<ampere>"]],"<volt>":[["V","Volt","volt","volts"],1,"potential",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>"]],"<ohm>":[["Ohm","ohm","\u03A9","\u2126"],1,"resistance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>","<ampere>"]],"<weber>":[["Wb","weber","webers"],1,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<tesla>":[["T","tesla","teslas"],1,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<gauss>":[["G","gauss"],1e-4,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<maxwell>":[["Mx","maxwell","maxwells"],1e-8,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<oersted>":[["Oe","oersted","oersteds"],250/Math.PI,"magnetism",["<ampere>"],["<meter>"]],"<joule>":[["J","joule","Joule","joules","Joules"],1,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<erg>":[["erg","ergs"],1e-7,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<btu>":[["BTU","btu","BTUs"],1055.056,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<calorie>":[["cal","calorie","calories"],4.184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Calorie>":[["Cal","Calorie","Calories"],4184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<therm-US>":[["th","therm","therms","Therm","therm-US"],105480400,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Wh>":[["Wh"],3600,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<electronvolt>":[["eV","electronvolt","electronvolts"],1602176634e-28,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<newton>":[["N","Newton","newton"],1,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<dyne>":[["dyn","dyne"],1e-5,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<pound-force>":[["lbf","pound-force"],4.448222,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<hertz>":[["Hz","hertz","Hertz"],1,"frequency",["<1>"],["<second>"]],"<radian>":[["rad","radian","radians"],1,"angle",["<radian>"]],"<degree>":[["deg","degree","degrees"],Math.PI/180,"angle",["<radian>"]],"<arcminute>":[["arcmin","arcminute","arcminutes"],Math.PI/10800,"angle",["<radian>"]],"<arcsecond>":[["arcsec","arcsecond","arcseconds"],Math.PI/648e3,"angle",["<radian>"]],"<gradian>":[["gon","grad","gradian","grads"],Math.PI/200,"angle",["<radian>"]],"<steradian>":[["sr","steradian","steradians"],1,"solid_angle",["<steradian>"]],"<rotation>":[["rotation"],2*Math.PI,"angle",["<radian>"]],"<rpm>":[["rpm"],2*Math.PI/60,"angular_velocity",["<radian>"],["<second>"]],"<byte>":[["B","byte","bytes"],1,"information",["<byte>"]],"<bit>":[["b","bit","bits"],.125,"information",["<byte>"]],"<Bps>":[["Bps"],1,"information_rate",["<byte>"],["<second>"]],"<bps>":[["bps"],.125,"information_rate",["<byte>"],["<second>"]],"<dollar>":[["USD","dollar"],1,"currency",["<dollar>"]],"<cents>":[["cents"],.01,"currency",["<dollar>"]],"<candela>":[["cd","candela"],1,"luminosity",["<candela>"]],"<lumen>":[["lm","lumen"],1,"luminous_power",["<candela>","<steradian>"]],"<lux>":[["lux"],1,"illuminance",["<candela>","<steradian>"],["<meter>","<meter>"]],"<watt>":[["W","watt","watts"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere>":[["VA","volt-ampere"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere-reactive>":[["var","Var","VAr","VAR","volt-ampere-reactive"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<horsepower>":[["hp","horsepower"],745.699872,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<gray>":[["Gy","gray","grays"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<roentgen>":[["R","roentgen"],.00933,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<sievert>":[["Sv","sievert","sieverts"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<becquerel>":[["Bq","becquerel","becquerels"],1,"radiation",["<1>"],["<second>"]],"<curie>":[["Ci","curie","curies"],37e9,"radiation",["<1>"],["<second>"]],"<cpm>":[["cpm"],1/60,"rate",["<count>"],["<second>"]],"<dpm>":[["dpm"],1/60,"rate",["<count>"],["<second>"]],"<bpm>":[["bpm"],1/60,"rate",["<count>"],["<second>"]],"<dot>":[["dot","dots"],1,"resolution",["<each>"]],"<pixel>":[["pixel","px"],1,"resolution",["<each>"]],"<ppi>":[["ppi"],1,"resolution",["<pixel>"],["<inch>"]],"<dpi>":[["dpi"],1,"typography",["<dot>"],["<inch>"]],"<cell>":[["cells","cell"],1,"counting",["<each>"]],"<each>":[["each"],1,"counting",["<each>"]],"<count>":[["count"],1,"counting",["<each>"]],"<base-pair>":[["bp","base-pair"],1,"counting",["<each>"]],"<nucleotide>":[["nt","nucleotide"],1,"counting",["<each>"]],"<molecule>":[["molecule","molecules"],1,"counting",["<1>"]],"<dozen>":[["doz","dz","dozen"],12,"prefix_only",["<each>"]],"<percent>":[["%","percent"],.01,"prefix_only",["<1>"]],"<ppm>":[["ppm"],1e-6,"prefix_only",["<1>"]],"<ppb>":[["ppb"],1e-9,"prefix_only",["<1>"]],"<ppt>":[["ppt"],1e-12,"prefix_only",["<1>"]],"<ppq>":[["ppq"],1e-15,"prefix_only",["<1>"]],"<gross>":[["gr","gross"],144,"prefix_only",["<dozen>","<dozen>"]],"<decibel>":[["dB","decibel","decibels"],1,"logarithmic",["<decibel>"]]},sr=["<meter>","<kilogram>","<second>","<mole>","<ampere>","<radian>","<kelvin>","<temp-K>","<byte>","<dollar>","<candela>","<each>","<steradian>","<decibel>"],J="<1>",C=[J];function or(e,r){var i=r[1],a=r[3]||[],o=r[4]||[];if(!t(i))throw new p(e+": Invalid unit definition. 'scalar' must be a number");a.forEach(function(c){if(x[c]===void 0)throw new p(e+": Invalid unit definition. Unit "+c+" in 'numerator' is not recognized")}),o.forEach(function(c){if(x[c]===void 0)throw new p(e+": Invalid unit definition. Unit "+c+" in 'denominator' is not recognized")})}var A={},X={},S={},K={},Q={};for(var R in x)if(x.hasOwnProperty(R)){var O=x[R];if(O[2]==="prefix"){A[R]=O[1];for(var ce=0;ce<O[0].length;ce++)X[O[0][ce]]=R}else{or(R,O),S[R]={scalar:O[1],numerator:O[3],denominator:O[4]};for(var ue=0;ue<O[0].length;ue++)K[O[0][ue]]=R}Q[R]=O[0][0]}function lr(e){var r,i=[],a=Object.keys(x);if(typeof e>"u")for(r=0;r<a.length;r++)["","prefix"].indexOf(x[a[r]][2])===-1&&i.push(a[r].substr(1,a[r].length-2));else{if(this.getKinds().indexOf(e)===-1)throw new p("Kind not recognized");for(r=0;r<a.length;r++)x[a[r]][2]===e&&i.push(a[r].substr(1,a[r].length-2))}return i.sort(function(o,c){return o.toLowerCase()<c.toLowerCase()?-1:o.toLowerCase()>c.toLowerCase()?1:0})}function cr(e){if(!K[e])throw new p("Unit not recognized");return x[K[e]][0]}var me=["length","time","temperature","mass","current","substance","luminosity","currency","information","angle"];function ur(){if(this.signature)return this.signature;for(var e=He.call(this),r=0;r<e.length;r++)e[r]*=Math.pow(20,r);return e.reduce(function(i,a){return i+a},0)}function He(){if(!this.isBase())return He.call(this.toBase());for(var e=new Array(me.length),r=0;r<e.length;r++)e[r]=0;for(var i,a,o=0;o<this.numerator.length;o++)(i=x[this.numerator[o]])&&(a=me.indexOf(i[2]),a>=0&&(e[a]=e[a]+1));for(var c=0;c<this.denominator.length;c++)(i=x[this.denominator[c]])&&(a=me.indexOf(i[2]),a>=0&&(e[a]=e[a]-1));return e}var Be="[+-]",de="\\d+",mr=Be+"?"+de,Ge="\\."+de,dr="(?:"+de+"(?:"+Ge+")?)|(?:"+Ge+")",pr="[Ee]"+mr,hr="(?:"+dr+")(?:"+pr+")?",fr=Be+"?\\s*"+hr,gr="("+fr+")?\\s*([^/]*)(?:/(.+))?",yr=new RegExp("^"+gr+"$"),We="\\^|\\*{2}",je="[01234]",vr=new RegExp("([^ \\*\\d]+?)(?:"+We+")?(-?"+je+"(?![a-zA-Z]))"),_r=new RegExp("([^ \\*\\d]+?)(?:"+We+")?("+je+"(?![a-zA-Z]))");function Ye(e){u(e)||(e=e.toString()),e=e.trim();var r=yr.exec(e);if(!r)throw new p(e+": Quantity not recognized");var i=r[1];i?(i=i.replace(/\s/g,""),this.scalar=parseFloat(i)):this.scalar=1;for(var a=r[2],o=r[3],c,_,g;r=vr.exec(a);){if(c=parseFloat(r[2]),isNaN(c))throw new p("Unit exponent is not a number");if(c===0&&!pe.test(r[1]))throw new p("Unit not recognized");_=r[1]+" ",g="";for(var b=0;b<Math.abs(c);b++)g+=_;c>=0?a=a.replace(r[0],g):(o=o?o+g:g,a=a.replace(r[0],""))}for(;r=_r.exec(o);){if(c=parseFloat(r[2]),isNaN(c))throw new p("Unit exponent is not a number");if(c===0&&!pe.test(r[1]))throw new p("Unit not recognized");_=r[1]+" ",g="";for(var M=0;M<c;M++)g+=_;o=o.replace(r[0],g)}a&&(this.numerator=Qe(a.trim())),o&&(this.denominator=Qe(o.trim()))}var br=Object.keys(X).sort(function(e,r){return r.length-e.length}).join("|"),wr=Object.keys(K).sort(function(e,r){return r.length-e.length}).join("|"),Cr="\\b|$",Je="("+br+")??("+wr+")(?:"+Cr+")",pe=new RegExp("^\\s*("+Je+"[\\s\\*]*)+$"),kr=new RegExp(Je,"g"),Xe={};function Qe(e){var r=Xe[e];if(r)return r;var i,a=[];if(!pe.test(e))throw new p("Unit not recognized");for(;i=kr.exec(e);)a.push(i.slice(1));return a=a.map(function(o){return X[o[0]]?[X[o[0]],K[o[1]]]:[K[o[1]]]}),a=a.reduce(function(o,c){return o.concat(c)},[]),a=a.filter(function(o){return o}),Xe[e]=a,a}function Sr(e){if(!u(e))throw new p("Argument should be a string");try{return this(e)}catch{return null}}function Z(e){return e instanceof m}function m(e,r){if(Mr.apply(null,arguments),!Z(this))return new m(e,r);if(this.scalar=null,this.baseScalar=null,this.signature=null,this._conversionCache={},this.numerator=C,this.denominator=C,Ze(e)?(this.scalar=e.scalar,this.numerator=e.numerator&&e.numerator.length!==0?e.numerator:C,this.denominator=e.denominator&&e.denominator.length!==0?e.denominator:C):r?(Ye.call(this,r),this.scalar=e):Ye.call(this,e),this.denominator.join("*").indexOf("temp")>=0)throw new p("Cannot divide with temperatures");if(this.numerator.join("*").indexOf("temp")>=0){if(this.numerator.length>1)throw new p("Cannot multiply by temperatures");if(!l(this.denominator,C))throw new p("Cannot divide with temperatures")}if(this.initValue=e,xr.call(this),this.isTemperature()&&this.baseScalar<0)throw new p("Temperatures must not be less than absolute zero")}m.prototype={constructor:m};function Mr(e,r){if(r){if(!(t(e)&&u(r)))throw new p("Only number accepted as initialization value when units are explicitly provided")}else if(!(u(e)||t(e)||Z(e)||Ze(e)))throw new p("Only string, number or quantity accepted as single initialization value")}function Ze(e){return e&&typeof e=="object"&&e.hasOwnProperty("scalar")}function xr(){if(this.baseScalar)return this.baseScalar;if(this.isBase())this.baseScalar=this.scalar,this.signature=ur.call(this);else{var e=this.toBase();this.baseScalar=e.scalar,this.signature=e.signature}}var he={"-312078":"elastance","-312058":"resistance","-312038":"inductance","-152058":"potential","-152040":"magnetism","-152038":"magnetism","-7997":"specific_volume","-79":"snap","-59":"jolt","-39":"acceleration","-38":"radiation","-20":"frequency","-19":"speed","-18":"viscosity","-17":"volumetric_flow","-1":"wavenumber",0:"unitless",1:"length",2:"area",3:"volume",20:"time",400:"temperature",7941:"yank",7942:"power",7959:"pressure",7961:"force",7962:"energy",7979:"viscosity",7981:"momentum",7982:"angular_momentum",7997:"density",7998:"area_density",8e3:"mass",152020:"radiation_exposure",159999:"magnetism",16e4:"current",160020:"charge",312058:"conductance",312078:"capacitance",3199980:"activity",3199997:"molar_concentration",32e5:"substance",63999998:"illuminance",64e6:"luminous_power",128e7:"currency","25599999980":"information_rate","25600000000":"information","511999999980":"angular_velocity","512000000000":"angle"};function Or(){return s(Object.keys(he).map(function(e){return he[e]}))}m.prototype.kind=function(){return he[this.signature.toString()]},h(m.prototype,{isDegrees:function(){return(this.signature===null||this.signature===400)&&this.numerator.length===1&&l(this.denominator,C)&&(this.numerator[0].match(/<temp-[CFRK]>/)||this.numerator[0].match(/<(kelvin|celsius|rankine|fahrenheit)>/))},isTemperature:function(){return this.isDegrees()&&this.numerator[0].match(/<temp-[CFRK]>/)}});function Tr(e,r){var i=e.units(),a=r.to(i),o=m(fe(i));return m({scalar:e.scalar-a.scalar,numerator:o.numerator,denominator:o.denominator})}function Er(e,r){var i=r.to(fe(e.units()));return m({scalar:e.scalar-i.scalar,numerator:e.numerator,denominator:e.denominator})}function $e(e,r){var i=r.to(fe(e.units()));return m({scalar:e.scalar+i.scalar,numerator:e.numerator,denominator:e.denominator})}function fe(e){if(e==="tempK")return"degK";if(e==="tempC")return"degC";if(e==="tempF")return"degF";if(e==="tempR")return"degR";throw new p("Unknown type for temp conversion from: "+e)}function Ar(e,r){var i=Dr(e),a=r.units(),o;if(a==="degK")o=i.scalar;else if(a==="degC")o=i.scalar;else if(a==="degF")o=i.scalar*9/5;else if(a==="degR")o=i.scalar*9/5;else throw new p("Unknown type for degree conversion to: "+a);return m({scalar:o,numerator:r.numerator,denominator:r.denominator})}function Dr(e){var r=e.units(),i;if(r.match(/(deg)[CFRK]/))i=e.baseScalar;else if(r==="tempK")i=e.scalar;else if(r==="tempC")i=e.scalar;else if(r==="tempF")i=e.scalar*5/9;else if(r==="tempR")i=e.scalar*5/9;else throw new p("Unknown type for temp conversion from: "+r);return m({scalar:i,numerator:["<kelvin>"],denominator:C})}function Rr(e,r){var i=r.units(),a;if(i==="tempK")a=e.baseScalar;else if(i==="tempC")a=e.baseScalar-273.15;else if(i==="tempF")a=e.baseScalar*9/5-459.67;else if(i==="tempR")a=e.baseScalar*9/5;else throw new p("Unknown type for temp conversion to: "+i);return m({scalar:a,numerator:r.numerator,denominator:r.denominator})}function Ir(e){var r=e.units(),i;if(r.match(/(deg)[CFRK]/))i=e.baseScalar;else if(r==="tempK")i=e.scalar;else if(r==="tempC")i=e.scalar+273.15;else if(r==="tempF")i=(e.scalar+459.67)*5/9;else if(r==="tempR")i=e.scalar*5/9;else throw new p("Unknown type for temp conversion from: "+r);return m({scalar:i,numerator:["<temp-K>"],denominator:C})}h(m.prototype,{to:function(e){var r,i;if(e==null)return this;if(!u(e))return this.to(e.units());if(r=this._conversionCache[e],r)return r;if(i=m(e),i.units()===this.units())return this;if(!this.isCompatible(i))this.isInverse(i)?i=this.inverse().to(e):W(this.units(),i.units());else if(i.isTemperature())i=Rr(this,i);else if(i.isDegrees())i=Ar(this,i);else{var a=v(this.baseScalar,i.baseScalar);i=m({scalar:a,numerator:i.numerator,denominator:i.denominator})}return this._conversionCache[e]=i,i},toBase:function(){if(this.isBase())return this;if(this.isTemperature())return Ir(this);var e=et[this.units()];return e||(e=Pr(this.numerator,this.denominator),et[this.units()]=e),e.mul(this.scalar)},toFloat:function(){if(this.isUnitless())return this.scalar;throw new p("Can't convert to Float unless unitless. Use Unit#scalar")},toPrec:function(e){if(u(e)&&(e=m(e)),t(e)&&(e=m(e+" "+this.units())),this.isUnitless()?e.isUnitless()||W(this.units(),e.units()):e=e.to(this.units()),e.scalar===0)throw new p("Divide by zero");var r=f(Math.round(this.scalar/e.scalar),e.scalar);return m(r+this.units())}});function Fr(e,r){var i=m(e),a=m(r);if(i.eq(a))return n;var o;return i.isTemperature()?o=function(c){return i.mul(c).to(a).scalar}:o=function(c){return c*i.baseScalar/a.baseScalar},function(_){var g,b,M;if(Array.isArray(_)){for(b=_.length,M=[],g=0;g<b;g++)M.push(o(_[g]));return M}else return o(_)}}var et={};function Pr(e,r){for(var i=[],a=[],o=1,c,_=0;_<e.length;_++)c=e[_],A[c]?o=f(o,A[c]):S[c]&&(o*=S[c].scalar,S[c].numerator&&i.push(S[c].numerator),S[c].denominator&&a.push(S[c].denominator));for(var g=0;g<r.length;g++)c=r[g],A[c]?o/=A[c]:S[c]&&(o/=S[c].scalar,S[c].numerator&&a.push(S[c].numerator),S[c].denominator&&i.push(S[c].denominator));return i=i.reduce(function(b,M){return b.concat(M)},[]),a=a.reduce(function(b,M){return b.concat(M)},[]),m({scalar:o,numerator:i,denominator:a})}m.parse=Sr,m.getUnits=lr,m.getAliases=cr,m.mulSafe=f,m.divSafe=v,m.getKinds=Or,m.swiftConverter=Fr,m.Error=p,h(m.prototype,{add:function(e){if(u(e)&&(e=m(e)),this.isCompatible(e)||W(this.units(),e.units()),this.isTemperature()&&e.isTemperature())throw new p("Cannot add two temperatures");return this.isTemperature()?$e(this,e):e.isTemperature()?$e(e,this):m({scalar:this.scalar+e.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},sub:function(e){if(u(e)&&(e=m(e)),this.isCompatible(e)||W(this.units(),e.units()),this.isTemperature()&&e.isTemperature())return Tr(this,e);if(this.isTemperature())return Er(this,e);if(e.isTemperature())throw new p("Cannot subtract a temperature from a differential degree unit");return m({scalar:this.scalar-e.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},mul:function(e){if(t(e))return m({scalar:f(this.scalar,e),numerator:this.numerator,denominator:this.denominator});if(u(e)&&(e=m(e)),(this.isTemperature()||e.isTemperature())&&!(this.isUnitless()||e.isUnitless()))throw new p("Cannot multiply by temperatures");var r=this,i=e;r.isCompatible(i)&&r.signature!==400&&(i=i.to(r));var a=tt(r.numerator,r.denominator,i.numerator,i.denominator);return m({scalar:f(r.scalar,i.scalar,a[2]),numerator:a[0],denominator:a[1]})},div:function(e){if(t(e)){if(e===0)throw new p("Divide by zero");return m({scalar:this.scalar/e,numerator:this.numerator,denominator:this.denominator})}else u(e)&&(e=m(e));if(e.scalar===0)throw new p("Divide by zero");if(e.isTemperature())throw new p("Cannot divide with temperatures");if(this.isTemperature()&&!e.isUnitless())throw new p("Cannot divide with temperatures");var r=this,i=e;r.isCompatible(i)&&r.signature!==400&&(i=i.to(r));var a=tt(r.numerator,r.denominator,i.denominator,i.numerator);return m({scalar:f(r.scalar,a[2])/i.scalar,numerator:a[0],denominator:a[1]})},inverse:function(){if(this.isTemperature())throw new p("Cannot divide with temperatures");if(this.scalar===0)throw new p("Divide by zero");return m({scalar:1/this.scalar,numerator:this.denominator,denominator:this.numerator})}});function tt(e,r,i,a){function o(T){return T!==J}e=e.filter(o),i=i.filter(o),r=r.filter(o),a=a.filter(o);var c={};function _(T,F){for(var E,$,ye,P=0;P<T.length;P++)if(A[T[P]]?(E=T[P+1],$=T[P],ye=A[$],P++):(E=T[P],$=null,ye=1),E&&E!==J)if(c[E]){c[E][0]+=F;var zr=c[E][2]?A[c[E][2]]:1;c[E][F===1?3:4]*=v(ye,zr)}else c[E]=[F,E,$,1,1]}_(e,1),_(r,-1),_(i,1),_(a,-1);var g=[],b=[],M=1;for(var nt in c)if(c.hasOwnProperty(nt)){var k=c[nt],N;if(k[0]>0)for(N=0;N<k[0];N++)g.push(k[2]===null?k[1]:[k[2],k[1]]);else if(k[0]<0)for(N=0;N<-k[0];N++)b.push(k[2]===null?k[1]:[k[2],k[1]]);M*=v(k[3],k[4])}return g.length===0&&(g=C),b.length===0&&(b=C),g=g.reduce(function(T,F){return T.concat(F)},[]),b=b.reduce(function(T,F){return T.concat(F)},[]),[g,b,M]}h(m.prototype,{eq:function(e){return this.compareTo(e)===0},lt:function(e){return this.compareTo(e)===-1},lte:function(e){return this.eq(e)||this.lt(e)},gt:function(e){return this.compareTo(e)===1},gte:function(e){return this.eq(e)||this.gt(e)},compareTo:function(e){if(u(e))return this.compareTo(m(e));if(this.isCompatible(e)||W(this.units(),e.units()),this.baseScalar<e.baseScalar)return-1;if(this.baseScalar===e.baseScalar)return 0;if(this.baseScalar>e.baseScalar)return 1},same:function(e){return this.scalar===e.scalar&&this.units()===e.units()}}),h(m.prototype,{isUnitless:function(){return[this.numerator,this.denominator].every(function(e){return l(e,C)})},isCompatible:function(e){return u(e)?this.isCompatible(m(e)):Z(e)&&e.signature!==void 0?this.signature===e.signature:!1},isInverse:function(e){return this.inverse().isCompatible(e)},isBase:function(){return this._isBase!==void 0?this._isBase:this.isDegrees()&&this.numerator[0].match(/<(kelvin|temp-K)>/)?(this._isBase=!0,this._isBase):(this.numerator.concat(this.denominator).forEach(function(e){e!==J&&sr.indexOf(e)===-1&&(this._isBase=!1)},this),this._isBase===!1?this._isBase:(this._isBase=!0,this._isBase))}});function ge(){}ge.prototype.get=function(e){return arguments.length>1&&(e=Array.apply(null,arguments)),e.reduce(function(r,i,a){if(r){var o=r[i];return a===e.length-1?o?o.data:void 0:o}},this)},ge.prototype.set=function(e,r){return arguments.length>2&&(e=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1]),e.reduce(function(i,a,o){var c=i[a];return c===void 0&&(c=i[a]={}),o===e.length-1?(c.data=r,r):c},this)};function qr(e,r){return(e+" "+r).trim()}m.formatter=qr,h(m.prototype,{units:function(){if(this._units!==void 0)return this._units;var e=l(this.numerator,C),r=l(this.denominator,C);if(e&&r)return this._units="",this._units;var i=it(this.numerator),a=it(this.denominator);return this._units=i+(r?"":"/"+a),this._units},toString:function(e,r){var i;if(t(e))i=this.units(),r=e;else if(u(e))i=e;else if(Z(e))return this.toPrec(e).toString(r);var a=this.to(i),o=r!==void 0?Y(a.scalar,r):a.scalar;return a=(o+" "+a.units()).trim(),a},format:function(e,r){arguments.length===1&&typeof e=="function"&&(r=e,e=void 0),r=r||m.formatter;var i=this.to(e);return r.call(this,i.scalar,i.units())}});var rt=new ge;function it(e){var r=rt.get(e);if(r)return r;var i=l(e,C);return i?r="1":r=Lr(Ur(e)).join("*"),rt.set(e,r),r}function Ur(e){for(var r=[],i,a,o=0;o<e.length;o++)i=e[o],a=e[o+1],A[i]?(r.push(Q[i]+Q[a]),o++):r.push(Q[i]);return r}function Lr(e){var r=e.reduce(function(i,a){var o=i[a];return o||i.push(o=i[a]=[a,0]),o[1]++,i},[]);return r.map(function(i){return i[0]+(i[1]>1?i[1]:"")})}return m.version="1.8.0",m})});var d=Nr(Qt());var li=(()=>{class u{AppSettingsService=y(xt);data=y(Rt);_defaultUnitsSub;_conversionList=[{group:"Unitless",units:[{measure:"unitless",description:"As-Is numeric value"},{measure:" ",description:"No unit label - As-Is numeric value"}]},{group:"Speed",units:[{measure:"knots",description:"Knots - Nautical miles per hour"},{measure:"kph",description:"kph - Kilometers per hour"},{measure:"mph",description:"mph - Miles per hour"},{measure:"m/s",description:"m/s - Meters per second (base)"}]},{group:"Flow",units:[{measure:"m3/s",description:"Cubic meters per second (base)"},{measure:"l/min",description:"Liters per minute"},{measure:"l/h",description:"Liters per hour"},{measure:"g/min",description:"Gallons per minute"},{measure:"g/h",description:"Gallons per hour"}]},{group:"Fuel Distance",units:[{measure:"m/m3",description:"Meters per cubic meter (base)"},{measure:"nm/l",description:"Nautical Miles per liter"},{measure:"nm/g",description:"Nautical Miles per gallon"},{measure:"km/l",description:"Kilometers per liter"},{measure:"mpg",description:"Miles per Gallon"}]},{group:"Energy Distance",units:[{measure:"m/J",description:"Meters per Joule (base)"},{measure:"nm/J",description:"Nautical Miles per Joule"},{measure:"km/J",description:"Kilometers per Joule"},{measure:"nm/kWh",description:"Nautical Miles per Kilowatt-hour"},{measure:"km/kWh",description:"Kilometers per Kilowatt-hour"}]},{group:"Temperature",units:[{measure:"K",description:"Kelvin (base)"},{measure:"celsius",description:"Celsius"},{measure:"fahrenheit",description:"Fahrenheit"}]},{group:"Length",units:[{measure:"m",description:"Meters (base)"},{measure:"mm",description:"Millimeters"},{measure:"fathom",description:"Fathoms"},{measure:"nm",description:"Nautical Miles"},{measure:"km",description:"Kilometers"},{measure:"mi",description:"Miles"},{measure:"feet",description:"Feet"},{measure:"inch",description:"Inches"}]},{group:"Volume",units:[{measure:"liter",description:"Liters (base)"},{measure:"m3",description:"Cubic Meters"},{measure:"gallon",description:"Gallons"}]},{group:"Current",units:[{measure:"A",description:"Amperes (base)"},{measure:"mA",description:"Milliamperes"}]},{group:"Potential",units:[{measure:"V",description:"Volts (base)"},{measure:"mV",description:"Millivolts"}]},{group:"Charge",units:[{measure:"C",description:"Coulomb (base)"},{measure:"Ah",description:"Ampere*Hours"}]},{group:"Power",units:[{measure:"W",description:"Watts (base)"},{measure:"mW",description:"Milliwatts"}]},{group:"Energy",units:[{measure:"J",description:"Joules (base)"},{measure:"kWh",description:"Kilowatt*Hours"}]},{group:"Resistance",units:[{measure:"ohm",description:"\u2126 (base)"},{measure:"kiloohm",description:"k\u2126"}]},{group:"Pressure",units:[{measure:"Pa",description:"Pa (base)"},{measure:"kPa",description:"kPa"},{measure:"hPa",description:"hPa"},{measure:"mbar",description:"mbar"},{measure:"bar",description:"Bars"},{measure:"psi",description:"psi"},{measure:"mmHg",description:"mmHg"},{measure:"inHg",description:"inHg"}]},{group:"Density",units:[{measure:"kg/m3",description:"Air density - kg/cubic meter (base)"}]},{group:"Time",units:[{measure:"s",description:"Seconds (base)"},{measure:"Minutes",description:"Minutes"},{measure:"Hours",description:"Hours"},{measure:"Days",description:"Days"},{measure:"D HH:MM:SS",description:"Day Hour:Minute:sec"}]},{group:"Angular Velocity",units:[{measure:"rad/s",description:"Radians per second (base)"},{measure:"deg/s",description:"Degrees per second"},{measure:"deg/min",description:"Degrees per minute"}]},{group:"Angle",units:[{measure:"rad",description:"Radians (base)"},{measure:"deg",description:"Degrees"},{measure:"grad",description:"Gradians"}]},{group:"Frequency",units:[{measure:"rpm",description:"RPM - Rotations per minute"},{measure:"Hz",description:"Hz - Hertz (base)"},{measure:"KHz",description:"KHz - Kilohertz"},{measure:"MHz",description:"MHz - Megahertz"},{measure:"GHz",description:"GHz - Gigahertz"}]},{group:"Ratio",units:[{measure:"percent",description:"As percentage value"},{measure:"percentraw",description:"As ratio 0-1 with % sign"},{measure:"ratio",description:"Ratio 0-1 (base)"}]},{group:"Position",units:[{measure:"pdeg",description:"Position Degrees"},{measure:"latitudeMin",description:"Latitude in minutes"},{measure:"latitudeSec",description:"Latitude in seconds"},{measure:"longitudeMin",description:"Longitude in minutes"},{measure:"longitudeSec",description:"Longitude in seconds"}]}];skBaseUnits=[{unit:"s",properties:{display:"s",quantity:"Time",quantityDisplay:"t",description:"Elapsed time (interval) in seconds"}},{unit:"Hz",properties:{display:"Hz",quantity:"Frequency",quantityDisplay:"f",description:"Frequency in Hertz"}},{unit:"m3",properties:{display:"m\xB3",quantity:"Volume",quantityDisplay:"V",description:"Volume in cubic meters"}},{unit:"m3/s",properties:{display:"m\xB3/s",quantity:"Flow",quantityDisplay:"Q",description:"Liquid or gas flow in cubic meters per second"}},{unit:"kg/s",properties:{display:"kg/s",quantity:"Mass flow rate",quantityDisplay:"\u1E41",description:"Liquid or gas flow in kilograms per second"}},{unit:"kg/m3",properties:{display:"kg/m\xB3",quantity:"Density",quantityDisplay:"\u03C1",description:"Density in kg per cubic meter"}},{unit:"deg",properties:{display:"Position",quantity:"Angle",quantityDisplay:"\u2220",description:"Latitude or longitude in decimal degrees"}},{unit:"rad",properties:{display:"\xB0",quantity:"Angle",quantityDisplay:"\u2220",description:"Angular arc in radians"}},{unit:"rad/s",properties:{display:"\u33AD/s",quantity:"Rotation",quantityDisplay:"\u03C9",description:"Angular rate in radians per second"}},{unit:"A",properties:{display:"A",quantity:"Current",quantityDisplay:"I",description:"Electrical current in ampere"}},{unit:"C",properties:{display:"C",quantity:"Charge",quantityDisplay:"Q",description:"Electrical charge in Coulomb"}},{unit:"V",properties:{display:"V",quantity:"Voltage",quantityDisplay:"V",description:"Electrical potential in volt"}},{unit:"W",properties:{display:"W",quantity:"Power",quantityDisplay:"P",description:"Power in watt"}},{unit:"Nm",properties:{display:"Nm",quantity:"Torque",quantityDisplay:"\u03C4",description:"Torque in Newton meter"}},{unit:"J",properties:{display:"J",quantity:"Energy",quantityDisplay:"E",description:"Electrical energy in joule"}},{unit:"ohm",properties:{display:"\u2126",quantity:"Resistance",quantityDisplay:"R",description:"Electrical resistance in ohm"}},{unit:"m",properties:{display:"m",quantity:"Distance",quantityDisplay:"d",description:"Distance in meters"}},{unit:"m/s",properties:{display:"m/s",quantity:"Speed",quantityDisplay:"v",description:"Speed in meters per second"}},{unit:"m2",properties:{display:"\u33A1",quantity:"Area",quantityDisplay:"A",description:"(Surface) area in square meters"}},{unit:"K",properties:{display:"K",quantity:"Temperature",quantityDisplay:"T",description:"Temperature in kelvin"}},{unit:"Pa",properties:{display:"Pa",quantity:"Pressure",quantityDisplay:"P",description:"Pressure in pascal"}},{unit:"kg",properties:{display:"kg",quantity:"Mass",quantityDisplay:"m",description:"Mass in kilogram"}},{unit:"ratio",properties:{display:"",quantity:"Ratio",quantityDisplay:"\u03C6",description:"Relative value compared to reference or normal value. 0 = 0%, 1 = 100%, 1e-3 = 1 ppt"}},{unit:"m/s2",properties:{display:"m/s\xB2",quantity:"Acceleration",quantityDisplay:"a",description:"Acceleration in meters per second squared"}},{unit:"rad/s2",properties:{display:"rad/s\xB2",quantity:"Angular acceleration",quantityDisplay:"a",description:"Angular acceleration in radians per second squared"}},{unit:"N",properties:{display:"N",quantity:"Force",quantityDisplay:"F",description:"Force in newton"}},{unit:"T",properties:{display:"T",quantity:"Magnetic field",quantityDisplay:"B",description:"Magnetic field strength in tesla"}},{unit:"Lux",properties:{display:"lx",quantity:"Light Intensity",quantityDisplay:"Ev",description:"Light Intensity in lux"}},{unit:"Pa/s",properties:{display:"Pa/s",quantity:"Pressure rate",quantityDisplay:"R",description:"Pressure change rate in pascal per second"}},{unit:"Pa.s",properties:{display:"Pa s",quantity:"Viscosity",quantityDisplay:"\u03BC",description:"Viscosity in pascal seconds"}}];_defaultUnits=null;constructor(){this._defaultUnitsSub=this.AppSettingsService.getDefaultUnitsAsO().subscribe(t=>{this._defaultUnits=t})}unitConversionFunctions={unitless:function(t){return t}," ":function(t){return t},knots:d.default.swiftConverter("m/s","kn"),kph:d.default.swiftConverter("m/s","kph"),"m/s":function(t){return t},mph:d.default.swiftConverter("m/s","mph"),liter:d.default.swiftConverter("m^3","liter"),gallon:d.default.swiftConverter("m^3","gallon"),m3:function(t){return t},"m3/s":function(t){return t},"l/min":d.default.swiftConverter("m^3/s","liter/minute"),"l/h":d.default.swiftConverter("m^3/s","liter/hour"),"g/min":d.default.swiftConverter("m^3/s","gallon/minute"),"g/h":d.default.swiftConverter("m^3/s","gallon/hour"),"m/m3":function(t){return t},"nm/l":d.default.swiftConverter("m/m^3","naut-mile/liter"),"nm/g":d.default.swiftConverter("m/m^3","naut-mile/gallon"),"km/l":d.default.swiftConverter("m/m^3","km/liter"),mpg:d.default.swiftConverter("m/m^3","mile/gallon"),"m/J":function(t){return t},"nm/J":d.default.swiftConverter("m/J","naut-mile/J"),"km/J":d.default.swiftConverter("km/J","km/J"),"nm/kWh":d.default.swiftConverter("m/J","naut-mile/kWh"),"km/kWh":d.default.swiftConverter("m/J","km/kWh"),K:function(t){return t},celsius:d.default.swiftConverter("tempK","tempC"),fahrenheit:d.default.swiftConverter("tempK","tempF"),m:function(t){return t},mm:function(t){return t*1e3},fathom:d.default.swiftConverter("m","fathom"),feet:d.default.swiftConverter("m","foot"),inch:d.default.swiftConverter("m","in"),km:d.default.swiftConverter("m","km"),nm:d.default.swiftConverter("m","nmi"),mi:d.default.swiftConverter("m","mi"),V:function(t){return t},mV:function(t){return t*1e3},A:function(t){return t},mA:function(t){return t*1e3},C:function(t){return t},Ah:d.default.swiftConverter("C","Ah"),W:function(t){return t},mW:function(t){return t*1e3},J:function(t){return t},kWh:d.default.swiftConverter("J","kWh"),ohm:function(t){return t},kiloohm:function(t){return t/1e3},Pa:function(t){return t},bar:d.default.swiftConverter("Pa","bar"),psi:d.default.swiftConverter("Pa","psi"),mmHg:d.default.swiftConverter("Pa","mmHg"),inHg:d.default.swiftConverter("Pa","inHg"),hPa:d.default.swiftConverter("Pa","hPa"),kPa:d.default.swiftConverter("Pa","kPa"),mbar:d.default.swiftConverter("Pa","millibar"),"kg/m3":function(t){return t},s:function(t){return t},Minutes:d.default.swiftConverter("s","minutes"),Hours:d.default.swiftConverter("s","hours"),Days:d.default.swiftConverter("s","days"),"D HH:MM:SS":function(t){t=parseInt(t,10);let n=t<0;t=Math.abs(t);let s=Math.floor(t/86400),l=Math.floor(t%86400/3600),h=Math.floor(t%3600/60),f=Math.floor(t%60),v=n?"-":"";return s>0?v+=s+"d "+l.toString()+":"+h.toString().padStart(2,"0")+":"+f.toString().padStart(2,"0"):v+=l.toString()+":"+h.toString().padStart(2,"0")+":"+f.toString().padStart(2,"0"),v},"rad/s":function(t){return t},"deg/s":d.default.swiftConverter("rad/s","deg/s"),"deg/min":d.default.swiftConverter("rad/s","deg/min"),rpm:function(t){return t*60},Hz:function(t){return t},KHz:function(t){return t/1e3},MHz:function(t){return t/1e6},GHz:function(t){return t/1e9},rad:function(t){return t},deg:d.default.swiftConverter("rad","deg"),grad:d.default.swiftConverter("rad","grad"),percent:function(t){return t*100},percentraw:function(t){return t},ratio:function(t){return t},pdeg:function(t){return t},latitudeMin:function(t){let n=Math.trunc(t),s="N";t<0&&(s="S",n=n*-1);let l=t%1*60;return s=="S"&&(l=l*-1),n+"\xB0 "+l.toFixed(2).padStart(5,"0")+"' "+s},latitudeSec:function(t){let n=Math.trunc(t),s="N";t<0&&(s="S",n=n*-1);let l=t%1*60;s=="S"&&(l=l*-1);let h=Math.trunc(l),f=l%1*60;return n+"\xB0 "+h+"' "+f.toFixed(2).padStart(5,"0")+'" '+s},longitudeMin:function(t){let n=Math.trunc(t),s="E";t<0&&(s="W",n=n*-1);let l=t%1*60;return s=="W"&&(l=l*-1),n+"\xB0 "+l.toFixed(2).padStart(5,"0")+"' "+s},longitudeSec:function(t){let n=Math.trunc(t),s="E";t<0&&(s="W",n=n*-1);let l=t%1*60;s=="W"&&(l=l*-1);let h=Math.trunc(l),f=l%1*60;return n+"\xB0 "+h+"' "+f.toFixed(2).padStart(5,"0")+'" '+s}};convertToUnit(t,n){if(!(t in this.unitConversionFunctions)||n===null)return null;let s=+n;return this.unitConversionFunctions[t](s)}getDefaults(){return this._defaultUnits}getConversions(){return this._conversionList}getConversionsForPath(t){let n=this.data.getPathUnitType(t),s="unitless",l="unitless";if(n===null||n==="RFC 3339 (UTC)")return{base:s,conversions:this._conversionList};{let h=this._conversionList.filter(f=>f.group=="Position"&&(t.includes("position.latitude")||t.includes("position.longitude"))?!0:f.units.find(Y=>Y.measure==n)?(l=this._defaultUnits[f.group],!0):!1);return h.length>0?{base:l,conversions:h}:(console.log("[Units Service] Unit type: "+n+", found for path: "+t+`
1
+ import{b as Wt,c as jt,f as Ue,g as Yt,h as Jt,k as Xt,m as Le}from"./chunk-HIADZ4BV.js";import{d as Rt,v as Nt,w as Vt,z as Ht}from"./chunk-QLTN6G6E.js";import{D as Kt,O as Bt,P as Gt,m as xt,q as Ut,r as Lt,w as zt}from"./chunk-XDPHEQEO.js";import{i as Fe,q as Pe,r as qe,s as qt}from"./chunk-SZ2GUIT5.js";import{Ab as L,Ad as At,Bb as z,Bd as Re,Dd as Dt,E as te,F as _e,Fa as q,Fb as _t,Fd as Ie,Hb as Te,Ia as pt,Jb as bt,K as st,Kb as Ee,Lb as Ae,Nd as It,Oa as ht,Pa as ft,Ua as gt,V as be,W as we,Wa as ie,Wb as wt,X as V,Xb as Ct,ab as ne,bb as ke,ca as ot,cb as Se,d as Kr,da as lt,e as Nr,ea as re,fe as Ft,ga as y,ge as Pt,hb as Me,hc as kt,ib as D,j as ee,ja as H,jb as U,ka as B,kb as yt,la as ct,na as Ce,nc as St,pc as I,qc as De,ra as ut,rb as xe,tb as j,ua as mt,ud as Ot,vb as G,w as ve,wa as dt,wb as vt,wd as Tt,xb as Oe,xc as Mt,xd as oe,yb as ae,yd as Et,z as at,zb as se}from"./chunk-OB3QLUH6.js";var Qt=Kr((ze,Ke)=>{(function(u,w){typeof ze=="object"&&typeof Ke<"u"?Ke.exports=w():typeof define=="function"&&define.amd?define(w):(u=typeof globalThis<"u"?globalThis:u||self,u.Qty=w())})(ze,function(){"use strict";function u(e){return typeof e=="string"||e instanceof String}var w=Number.isFinite||window.isFinite;function t(e){return w(e)}function n(e){return e}function s(e){var r={};return e.filter(function(i){return r.hasOwnProperty(i)?!1:r[i]=!0})}function l(e,r){if(r.length!==e.length)return!1;for(var i=0;i<e.length;i++)if(r[i].compareArray&&!r[i].compareArray(e[i])||r[i]!==e[i])return!1;return!0}function h(e,r){Object.keys(r).forEach(function(i){e[i]=r[i]})}function f(){for(var e=1,r=0,i=0;i<arguments.length;i++){var a=arguments[i];r=r+Ve(a),e*=a}return r!==0?Y(e,r):e}function v(e,r){if(r===0)throw new Error("Divide by zero");var i=Math.pow(10,Ve(r)),a=i/(i*r);return f(e,a)}function Y(e,r){return Math.round(e*Math.pow(10,r))/Math.pow(10,r)}function Ve(e){if(!isFinite(e))return 0;for(var r=0;e%1!==0;)e*=10,r++;return r}function p(){var e;if(!this)return e=Object.create(p.prototype),p.apply(e,arguments),e;e=Error.apply(this,arguments),this.name="QtyError",this.message=e.message,this.stack=e.stack}p.prototype=Object.create(Error.prototype,{constructor:{value:p}});function W(e,r){throw new p("Incompatible units: "+e+" and "+r)}var x={"<googol>":[["googol"],1e100,"prefix"],"<kibi>":[["Ki","Kibi","kibi"],Math.pow(2,10),"prefix"],"<mebi>":[["Mi","Mebi","mebi"],Math.pow(2,20),"prefix"],"<gibi>":[["Gi","Gibi","gibi"],Math.pow(2,30),"prefix"],"<tebi>":[["Ti","Tebi","tebi"],Math.pow(2,40),"prefix"],"<pebi>":[["Pi","Pebi","pebi"],Math.pow(2,50),"prefix"],"<exi>":[["Ei","Exi","exi"],Math.pow(2,60),"prefix"],"<zebi>":[["Zi","Zebi","zebi"],Math.pow(2,70),"prefix"],"<yebi>":[["Yi","Yebi","yebi"],Math.pow(2,80),"prefix"],"<yotta>":[["Y","Yotta","yotta"],1e24,"prefix"],"<zetta>":[["Z","Zetta","zetta"],1e21,"prefix"],"<exa>":[["E","Exa","exa"],1e18,"prefix"],"<peta>":[["P","Peta","peta"],1e15,"prefix"],"<tera>":[["T","Tera","tera"],1e12,"prefix"],"<giga>":[["G","Giga","giga"],1e9,"prefix"],"<mega>":[["M","Mega","mega"],1e6,"prefix"],"<kilo>":[["k","kilo"],1e3,"prefix"],"<hecto>":[["h","Hecto","hecto"],100,"prefix"],"<deca>":[["da","Deca","deca","deka"],10,"prefix"],"<deci>":[["d","Deci","deci"],.1,"prefix"],"<centi>":[["c","Centi","centi"],.01,"prefix"],"<milli>":[["m","Milli","milli"],.001,"prefix"],"<micro>":[["u","\u03BC","\xB5","Micro","mc","micro"],1e-6,"prefix"],"<nano>":[["n","Nano","nano"],1e-9,"prefix"],"<pico>":[["p","Pico","pico"],1e-12,"prefix"],"<femto>":[["f","Femto","femto"],1e-15,"prefix"],"<atto>":[["a","Atto","atto"],1e-18,"prefix"],"<zepto>":[["z","Zepto","zepto"],1e-21,"prefix"],"<yocto>":[["y","Yocto","yocto"],1e-24,"prefix"],"<1>":[["1","<1>"],1,""],"<meter>":[["m","meter","meters","metre","metres"],1,"length",["<meter>"]],"<inch>":[["in","inch","inches",'"'],.0254,"length",["<meter>"]],"<foot>":[["ft","foot","feet","'"],.3048,"length",["<meter>"]],"<yard>":[["yd","yard","yards"],.9144,"length",["<meter>"]],"<mile>":[["mi","mile","miles"],1609.344,"length",["<meter>"]],"<naut-mile>":[["nmi","naut-mile"],1852,"length",["<meter>"]],"<league>":[["league","leagues"],4828,"length",["<meter>"]],"<furlong>":[["furlong","furlongs"],201.2,"length",["<meter>"]],"<rod>":[["rd","rod","rods"],5.029,"length",["<meter>"]],"<mil>":[["mil","mils"],254e-7,"length",["<meter>"]],"<angstrom>":[["ang","angstrom","angstroms"],1e-10,"length",["<meter>"]],"<fathom>":[["fathom","fathoms"],1.829,"length",["<meter>"]],"<pica>":[["pica","picas"],.00423333333,"length",["<meter>"]],"<point>":[["pt","point","points"],.000352777778,"length",["<meter>"]],"<redshift>":[["z","red-shift","redshift"],1302773e20,"length",["<meter>"]],"<AU>":[["AU","astronomical-unit"],1495979e5,"length",["<meter>"]],"<light-second>":[["ls","light-second"],299792500,"length",["<meter>"]],"<light-minute>":[["lmin","light-minute"],1798755e4,"length",["<meter>"]],"<light-year>":[["ly","light-year"],9460528e9,"length",["<meter>"]],"<parsec>":[["pc","parsec","parsecs"],3085678e10,"length",["<meter>"]],"<datamile>":[["DM","datamile"],1828.8,"length",["<meter>"]],"<kilogram>":[["kg","kilogram","kilograms"],1,"mass",["<kilogram>"]],"<AMU>":[["u","AMU","amu"],1660538921e-36,"mass",["<kilogram>"]],"<dalton>":[["Da","Dalton","Daltons","dalton","daltons"],1660538921e-36,"mass",["<kilogram>"]],"<slug>":[["slug","slugs"],14.5939029,"mass",["<kilogram>"]],"<short-ton>":[["tn","ton","short-ton"],907.18474,"mass",["<kilogram>"]],"<metric-ton>":[["t","tonne","metric-ton"],1e3,"mass",["<kilogram>"]],"<carat>":[["ct","carat","carats"],2e-4,"mass",["<kilogram>"]],"<pound>":[["lbs","lb","pound","pounds","#"],.45359237,"mass",["<kilogram>"]],"<ounce>":[["oz","ounce","ounces"],.0283495231,"mass",["<kilogram>"]],"<gram>":[["g","gram","grams","gramme","grammes"],.001,"mass",["<kilogram>"]],"<grain>":[["grain","grains","gr"],6479891e-11,"mass",["<kilogram>"]],"<dram>":[["dram","drams","dr"],.0017718452,"mass",["<kilogram>"]],"<stone>":[["stone","stones","st"],6.35029318,"mass",["<kilogram>"]],"<hectare>":[["hectare"],1e4,"area",["<meter>","<meter>"]],"<acre>":[["acre","acres"],4046.85642,"area",["<meter>","<meter>"]],"<sqft>":[["sqft"],1,"area",["<foot>","<foot>"]],"<liter>":[["l","L","liter","liters","litre","litres"],.001,"volume",["<meter>","<meter>","<meter>"]],"<gallon>":[["gal","gallon","gallons"],.0037854118,"volume",["<meter>","<meter>","<meter>"]],"<gallon-imp>":[["galimp","gallon-imp","gallons-imp"],.00454609,"volume",["<meter>","<meter>","<meter>"]],"<quart>":[["qt","quart","quarts"],.00094635295,"volume",["<meter>","<meter>","<meter>"]],"<pint>":[["pt","pint","pints"],.000473176475,"volume",["<meter>","<meter>","<meter>"]],"<pint-imp>":[["ptimp","pint-imp","pints-imp"],.00056826125,"volume",["<meter>","<meter>","<meter>"]],"<cup>":[["cu","cup","cups"],.000236588238,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce>":[["floz","fluid-ounce","fluid-ounces"],295735297e-13,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce-imp>":[["flozimp","floz-imp","fluid-ounce-imp","fluid-ounces-imp"],284130625e-13,"volume",["<meter>","<meter>","<meter>"]],"<tablespoon>":[["tb","tbsp","tbs","tablespoon","tablespoons"],147867648e-13,"volume",["<meter>","<meter>","<meter>"]],"<teaspoon>":[["tsp","teaspoon","teaspoons"],492892161e-14,"volume",["<meter>","<meter>","<meter>"]],"<bushel>":[["bu","bsh","bushel","bushels"],.035239072,"volume",["<meter>","<meter>","<meter>"]],"<oilbarrel>":[["bbl","oilbarrel","oilbarrels","oil-barrel","oil-barrels"],.158987294928,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel>":[["bl","bl-us","beerbarrel","beerbarrels","beer-barrel","beer-barrels"],.1173477658,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel-imp>":[["blimp","bl-imp","beerbarrel-imp","beerbarrels-imp","beer-barrel-imp","beer-barrels-imp"],.16365924,"volume",["<meter>","<meter>","<meter>"]],"<kph>":[["kph"],.277777778,"speed",["<meter>"],["<second>"]],"<mph>":[["mph"],.44704,"speed",["<meter>"],["<second>"]],"<knot>":[["kt","kn","kts","knot","knots"],.514444444,"speed",["<meter>"],["<second>"]],"<fps>":[["fps"],.3048,"speed",["<meter>"],["<second>"]],"<gee>":[["gee"],9.80665,"acceleration",["<meter>"],["<second>","<second>"]],"<Gal>":[["Gal"],.01,"acceleration",["<meter>"],["<second>","<second>"]],"<kelvin>":[["degK","kelvin"],1,"temperature",["<kelvin>"]],"<celsius>":[["degC","celsius","celsius","centigrade"],1,"temperature",["<kelvin>"]],"<fahrenheit>":[["degF","fahrenheit"],5/9,"temperature",["<kelvin>"]],"<rankine>":[["degR","rankine"],5/9,"temperature",["<kelvin>"]],"<temp-K>":[["tempK","temp-K"],1,"temperature",["<temp-K>"]],"<temp-C>":[["tempC","temp-C"],1,"temperature",["<temp-K>"]],"<temp-F>":[["tempF","temp-F"],5/9,"temperature",["<temp-K>"]],"<temp-R>":[["tempR","temp-R"],5/9,"temperature",["<temp-K>"]],"<second>":[["s","sec","secs","second","seconds"],1,"time",["<second>"]],"<minute>":[["min","mins","minute","minutes"],60,"time",["<second>"]],"<hour>":[["h","hr","hrs","hour","hours"],3600,"time",["<second>"]],"<day>":[["d","day","days"],3600*24,"time",["<second>"]],"<week>":[["wk","week","weeks"],7*3600*24,"time",["<second>"]],"<fortnight>":[["fortnight","fortnights"],1209600,"time",["<second>"]],"<year>":[["y","yr","year","years","annum"],31556926,"time",["<second>"]],"<decade>":[["decade","decades"],315569260,"time",["<second>"]],"<century>":[["century","centuries"],3155692600,"time",["<second>"]],"<pascal>":[["Pa","pascal","Pascal"],1,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<bar>":[["bar","bars"],1e5,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<mmHg>":[["mmHg"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inHg>":[["inHg"],3386.3881472,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<torr>":[["torr"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<atm>":[["atm","ATM","atmosphere","atmospheres"],101325,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<psi>":[["psi"],6894.76,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<cmh2o>":[["cmH2O","cmh2o"],98.0638,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inh2o>":[["inH2O","inh2o"],249.082052,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<poise>":[["P","poise"],.1,"viscosity",["<kilogram>"],["<meter>","<second>"]],"<stokes>":[["St","stokes"],1e-4,"viscosity",["<meter>","<meter>"],["<second>"]],"<mole>":[["mol","mole"],1,"substance",["<mole>"]],"<molar>":[["M","molar"],1e3,"molar_concentration",["<mole>"],["<meter>","<meter>","<meter>"]],"<wtpercent>":[["wt%","wtpercent"],10,"molar_concentration",["<kilogram>"],["<meter>","<meter>","<meter>"]],"<katal>":[["kat","katal","Katal"],1,"activity",["<mole>"],["<second>"]],"<unit>":[["U","enzUnit","unit"],16667e-19,"activity",["<mole>"],["<second>"]],"<farad>":[["F","farad","Farad"],1,"capacitance",["<second>","<second>","<second>","<second>","<ampere>","<ampere>"],["<meter>","<meter>","<kilogram>"]],"<coulomb>":[["C","coulomb","Coulomb"],1,"charge",["<ampere>","<second>"]],"<Ah>":[["Ah"],3600,"charge",["<ampere>","<second>"]],"<ampere>":[["A","Ampere","ampere","amp","amps"],1,"current",["<ampere>"]],"<siemens>":[["S","Siemens","siemens"],1,"conductance",["<second>","<second>","<second>","<ampere>","<ampere>"],["<kilogram>","<meter>","<meter>"]],"<henry>":[["H","Henry","henry"],1,"inductance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>","<ampere>"]],"<volt>":[["V","Volt","volt","volts"],1,"potential",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>"]],"<ohm>":[["Ohm","ohm","\u03A9","\u2126"],1,"resistance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>","<ampere>"]],"<weber>":[["Wb","weber","webers"],1,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<tesla>":[["T","tesla","teslas"],1,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<gauss>":[["G","gauss"],1e-4,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<maxwell>":[["Mx","maxwell","maxwells"],1e-8,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<oersted>":[["Oe","oersted","oersteds"],250/Math.PI,"magnetism",["<ampere>"],["<meter>"]],"<joule>":[["J","joule","Joule","joules","Joules"],1,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<erg>":[["erg","ergs"],1e-7,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<btu>":[["BTU","btu","BTUs"],1055.056,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<calorie>":[["cal","calorie","calories"],4.184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Calorie>":[["Cal","Calorie","Calories"],4184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<therm-US>":[["th","therm","therms","Therm","therm-US"],105480400,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Wh>":[["Wh"],3600,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<electronvolt>":[["eV","electronvolt","electronvolts"],1602176634e-28,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<newton>":[["N","Newton","newton"],1,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<dyne>":[["dyn","dyne"],1e-5,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<pound-force>":[["lbf","pound-force"],4.448222,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<hertz>":[["Hz","hertz","Hertz"],1,"frequency",["<1>"],["<second>"]],"<radian>":[["rad","radian","radians"],1,"angle",["<radian>"]],"<degree>":[["deg","degree","degrees"],Math.PI/180,"angle",["<radian>"]],"<arcminute>":[["arcmin","arcminute","arcminutes"],Math.PI/10800,"angle",["<radian>"]],"<arcsecond>":[["arcsec","arcsecond","arcseconds"],Math.PI/648e3,"angle",["<radian>"]],"<gradian>":[["gon","grad","gradian","grads"],Math.PI/200,"angle",["<radian>"]],"<steradian>":[["sr","steradian","steradians"],1,"solid_angle",["<steradian>"]],"<rotation>":[["rotation"],2*Math.PI,"angle",["<radian>"]],"<rpm>":[["rpm"],2*Math.PI/60,"angular_velocity",["<radian>"],["<second>"]],"<byte>":[["B","byte","bytes"],1,"information",["<byte>"]],"<bit>":[["b","bit","bits"],.125,"information",["<byte>"]],"<Bps>":[["Bps"],1,"information_rate",["<byte>"],["<second>"]],"<bps>":[["bps"],.125,"information_rate",["<byte>"],["<second>"]],"<dollar>":[["USD","dollar"],1,"currency",["<dollar>"]],"<cents>":[["cents"],.01,"currency",["<dollar>"]],"<candela>":[["cd","candela"],1,"luminosity",["<candela>"]],"<lumen>":[["lm","lumen"],1,"luminous_power",["<candela>","<steradian>"]],"<lux>":[["lux"],1,"illuminance",["<candela>","<steradian>"],["<meter>","<meter>"]],"<watt>":[["W","watt","watts"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere>":[["VA","volt-ampere"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere-reactive>":[["var","Var","VAr","VAR","volt-ampere-reactive"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<horsepower>":[["hp","horsepower"],745.699872,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<gray>":[["Gy","gray","grays"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<roentgen>":[["R","roentgen"],.00933,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<sievert>":[["Sv","sievert","sieverts"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<becquerel>":[["Bq","becquerel","becquerels"],1,"radiation",["<1>"],["<second>"]],"<curie>":[["Ci","curie","curies"],37e9,"radiation",["<1>"],["<second>"]],"<cpm>":[["cpm"],1/60,"rate",["<count>"],["<second>"]],"<dpm>":[["dpm"],1/60,"rate",["<count>"],["<second>"]],"<bpm>":[["bpm"],1/60,"rate",["<count>"],["<second>"]],"<dot>":[["dot","dots"],1,"resolution",["<each>"]],"<pixel>":[["pixel","px"],1,"resolution",["<each>"]],"<ppi>":[["ppi"],1,"resolution",["<pixel>"],["<inch>"]],"<dpi>":[["dpi"],1,"typography",["<dot>"],["<inch>"]],"<cell>":[["cells","cell"],1,"counting",["<each>"]],"<each>":[["each"],1,"counting",["<each>"]],"<count>":[["count"],1,"counting",["<each>"]],"<base-pair>":[["bp","base-pair"],1,"counting",["<each>"]],"<nucleotide>":[["nt","nucleotide"],1,"counting",["<each>"]],"<molecule>":[["molecule","molecules"],1,"counting",["<1>"]],"<dozen>":[["doz","dz","dozen"],12,"prefix_only",["<each>"]],"<percent>":[["%","percent"],.01,"prefix_only",["<1>"]],"<ppm>":[["ppm"],1e-6,"prefix_only",["<1>"]],"<ppb>":[["ppb"],1e-9,"prefix_only",["<1>"]],"<ppt>":[["ppt"],1e-12,"prefix_only",["<1>"]],"<ppq>":[["ppq"],1e-15,"prefix_only",["<1>"]],"<gross>":[["gr","gross"],144,"prefix_only",["<dozen>","<dozen>"]],"<decibel>":[["dB","decibel","decibels"],1,"logarithmic",["<decibel>"]]},sr=["<meter>","<kilogram>","<second>","<mole>","<ampere>","<radian>","<kelvin>","<temp-K>","<byte>","<dollar>","<candela>","<each>","<steradian>","<decibel>"],J="<1>",C=[J];function or(e,r){var i=r[1],a=r[3]||[],o=r[4]||[];if(!t(i))throw new p(e+": Invalid unit definition. 'scalar' must be a number");a.forEach(function(c){if(x[c]===void 0)throw new p(e+": Invalid unit definition. Unit "+c+" in 'numerator' is not recognized")}),o.forEach(function(c){if(x[c]===void 0)throw new p(e+": Invalid unit definition. Unit "+c+" in 'denominator' is not recognized")})}var A={},X={},S={},K={},Q={};for(var R in x)if(x.hasOwnProperty(R)){var O=x[R];if(O[2]==="prefix"){A[R]=O[1];for(var ce=0;ce<O[0].length;ce++)X[O[0][ce]]=R}else{or(R,O),S[R]={scalar:O[1],numerator:O[3],denominator:O[4]};for(var ue=0;ue<O[0].length;ue++)K[O[0][ue]]=R}Q[R]=O[0][0]}function lr(e){var r,i=[],a=Object.keys(x);if(typeof e>"u")for(r=0;r<a.length;r++)["","prefix"].indexOf(x[a[r]][2])===-1&&i.push(a[r].substr(1,a[r].length-2));else{if(this.getKinds().indexOf(e)===-1)throw new p("Kind not recognized");for(r=0;r<a.length;r++)x[a[r]][2]===e&&i.push(a[r].substr(1,a[r].length-2))}return i.sort(function(o,c){return o.toLowerCase()<c.toLowerCase()?-1:o.toLowerCase()>c.toLowerCase()?1:0})}function cr(e){if(!K[e])throw new p("Unit not recognized");return x[K[e]][0]}var me=["length","time","temperature","mass","current","substance","luminosity","currency","information","angle"];function ur(){if(this.signature)return this.signature;for(var e=He.call(this),r=0;r<e.length;r++)e[r]*=Math.pow(20,r);return e.reduce(function(i,a){return i+a},0)}function He(){if(!this.isBase())return He.call(this.toBase());for(var e=new Array(me.length),r=0;r<e.length;r++)e[r]=0;for(var i,a,o=0;o<this.numerator.length;o++)(i=x[this.numerator[o]])&&(a=me.indexOf(i[2]),a>=0&&(e[a]=e[a]+1));for(var c=0;c<this.denominator.length;c++)(i=x[this.denominator[c]])&&(a=me.indexOf(i[2]),a>=0&&(e[a]=e[a]-1));return e}var Be="[+-]",de="\\d+",mr=Be+"?"+de,Ge="\\."+de,dr="(?:"+de+"(?:"+Ge+")?)|(?:"+Ge+")",pr="[Ee]"+mr,hr="(?:"+dr+")(?:"+pr+")?",fr=Be+"?\\s*"+hr,gr="("+fr+")?\\s*([^/]*)(?:/(.+))?",yr=new RegExp("^"+gr+"$"),We="\\^|\\*{2}",je="[01234]",vr=new RegExp("([^ \\*\\d]+?)(?:"+We+")?(-?"+je+"(?![a-zA-Z]))"),_r=new RegExp("([^ \\*\\d]+?)(?:"+We+")?("+je+"(?![a-zA-Z]))");function Ye(e){u(e)||(e=e.toString()),e=e.trim();var r=yr.exec(e);if(!r)throw new p(e+": Quantity not recognized");var i=r[1];i?(i=i.replace(/\s/g,""),this.scalar=parseFloat(i)):this.scalar=1;for(var a=r[2],o=r[3],c,_,g;r=vr.exec(a);){if(c=parseFloat(r[2]),isNaN(c))throw new p("Unit exponent is not a number");if(c===0&&!pe.test(r[1]))throw new p("Unit not recognized");_=r[1]+" ",g="";for(var b=0;b<Math.abs(c);b++)g+=_;c>=0?a=a.replace(r[0],g):(o=o?o+g:g,a=a.replace(r[0],""))}for(;r=_r.exec(o);){if(c=parseFloat(r[2]),isNaN(c))throw new p("Unit exponent is not a number");if(c===0&&!pe.test(r[1]))throw new p("Unit not recognized");_=r[1]+" ",g="";for(var M=0;M<c;M++)g+=_;o=o.replace(r[0],g)}a&&(this.numerator=Qe(a.trim())),o&&(this.denominator=Qe(o.trim()))}var br=Object.keys(X).sort(function(e,r){return r.length-e.length}).join("|"),wr=Object.keys(K).sort(function(e,r){return r.length-e.length}).join("|"),Cr="\\b|$",Je="("+br+")??("+wr+")(?:"+Cr+")",pe=new RegExp("^\\s*("+Je+"[\\s\\*]*)+$"),kr=new RegExp(Je,"g"),Xe={};function Qe(e){var r=Xe[e];if(r)return r;var i,a=[];if(!pe.test(e))throw new p("Unit not recognized");for(;i=kr.exec(e);)a.push(i.slice(1));return a=a.map(function(o){return X[o[0]]?[X[o[0]],K[o[1]]]:[K[o[1]]]}),a=a.reduce(function(o,c){return o.concat(c)},[]),a=a.filter(function(o){return o}),Xe[e]=a,a}function Sr(e){if(!u(e))throw new p("Argument should be a string");try{return this(e)}catch{return null}}function Z(e){return e instanceof m}function m(e,r){if(Mr.apply(null,arguments),!Z(this))return new m(e,r);if(this.scalar=null,this.baseScalar=null,this.signature=null,this._conversionCache={},this.numerator=C,this.denominator=C,Ze(e)?(this.scalar=e.scalar,this.numerator=e.numerator&&e.numerator.length!==0?e.numerator:C,this.denominator=e.denominator&&e.denominator.length!==0?e.denominator:C):r?(Ye.call(this,r),this.scalar=e):Ye.call(this,e),this.denominator.join("*").indexOf("temp")>=0)throw new p("Cannot divide with temperatures");if(this.numerator.join("*").indexOf("temp")>=0){if(this.numerator.length>1)throw new p("Cannot multiply by temperatures");if(!l(this.denominator,C))throw new p("Cannot divide with temperatures")}if(this.initValue=e,xr.call(this),this.isTemperature()&&this.baseScalar<0)throw new p("Temperatures must not be less than absolute zero")}m.prototype={constructor:m};function Mr(e,r){if(r){if(!(t(e)&&u(r)))throw new p("Only number accepted as initialization value when units are explicitly provided")}else if(!(u(e)||t(e)||Z(e)||Ze(e)))throw new p("Only string, number or quantity accepted as single initialization value")}function Ze(e){return e&&typeof e=="object"&&e.hasOwnProperty("scalar")}function xr(){if(this.baseScalar)return this.baseScalar;if(this.isBase())this.baseScalar=this.scalar,this.signature=ur.call(this);else{var e=this.toBase();this.baseScalar=e.scalar,this.signature=e.signature}}var he={"-312078":"elastance","-312058":"resistance","-312038":"inductance","-152058":"potential","-152040":"magnetism","-152038":"magnetism","-7997":"specific_volume","-79":"snap","-59":"jolt","-39":"acceleration","-38":"radiation","-20":"frequency","-19":"speed","-18":"viscosity","-17":"volumetric_flow","-1":"wavenumber",0:"unitless",1:"length",2:"area",3:"volume",20:"time",400:"temperature",7941:"yank",7942:"power",7959:"pressure",7961:"force",7962:"energy",7979:"viscosity",7981:"momentum",7982:"angular_momentum",7997:"density",7998:"area_density",8e3:"mass",152020:"radiation_exposure",159999:"magnetism",16e4:"current",160020:"charge",312058:"conductance",312078:"capacitance",3199980:"activity",3199997:"molar_concentration",32e5:"substance",63999998:"illuminance",64e6:"luminous_power",128e7:"currency","25599999980":"information_rate","25600000000":"information","511999999980":"angular_velocity","512000000000":"angle"};function Or(){return s(Object.keys(he).map(function(e){return he[e]}))}m.prototype.kind=function(){return he[this.signature.toString()]},h(m.prototype,{isDegrees:function(){return(this.signature===null||this.signature===400)&&this.numerator.length===1&&l(this.denominator,C)&&(this.numerator[0].match(/<temp-[CFRK]>/)||this.numerator[0].match(/<(kelvin|celsius|rankine|fahrenheit)>/))},isTemperature:function(){return this.isDegrees()&&this.numerator[0].match(/<temp-[CFRK]>/)}});function Tr(e,r){var i=e.units(),a=r.to(i),o=m(fe(i));return m({scalar:e.scalar-a.scalar,numerator:o.numerator,denominator:o.denominator})}function Er(e,r){var i=r.to(fe(e.units()));return m({scalar:e.scalar-i.scalar,numerator:e.numerator,denominator:e.denominator})}function $e(e,r){var i=r.to(fe(e.units()));return m({scalar:e.scalar+i.scalar,numerator:e.numerator,denominator:e.denominator})}function fe(e){if(e==="tempK")return"degK";if(e==="tempC")return"degC";if(e==="tempF")return"degF";if(e==="tempR")return"degR";throw new p("Unknown type for temp conversion from: "+e)}function Ar(e,r){var i=Dr(e),a=r.units(),o;if(a==="degK")o=i.scalar;else if(a==="degC")o=i.scalar;else if(a==="degF")o=i.scalar*9/5;else if(a==="degR")o=i.scalar*9/5;else throw new p("Unknown type for degree conversion to: "+a);return m({scalar:o,numerator:r.numerator,denominator:r.denominator})}function Dr(e){var r=e.units(),i;if(r.match(/(deg)[CFRK]/))i=e.baseScalar;else if(r==="tempK")i=e.scalar;else if(r==="tempC")i=e.scalar;else if(r==="tempF")i=e.scalar*5/9;else if(r==="tempR")i=e.scalar*5/9;else throw new p("Unknown type for temp conversion from: "+r);return m({scalar:i,numerator:["<kelvin>"],denominator:C})}function Rr(e,r){var i=r.units(),a;if(i==="tempK")a=e.baseScalar;else if(i==="tempC")a=e.baseScalar-273.15;else if(i==="tempF")a=e.baseScalar*9/5-459.67;else if(i==="tempR")a=e.baseScalar*9/5;else throw new p("Unknown type for temp conversion to: "+i);return m({scalar:a,numerator:r.numerator,denominator:r.denominator})}function Ir(e){var r=e.units(),i;if(r.match(/(deg)[CFRK]/))i=e.baseScalar;else if(r==="tempK")i=e.scalar;else if(r==="tempC")i=e.scalar+273.15;else if(r==="tempF")i=(e.scalar+459.67)*5/9;else if(r==="tempR")i=e.scalar*5/9;else throw new p("Unknown type for temp conversion from: "+r);return m({scalar:i,numerator:["<temp-K>"],denominator:C})}h(m.prototype,{to:function(e){var r,i;if(e==null)return this;if(!u(e))return this.to(e.units());if(r=this._conversionCache[e],r)return r;if(i=m(e),i.units()===this.units())return this;if(!this.isCompatible(i))this.isInverse(i)?i=this.inverse().to(e):W(this.units(),i.units());else if(i.isTemperature())i=Rr(this,i);else if(i.isDegrees())i=Ar(this,i);else{var a=v(this.baseScalar,i.baseScalar);i=m({scalar:a,numerator:i.numerator,denominator:i.denominator})}return this._conversionCache[e]=i,i},toBase:function(){if(this.isBase())return this;if(this.isTemperature())return Ir(this);var e=et[this.units()];return e||(e=Pr(this.numerator,this.denominator),et[this.units()]=e),e.mul(this.scalar)},toFloat:function(){if(this.isUnitless())return this.scalar;throw new p("Can't convert to Float unless unitless. Use Unit#scalar")},toPrec:function(e){if(u(e)&&(e=m(e)),t(e)&&(e=m(e+" "+this.units())),this.isUnitless()?e.isUnitless()||W(this.units(),e.units()):e=e.to(this.units()),e.scalar===0)throw new p("Divide by zero");var r=f(Math.round(this.scalar/e.scalar),e.scalar);return m(r+this.units())}});function Fr(e,r){var i=m(e),a=m(r);if(i.eq(a))return n;var o;return i.isTemperature()?o=function(c){return i.mul(c).to(a).scalar}:o=function(c){return c*i.baseScalar/a.baseScalar},function(_){var g,b,M;if(Array.isArray(_)){for(b=_.length,M=[],g=0;g<b;g++)M.push(o(_[g]));return M}else return o(_)}}var et={};function Pr(e,r){for(var i=[],a=[],o=1,c,_=0;_<e.length;_++)c=e[_],A[c]?o=f(o,A[c]):S[c]&&(o*=S[c].scalar,S[c].numerator&&i.push(S[c].numerator),S[c].denominator&&a.push(S[c].denominator));for(var g=0;g<r.length;g++)c=r[g],A[c]?o/=A[c]:S[c]&&(o/=S[c].scalar,S[c].numerator&&a.push(S[c].numerator),S[c].denominator&&i.push(S[c].denominator));return i=i.reduce(function(b,M){return b.concat(M)},[]),a=a.reduce(function(b,M){return b.concat(M)},[]),m({scalar:o,numerator:i,denominator:a})}m.parse=Sr,m.getUnits=lr,m.getAliases=cr,m.mulSafe=f,m.divSafe=v,m.getKinds=Or,m.swiftConverter=Fr,m.Error=p,h(m.prototype,{add:function(e){if(u(e)&&(e=m(e)),this.isCompatible(e)||W(this.units(),e.units()),this.isTemperature()&&e.isTemperature())throw new p("Cannot add two temperatures");return this.isTemperature()?$e(this,e):e.isTemperature()?$e(e,this):m({scalar:this.scalar+e.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},sub:function(e){if(u(e)&&(e=m(e)),this.isCompatible(e)||W(this.units(),e.units()),this.isTemperature()&&e.isTemperature())return Tr(this,e);if(this.isTemperature())return Er(this,e);if(e.isTemperature())throw new p("Cannot subtract a temperature from a differential degree unit");return m({scalar:this.scalar-e.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},mul:function(e){if(t(e))return m({scalar:f(this.scalar,e),numerator:this.numerator,denominator:this.denominator});if(u(e)&&(e=m(e)),(this.isTemperature()||e.isTemperature())&&!(this.isUnitless()||e.isUnitless()))throw new p("Cannot multiply by temperatures");var r=this,i=e;r.isCompatible(i)&&r.signature!==400&&(i=i.to(r));var a=tt(r.numerator,r.denominator,i.numerator,i.denominator);return m({scalar:f(r.scalar,i.scalar,a[2]),numerator:a[0],denominator:a[1]})},div:function(e){if(t(e)){if(e===0)throw new p("Divide by zero");return m({scalar:this.scalar/e,numerator:this.numerator,denominator:this.denominator})}else u(e)&&(e=m(e));if(e.scalar===0)throw new p("Divide by zero");if(e.isTemperature())throw new p("Cannot divide with temperatures");if(this.isTemperature()&&!e.isUnitless())throw new p("Cannot divide with temperatures");var r=this,i=e;r.isCompatible(i)&&r.signature!==400&&(i=i.to(r));var a=tt(r.numerator,r.denominator,i.denominator,i.numerator);return m({scalar:f(r.scalar,a[2])/i.scalar,numerator:a[0],denominator:a[1]})},inverse:function(){if(this.isTemperature())throw new p("Cannot divide with temperatures");if(this.scalar===0)throw new p("Divide by zero");return m({scalar:1/this.scalar,numerator:this.denominator,denominator:this.numerator})}});function tt(e,r,i,a){function o(T){return T!==J}e=e.filter(o),i=i.filter(o),r=r.filter(o),a=a.filter(o);var c={};function _(T,F){for(var E,$,ye,P=0;P<T.length;P++)if(A[T[P]]?(E=T[P+1],$=T[P],ye=A[$],P++):(E=T[P],$=null,ye=1),E&&E!==J)if(c[E]){c[E][0]+=F;var zr=c[E][2]?A[c[E][2]]:1;c[E][F===1?3:4]*=v(ye,zr)}else c[E]=[F,E,$,1,1]}_(e,1),_(r,-1),_(i,1),_(a,-1);var g=[],b=[],M=1;for(var nt in c)if(c.hasOwnProperty(nt)){var k=c[nt],N;if(k[0]>0)for(N=0;N<k[0];N++)g.push(k[2]===null?k[1]:[k[2],k[1]]);else if(k[0]<0)for(N=0;N<-k[0];N++)b.push(k[2]===null?k[1]:[k[2],k[1]]);M*=v(k[3],k[4])}return g.length===0&&(g=C),b.length===0&&(b=C),g=g.reduce(function(T,F){return T.concat(F)},[]),b=b.reduce(function(T,F){return T.concat(F)},[]),[g,b,M]}h(m.prototype,{eq:function(e){return this.compareTo(e)===0},lt:function(e){return this.compareTo(e)===-1},lte:function(e){return this.eq(e)||this.lt(e)},gt:function(e){return this.compareTo(e)===1},gte:function(e){return this.eq(e)||this.gt(e)},compareTo:function(e){if(u(e))return this.compareTo(m(e));if(this.isCompatible(e)||W(this.units(),e.units()),this.baseScalar<e.baseScalar)return-1;if(this.baseScalar===e.baseScalar)return 0;if(this.baseScalar>e.baseScalar)return 1},same:function(e){return this.scalar===e.scalar&&this.units()===e.units()}}),h(m.prototype,{isUnitless:function(){return[this.numerator,this.denominator].every(function(e){return l(e,C)})},isCompatible:function(e){return u(e)?this.isCompatible(m(e)):Z(e)&&e.signature!==void 0?this.signature===e.signature:!1},isInverse:function(e){return this.inverse().isCompatible(e)},isBase:function(){return this._isBase!==void 0?this._isBase:this.isDegrees()&&this.numerator[0].match(/<(kelvin|temp-K)>/)?(this._isBase=!0,this._isBase):(this.numerator.concat(this.denominator).forEach(function(e){e!==J&&sr.indexOf(e)===-1&&(this._isBase=!1)},this),this._isBase===!1?this._isBase:(this._isBase=!0,this._isBase))}});function ge(){}ge.prototype.get=function(e){return arguments.length>1&&(e=Array.apply(null,arguments)),e.reduce(function(r,i,a){if(r){var o=r[i];return a===e.length-1?o?o.data:void 0:o}},this)},ge.prototype.set=function(e,r){return arguments.length>2&&(e=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1]),e.reduce(function(i,a,o){var c=i[a];return c===void 0&&(c=i[a]={}),o===e.length-1?(c.data=r,r):c},this)};function qr(e,r){return(e+" "+r).trim()}m.formatter=qr,h(m.prototype,{units:function(){if(this._units!==void 0)return this._units;var e=l(this.numerator,C),r=l(this.denominator,C);if(e&&r)return this._units="",this._units;var i=it(this.numerator),a=it(this.denominator);return this._units=i+(r?"":"/"+a),this._units},toString:function(e,r){var i;if(t(e))i=this.units(),r=e;else if(u(e))i=e;else if(Z(e))return this.toPrec(e).toString(r);var a=this.to(i),o=r!==void 0?Y(a.scalar,r):a.scalar;return a=(o+" "+a.units()).trim(),a},format:function(e,r){arguments.length===1&&typeof e=="function"&&(r=e,e=void 0),r=r||m.formatter;var i=this.to(e);return r.call(this,i.scalar,i.units())}});var rt=new ge;function it(e){var r=rt.get(e);if(r)return r;var i=l(e,C);return i?r="1":r=Lr(Ur(e)).join("*"),rt.set(e,r),r}function Ur(e){for(var r=[],i,a,o=0;o<e.length;o++)i=e[o],a=e[o+1],A[i]?(r.push(Q[i]+Q[a]),o++):r.push(Q[i]);return r}function Lr(e){var r=e.reduce(function(i,a){var o=i[a];return o||i.push(o=i[a]=[a,0]),o[1]++,i},[]);return r.map(function(i){return i[0]+(i[1]>1?i[1]:"")})}return m.version="1.8.0",m})});var d=Nr(Qt());var li=(()=>{class u{AppSettingsService=y(xt);data=y(Rt);_defaultUnitsSub;_conversionList=[{group:"Unitless",units:[{measure:"unitless",description:"As-Is numeric value"},{measure:" ",description:"No unit label - As-Is numeric value"}]},{group:"Speed",units:[{measure:"knots",description:"Knots - Nautical miles per hour"},{measure:"kph",description:"kph - Kilometers per hour"},{measure:"mph",description:"mph - Miles per hour"},{measure:"m/s",description:"m/s - Meters per second (base)"}]},{group:"Flow",units:[{measure:"m3/s",description:"Cubic meters per second (base)"},{measure:"l/min",description:"Liters per minute"},{measure:"l/h",description:"Liters per hour"},{measure:"g/min",description:"Gallons per minute"},{measure:"g/h",description:"Gallons per hour"}]},{group:"Fuel Distance",units:[{measure:"m/m3",description:"Meters per cubic meter (base)"},{measure:"nm/l",description:"Nautical Miles per liter"},{measure:"nm/g",description:"Nautical Miles per gallon"},{measure:"km/l",description:"Kilometers per liter"},{measure:"mpg",description:"Miles per Gallon"}]},{group:"Energy Distance",units:[{measure:"m/J",description:"Meters per Joule (base)"},{measure:"nm/J",description:"Nautical Miles per Joule"},{measure:"km/J",description:"Kilometers per Joule"},{measure:"nm/kWh",description:"Nautical Miles per Kilowatt-hour"},{measure:"km/kWh",description:"Kilometers per Kilowatt-hour"}]},{group:"Temperature",units:[{measure:"K",description:"Kelvin (base)"},{measure:"celsius",description:"Celsius"},{measure:"fahrenheit",description:"Fahrenheit"}]},{group:"Length",units:[{measure:"m",description:"Meters (base)"},{measure:"mm",description:"Millimeters"},{measure:"fathom",description:"Fathoms"},{measure:"nm",description:"Nautical Miles"},{measure:"km",description:"Kilometers"},{measure:"mi",description:"Miles"},{measure:"feet",description:"Feet"},{measure:"inch",description:"Inches"}]},{group:"Volume",units:[{measure:"liter",description:"Liters (base)"},{measure:"m3",description:"Cubic Meters"},{measure:"gallon",description:"Gallons"}]},{group:"Current",units:[{measure:"A",description:"Amperes (base)"},{measure:"mA",description:"Milliamperes"}]},{group:"Potential",units:[{measure:"V",description:"Volts (base)"},{measure:"mV",description:"Millivolts"}]},{group:"Charge",units:[{measure:"C",description:"Coulomb (base)"},{measure:"Ah",description:"Ampere*Hours"}]},{group:"Power",units:[{measure:"W",description:"Watts (base)"},{measure:"mW",description:"Milliwatts"}]},{group:"Energy",units:[{measure:"J",description:"Joules (base)"},{measure:"kWh",description:"Kilowatt*Hours"}]},{group:"Resistance",units:[{measure:"ohm",description:"\u2126 (base)"},{measure:"kiloohm",description:"k\u2126"}]},{group:"Pressure",units:[{measure:"Pa",description:"Pa (base)"},{measure:"kPa",description:"kPa"},{measure:"hPa",description:"hPa"},{measure:"mbar",description:"mbar"},{measure:"bar",description:"Bars"},{measure:"psi",description:"psi"},{measure:"mmHg",description:"mmHg"},{measure:"inHg",description:"inHg"}]},{group:"Density",units:[{measure:"kg/m3",description:"Air density - kg/cubic meter (base)"}]},{group:"Time",units:[{measure:"s",description:"Seconds (base)"},{measure:"Minutes",description:"Minutes"},{measure:"Hours",description:"Hours"},{measure:"Days",description:"Days"},{measure:"D HH:MM:SS",description:"Day Hour:Minute:sec"}]},{group:"Angular Velocity",units:[{measure:"rad/s",description:"Radians per second (base)"},{measure:"deg/s",description:"Degrees per second"},{measure:"deg/min",description:"Degrees per minute"}]},{group:"Angle",units:[{measure:"rad",description:"Radians (base)"},{measure:"deg",description:"Degrees"},{measure:"grad",description:"Gradians"}]},{group:"Frequency",units:[{measure:"rpm",description:"RPM - Rotations per minute"},{measure:"Hz",description:"Hz - Hertz (base)"},{measure:"KHz",description:"KHz - Kilohertz"},{measure:"MHz",description:"MHz - Megahertz"},{measure:"GHz",description:"GHz - Gigahertz"}]},{group:"Ratio",units:[{measure:"percent",description:"As percentage value"},{measure:"percentraw",description:"As ratio 0-1 with % sign"},{measure:"ratio",description:"Ratio 0-1 (base)"}]},{group:"Position",units:[{measure:"pdeg",description:"Position Degrees"},{measure:"latitudeMin",description:"Latitude in minutes"},{measure:"latitudeSec",description:"Latitude in seconds"},{measure:"longitudeMin",description:"Longitude in minutes"},{measure:"longitudeSec",description:"Longitude in seconds"}]}];skBaseUnits=[{unit:"s",properties:{display:"s",quantity:"Time",quantityDisplay:"t",description:"Elapsed time (interval) in seconds"}},{unit:"Hz",properties:{display:"Hz",quantity:"Frequency",quantityDisplay:"f",description:"Frequency in Hertz"}},{unit:"m3",properties:{display:"m\xB3",quantity:"Volume",quantityDisplay:"V",description:"Volume in cubic meters"}},{unit:"m3/s",properties:{display:"m\xB3/s",quantity:"Flow",quantityDisplay:"Q",description:"Liquid or gas flow in cubic meters per second"}},{unit:"kg/s",properties:{display:"kg/s",quantity:"Mass flow rate",quantityDisplay:"\u1E41",description:"Liquid or gas flow in kilograms per second"}},{unit:"kg/m3",properties:{display:"kg/m\xB3",quantity:"Density",quantityDisplay:"\u03C1",description:"Density in kg per cubic meter"}},{unit:"deg",properties:{display:"Position",quantity:"Angle",quantityDisplay:"\u2220",description:"Latitude or longitude in decimal degrees"}},{unit:"rad",properties:{display:"\xB0",quantity:"Angle",quantityDisplay:"\u2220",description:"Angular arc in radians"}},{unit:"rad/s",properties:{display:"\u33AD/s",quantity:"Rotation",quantityDisplay:"\u03C9",description:"Angular rate in radians per second"}},{unit:"A",properties:{display:"A",quantity:"Current",quantityDisplay:"I",description:"Electrical current in ampere"}},{unit:"C",properties:{display:"C",quantity:"Charge",quantityDisplay:"Q",description:"Electrical charge in Coulomb"}},{unit:"V",properties:{display:"V",quantity:"Voltage",quantityDisplay:"V",description:"Electrical potential in volt"}},{unit:"W",properties:{display:"W",quantity:"Power",quantityDisplay:"P",description:"Power in watt"}},{unit:"Nm",properties:{display:"Nm",quantity:"Torque",quantityDisplay:"\u03C4",description:"Torque in Newton meter"}},{unit:"J",properties:{display:"J",quantity:"Energy",quantityDisplay:"E",description:"Electrical energy in joule"}},{unit:"ohm",properties:{display:"\u2126",quantity:"Resistance",quantityDisplay:"R",description:"Electrical resistance in ohm"}},{unit:"m",properties:{display:"m",quantity:"Distance",quantityDisplay:"d",description:"Distance in meters"}},{unit:"m/s",properties:{display:"m/s",quantity:"Speed",quantityDisplay:"v",description:"Speed in meters per second"}},{unit:"m2",properties:{display:"\u33A1",quantity:"Area",quantityDisplay:"A",description:"(Surface) area in square meters"}},{unit:"K",properties:{display:"K",quantity:"Temperature",quantityDisplay:"T",description:"Temperature in kelvin"}},{unit:"Pa",properties:{display:"Pa",quantity:"Pressure",quantityDisplay:"P",description:"Pressure in pascal"}},{unit:"kg",properties:{display:"kg",quantity:"Mass",quantityDisplay:"m",description:"Mass in kilogram"}},{unit:"ratio",properties:{display:"",quantity:"Ratio",quantityDisplay:"\u03C6",description:"Relative value compared to reference or normal value. 0 = 0%, 1 = 100%, 1e-3 = 1 ppt"}},{unit:"m/s2",properties:{display:"m/s\xB2",quantity:"Acceleration",quantityDisplay:"a",description:"Acceleration in meters per second squared"}},{unit:"rad/s2",properties:{display:"rad/s\xB2",quantity:"Angular acceleration",quantityDisplay:"a",description:"Angular acceleration in radians per second squared"}},{unit:"N",properties:{display:"N",quantity:"Force",quantityDisplay:"F",description:"Force in newton"}},{unit:"T",properties:{display:"T",quantity:"Magnetic field",quantityDisplay:"B",description:"Magnetic field strength in tesla"}},{unit:"Lux",properties:{display:"lx",quantity:"Light Intensity",quantityDisplay:"Ev",description:"Light Intensity in lux"}},{unit:"Pa/s",properties:{display:"Pa/s",quantity:"Pressure rate",quantityDisplay:"R",description:"Pressure change rate in pascal per second"}},{unit:"Pa.s",properties:{display:"Pa s",quantity:"Viscosity",quantityDisplay:"\u03BC",description:"Viscosity in pascal seconds"}}];_defaultUnits=null;constructor(){this._defaultUnitsSub=this.AppSettingsService.getDefaultUnitsAsO().subscribe(t=>{this._defaultUnits=t})}unitConversionFunctions={unitless:function(t){return t}," ":function(t){return t},knots:d.default.swiftConverter("m/s","kn"),kph:d.default.swiftConverter("m/s","kph"),"m/s":function(t){return t},mph:d.default.swiftConverter("m/s","mph"),liter:d.default.swiftConverter("m^3","liter"),gallon:d.default.swiftConverter("m^3","gallon"),m3:function(t){return t},"m3/s":function(t){return t},"l/min":d.default.swiftConverter("m^3/s","liter/minute"),"l/h":d.default.swiftConverter("m^3/s","liter/hour"),"g/min":d.default.swiftConverter("m^3/s","gallon/minute"),"g/h":d.default.swiftConverter("m^3/s","gallon/hour"),"m/m3":function(t){return t},"nm/l":d.default.swiftConverter("m/m^3","naut-mile/liter"),"nm/g":d.default.swiftConverter("m/m^3","naut-mile/gallon"),"km/l":d.default.swiftConverter("m/m^3","km/liter"),mpg:d.default.swiftConverter("m/m^3","mile/gallon"),"m/J":function(t){return t},"nm/J":d.default.swiftConverter("m/J","naut-mile/J"),"km/J":d.default.swiftConverter("km/J","km/J"),"nm/kWh":d.default.swiftConverter("m/J","naut-mile/kWh"),"km/kWh":d.default.swiftConverter("m/J","km/kWh"),K:function(t){return t},celsius:d.default.swiftConverter("tempK","tempC"),fahrenheit:d.default.swiftConverter("tempK","tempF"),m:function(t){return t},mm:function(t){return t*1e3},fathom:d.default.swiftConverter("m","fathom"),feet:d.default.swiftConverter("m","foot"),inch:d.default.swiftConverter("m","in"),km:d.default.swiftConverter("m","km"),nm:d.default.swiftConverter("m","nmi"),mi:d.default.swiftConverter("m","mi"),V:function(t){return t},mV:function(t){return t*1e3},A:function(t){return t},mA:function(t){return t*1e3},C:function(t){return t},Ah:d.default.swiftConverter("C","Ah"),W:function(t){return t},mW:function(t){return t*1e3},J:function(t){return t},kWh:d.default.swiftConverter("J","kWh"),ohm:function(t){return t},kiloohm:function(t){return t/1e3},Pa:function(t){return t},bar:d.default.swiftConverter("Pa","bar"),psi:d.default.swiftConverter("Pa","psi"),mmHg:d.default.swiftConverter("Pa","mmHg"),inHg:d.default.swiftConverter("Pa","inHg"),hPa:d.default.swiftConverter("Pa","hPa"),kPa:d.default.swiftConverter("Pa","kPa"),mbar:d.default.swiftConverter("Pa","millibar"),"kg/m3":function(t){return t},s:function(t){return t},Minutes:d.default.swiftConverter("s","minutes"),Hours:d.default.swiftConverter("s","hours"),Days:d.default.swiftConverter("s","days"),"D HH:MM:SS":function(t){t=parseInt(t,10);let n=t<0;t=Math.abs(t);let s=Math.floor(t/86400),l=Math.floor(t%86400/3600),h=Math.floor(t%3600/60),f=Math.floor(t%60),v=n?"-":"";return s>0?v+=s+"d "+l.toString()+":"+h.toString().padStart(2,"0")+":"+f.toString().padStart(2,"0"):v+=l.toString()+":"+h.toString().padStart(2,"0")+":"+f.toString().padStart(2,"0"),v},"rad/s":function(t){return t},"deg/s":d.default.swiftConverter("rad/s","deg/s"),"deg/min":d.default.swiftConverter("rad/s","deg/min"),rpm:function(t){return t*60},Hz:function(t){return t},KHz:function(t){return t/1e3},MHz:function(t){return t/1e6},GHz:function(t){return t/1e9},rad:function(t){return t},deg:d.default.swiftConverter("rad","deg"),grad:d.default.swiftConverter("rad","grad"),percent:function(t){return t*100},percentraw:function(t){return t},ratio:function(t){return t},pdeg:function(t){return t},latitudeMin:function(t){let n=Math.trunc(t),s="N";t<0&&(s="S",n=n*-1);let l=t%1*60;return s=="S"&&(l=l*-1),n+"\xB0 "+l.toFixed(2).padStart(5,"0")+"' "+s},latitudeSec:function(t){let n=Math.trunc(t),s="N";t<0&&(s="S",n=n*-1);let l=t%1*60;s=="S"&&(l=l*-1);let h=Math.trunc(l),f=l%1*60;return n+"\xB0 "+h+"' "+f.toFixed(2).padStart(5,"0")+'" '+s},longitudeMin:function(t){let n=Math.trunc(t),s="E";t<0&&(s="W",n=n*-1);let l=t%1*60;return s=="W"&&(l=l*-1),n+"\xB0 "+l.toFixed(2).padStart(5,"0")+"' "+s},longitudeSec:function(t){let n=Math.trunc(t),s="E";t<0&&(s="W",n=n*-1);let l=t%1*60;s=="W"&&(l=l*-1);let h=Math.trunc(l),f=l%1*60;return n+"\xB0 "+h+"' "+f.toFixed(2).padStart(5,"0")+'" '+s}};convertToUnit(t,n){if(!(t in this.unitConversionFunctions)||n===null)return null;let s=+n;return this.unitConversionFunctions[t](s)}getDefaults(){return this._defaultUnits}getConversions(){return this._conversionList}getConversionsForPath(t){let n=this.data.getPathUnitType(t),s="unitless",l="unitless";if(n===null||n==="RFC 3339 (UTC)")return{base:s,conversions:this._conversionList};{let h=this._conversionList.filter(f=>f.group=="Position"&&(t.includes("position.latitude")||t.includes("position.longitude"))?!0:f.units.find(Y=>Y.measure==n)?(l=this._defaultUnits[f.group],!0):!1);return h.length>0?{base:l,conversions:h}:(console.log("[Units Service] Unit type: "+n+", found for path: "+t+`
2
2
  but Kip does not support it.`),{base:s,conversions:this._conversionList})}}ngOnDestroy(){this._defaultUnitsSub?.unsubscribe()}static \u0275fac=function(n){return new(n||u)};static \u0275prov=ot({token:u,factory:u.\u0275fac})}return u})();var jr=["trigger"],Yr=["panel"],Jr=[[["mat-select-trigger"]],"*"],Xr=["mat-select-trigger","*"];function Qr(u,w){if(u&1&&(D(0,"span",4),Ee(1),U()),u&2){let t=G();q(),Ae(t.placeholder)}}function Zr(u,w){u&1&&Oe(0)}function $r(u,w){if(u&1&&(D(0,"span",11),Ee(1),U()),u&2){let t=G(2);q(),Ae(t.triggerValue)}}function ei(u,w){if(u&1&&(D(0,"span",5),ke(1,Zr,1,0)(2,$r,2,1,"span",11),U()),u&2){let t=G();q(),Se(t.customTrigger?1:2)}}function ti(u,w){if(u&1){let t=xe();D(0,"div",12,1),j("keydown",function(s){H(t);let l=G();return B(l._handleKeydown(s))}),Oe(2,1),U()}if(u&2){let t=G();bt(wt("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme())),Te("mat-select-panel-animations-enabled",!t._animationsDisabled),Me("ngClass",t.panelClass),ne("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}var Ne=new re("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let u=y(Ce);return()=>Fe(u)}});function rr(u){let w=y(Ce);return()=>Fe(w)}var ir=new re("MAT_SELECT_CONFIG"),nr={provide:Ne,deps:[],useFactory:rr},ar=new re("MatSelectTrigger"),le=class{source;value;constructor(w,t){this.source=w,this.value=t}},ri=(()=>{class u{_viewportRuler=y(Ft);_changeDetectorRef=y(St);_elementRef=y(dt);_dir=y(Dt,{optional:!0});_idGenerator=y(Tt);_renderer=y(pt);_parentFormField=y(Vt,{optional:!0});ngControl=y(Lt,{self:!0,optional:!0});_liveAnnouncer=y(Ot);_defaultOptions=y(ir,{optional:!0});_animationsDisabled=It();_initialized=new ee;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(t){let n=this.options.toArray()[t];if(n){let s=this.panel.nativeElement,l=Yt(t,this.options,this.optionGroups),h=n._getHostElement();t===0&&l===1?s.scrollTop=0:s.scrollTop=Jt(h.offsetTop,h.offsetHeight,s.scrollTop,s.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new le(this,t)}_scrollStrategyFactory=y(Ne);_panelOpen=!1;_compareWith=(t,n)=>t===n;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new ee;_errorStateTracker;stateChanges=new ee;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(t){this._disableRipple.set(t)}_disableRipple=ut(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Ut.required)??!1}set required(t){this._required=t,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(t){this._selectionModel,this._multiple=t}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=at(()=>{let t=this.options;return t?t.changes.pipe(be(t),we(()=>te(...t.map(n=>n.onSelectionChange)))):this._initialized.pipe(we(()=>this.optionSelectionChanges))});openedChange=new ie;_openedStream=this.openedChange.pipe(_e(t=>t),ve(()=>{}));_closedStream=this.openedChange.pipe(_e(t=>!t),ve(()=>{}));selectionChange=new ie;valueChange=new ie;constructor(){let t=y(Bt),n=y(zt,{optional:!0}),s=y(Kt,{optional:!0}),l=y(new kt("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Gt(t,this.ngControl,s,n,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=l==null?0:parseInt(l)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Xt(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(V(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(V(this._destroy)).subscribe(t=>{t.added.forEach(n=>n.select()),t.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(be(null),V(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let t=this._getTriggerAriaLabelledby(),n=this.ngControl;if(t!==this._triggerAriaLabelledBy){let s=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?s.setAttribute("aria-labelledby",t):s.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(this._previousControl!==void 0&&n.disabled!==null&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(st(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;let n=`${this.id}-panel`;this._trackedModal&&Re(this._trackedModal,"aria-owns",n),At(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){if(!this._trackedModal)return;let t=`${this.id}-panel`;Re(this._trackedModal,"aria-owns",t),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{n(),clearTimeout(s),this._cleanupDetach=void 0};let t=this.panel.nativeElement,n=this._renderer.listen(t,"animationend",l=>{l.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),s=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);t.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let t=this._selectionModel.selected.map(n=>n.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){let n=t.keyCode,s=n===40||n===38||n===37||n===39,l=n===13||n===32,h=this._keyManager;if(!h.isTyping()&&l&&!oe(t)||(this.multiple||t.altKey)&&s)t.preventDefault(),this.open();else if(!this.multiple){let f=this.selected;h.onKeydown(t);let v=this.selected;v&&f!==v&&this._liveAnnouncer.announce(v.viewValue,1e4)}}_handleOpenKeydown(t){let n=this._keyManager,s=t.keyCode,l=s===40||s===38,h=n.isTyping();if(l&&t.altKey)t.preventDefault(),this.close();else if(!h&&(s===13||s===32)&&n.activeItem&&!oe(t))t.preventDefault(),n.activeItem._selectViaInteraction();else if(!h&&this._multiple&&s===65&&t.ctrlKey){t.preventDefault();let f=this.options.some(v=>!v.disabled&&!v.selected);this.options.forEach(v=>{v.disabled||(f?v.select():v.deselect())})}else{let f=n.activeItemIndex;n.onKeydown(t),this._multiple&&l&&t.shiftKey&&n.activeItem&&n.activeItemIndex!==f&&n.activeItem._selectViaInteraction()}}_handleOverlayKeydown(t){t.keyCode===27&&!oe(t)&&(t.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{let n=this._selectOptionByValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){let n=this.options.find(s=>{if(this._selectionModel.isSelected(s))return!1;try{return(s.value!=null||this.canSelectNullableOptions)&&this._compareWith(s.value,t)}catch{return!1}});return n&&this._selectionModel.select(n),n}_assignValue(t){return t!==this._value||this._multiple&&Array.isArray(t)?(this.options&&this._setSelectionByValue(t),this._value=t,!0):!1}_skipPredicate=t=>this.panelOpen?!1:t.disabled;_getOverlayWidth(t){return this.panelWidth==="auto"?(t instanceof Pe?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Et(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let t=te(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(V(t)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),te(...this.options.map(n=>n._stateChanges)).pipe(V(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,n){let s=this._selectionModel.isSelected(t);!this.canSelectNullableOptions&&t.value==null&&!this._multiple?(t.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(t.value)):(s!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),n&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),n&&this.focus())),s!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let t=this.options.toArray();this._selectionModel.sort((n,s)=>this.sortComparator?this.sortComparator(n,s,t):t.indexOf(n)-t.indexOf(s)),this.stateChanges.next()}}_propagateChanges(t){let n;this.multiple?n=this.selected.map(s=>s.value):n=this.selected?this.selected.value:t,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let n=0;n<this.options.length;n++)if(!this.options.get(n).disabled){t=n;break}this._keyManager.setActiveItem(t)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let t=this._parentFormField?.getLabelId()||null,n=t?t+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let t=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t||(t=this._valueId),t}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=ht({type:u,selectors:[["mat-select"]],contentQueries:function(n,s,l){if(n&1&&(ae(l,ar,5),ae(l,Ue,5),ae(l,jt,5)),n&2){let h;L(h=z())&&(s.customTrigger=h.first),L(h=z())&&(s.options=h),L(h=z())&&(s.optionGroups=h)}},viewQuery:function(n,s){if(n&1&&(se(jr,5),se(Yr,5),se(qe,5)),n&2){let l;L(l=z())&&(s.trigger=l.first),L(l=z())&&(s.panel=l.first),L(l=z())&&(s._overlayDir=l.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,s){n&1&&j("keydown",function(h){return s._handleKeydown(h)})("focus",function(){return s._onFocus()})("blur",function(){return s._onBlur()}),n&2&&(ne("id",s.id)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s.panelOpen?s.id+"-panel":null)("aria-expanded",s.panelOpen)("aria-label",s.ariaLabel||null)("aria-required",s.required.toString())("aria-disabled",s.disabled.toString())("aria-invalid",s.errorState)("aria-activedescendant",s._getAriaActiveDescendant()),Te("mat-mdc-select-disabled",s.disabled)("mat-mdc-select-invalid",s.errorState)("mat-mdc-select-required",s.required)("mat-mdc-select-empty",s.empty)("mat-mdc-select-multiple",s.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",I],disableRipple:[2,"disableRipple","disableRipple",I],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?0:De(t)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",I],placeholder:"placeholder",required:[2,"required","required",I],multiple:[2,"multiple","multiple",I],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",I],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",De],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",I]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ct([{provide:Nt,useExisting:u},{provide:Wt,useExisting:u}]),mt],ngContentSelectors:Xr,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(n,s){if(n&1){let l=xe();vt(Jr),D(0,"div",2,0),j("click",function(){return H(l),B(s.open())}),D(3,"div",3),ke(4,Qr,2,1,"span",4)(5,ei,3,1,"span",5),U(),D(6,"div",6)(7,"div",7),ct(),D(8,"svg",8),yt(9,"path",9),U()()()(),gt(10,ti,3,10,"ng-template",10),j("detach",function(){return H(l),B(s.close())})("backdropClick",function(){return H(l),B(s.close())})("overlayKeydown",function(f){return H(l),B(s._handleOverlayKeydown(f))})}if(n&2){let l=_t(1);q(3),ne("id",s._valueId),q(),Se(s.empty?4:5),q(6),Me("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",s._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",s._scrollStrategy)("cdkConnectedOverlayOrigin",s._preferredOverlayOrigin||l)("cdkConnectedOverlayPositions",s._positions)("cdkConnectedOverlayWidth",s._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[Pe,qe,Mt],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
3
3
  `],encapsulation:2,changeDetection:0})}return u})();var ii=(()=>{class u{static \u0275fac=function(n){return new(n||u)};static \u0275mod=ft({type:u});static \u0275inj=lt({providers:[nr],imports:[qt,Le,Ie,Pt,Ht,Le,Ie]})}return u})();export{ri as a,ii as b,li as c};