@mxtommy/kip 3.1.7 → 3.2.0-beta.1

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.
@@ -0,0 +1,7 @@
1
+ import{$a as Ui,$b as ce,$c as Er,$e as eo,A as vi,Bc as Bi,Ca as Tr,Cc as Ar,Da as Oi,Db as ji,Dc as Wi,Ea as Ii,Ec as Hi,Ed as Ke,Fa as Ri,G as _i,H as yi,Hb as bt,Ib as We,J as Si,Jb as ae,K as $e,Ka as Cr,L as Nt,Lc as Vi,M as wi,Ma as ye,Nb as W,Nd as Qi,Oc as qe,Od as Ge,Pa as G,Sd as Mr,T as Ti,Ta as Se,U as Ci,Ua as Ni,Va as ht,Vc as qi,Vd as Ji,Xc as Ki,Yb as xt,Z as ki,Zb as He,Ze as Xi,_ as Ai,_d as Zi,bd as yt,cd as Dr,d as bs,da as Ei,db as Pi,dc as H,de as Qe,e as xs,ef as to,f as ie,fa as Di,g as It,ga as Mi,h as pi,ha as Ue,ia as Fi,ic as V,j as Re,jc as Q,kc as Pe,ke as Yi,la as wr,le as Je,lf as ro,m as T,me as Fr,n as hi,ne as Ze,o as D,oa as I,oc as zi,p as Ne,pa as Be,pc as vt,qc as _t,r as gi,ra as oe,rc as we,sc as kr,t as Rt,tc as ne,td as Gi,u as bi,ua as g,ub as L,vc as Ve,wc as fe,x as de,xb as Li,xc as z,y as xi,yb as gt,yc as $,z as ze,zc as $i}from"./chunk-Y7X77HSW.js";var Sn=bs((Vr,qr)=>{(function(t,i){typeof Vr=="object"&&typeof qr<"u"?qr.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.Qty=i())})(Vr,function(){"use strict";function t(a){return typeof a=="string"||a instanceof String}var i=Number.isFinite||window.isFinite;function e(a){return i(a)}function r(a){return a}function o(a){var l={};return a.filter(function(d){return l.hasOwnProperty(d)?!1:l[d]=!0})}function n(a,l){if(l.length!==a.length)return!1;for(var d=0;d<a.length;d++)if(l[d].compareArray&&!l[d].compareArray(a[d])||l[d]!==a[d])return!1;return!0}function s(a,l){Object.keys(l).forEach(function(d){a[d]=l[d]})}function c(){for(var a=1,l=0,d=0;d<arguments.length;d++){var f=arguments[d];l=l+_(f),a*=f}return l!==0?b(a,l):a}function m(a,l){if(l===0)throw new Error("Divide by zero");var d=Math.pow(10,_(l)),f=d/(d*l);return c(a,f)}function b(a,l){return Math.round(a*Math.pow(10,l))/Math.pow(10,l)}function _(a){if(!isFinite(a))return 0;for(var l=0;a%1!==0;)a*=10,l++;return l}function u(){var a;if(!this)return a=Object.create(u.prototype),u.apply(a,arguments),a;a=Error.apply(this,arguments),this.name="QtyError",this.message=a.message,this.stack=a.stack}u.prototype=Object.create(Error.prototype,{constructor:{value:u}});function v(a,l){throw new u("Incompatible units: "+a+" and "+l)}var y={"<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>"]]},w=["<meter>","<kilogram>","<second>","<mole>","<ampere>","<radian>","<kelvin>","<temp-K>","<byte>","<dollar>","<candela>","<each>","<steradian>","<decibel>"],E="<1>",S=[E];function R(a,l){var d=l[1],f=l[3]||[],p=l[4]||[];if(!e(d))throw new u(a+": Invalid unit definition. 'scalar' must be a number");f.forEach(function(h){if(y[h]===void 0)throw new u(a+": Invalid unit definition. Unit "+h+" in 'numerator' is not recognized")}),p.forEach(function(h){if(y[h]===void 0)throw new u(a+": Invalid unit definition. Unit "+h+" in 'denominator' is not recognized")})}var N={},Fe={},F={},X={},Mt={};for(var _e in y)if(y.hasOwnProperty(_e)){var ee=y[_e];if(ee[2]==="prefix"){N[_e]=ee[1];for(var pr=0;pr<ee[0].length;pr++)Fe[ee[0][pr]]=_e}else{R(_e,ee),F[_e]={scalar:ee[1],numerator:ee[3],denominator:ee[4]};for(var hr=0;hr<ee[0].length;hr++)X[ee[0][hr]]=_e}Mt[_e]=ee[0][0]}function jn(a){var l,d=[],f=Object.keys(y);if(typeof a>"u")for(l=0;l<f.length;l++)["","prefix"].indexOf(y[f[l]][2])===-1&&d.push(f[l].substr(1,f[l].length-2));else{if(this.getKinds().indexOf(a)===-1)throw new u("Kind not recognized");for(l=0;l<f.length;l++)y[f[l]][2]===a&&d.push(f[l].substr(1,f[l].length-2))}return d.sort(function(p,h){return p.toLowerCase()<h.toLowerCase()?-1:p.toLowerCase()>h.toLowerCase()?1:0})}function zn(a){if(!X[a])throw new u("Unit not recognized");return y[X[a]][0]}var gr=["length","time","temperature","mass","current","substance","luminosity","currency","information","angle"];function $n(){if(this.signature)return this.signature;for(var a=Yr.call(this),l=0;l<a.length;l++)a[l]*=Math.pow(20,l);return a.reduce(function(d,f){return d+f},0)}function Yr(){if(!this.isBase())return Yr.call(this.toBase());for(var a=new Array(gr.length),l=0;l<a.length;l++)a[l]=0;for(var d,f,p=0;p<this.numerator.length;p++)(d=y[this.numerator[p]])&&(f=gr.indexOf(d[2]),f>=0&&(a[f]=a[f]+1));for(var h=0;h<this.denominator.length;h++)(d=y[this.denominator[h]])&&(f=gr.indexOf(d[2]),f>=0&&(a[f]=a[f]-1));return a}var Xr="[+-]",br="\\d+",Bn=Xr+"?"+br,ei="\\."+br,Wn="(?:"+br+"(?:"+ei+")?)|(?:"+ei+")",Hn="[Ee]"+Bn,Vn="(?:"+Wn+")(?:"+Hn+")?",qn=Xr+"?\\s*"+Vn,Kn="("+qn+")?\\s*([^/]*)(?:/(.+))?",Gn=new RegExp("^"+Kn+"$"),ti="\\^|\\*{2}",ri="[01234]",Qn=new RegExp("([^ \\*\\d]+?)(?:"+ti+")?(-?"+ri+"(?![a-zA-Z]))"),Jn=new RegExp("([^ \\*\\d]+?)(?:"+ti+")?("+ri+"(?![a-zA-Z]))");function ii(a){t(a)||(a=a.toString()),a=a.trim();var l=Gn.exec(a);if(!l)throw new u(a+": Quantity not recognized");var d=l[1];d?(d=d.replace(/\s/g,""),this.scalar=parseFloat(d)):this.scalar=1;for(var f=l[2],p=l[3],h,O,A;l=Qn.exec(f);){if(h=parseFloat(l[2]),isNaN(h))throw new u("Unit exponent is not a number");if(h===0&&!xr.test(l[1]))throw new u("Unit not recognized");O=l[1]+" ",A="";for(var P=0;P<Math.abs(h);P++)A+=O;h>=0?f=f.replace(l[0],A):(p=p?p+A:A,f=f.replace(l[0],""))}for(;l=Jn.exec(p);){if(h=parseFloat(l[2]),isNaN(h))throw new u("Unit exponent is not a number");if(h===0&&!xr.test(l[1]))throw new u("Unit not recognized");O=l[1]+" ",A="";for(var K=0;K<h;K++)A+=O;p=p.replace(l[0],A)}f&&(this.numerator=ni(f.trim())),p&&(this.denominator=ni(p.trim()))}var Zn=Object.keys(Fe).sort(function(a,l){return l.length-a.length}).join("|"),Yn=Object.keys(X).sort(function(a,l){return l.length-a.length}).join("|"),Xn="\\b|$",oi="("+Zn+")??("+Yn+")(?:"+Xn+")",xr=new RegExp("^\\s*("+oi+"[\\s\\*]*)+$"),es=new RegExp(oi,"g"),ai={};function ni(a){var l=ai[a];if(l)return l;var d,f=[];if(!xr.test(a))throw new u("Unit not recognized");for(;d=es.exec(a);)f.push(d.slice(1));return f=f.map(function(p){return Fe[p[0]]?[Fe[p[0]],X[p[1]]]:[X[p[1]]]}),f=f.reduce(function(p,h){return p.concat(h)},[]),f=f.filter(function(p){return p}),ai[a]=f,f}function ts(a){if(!t(a))throw new u("Argument should be a string");try{return this(a)}catch{return null}}function Ft(a){return a instanceof x}function x(a,l){if(rs.apply(null,arguments),!Ft(this))return new x(a,l);if(this.scalar=null,this.baseScalar=null,this.signature=null,this._conversionCache={},this.numerator=S,this.denominator=S,si(a)?(this.scalar=a.scalar,this.numerator=a.numerator&&a.numerator.length!==0?a.numerator:S,this.denominator=a.denominator&&a.denominator.length!==0?a.denominator:S):l?(ii.call(this,l),this.scalar=a):ii.call(this,a),this.denominator.join("*").indexOf("temp")>=0)throw new u("Cannot divide with temperatures");if(this.numerator.join("*").indexOf("temp")>=0){if(this.numerator.length>1)throw new u("Cannot multiply by temperatures");if(!n(this.denominator,S))throw new u("Cannot divide with temperatures")}if(this.initValue=a,is.call(this),this.isTemperature()&&this.baseScalar<0)throw new u("Temperatures must not be less than absolute zero")}x.prototype={constructor:x};function rs(a,l){if(l){if(!(e(a)&&t(l)))throw new u("Only number accepted as initialization value when units are explicitly provided")}else if(!(t(a)||e(a)||Ft(a)||si(a)))throw new u("Only string, number or quantity accepted as single initialization value")}function si(a){return a&&typeof a=="object"&&a.hasOwnProperty("scalar")}function is(){if(this.baseScalar)return this.baseScalar;if(this.isBase())this.baseScalar=this.scalar,this.signature=$n.call(this);else{var a=this.toBase();this.baseScalar=a.scalar,this.signature=a.signature}}var vr={"-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 os(){return o(Object.keys(vr).map(function(a){return vr[a]}))}x.prototype.kind=function(){return vr[this.signature.toString()]},s(x.prototype,{isDegrees:function(){return(this.signature===null||this.signature===400)&&this.numerator.length===1&&n(this.denominator,S)&&(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 as(a,l){var d=a.units(),f=l.to(d),p=x(_r(d));return x({scalar:a.scalar-f.scalar,numerator:p.numerator,denominator:p.denominator})}function ns(a,l){var d=l.to(_r(a.units()));return x({scalar:a.scalar-d.scalar,numerator:a.numerator,denominator:a.denominator})}function li(a,l){var d=l.to(_r(a.units()));return x({scalar:a.scalar+d.scalar,numerator:a.numerator,denominator:a.denominator})}function _r(a){if(a==="tempK")return"degK";if(a==="tempC")return"degC";if(a==="tempF")return"degF";if(a==="tempR")return"degR";throw new u("Unknown type for temp conversion from: "+a)}function ss(a,l){var d=ls(a),f=l.units(),p;if(f==="degK")p=d.scalar;else if(f==="degC")p=d.scalar;else if(f==="degF")p=d.scalar*9/5;else if(f==="degR")p=d.scalar*9/5;else throw new u("Unknown type for degree conversion to: "+f);return x({scalar:p,numerator:l.numerator,denominator:l.denominator})}function ls(a){var l=a.units(),d;if(l.match(/(deg)[CFRK]/))d=a.baseScalar;else if(l==="tempK")d=a.scalar;else if(l==="tempC")d=a.scalar;else if(l==="tempF")d=a.scalar*5/9;else if(l==="tempR")d=a.scalar*5/9;else throw new u("Unknown type for temp conversion from: "+l);return x({scalar:d,numerator:["<kelvin>"],denominator:S})}function ds(a,l){var d=l.units(),f;if(d==="tempK")f=a.baseScalar;else if(d==="tempC")f=a.baseScalar-273.15;else if(d==="tempF")f=a.baseScalar*9/5-459.67;else if(d==="tempR")f=a.baseScalar*9/5;else throw new u("Unknown type for temp conversion to: "+d);return x({scalar:f,numerator:l.numerator,denominator:l.denominator})}function cs(a){var l=a.units(),d;if(l.match(/(deg)[CFRK]/))d=a.baseScalar;else if(l==="tempK")d=a.scalar;else if(l==="tempC")d=a.scalar+273.15;else if(l==="tempF")d=(a.scalar+459.67)*5/9;else if(l==="tempR")d=a.scalar*5/9;else throw new u("Unknown type for temp conversion from: "+l);return x({scalar:d,numerator:["<temp-K>"],denominator:S})}s(x.prototype,{to:function(a){var l,d;if(a==null)return this;if(!t(a))return this.to(a.units());if(l=this._conversionCache[a],l)return l;if(d=x(a),d.units()===this.units())return this;if(!this.isCompatible(d))this.isInverse(d)?d=this.inverse().to(a):v(this.units(),d.units());else if(d.isTemperature())d=ds(this,d);else if(d.isDegrees())d=ss(this,d);else{var f=m(this.baseScalar,d.baseScalar);d=x({scalar:f,numerator:d.numerator,denominator:d.denominator})}return this._conversionCache[a]=d,d},toBase:function(){if(this.isBase())return this;if(this.isTemperature())return cs(this);var a=di[this.units()];return a||(a=ms(this.numerator,this.denominator),di[this.units()]=a),a.mul(this.scalar)},toFloat:function(){if(this.isUnitless())return this.scalar;throw new u("Can't convert to Float unless unitless. Use Unit#scalar")},toPrec:function(a){if(t(a)&&(a=x(a)),e(a)&&(a=x(a+" "+this.units())),this.isUnitless()?a.isUnitless()||v(this.units(),a.units()):a=a.to(this.units()),a.scalar===0)throw new u("Divide by zero");var l=c(Math.round(this.scalar/a.scalar),a.scalar);return x(l+this.units())}});function fs(a,l){var d=x(a),f=x(l);if(d.eq(f))return r;var p;return d.isTemperature()?p=function(h){return d.mul(h).to(f).scalar}:p=function(h){return h*d.baseScalar/f.baseScalar},function(O){var A,P,K;if(Array.isArray(O)){for(P=O.length,K=[],A=0;A<P;A++)K.push(p(O[A]));return K}else return p(O)}}var di={};function ms(a,l){for(var d=[],f=[],p=1,h,O=0;O<a.length;O++)h=a[O],N[h]?p=c(p,N[h]):F[h]&&(p*=F[h].scalar,F[h].numerator&&d.push(F[h].numerator),F[h].denominator&&f.push(F[h].denominator));for(var A=0;A<l.length;A++)h=l[A],N[h]?p/=N[h]:F[h]&&(p/=F[h].scalar,F[h].numerator&&f.push(F[h].numerator),F[h].denominator&&d.push(F[h].denominator));return d=d.reduce(function(P,K){return P.concat(K)},[]),f=f.reduce(function(P,K){return P.concat(K)},[]),x({scalar:p,numerator:d,denominator:f})}x.parse=ts,x.getUnits=jn,x.getAliases=zn,x.mulSafe=c,x.divSafe=m,x.getKinds=os,x.swiftConverter=fs,x.Error=u,s(x.prototype,{add:function(a){if(t(a)&&(a=x(a)),this.isCompatible(a)||v(this.units(),a.units()),this.isTemperature()&&a.isTemperature())throw new u("Cannot add two temperatures");return this.isTemperature()?li(this,a):a.isTemperature()?li(a,this):x({scalar:this.scalar+a.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},sub:function(a){if(t(a)&&(a=x(a)),this.isCompatible(a)||v(this.units(),a.units()),this.isTemperature()&&a.isTemperature())return as(this,a);if(this.isTemperature())return ns(this,a);if(a.isTemperature())throw new u("Cannot subtract a temperature from a differential degree unit");return x({scalar:this.scalar-a.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},mul:function(a){if(e(a))return x({scalar:c(this.scalar,a),numerator:this.numerator,denominator:this.denominator});if(t(a)&&(a=x(a)),(this.isTemperature()||a.isTemperature())&&!(this.isUnitless()||a.isUnitless()))throw new u("Cannot multiply by temperatures");var l=this,d=a;l.isCompatible(d)&&l.signature!==400&&(d=d.to(l));var f=ci(l.numerator,l.denominator,d.numerator,d.denominator);return x({scalar:c(l.scalar,d.scalar,f[2]),numerator:f[0],denominator:f[1]})},div:function(a){if(e(a)){if(a===0)throw new u("Divide by zero");return x({scalar:this.scalar/a,numerator:this.numerator,denominator:this.denominator})}else t(a)&&(a=x(a));if(a.scalar===0)throw new u("Divide by zero");if(a.isTemperature())throw new u("Cannot divide with temperatures");if(this.isTemperature()&&!a.isUnitless())throw new u("Cannot divide with temperatures");var l=this,d=a;l.isCompatible(d)&&l.signature!==400&&(d=d.to(l));var f=ci(l.numerator,l.denominator,d.denominator,d.numerator);return x({scalar:c(l.scalar,f[2])/d.scalar,numerator:f[0],denominator:f[1]})},inverse:function(){if(this.isTemperature())throw new u("Cannot divide with temperatures");if(this.scalar===0)throw new u("Divide by zero");return x({scalar:1/this.scalar,numerator:this.denominator,denominator:this.numerator})}});function ci(a,l,d,f){function p(te){return te!==E}a=a.filter(p),d=d.filter(p),l=l.filter(p),f=f.filter(p);var h={};function O(te,Oe){for(var re,Ot,Sr,Ie=0;Ie<te.length;Ie++)if(N[te[Ie]]?(re=te[Ie+1],Ot=te[Ie],Sr=N[Ot],Ie++):(re=te[Ie],Ot=null,Sr=1),re&&re!==E)if(h[re]){h[re][0]+=Oe;var gs=h[re][2]?N[h[re][2]]:1;h[re][Oe===1?3:4]*=m(Sr,gs)}else h[re]=[Oe,re,Ot,1,1]}O(a,1),O(l,-1),O(d,1),O(f,-1);var A=[],P=[],K=1;for(var ui in h)if(h.hasOwnProperty(ui)){var B=h[ui],je;if(B[0]>0)for(je=0;je<B[0];je++)A.push(B[2]===null?B[1]:[B[2],B[1]]);else if(B[0]<0)for(je=0;je<-B[0];je++)P.push(B[2]===null?B[1]:[B[2],B[1]]);K*=m(B[3],B[4])}return A.length===0&&(A=S),P.length===0&&(P=S),A=A.reduce(function(te,Oe){return te.concat(Oe)},[]),P=P.reduce(function(te,Oe){return te.concat(Oe)},[]),[A,P,K]}s(x.prototype,{eq:function(a){return this.compareTo(a)===0},lt:function(a){return this.compareTo(a)===-1},lte:function(a){return this.eq(a)||this.lt(a)},gt:function(a){return this.compareTo(a)===1},gte:function(a){return this.eq(a)||this.gt(a)},compareTo:function(a){if(t(a))return this.compareTo(x(a));if(this.isCompatible(a)||v(this.units(),a.units()),this.baseScalar<a.baseScalar)return-1;if(this.baseScalar===a.baseScalar)return 0;if(this.baseScalar>a.baseScalar)return 1},same:function(a){return this.scalar===a.scalar&&this.units()===a.units()}}),s(x.prototype,{isUnitless:function(){return[this.numerator,this.denominator].every(function(a){return n(a,S)})},isCompatible:function(a){return t(a)?this.isCompatible(x(a)):Ft(a)&&a.signature!==void 0?this.signature===a.signature:!1},isInverse:function(a){return this.inverse().isCompatible(a)},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(a){a!==E&&w.indexOf(a)===-1&&(this._isBase=!1)},this),this._isBase===!1?this._isBase:(this._isBase=!0,this._isBase))}});function yr(){}yr.prototype.get=function(a){return arguments.length>1&&(a=Array.apply(null,arguments)),a.reduce(function(l,d,f){if(l){var p=l[d];return f===a.length-1?p?p.data:void 0:p}},this)},yr.prototype.set=function(a,l){return arguments.length>2&&(a=Array.prototype.slice.call(arguments,0,-1),l=arguments[arguments.length-1]),a.reduce(function(d,f,p){var h=d[f];return h===void 0&&(h=d[f]={}),p===a.length-1?(h.data=l,l):h},this)};function us(a,l){return(a+" "+l).trim()}x.formatter=us,s(x.prototype,{units:function(){if(this._units!==void 0)return this._units;var a=n(this.numerator,S),l=n(this.denominator,S);if(a&&l)return this._units="",this._units;var d=mi(this.numerator),f=mi(this.denominator);return this._units=d+(l?"":"/"+f),this._units},toString:function(a,l){var d;if(e(a))d=this.units(),l=a;else if(t(a))d=a;else if(Ft(a))return this.toPrec(a).toString(l);var f=this.to(d),p=l!==void 0?b(f.scalar,l):f.scalar;return f=(p+" "+f.units()).trim(),f},format:function(a,l){arguments.length===1&&typeof a=="function"&&(l=a,a=void 0),l=l||x.formatter;var d=this.to(a);return l.call(this,d.scalar,d.units())}});var fi=new yr;function mi(a){var l=fi.get(a);if(l)return l;var d=n(a,S);return d?l="1":l=hs(ps(a)).join("*"),fi.set(a,l),l}function ps(a){for(var l=[],d,f,p=0;p<a.length;p++)d=a[p],f=a[p+1],N[d]?(l.push(Mt[d]+Mt[f]),p++):l.push(Mt[d]);return l}function hs(a){var l=a.reduce(function(d,f){var p=d[f];return p||d.push(p=d[f]=[f,0]),p[1]++,d},[]);return l.map(function(d){return d[0]+(d[1]>1?d[1]:"")})}return x.version="1.8.0",x})});var Ye=(()=>{class t{TIMEOUT_DURATION=1e4;serverServiceEndpoint$=new D({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new D(null);serverRoles=[];http=g(Ke);resetSignalK(e,r,o){return ie(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection reset called with null or empty URL value");return}let n={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(n);let s=this.signalKURL.url;s.endsWith("signalk/")||(s+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let c=yield de(this.http.get(s,{observe:"response"}).pipe(xi(this.TIMEOUT_DURATION),Nt(_=>(_.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),bi(_)))));console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(c.body.server.version);let m=c.body.endpoints.v1["signalk-http"],b=c.body.endpoints.v1["signalk-ws"];r?(console.debug("[Connection Service] Proxy Mode Enabled"),n.httpServiceUrl=window.location.origin+new URL(m).pathname,n.WsServiceUrl=(window.location.protocol=="https:"?"wss://":"ws://")+window.location.host+new URL(b).pathname):(n.httpServiceUrl=m,n.WsServiceUrl=b),console.debug("[Connection Service] HTTP URI: "+n.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+n.WsServiceUrl),n.operation=2,n.message=c.status.toString(),n.serverDescription=`${c.body.server.id} ${c.body.server.version}`}catch(c){n.operation=3,n.message=c.message,this.handleError(c)}finally{o?n.subscribeAll=!0:n.subscribeAll=!1,this.serverServiceEndpoint$.next(n)}})}handleError(e){let r=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(r),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,r,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${r}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var vs=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Or=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let i=t.match(vs);if(!i)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return i.shift(),i},io=t=>t==="*"||t==="x"||t==="X",oo=t=>{let i=parseInt(t,10);return isNaN(i)?t:i},_s=(t,i)=>typeof t!=typeof i?[String(t),String(i)]:[t,i],ys=(t,i)=>{if(io(t)||io(i))return 0;let[e,r]=_s(oo(t),oo(i));return e>r?1:e<r?-1:0},Ir=(t,i)=>{for(let e=0;e<Math.max(t.length,i.length);e++){let r=ys(t[e]||"0",i[e]||"0");if(r!==0)return r}return 0};var ao=(t,i)=>{let e=Or(t),r=Or(i),o=e.pop(),n=r.pop(),s=Ir(e,r);return s!==0?s:o&&n?Ir(o.split("."),n.split(".")):o||n?o?-1:1:0};var Rr=(t,i,e)=>{Ss(e);let r=ao(t,i);return so[e].includes(r)},so={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},no=Object.keys(so),Ss=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(no.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${no.join("|")}`)};var lo=(()=>{class t{server=g(Ye);http=g(Ke);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new T;patchQueue$=new T;patch=function(e){return this.http.post(e.url,e.document).pipe(Fi(r=>console.log("[Storage Service] Remote config patch request completed successfully")),Nt(r=>this.handleError(r)))};constructor(){let e=this.server;e.serverServiceEndpoint$.subscribe(r=>{r.httpServiceUrl!==null&&(this.serverEndpoint=r.httpServiceUrl.substring(0,r.httpServiceUrl.length-4)+"applicationData/",console.log("[Storage Service] Service startup. AppData API set to: "+this.serverEndpoint)),r.operation===2?this.storageServiceReady$.next(!0):this.storageServiceReady$.next(!1)}),e.serverVersion$.subscribe(r=>{r&&(this.isAppDataSupported=Rr(r,"1.27.0",">="))}),this.patchQueue$.pipe(wi(r=>this.patch(r))).subscribe(r=>{})}listConfigs(e){return ie(this,null,function*(){let r=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,n=o+"global/kip/"+this.configFileVersion+"/?keys=true",s=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(n=o+"global/kip/"+e+"/?keys=true",s=o+"user/kip/"+e+"/?keys=true"),yield de(this.http.get(n)).then(c=>{for(let m of c)r.push({scope:"global",name:m});console.log("[Storage Service] Retrieved Global config list")}).catch(c=>{this.handleError(c)}),yield de(this.http.get(s)).then(c=>{for(let m of c)r.push({scope:"user",name:m});console.log("[Storage Service] Retrieved User config list")}).catch(c=>{this.handleError(c)}),r})}getConfig(e,r,o,n){return ie(this,null,function*(){let s=null,c=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r;return o&&(c=this.serverEndpoint+e+"/kip/"+o+"/"+r),yield de(this.http.get(c)).then(m=>{s=m,console.log(`[Storage Service] Retrieved config [${r}] from [${e}] scope`),n&&(this.InitConfig=m)}).catch(m=>{this.handleError(m)}),s})}setConfig(e,r,o,n){return ie(this,null,function*(){let s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+r,c;return n&&(s=this.serverEndpoint+e+"/kip/"+n+"/"+r),yield de(this.http.post(s,o)).then(m=>{console.log(`[Storage Service] Saved config [${r}] to [${e}] scope`),c=m}).catch(m=>{this.handleError(m)}),c})}patchConfig(e,r,o){let n=this.serverEndpoint+"user/kip/"+this.configFileVersion,s;switch(o&&(n=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:r}];break;case"IThemeConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:r.themeName}];break;case"IWidgetConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:r}];break;case"ILayoutConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:r}];break;case"Dashboards":s=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:r}];break;case"Array<IUnitDefaults>":s=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:r}];break;case"Array<IDatasetDef>":s=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:r}];break;case"INotificationConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:r}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let c={url:n,document:s};this.patchQueue$.next(c)}patchGlobal(e,r,o,n,s){let c=this.serverEndpoint+r+"/kip/"+this.configFileVersion;s&&(c=this.serverEndpoint+r+"/kip/"+s);let m;switch(n){case"add":m=[{op:"add",path:`/${e}`,value:o}];break;case"replace":m=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":m=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let b={url:c,document:m};this.patchQueue$.next(b)}removeItem(e,r,o){let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(n=this.serverEndpoint+e+"/kip/"+o);let s=[{op:"remove",path:`/${r}`}],c={url:n,document:s};this.patchQueue$.next(c)}clear(){}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Te=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){let e=Math.random()*16|0;return(i=="x"?e:e&3|8).toString(16)})}};var St={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var Ut={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var co={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:Ut,notificationConfig:St},fo={themeName:""};var mo={configVersion:11,kipUUID:Te.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Nr={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},Ur=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"yellow",enableTimeout:!1,dataTimeout:5}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},courseOverGround:{description:"Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,numInt:1,color:"contrast",enableTimeout:!1,dataTimeout:5}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",invertData:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalGraph:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"green"}}},x:8,y:6},{w:3,h:4,id:"05414722-733a-4483-89b0-07f3945ffd97",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"05414722-733a-4483-89b0-07f3945ffd97",config:{displayName:"Engine Room",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.inside.engineRoom.temperature",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"celsius",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"blue",enableTimeout:!1,dataTimeout:5}}},x:0,y:8},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.0.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",isConvertUnitToConfigurable:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{displayName:"N2k Autopilot",filterSelfPaths:!0,paths:{apState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!0,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},apTargetHeadingMag:{description:"Autopilot Target Heading Mag",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},apTargetWindAngleApp:{description:"Autopilot Target Wind Angle Apparent",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingMag:{description:"Heading Magnetic",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingTrue:{description:"Heading True",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleApparent:{description:"Wind Angle Apparent",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500}},usage:{headingMag:["wind","route","auto","standby"],headingTrue:["wind","route","auto","standby"],windAngleApparent:["wind"],windAngleTrueWater:["wind"]},typeVal:{headingMag:"Mag",headingTrue:"True",windAngleApparent:"AWA",windAngleTrueWater:"TWA"},barColor:"accent",autoStart:!1,enableTimeout:!1,dataTimeout:5}}}}]}],Pr={themeName:""};var _p={configVersion:11,kipUUID:Te.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var ws="",Ts=11,wt=11,Fp=(()=>{class t{storage=g(lo);unitDefaults=new D({});themeName=new D(ws);kipKNotificationConfig=new D(St);autoNightMode=new D(!1);redNightMode=new D(!1);nightModeBrightness=new D(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=ht(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=Ts,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
2
+ This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let r={app:null,theme:null,dashboards:null};r.app=this.loadConfigFromLocalStorage("appConfig"),r.app.configVersion!==wt&&this.checkConfigUpgradeRequired(!0),r.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),r.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=r,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(r=>ie(this,null,function*(){for(let o of r)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(n){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,n)}})).catch(r=>{console.error("[AppSettings Service] Error fetching configuration data:",r)})}loadConfigFromLocalStorage(e){let r=JSON.parse(localStorage.getItem(e));if(r===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":r=this.getDefaultAppConfig();break;case"connectionConfig":r=this.getDefaultConnectionConfig();break;case"dashboardsConfig":r=this.getDefaultDashboardsConfig();break;case"themeConfig":r=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&r.configVersion!==wt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":r=this.getDefaultConnectionConfig();break}return r}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let r={themeName:e};this.storage.patchConfig("IThemeConfig",r)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let r=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",r):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.setConfig("user",this.sharedConfigName,e).then(r=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(r=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName)}):this.reloadApp()}replaceConfig(e,r,o){let n=JSON.stringify(r);localStorage.setItem(e,n),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:Nr,dashboards:Ur,theme:Pr};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",Nr),this.replaceConfig("dashboardsConfig",Ur),this.replaceConfig("themeConfig",Pr,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),location.replace("./")}buildAppStorageObject(){return{configVersion:wt,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:wt,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=co;return e.notificationConfig=St,e.unitDefaults=Ut,e.configVersion=wt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=mo;return e.kipUUID=Te.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=fo;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cs(){this.__data__=[],this.size=0}var uo=Cs;function ks(t,i){return t===i||t!==t&&i!==i}var me=ks;function As(t,i){for(var e=t.length;e--;)if(me(t[e][0],i))return e;return-1}var Ce=As;var Es=Array.prototype,Ds=Es.splice;function Ms(t){var i=this.__data__,e=Ce(i,t);if(e<0)return!1;var r=i.length-1;return e==r?i.pop():Ds.call(i,e,1),--this.size,!0}var po=Ms;function Fs(t){var i=this.__data__,e=Ce(i,t);return e<0?void 0:i[e][1]}var ho=Fs;function Os(t){return Ce(this.__data__,t)>-1}var go=Os;function Is(t,i){var e=this.__data__,r=Ce(e,t);return r<0?(++this.size,e.push([t,i])):e[r][1]=i,this}var bo=Is;function Xe(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}Xe.prototype.clear=uo;Xe.prototype.delete=po;Xe.prototype.get=ho;Xe.prototype.has=go;Xe.prototype.set=bo;var ke=Xe;function Rs(){this.__data__=new ke,this.size=0}var xo=Rs;function Ns(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}var vo=Ns;function Us(t){return this.__data__.get(t)}var _o=Us;function Ps(t){return this.__data__.has(t)}var yo=Ps;var Ls=typeof global=="object"&&global&&global.Object===Object&&global,Pt=Ls;var js=typeof self=="object"&&self&&self.Object===Object&&self,zs=Pt||js||Function("return this")(),M=zs;var $s=M.Symbol,Z=$s;var So=Object.prototype,Bs=So.hasOwnProperty,Ws=So.toString,Tt=Z?Z.toStringTag:void 0;function Hs(t){var i=Bs.call(t,Tt),e=t[Tt];try{t[Tt]=void 0;var r=!0}catch{}var o=Ws.call(t);return r&&(i?t[Tt]=e:delete t[Tt]),o}var wo=Hs;var Vs=Object.prototype,qs=Vs.toString;function Ks(t){return qs.call(t)}var To=Ks;var Gs="[object Null]",Qs="[object Undefined]",Co=Z?Z.toStringTag:void 0;function Js(t){return t==null?t===void 0?Qs:Gs:Co&&Co in Object(t)?wo(t):To(t)}var le=Js;function Zs(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}var j=Zs;var Ys="[object AsyncFunction]",Xs="[object Function]",el="[object GeneratorFunction]",tl="[object Proxy]";function rl(t){if(!j(t))return!1;var i=le(t);return i==Xs||i==el||i==Ys||i==tl}var et=rl;var il=M["__core-js_shared__"],Lt=il;var ko=function(){var t=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ol(t){return!!ko&&ko in t}var Ao=ol;var al=Function.prototype,nl=al.toString;function sl(t){if(t!=null){try{return nl.call(t)}catch{}try{return t+""}catch{}}return""}var he=sl;var ll=/[\\^$.*+?()[\]{}|]/g,dl=/^\[object .+?Constructor\]$/,cl=Function.prototype,fl=Object.prototype,ml=cl.toString,ul=fl.hasOwnProperty,pl=RegExp("^"+ml.call(ul).replace(ll,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hl(t){if(!j(t)||Ao(t))return!1;var i=et(t)?pl:dl;return i.test(he(t))}var Eo=hl;function gl(t,i){return t?.[i]}var Do=gl;function bl(t,i){var e=Do(t,i);return Eo(e)?e:void 0}var q=bl;var xl=q(M,"Map"),Ae=xl;var vl=q(Object,"create"),ge=vl;function _l(){this.__data__=ge?ge(null):{},this.size=0}var Mo=_l;function yl(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}var Fo=yl;var Sl="__lodash_hash_undefined__",wl=Object.prototype,Tl=wl.hasOwnProperty;function Cl(t){var i=this.__data__;if(ge){var e=i[t];return e===Sl?void 0:e}return Tl.call(i,t)?i[t]:void 0}var Oo=Cl;var kl=Object.prototype,Al=kl.hasOwnProperty;function El(t){var i=this.__data__;return ge?i[t]!==void 0:Al.call(i,t)}var Io=El;var Dl="__lodash_hash_undefined__";function Ml(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=ge&&i===void 0?Dl:i,this}var Ro=Ml;function tt(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}tt.prototype.clear=Mo;tt.prototype.delete=Fo;tt.prototype.get=Oo;tt.prototype.has=Io;tt.prototype.set=Ro;var Lr=tt;function Fl(){this.size=0,this.__data__={hash:new Lr,map:new(Ae||ke),string:new Lr}}var No=Fl;function Ol(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}var Uo=Ol;function Il(t,i){var e=t.__data__;return Uo(i)?e[typeof i=="string"?"string":"hash"]:e.map}var Ee=Il;function Rl(t){var i=Ee(this,t).delete(t);return this.size-=i?1:0,i}var Po=Rl;function Nl(t){return Ee(this,t).get(t)}var Lo=Nl;function Ul(t){return Ee(this,t).has(t)}var jo=Ul;function Pl(t,i){var e=Ee(this,t),r=e.size;return e.set(t,i),this.size+=e.size==r?0:1,this}var zo=Pl;function rt(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var r=t[i];this.set(r[0],r[1])}}rt.prototype.clear=No;rt.prototype.delete=Po;rt.prototype.get=Lo;rt.prototype.has=jo;rt.prototype.set=zo;var jt=rt;var Ll=200;function jl(t,i){var e=this.__data__;if(e instanceof ke){var r=e.__data__;if(!Ae||r.length<Ll-1)return r.push([t,i]),this.size=++e.size,this;e=this.__data__=new jt(r)}return e.set(t,i),this.size=e.size,this}var $o=jl;function it(t){var i=this.__data__=new ke(t);this.size=i.size}it.prototype.clear=xo;it.prototype.delete=vo;it.prototype.get=_o;it.prototype.has=yo;it.prototype.set=$o;var De=it;function zl(t,i){for(var e=-1,r=t==null?0:t.length;++e<r&&i(t[e],e,t)!==!1;);return t}var Bo=zl;var $l=function(){try{var t=q(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ot=$l;function Bl(t,i,e){i=="__proto__"&&ot?ot(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var at=Bl;var Wl=Object.prototype,Hl=Wl.hasOwnProperty;function Vl(t,i,e){var r=t[i];(!(Hl.call(t,i)&&me(r,e))||e===void 0&&!(i in t))&&at(t,i,e)}var zt=Vl;function ql(t,i,e,r){var o=!e;e||(e={});for(var n=-1,s=i.length;++n<s;){var c=i[n],m=r?r(e[c],t[c],c,e,t):void 0;m===void 0&&(m=t[c]),o?at(e,c,m):zt(e,c,m)}return e}var ue=ql;function Kl(t,i){for(var e=-1,r=Array(t);++e<t;)r[e]=i(e);return r}var Wo=Kl;function Gl(t){return t!=null&&typeof t=="object"}var U=Gl;var Ql="[object Arguments]";function Jl(t){return U(t)&&le(t)==Ql}var jr=Jl;var Ho=Object.prototype,Zl=Ho.hasOwnProperty,Yl=Ho.propertyIsEnumerable,Xl=jr(function(){return arguments}())?jr:function(t){return U(t)&&Zl.call(t,"callee")&&!Yl.call(t,"callee")},Ct=Xl;var ed=Array.isArray,Y=ed;function td(){return!1}var Vo=td;var Go=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qo=Go&&typeof module=="object"&&module&&!module.nodeType&&module,rd=qo&&qo.exports===Go,Ko=rd?M.Buffer:void 0,id=Ko?Ko.isBuffer:void 0,od=id||Vo,be=od;var ad=9007199254740991,nd=/^(?:0|[1-9]\d*)$/;function sd(t,i){var e=typeof t;return i=i??ad,!!i&&(e=="number"||e!="symbol"&&nd.test(t))&&t>-1&&t%1==0&&t<i}var $t=sd;var ld=9007199254740991;function dd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ld}var Bt=dd;var cd="[object Arguments]",fd="[object Array]",md="[object Boolean]",ud="[object Date]",pd="[object Error]",hd="[object Function]",gd="[object Map]",bd="[object Number]",xd="[object Object]",vd="[object RegExp]",_d="[object Set]",yd="[object String]",Sd="[object WeakMap]",wd="[object ArrayBuffer]",Td="[object DataView]",Cd="[object Float32Array]",kd="[object Float64Array]",Ad="[object Int8Array]",Ed="[object Int16Array]",Dd="[object Int32Array]",Md="[object Uint8Array]",Fd="[object Uint8ClampedArray]",Od="[object Uint16Array]",Id="[object Uint32Array]",k={};k[Cd]=k[kd]=k[Ad]=k[Ed]=k[Dd]=k[Md]=k[Fd]=k[Od]=k[Id]=!0;k[cd]=k[fd]=k[wd]=k[md]=k[Td]=k[ud]=k[pd]=k[hd]=k[gd]=k[bd]=k[xd]=k[vd]=k[_d]=k[yd]=k[Sd]=!1;function Rd(t){return U(t)&&Bt(t.length)&&!!k[le(t)]}var Qo=Rd;function Nd(t){return function(i){return t(i)}}var nt=Nd;var Jo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kt=Jo&&typeof module=="object"&&module&&!module.nodeType&&module,Ud=kt&&kt.exports===Jo,zr=Ud&&Pt.process,Pd=function(){try{var t=kt&&kt.require&&kt.require("util").types;return t||zr&&zr.binding&&zr.binding("util")}catch{}}(),xe=Pd;var Zo=xe&&xe.isTypedArray,Ld=Zo?nt(Zo):Qo,st=Ld;var jd=Object.prototype,zd=jd.hasOwnProperty;function $d(t,i){var e=Y(t),r=!e&&Ct(t),o=!e&&!r&&be(t),n=!e&&!r&&!o&&st(t),s=e||r||o||n,c=s?Wo(t.length,String):[],m=c.length;for(var b in t)(i||zd.call(t,b))&&!(s&&(b=="length"||o&&(b=="offset"||b=="parent")||n&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||$t(b,m)))&&c.push(b);return c}var Wt=$d;var Bd=Object.prototype;function Wd(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||Bd;return t===e}var lt=Wd;function Hd(t,i){return function(e){return t(i(e))}}var Ht=Hd;var Vd=Ht(Object.keys,Object),Yo=Vd;var qd=Object.prototype,Kd=qd.hasOwnProperty;function Gd(t){if(!lt(t))return Yo(t);var i=[];for(var e in Object(t))Kd.call(t,e)&&e!="constructor"&&i.push(e);return i}var Xo=Gd;function Qd(t){return t!=null&&Bt(t.length)&&!et(t)}var Me=Qd;function Jd(t){return Me(t)?Wt(t):Xo(t)}var dt=Jd;function Zd(t,i){return t&&ue(i,dt(i),t)}var ea=Zd;function Yd(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}var ta=Yd;var Xd=Object.prototype,ec=Xd.hasOwnProperty;function tc(t){if(!j(t))return ta(t);var i=lt(t),e=[];for(var r in t)r=="constructor"&&(i||!ec.call(t,r))||e.push(r);return e}var ra=tc;function rc(t){return Me(t)?Wt(t,!0):ra(t)}var pe=rc;function ic(t,i){return t&&ue(i,pe(i),t)}var ia=ic;var sa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oa=sa&&typeof module=="object"&&module&&!module.nodeType&&module,oc=oa&&oa.exports===sa,aa=oc?M.Buffer:void 0,na=aa?aa.allocUnsafe:void 0;function ac(t,i){if(i)return t.slice();var e=t.length,r=na?na(e):new t.constructor(e);return t.copy(r),r}var Vt=ac;function nc(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}var qt=nc;function sc(t,i){for(var e=-1,r=t==null?0:t.length,o=0,n=[];++e<r;){var s=t[e];i(s,e,t)&&(n[o++]=s)}return n}var la=sc;function lc(){return[]}var Kt=lc;var dc=Object.prototype,cc=dc.propertyIsEnumerable,da=Object.getOwnPropertySymbols,fc=da?function(t){return t==null?[]:(t=Object(t),la(da(t),function(i){return cc.call(t,i)}))}:Kt,ct=fc;function mc(t,i){return ue(t,ct(t),i)}var ca=mc;function uc(t,i){for(var e=-1,r=i.length,o=t.length;++e<r;)t[o+e]=i[e];return t}var Gt=uc;var pc=Ht(Object.getPrototypeOf,Object),ft=pc;var hc=Object.getOwnPropertySymbols,gc=hc?function(t){for(var i=[];t;)Gt(i,ct(t)),t=ft(t);return i}:Kt,Qt=gc;function bc(t,i){return ue(t,Qt(t),i)}var fa=bc;function xc(t,i,e){var r=i(t);return Y(t)?r:Gt(r,e(t))}var Jt=xc;function vc(t){return Jt(t,dt,ct)}var At=vc;function _c(t){return Jt(t,pe,Qt)}var ma=_c;var yc=q(M,"DataView"),Zt=yc;var Sc=q(M,"Promise"),Yt=Sc;var wc=q(M,"Set"),Xt=wc;var Tc=q(M,"WeakMap"),er=Tc;var ua="[object Map]",Cc="[object Object]",pa="[object Promise]",ha="[object Set]",ga="[object WeakMap]",ba="[object DataView]",kc=he(Zt),Ac=he(Ae),Ec=he(Yt),Dc=he(Xt),Mc=he(er),Le=le;(Zt&&Le(new Zt(new ArrayBuffer(1)))!=ba||Ae&&Le(new Ae)!=ua||Yt&&Le(Yt.resolve())!=pa||Xt&&Le(new Xt)!=ha||er&&Le(new er)!=ga)&&(Le=function(t){var i=le(t),e=i==Cc?t.constructor:void 0,r=e?he(e):"";if(r)switch(r){case kc:return ba;case Ac:return ua;case Ec:return pa;case Dc:return ha;case Mc:return ga}return i});var ve=Le;var Fc=Object.prototype,Oc=Fc.hasOwnProperty;function Ic(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Oc.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var xa=Ic;var Rc=M.Uint8Array,mt=Rc;function Nc(t){var i=new t.constructor(t.byteLength);return new mt(i).set(new mt(t)),i}var ut=Nc;function Uc(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var va=Uc;var Pc=/\w*$/;function Lc(t){var i=new t.constructor(t.source,Pc.exec(t));return i.lastIndex=t.lastIndex,i}var _a=Lc;var ya=Z?Z.prototype:void 0,Sa=ya?ya.valueOf:void 0;function jc(t){return Sa?Object(Sa.call(t)):{}}var wa=jc;function zc(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var tr=zc;var $c="[object Boolean]",Bc="[object Date]",Wc="[object Map]",Hc="[object Number]",Vc="[object RegExp]",qc="[object Set]",Kc="[object String]",Gc="[object Symbol]",Qc="[object ArrayBuffer]",Jc="[object DataView]",Zc="[object Float32Array]",Yc="[object Float64Array]",Xc="[object Int8Array]",ef="[object Int16Array]",tf="[object Int32Array]",rf="[object Uint8Array]",of="[object Uint8ClampedArray]",af="[object Uint16Array]",nf="[object Uint32Array]";function sf(t,i,e){var r=t.constructor;switch(i){case Qc:return ut(t);case $c:case Bc:return new r(+t);case Jc:return va(t,e);case Zc:case Yc:case Xc:case ef:case tf:case rf:case of:case af:case nf:return tr(t,e);case Wc:return new r;case Hc:case Kc:return new r(t);case Vc:return _a(t);case qc:return new r;case Gc:return wa(t)}}var Ta=sf;var Ca=Object.create,lf=function(){function t(){}return function(i){if(!j(i))return{};if(Ca)return Ca(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),ka=lf;function df(t){return typeof t.constructor=="function"&&!lt(t)?ka(ft(t)):{}}var rr=df;var cf="[object Map]";function ff(t){return U(t)&&ve(t)==cf}var Aa=ff;var Ea=xe&&xe.isMap,mf=Ea?nt(Ea):Aa,Da=mf;var uf="[object Set]";function pf(t){return U(t)&&ve(t)==uf}var Ma=pf;var Fa=xe&&xe.isSet,hf=Fa?nt(Fa):Ma,Oa=hf;var gf=1,bf=2,xf=4,Ia="[object Arguments]",vf="[object Array]",_f="[object Boolean]",yf="[object Date]",Sf="[object Error]",Ra="[object Function]",wf="[object GeneratorFunction]",Tf="[object Map]",Cf="[object Number]",Na="[object Object]",kf="[object RegExp]",Af="[object Set]",Ef="[object String]",Df="[object Symbol]",Mf="[object WeakMap]",Ff="[object ArrayBuffer]",Of="[object DataView]",If="[object Float32Array]",Rf="[object Float64Array]",Nf="[object Int8Array]",Uf="[object Int16Array]",Pf="[object Int32Array]",Lf="[object Uint8Array]",jf="[object Uint8ClampedArray]",zf="[object Uint16Array]",$f="[object Uint32Array]",C={};C[Ia]=C[vf]=C[Ff]=C[Of]=C[_f]=C[yf]=C[If]=C[Rf]=C[Nf]=C[Uf]=C[Pf]=C[Tf]=C[Cf]=C[Na]=C[kf]=C[Af]=C[Ef]=C[Df]=C[Lf]=C[jf]=C[zf]=C[$f]=!0;C[Sf]=C[Ra]=C[Mf]=!1;function ir(t,i,e,r,o,n){var s,c=i&gf,m=i&bf,b=i&xf;if(e&&(s=o?e(t,r,o,n):e(t)),s!==void 0)return s;if(!j(t))return t;var _=Y(t);if(_){if(s=xa(t),!c)return qt(t,s)}else{var u=ve(t),v=u==Ra||u==wf;if(be(t))return Vt(t,c);if(u==Na||u==Ia||v&&!o){if(s=m||v?{}:rr(t),!c)return m?fa(t,ia(s,t)):ca(t,ea(s,t))}else{if(!C[u])return o?t:{};s=Ta(t,u,c)}}n||(n=new De);var y=n.get(t);if(y)return y;n.set(t,s),Oa(t)?t.forEach(function(S){s.add(ir(S,i,e,S,t,n))}):Da(t)&&t.forEach(function(S,R){s.set(R,ir(S,i,e,R,t,n))});var w=b?m?ma:At:m?pe:dt,E=_?void 0:w(t);return Bo(E||t,function(S,R){E&&(R=S,S=t[R]),zt(s,R,ir(S,i,e,R,t,n))}),s}var Ua=ir;var Bf=1,Wf=4;function Hf(t){return Ua(t,Bf|Wf)}var $r=Hf;function J(t){t||(Tr(J),t=g(ye));let i=new Re(e=>t.onDestroy(e.next.bind(e)));return e=>e.pipe(Ue(i))}function Vf(t,i){let e=!i?.manualCleanup;e&&!i?.injector&&Tr(Vf);let r=e?i?.injector?.get(ye)??g(ye):null,o=qf(i?.equal),n;i?.requireSync?n=ht({kind:0},{equal:o}):n=ht({kind:1,value:i?.initialValue},{equal:o});let s=t.subscribe({next:c=>n.set({kind:1,value:c}),error:c=>{if(i?.rejectErrors)throw c;n.set({kind:2,error:c})}});if(i?.requireSync&&n().kind===0)throw new wr(601,!1);return r?.onDestroy(s.unsubscribe.bind(s)),yt(()=>{let c=n();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new wr(601,!1)}},{equal:i?.equal})}function qf(t=Object.is){return(i,e)=>i.kind===1&&e.kind===1&&t(i.value,e.value)}var Kf="/signalk/v1/",Pa="auth/login",Gf="auth/logout",Qf="auth/validate",Jf=60,La=(()=>{class t{http=g(Ke);conn=g(Ye);_IsLoggedIn$=new D(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new D(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe($e(r=>!!r&&r.expiry!==null),Ci((r,o)=>r.expiry===o.expiry),ze(r=>{let o=this.getTokenExpirationDate(r.expiry,Jf),n=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${n} ms (Token Expiry: ${o.toISOString()})`),Math.max(n,0)}),Mi(r=>yi(r))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(r=>{if(r.operation===2){let o=r.httpServiceUrl.substring(0,r.httpServiceUrl.length-4);this.loginUrl=o+Pa,this.logoutUrl=o+Gf,this.validateTokenUrl=o+Qf}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let r=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:r.loginName,pwd:r.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(n){return ie(this,arguments,function*({usr:e,pwd:r,newUrl:o}){let s;o?s=o+Kf+Pa:s=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),yield de(this.http.post(s,{username:e,password:r},{observe:"response"})).then(c=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(c.body.token)}).catch(c=>{this.deleteToken(),this.handleError(c)})})}handleError(e){throw e.status===0?(console.error("[Authentication Service] An error occurred:",e.error),this.deleteToken()):console.error(`[Authentication Service] Backend returned code ${e.status}, body was: `,e.error),e}setSession(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};r===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,r){let o=new Date(0);if(r){let n=new Date(0);n.setUTCSeconds(e-r),o=n}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return ie(this,null,function*(){localStorage.removeItem("authorization_token"),yield de(this.http.put(this.logoutUrl,null)).then(r=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(r=>{console.error(r)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let r=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};r===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(r)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=r,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Zf={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},Yf="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",or=class t extends hi{constructor(i,e){if(super(),this._socket=null,i instanceof Re)this.destination=e,this.source=i;else{let r=this._config=Object.assign({},Zf);if(this._output=new T,typeof i=="string")r.url=i;else for(let o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);if(!r.WebSocketCtor&&WebSocket)r.WebSocketCtor=WebSocket;else if(!r.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new Ne}}lift(i){let e=new t(this._config,this.destination);return e.operator=i,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new Ne),this._output=new T}multiplex(i,e,r){let o=this;return new Re(n=>{try{o.next(i())}catch(c){n.error(c)}let s=o.subscribe({next:c=>{try{r(c)&&n.next(c)}catch(m){n.error(m)}},error:c=>n.error(c),complete:()=>n.complete()});return()=>{try{o.next(e())}catch(c){n.error(c)}s.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:i,protocol:e,url:r,binaryType:o}=this._config,n=this._output,s=null;try{s=e?new i(r,e):new i(r),this._socket=s,o&&(this._socket.binaryType=o)}catch(m){n.error(m);return}let c=new It(()=>{this._socket=null,s&&s.readyState===1&&s.close()});s.onopen=m=>{let{_socket:b}=this;if(!b){s.close(),this._resetState();return}let{openObserver:_}=this._config;_&&_.next(m);let u=this.destination;this.destination=pi.create(v=>{if(s.readyState===1)try{let{serializer:y}=this._config;s.send(y(v))}catch(y){this.destination.error(y)}},v=>{let{closingObserver:y}=this._config;y&&y.next(void 0),v&&v.code?s.close(v.code,v.reason):n.error(new TypeError(Yf)),this._resetState()},()=>{let{closingObserver:v}=this._config;v&&v.next(void 0),s.close(),this._resetState()}),u&&u instanceof Ne&&c.add(u.subscribe(this.destination))},s.onerror=m=>{this._resetState(),n.error(m)},s.onclose=m=>{s===this._socket&&this._resetState();let{closeObserver:b}=this._config;b&&b.next(m),m.wasClean?n.complete():n.error(m)},s.onmessage=m=>{try{let{deserializer:b}=this._config;n.next(b(m))}catch(b){n.error(b)}}}_subscribe(i){let{source:e}=this;return e?e.subscribe(i):(this._socket||this._connectSocket(),this._output.subscribe(i),i.add(()=>{let{_socket:r}=this;this._output.observers.length===0&&(r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState())}),i)}unsubscribe(){let{_socket:i}=this;i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState(),super.unsubscribe()}};function Br(t){return new or(t)}var ja=(()=>{class t{_destroyRef=g(ye);_skRequests$=new T;_skNotificationsMsg$=new T;_skValue$=new T;_skMetadata$=new T;_vesselSelfUrn$=new T;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new D(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_RECONNECT_INTERVAL=3e3;WS_RETRY_COUNT=3;WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new T;socketWSOpenEvent$=new T;authToken=null;timeoutIds=[];server=g(Ye);auth=g(La);zones=g(G);constructor(){this.server.serverServiceEndpoint$.pipe(J(this._destroyRef)).subscribe(e=>{let r=null;e.operation===2?r="New endpoint":r="Connection stopped",e.operation===2?(this.endpointWS=e.WsServiceUrl,this.socketWS$&&this.streamEndpoint.operation!==4&&this.closeWS(r),this.timeoutIds.push(setTimeout(()=>{this.connectWS(r)},250))):this.socketWS$&&e.operation!==1&&this.streamEndpoint.operation!==4&&this.closeWS(r),e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self"}),this.auth.authToken$.pipe(J(this._destroyRef)).subscribe(e=>{if(this.authToken!=e){this.authToken=e;let r=null;e?r="New token":r="Deleted Token",this.socketWS$&&(this.streamEndpoint.operation===2||this.streamEndpoint.operation===1)&&(this.closeWS(r),this.timeoutIds.push(setTimeout(()=>{this.connectWS(r)},250)))}}),this.socketWSOpenEvent$.pipe(J(this._destroyRef)).subscribe(e=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint)}),this.socketWSCloseEvent$.pipe(J(this._destroyRef)).subscribe(e=>{e.wasClean?(this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0,console.log("[Delta Service] WebSocket closed")):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,console.log("[Delta Service] WebSocket closed")),this.streamEndpoint$.next(this.streamEndpoint)}),_i(document,"visibilitychange").pipe(J(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(Ai({count:this.WS_RETRY_COUNT,delay:(r,o)=>(console.error(`[Delta Service] WebSocket error (attempt ${o}): ${JSON.stringify(r,["code","message","type"])}`),Rt(r).pipe(Ti(this.WS_RECONNECT_INTERVAL)))})).pipe(J(this._destroyRef)).subscribe({next:r=>this.processWebsocketMessage(r),error:r=>console.error("[Delta Service] WebSocket connection failed after maximum retries:",r)})})}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,Br({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):(this.timeoutIds.push(setTimeout(()=>{this.socketWS$&&(console.log("[Delta Service] WebSocket retry sending message"),this.socketWS$.next(e))},1e3)),console.log("[Delta Service] No WebSocket present to send message"))}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,r){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(n=>this.parseSkMeta(n,r)),o.values!==void 0&&o.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)Object.keys(n.value).forEach(s=>{let c={context:r,path:`${n.path}.${s}`,source:o.$source,timestamp:o.timestamp,value:n.value[s]};o.$source=="defaults"&&n.path==""&&(c.path=c.path.slice(1)),r!=this._selfUrn&&n.path==""&&(c.path=c.path.slice(1)),this._skValue$.next(c)});else{let s={context:r,path:n.path,source:o.$source,timestamp:o.timestamp,value:n.value};this._skValue$.next(s)}})})}parseSkMeta(e,r){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:r,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:r,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.streamEndpoint.operation!==2?(console.log(`[Delta Service] ${e}: WebSocket not connected, attempting to reconnect...`),this.closeWS(e),this.timeoutIds.push(setTimeout(()=>this.connectWS(e),250))):console.log(`[Delta Service] ${e}: WebSocket is already connected.`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete(),this.timeoutIds.forEach(e=>clearTimeout(e))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xf(t){return t}var ar=Xf;function em(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}var za=em;var tm=800,rm=16,im=Date.now;function om(t){var i=0,e=0;return function(){var r=im(),o=rm-(r-e);if(e=r,o>0){if(++i>=tm)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}var $a=om;function am(t){return function(){return t}}var Ba=am;var nm=ot?function(t,i){return ot(t,"toString",{configurable:!0,enumerable:!1,value:Ba(i),writable:!0})}:ar,Wa=nm;var sm=$a(Wa),Ha=sm;var Va=Math.max;function lm(t,i,e){return i=Va(i===void 0?t.length-1:i,0),function(){for(var r=arguments,o=-1,n=Va(r.length-i,0),s=Array(n);++o<n;)s[o]=r[i+o];o=-1;for(var c=Array(i+1);++o<i;)c[o]=r[o];return c[i]=e(s),za(t,this,c)}}var qa=lm;function dm(t,i){return Ha(qa(t,i,ar),t+"")}var Ka=dm;function cm(t,i,e){if(!j(e))return!1;var r=typeof i;return(r=="number"?Me(e)&&$t(i,e.length):r=="string"&&i in e)?me(e[i],t):!1}var Ga=cm;function fm(t){return Ka(function(i,e){var r=-1,o=e.length,n=o>1?e[o-1]:void 0,s=o>2?e[2]:void 0;for(n=t.length>3&&typeof n=="function"?(o--,n):void 0,s&&Ga(e[0],e[1],s)&&(n=o<3?void 0:n,o=1),i=Object(i);++r<o;){var c=e[r];c&&t(i,c,r,n)}return i})}var Qa=fm;var mm="[object Object]",um=Function.prototype,pm=Object.prototype,Ja=um.toString,hm=pm.hasOwnProperty,gm=Ja.call(Object);function bm(t){if(!U(t)||le(t)!=mm)return!1;var i=ft(t);if(i===null)return!0;var e=hm.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&Ja.call(e)==gm}var Za=bm;var xm="__lodash_hash_undefined__";function vm(t){return this.__data__.set(t,xm),this}var Ya=vm;function _m(t){return this.__data__.has(t)}var Xa=_m;function nr(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new jt;++i<e;)this.add(t[i])}nr.prototype.add=nr.prototype.push=Ya;nr.prototype.has=Xa;var en=nr;function ym(t,i){for(var e=-1,r=t==null?0:t.length;++e<r;)if(i(t[e],e,t))return!0;return!1}var tn=ym;function Sm(t,i){return t.has(i)}var rn=Sm;var wm=1,Tm=2;function Cm(t,i,e,r,o,n){var s=e&wm,c=t.length,m=i.length;if(c!=m&&!(s&&m>c))return!1;var b=n.get(t),_=n.get(i);if(b&&_)return b==i&&_==t;var u=-1,v=!0,y=e&Tm?new en:void 0;for(n.set(t,i),n.set(i,t);++u<c;){var w=t[u],E=i[u];if(r)var S=s?r(E,w,u,i,t,n):r(w,E,u,t,i,n);if(S!==void 0){if(S)continue;v=!1;break}if(y){if(!tn(i,function(R,N){if(!rn(y,N)&&(w===R||o(w,R,e,r,n)))return y.push(N)})){v=!1;break}}else if(!(w===E||o(w,E,e,r,n))){v=!1;break}}return n.delete(t),n.delete(i),v}var sr=Cm;function km(t){var i=-1,e=Array(t.size);return t.forEach(function(r,o){e[++i]=[o,r]}),e}var on=km;function Am(t){var i=-1,e=Array(t.size);return t.forEach(function(r){e[++i]=r}),e}var an=Am;var Em=1,Dm=2,Mm="[object Boolean]",Fm="[object Date]",Om="[object Error]",Im="[object Map]",Rm="[object Number]",Nm="[object RegExp]",Um="[object Set]",Pm="[object String]",Lm="[object Symbol]",jm="[object ArrayBuffer]",zm="[object DataView]",nn=Z?Z.prototype:void 0,Wr=nn?nn.valueOf:void 0;function $m(t,i,e,r,o,n,s){switch(e){case zm:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case jm:return!(t.byteLength!=i.byteLength||!n(new mt(t),new mt(i)));case Mm:case Fm:case Rm:return me(+t,+i);case Om:return t.name==i.name&&t.message==i.message;case Nm:case Pm:return t==i+"";case Im:var c=on;case Um:var m=r&Em;if(c||(c=an),t.size!=i.size&&!m)return!1;var b=s.get(t);if(b)return b==i;r|=Dm,s.set(t,i);var _=sr(c(t),c(i),r,o,n,s);return s.delete(t),_;case Lm:if(Wr)return Wr.call(t)==Wr.call(i)}return!1}var sn=$m;var Bm=1,Wm=Object.prototype,Hm=Wm.hasOwnProperty;function Vm(t,i,e,r,o,n){var s=e&Bm,c=At(t),m=c.length,b=At(i),_=b.length;if(m!=_&&!s)return!1;for(var u=m;u--;){var v=c[u];if(!(s?v in i:Hm.call(i,v)))return!1}var y=n.get(t),w=n.get(i);if(y&&w)return y==i&&w==t;var E=!0;n.set(t,i),n.set(i,t);for(var S=s;++u<m;){v=c[u];var R=t[v],N=i[v];if(r)var Fe=s?r(N,R,v,i,t,n):r(R,N,v,t,i,n);if(!(Fe===void 0?R===N||o(R,N,e,r,n):Fe)){E=!1;break}S||(S=v=="constructor")}if(E&&!S){var F=t.constructor,X=i.constructor;F!=X&&"constructor"in t&&"constructor"in i&&!(typeof F=="function"&&F instanceof F&&typeof X=="function"&&X instanceof X)&&(E=!1)}return n.delete(t),n.delete(i),E}var ln=Vm;var qm=1,dn="[object Arguments]",cn="[object Array]",lr="[object Object]",Km=Object.prototype,fn=Km.hasOwnProperty;function Gm(t,i,e,r,o,n){var s=Y(t),c=Y(i),m=s?cn:ve(t),b=c?cn:ve(i);m=m==dn?lr:m,b=b==dn?lr:b;var _=m==lr,u=b==lr,v=m==b;if(v&&be(t)){if(!be(i))return!1;s=!0,_=!1}if(v&&!_)return n||(n=new De),s||st(t)?sr(t,i,e,r,o,n):sn(t,i,m,e,r,o,n);if(!(e&qm)){var y=_&&fn.call(t,"__wrapped__"),w=u&&fn.call(i,"__wrapped__");if(y||w){var E=y?t.value():t,S=w?i.value():i;return n||(n=new De),o(E,S,e,r,n)}}return v?(n||(n=new De),ln(t,i,e,r,o,n)):!1}var mn=Gm;function un(t,i,e,r,o){return t===i?!0:t==null||i==null||!U(t)&&!U(i)?t!==t&&i!==i:mn(t,i,e,r,un,o)}var pn=un;function Qm(t){return function(i,e,r){for(var o=-1,n=Object(i),s=r(i),c=s.length;c--;){var m=s[t?c:++o];if(e(n[m],m,n)===!1)break}return i}}var hn=Qm;var Jm=hn(),gn=Jm;function Zm(t,i,e){(e!==void 0&&!me(t[i],e)||e===void 0&&!(i in t))&&at(t,i,e)}var Et=Zm;function Ym(t){return U(t)&&Me(t)}var bn=Ym;function Xm(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}var Dt=Xm;function eu(t){return ue(t,pe(t))}var xn=eu;function tu(t,i,e,r,o,n,s){var c=Dt(t,e),m=Dt(i,e),b=s.get(m);if(b){Et(t,e,b);return}var _=n?n(c,m,e+"",t,i,s):void 0,u=_===void 0;if(u){var v=Y(m),y=!v&&be(m),w=!v&&!y&&st(m);_=m,v||y||w?Y(c)?_=c:bn(c)?_=qt(c):y?(u=!1,_=Vt(m,!0)):w?(u=!1,_=tr(m,!0)):_=[]:Za(m)||Ct(m)?(_=c,Ct(c)?_=xn(c):(!j(c)||et(c))&&(_=rr(m))):u=!1}u&&(s.set(m,_),o(_,m,r,n,s),s.delete(m)),Et(t,e,_)}var vn=tu;function _n(t,i,e,r,o){t!==i&&gn(i,function(n,s){if(o||(o=new De),j(n))vn(t,i,s,e,_n,r,o);else{var c=r?r(Dt(t,s),n,s+"",t,i,o):void 0;c===void 0&&(c=n),Et(t,s,c)}},pe)}var yn=_n;function ru(t,i){return pn(t,i)}var iu=ru;var ou=Qa(function(t,i,e){yn(t,i,e)}),Hr=ou;var pt=function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t}(pt||{});var au=function(t){return t.Visual="visual",t.Sound="sound",t}(au||{});var Tn=xs(Sn());var nu="self",wn=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(t):!1,X0=(()=>{class t{delta=g(ja);_destroyRef=g(ye);_deltaUpdatesCounter=null;_deltaUpdatesSubject=new Ne(60);_deltaUpdatesCounterTimer=null;_isSkDataFullTreeActive=!1;_skDataSubject$=new D([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new D([]);_skNotificationMsg$=new T;_skNotificationMeta$=new T;_isReset=new T;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){this._deltaUpdatesCounterTimer=setInterval(()=>{if(this._deltaUpdatesCounter!==null){let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}},1e3),this.delta.subscribeDataPathsUpdates().pipe(J(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(J(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(J(this._destroyRef)).subscribe(e=>{let r=e.path.replace("notifications.","self."),o=this._skData.find(n=>n.path==r);if(o&&o.state!==e.value.state){o.state=e.value.state;let n=this._pathRegister.find(s=>s.path==r);n&&n._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(J(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let r=this._pathRegister.findIndex(o=>o.path===e);if(r!==-1){let o=this._pathRegister[r];o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(r,1)}}subscribePath(e,r){let o=this._pathRegister.find(w=>w.path===e&&w.source===r);if(o)return o.pathDataUpdate$;let n=null,s=null,c=null,m=pt.Normal,b={data:{value:null,timestamp:null},state:m},_=null,u=this._skData.find(w=>w.path==e);this._skData.length&&u&&(n=r==="default"?u.pathValue:u.sources?.[r]?.sourceValue??null,s=r==="default"?u.pathTimestamp:u.sources?.[r]?.sourceTimestamp??null,c=s?new Date(s):null,b={data:{value:n,timestamp:c},state:u.state||m},m=u.state||m,_=u.meta||null);let v={path:e,source:r,_pathData$:new D(b.data),_pathState$:new D(b.state),pathDataUpdate$:new D(b),pathMeta$:new D(_)};return vi([v._pathData$,v._pathState$]).pipe(ze(([w,E])=>({data:w,state:E}))).subscribe(w=>v.pathDataUpdate$.next(w)),this._pathRegister.push(v),v.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let r=this.setPathContext(e.context,e.path);if(r.includes("position.latitude")||r.includes("position.longitude")){let s=Tn.default.swiftConverter("deg","rad");e.value=s(e.value)}let o=this._skData.find(s=>s.path==r);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&wn(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let s=typeof e.value;s==="string"&&wn(e.value)&&(s="Date"),o={path:r,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:s,state:pt.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let n=this._pathRegister.filter(s=>s.path===r);if(n.length){let s={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},c=n.find(b=>b.source==="default");c&&c._pathData$.next(s);let m=n.find(b=>b.source===e.source);m&&m._pathData$.next(s)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let r=this.setPathContext(e.context,e.path),o=this._skData.find(s=>s.path===r);o?(o.type==="object"&&e.meta.units&&(o.type="number"),o.meta=Hr(o.meta,e.meta)):(o={path:r,pathValue:void 0,pathTimestamp:void 0,type:e.meta.units?"number":void 0,state:pt.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let n=this._pathRegister.find(s=>s.path===r);n&&n.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:r,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""||e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,r){return e!==this._selfUrn?`${e}.${r}`:`${nu}.${r}`}getPathsByType(e,r){return this._skData.filter(o=>o.type===e&&(!r||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,r,o){return this._skData.filter(n=>n.type===e&&(!o||n.path.startsWith("self"))&&(r===!0?n.meta?.supportsPut===!0:!0)).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return $r(this._skData.find(r=>r.path===e))||null}getPathUnitType(e){return this._skData.find(r=>r.path===e)?.meta?.units||null}timeoutPathObservable(e,r){let o=this._pathRegister.find(n=>n.path==e);if(o){let n;["string","Date","number"].includes(r)&&(n={data:{value:null,timestamp:null},state:pt.Normal}),o.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||Rt(null)}getPathMeta(e){return this._skData.find(r=>r.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._deltaUpdatesCounterTimer&&clearInterval(this._deltaUpdatesCounterTimer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Kr=class{_box;_destroyed=new T;_resizeSubject=new T;_resizeObserver;_elementObservables=new Map;constructor(i){this._box=i,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new Re(e=>{let r=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),r.unsubscribe(),this._elementObservables.delete(i)}}).pipe($e(e=>e.some(r=>r.target===i)),Ei({bufferSize:1,refCount:!0}),Ue(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Cn=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new Kr(o)),this._observers.get(o).observe(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var su=["notch"],lu=["matFormFieldNotchedOutline",""],du=["*"],cu=["textField"],fu=["iconPrefixContainer"],mu=["textPrefixContainer"],uu=["iconSuffixContainer"],pu=["textSuffixContainer"],hu=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],gu=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function bu(t,i){t&1&&Pe(0,"span",20)}function xu(t,i){if(t&1&&(V(0,"label",19),ne(1,1),W(2,bu,1,0,"span",20),Q()),t&2){let e=we(2);He("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),xt("for",e._control.disableAutomaticLabeling?null:e._control.id),L(2),H(!e.hideRequiredMarker&&e._control.required?2:-1)}}function vu(t,i){if(t&1&&W(0,xu,3,5,"label",19),t&2){let e=we();H(e._hasFloatingLabel()?0:-1)}}function _u(t,i){t&1&&Pe(0,"div",7)}function yu(t,i){}function Su(t,i){if(t&1&&W(0,yu,0,0,"ng-template",13),t&2){we(2);let e=Ar(1);He("ngTemplateOutlet",e)}}function wu(t,i){if(t&1&&(V(0,"div",9),W(1,Su,1,1,null,13),Q()),t&2){let e=we();He("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),L(),H(e._forceDisplayInfixLabel()?-1:1)}}function Tu(t,i){t&1&&(V(0,"div",10,2),ne(2,2),Q())}function Cu(t,i){t&1&&(V(0,"div",11,3),ne(2,3),Q())}function ku(t,i){}function Au(t,i){if(t&1&&W(0,ku,0,0,"ng-template",13),t&2){we();let e=Ar(1);He("ngTemplateOutlet",e)}}function Eu(t,i){t&1&&(V(0,"div",14,4),ne(2,4),Q())}function Du(t,i){t&1&&(V(0,"div",15,5),ne(2,5),Q())}function Mu(t,i){t&1&&Pe(0,"div",16)}function Fu(t,i){t&1&&ne(0,6)}function Ou(t,i){if(t&1&&(V(0,"mat-hint",21),Wi(1),Q()),t&2){let e=we(2);He("id",e._hintLabelId),L(),Hi(e.hintLabel)}}function Iu(t,i){if(t&1&&(W(0,Ou,2,2,"mat-hint",21),ne(1,7),Pe(2,"div",22),ne(3,8)),t&2){let e=we();H(e.hintLabel?0:-1)}}var Gr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["mat-label"]]})}return t})(),Jr=new oe("MatError"),Ru=(()=>{class t{id=g(Qe).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(r,o){r&2&&vt("id",o.id)},inputs:{id:"id"},features:[qe([{provide:Jr,useExisting:t}])]})}return t})(),Qr=(()=>{class t{align="start";id=g(Qe).getId("mat-mdc-hint-");static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(vt("id",o.id),xt("align",null),ce("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),On=new oe("MatPrefix");var Zr=new oe("MatSuffix"),Nu=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[qe([{provide:Zr,useExisting:t}])]})}return t})(),In=new oe("FloatingLabelParent"),kn=(()=>{class t{_elementRef=g(Se);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=g(Cn);_ngZone=g(G);_parent=g(In);_resizeSubscription=new It;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Uu(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&ce("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Uu(t){let i=t;if(i.offsetParent!==null)return i.scrollWidth;let e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let r=e.scrollWidth;return e.remove(),r}var An="mdc-line-ripple--active",dr="mdc-line-ripple--deactivating",En=(()=>{class t{_elementRef=g(Se);_cleanupTransitionEnd;constructor(){let e=g(G),r=g(gt);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=r.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(dr),e.add(An)}deactivate(){this._elementRef.nativeElement.classList.add(dr)}_handleTransitionEnd=e=>{let r=this._elementRef.nativeElement.classList,o=r.contains(dr);e.propertyName==="opacity"&&o&&r.remove(An,dr)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Dn=(()=>{class t{_elementRef=g(Se);_ngZone=g(G);open=!1;_notch;constructor(){}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){!this.open||!e?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&fe(su,5),r&2){let n;z(n=$())&&(o._notch=n.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&ce("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:lu,ngContentSelectors:du,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(kr(),Pe(0,"div",1),V(1,"div",2,0),ne(3),Q(),Pe(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),cr=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t})}return t})();var fr=new oe("MatFormField"),Rn=new oe("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Mn="fill",Pu="auto",Fn="fixed",Lu="translateY(-50%)",ju=(()=>{class t{_elementRef=g(Se);_changeDetectorRef=g(Ki);_dir=g(Yi);_platform=g(Ge);_idGenerator=g(Qe);_ngZone=g(G);_injector=g(Cr);_defaults=g(Rn,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=ji(Gr);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ze(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Pu}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearance}set appearance(e){let r=this._appearance,o=e||this._defaults?.appearance||Mn;this._appearance=o,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}_appearance=Mn;get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Fn}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Fn}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new T;_isFocused=null;_explicitFormFieldControl;_needsOutlineLabelOffsetUpdate=!1;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_animationsDisabled;constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),this._animationsDisabled=g(Ui,{optional:!0})==="NoopAnimations"}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=yt(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let r=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),r.controlType&&this._elementRef.nativeElement.classList.add(o+r.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=r.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=r.stateChanges.pipe(Di([void 0,void 0]),ze(()=>[r.errorState,r.userAriaDescribedBy]),ki(),$e(([[n,s],[c,m]])=>n!==c||s!==m)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),r.ngControl&&r.ngControl.valueChanges&&(this._valueChanges=r.ngControl.valueChanges.pipe(Ue(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Si(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),Pi(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Ue(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=yt(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let r=this._control?this._control.ngControl:null;return r&&r[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(n=>n.align==="start"):null,o=this._hintChildren?this._hintChildren.find(n=>n.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),o&&e.push(o.id)}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){e.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,s=this._textSuffixContainer?.nativeElement,c=r?.getBoundingClientRect().width??0,m=o?.getBoundingClientRect().width??0,b=n?.getBoundingClientRect().width??0,_=s?.getBoundingClientRect().width??0,u=this._dir.value==="rtl"?"-1":"1",v=`${c+m}px`,w=`calc(${u} * (${v} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;e.style.transform=`var(
3
+ --mat-mdc-form-field-label-transform,
4
+ ${Lu} translateX(${w})
5
+ )`;let E=c+m+b+_;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${E}px)`)}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let r=e.getRootNode();return r&&r!==e}return document.documentElement.contains(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["mat-form-field"]],contentQueries:function(r,o,n){if(r&1&&($i(n,o._labelChild,Gr,5),Ve(n,cr,5),Ve(n,On,5),Ve(n,Zr,5),Ve(n,Jr,5),Ve(n,Qr,5)),r&2){Bi();let s;z(s=$())&&(o._formFieldControl=s.first),z(s=$())&&(o._prefixChildren=s),z(s=$())&&(o._suffixChildren=s),z(s=$())&&(o._errorChildren=s),z(s=$())&&(o._hintChildren=s)}},viewQuery:function(r,o){if(r&1&&(fe(cu,5),fe(fu,5),fe(mu,5),fe(uu,5),fe(pu,5),fe(kn,5),fe(Dn,5),fe(En,5)),r&2){let n;z(n=$())&&(o._textField=n.first),z(n=$())&&(o._iconPrefixContainer=n.first),z(n=$())&&(o._textPrefixContainer=n.first),z(n=$())&&(o._iconSuffixContainer=n.first),z(n=$())&&(o._textSuffixContainer=n.first),z(n=$())&&(o._floatingLabel=n.first),z(n=$())&&(o._notchedOutline=n.first),z(n=$())&&(o._lineRipple=n.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:40,hostBindings:function(r,o){r&2&&ce("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[qe([{provide:fr,useExisting:t},{provide:In,useExisting:t}])],ngContentSelectors:gu,decls:20,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let n=zi();kr(hu),W(0,vu,1,1,"ng-template",null,0,qi),V(2,"div",6,1),_t("click",function(c){return Ii(n),Ri(o._control.onContainerClick(c))}),W(4,_u,1,0,"div",7),V(5,"div",8),W(6,wu,2,2,"div",9)(7,Tu,3,0,"div",10)(8,Cu,3,0,"div",11),V(9,"div",12),W(10,Au,1,1,null,13),ne(11),Q(),W(12,Eu,3,0,"div",14)(13,Du,3,0,"div",15),Q(),W(14,Mu,1,0,"div",16),Q(),V(15,"div",17),Vi(16),V(17,"div",18),W(18,Fu,1,0)(19,Iu,4,1),Q()()}if(r&2){let n;L(2),ce("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),L(2),H(!o._hasOutline()&&!o._control.disabled?4:-1),L(2),H(o._hasOutline()?6:-1),L(),H(o._hasIconPrefix?7:-1),L(),H(o._hasTextPrefix?8:-1),L(2),H(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),L(2),H(o._hasTextSuffix?12:-1),L(),H(o._hasIconSuffix?13:-1),L(),H(o._hasOutline()?-1:14),L(),ce("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let s=o._getSubscriptMessageType();L(2),ce("mat-mdc-form-field-error-wrapper",s==="error")("mat-mdc-form-field-hint-wrapper",s==="hint"),L(),H((n=s)==="error"?18:n==="hint"?19:-1)}},dependencies:[kn,Dn,Gi,En,Qr],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
6
+ `],encapsulation:2,changeDetection:0})}return t})();var mr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=We({type:t});static \u0275inj=Be({imports:[Je,Zi,Je]})}return t})();var zu=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=bt({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(r,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
7
+ `],encapsulation:2,changeDetection:0})}return t})(),$u={passive:!0},Nn=(()=>{class t{_platform=g(Ge);_ngZone=g(G);_renderer=g(Li).createRenderer(null,null);_styleLoader=g(Ji);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return gi;this._styleLoader.load(zu);let r=Mr(e),o=this._monitoredElements.get(r);if(o)return o.subject;let n=new T,s="cdk-text-field-autofilled",c=b=>{b.animationName==="cdk-text-field-autofill-start"&&!r.classList.contains(s)?(r.classList.add(s),this._ngZone.run(()=>n.next({target:b.target,isAutofilled:!0}))):b.animationName==="cdk-text-field-autofill-end"&&r.classList.contains(s)&&(r.classList.remove(s),this._ngZone.run(()=>n.next({target:b.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(r.classList.add("cdk-text-field-autofill-monitored"),Qi(this._renderer,r,"animationstart",c,$u)));return this._monitoredElements.set(r,{subject:n,unlisten:m}),n}stopMonitoring(e){let r=Mr(e),o=this._monitoredElements.get(r);o&&(o.unlisten(),o.subject.complete(),r.classList.remove("cdk-text-field-autofill-monitored"),r.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(r))}ngOnDestroy(){this._monitoredElements.forEach((e,r)=>this.stopMonitoring(r))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Un=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=We({type:t});static \u0275inj=Be({})}return t})();var Pn=new oe("MAT_INPUT_VALUE_ACCESSOR");var Ln=(()=>{class t{isErrorState(e,r){return!!(e&&e.invalid&&(e.touched||r&&r.submitted))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ur=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(i,e,r,o,n){this._defaultMatcher=i,this.ngControl=e,this._parentFormGroup=r,this._parentForm=o,this._stateChanges=n}updateErrorState(){let i=this.errorState,e=this._parentFormGroup||this._parentForm,r=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,n=r?.isErrorState(o,e)??!1;n!==i&&(this.errorState=n,this._stateChanges.next())}};var Bu=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Wu=new oe("MAT_INPUT_CONFIG"),xw=(()=>{class t{_elementRef=g(Se);_platform=g(Ge);ngControl=g(eo,{optional:!0,self:!0});_autofillMonitor=g(Nn);_ngZone=g(G);_formField=g(fr,{optional:!0});_renderer=g(gt);_uid=g(Qe).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=g(Wu,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_formFieldDescribedBy;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new T;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Ze(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Xi.required)??!1}set required(e){this._required=Ze(e)}_required;get type(){return this._type}set type(e){let r=this._type;this._type=e||"text",this._validateType(),!this._isTextarea&&Fr().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._type!==r&&this._ensureWheelDefaultBehavior()}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ze(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Fr().has(e));constructor(){let e=g(to,{optional:!0}),r=g(ro,{optional:!0}),o=g(Ln),n=g(Pn,{optional:!0,self:!0}),s=this._elementRef.nativeElement,c=s.nodeName.toLowerCase();n?Ni(n.value)?this._signalBasedValueAccessor=n:this._inputValueAccessor=n:this._inputValueAccessor=s,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(s,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new ur(o,this.ngControl,r,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=s.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Dr(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let r=this._elementRef.nativeElement;r.type==="number"?(r.type="text",r.setSelectionRange(0,0),r.type="number"):r.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let r=this._elementRef.nativeElement;this._previousPlaceholder=e,e?r.setAttribute("placeholder",e):r.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Bu.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,r=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&r&&r.label)}else return this.focused&&!this.disabled||!this.empty}setDescribedByIds(e){let r=this._elementRef.nativeElement,o=r.getAttribute("aria-describedby"),n;if(o){let s=this._formFieldDescribedBy||e;n=e.concat(o.split(" ").filter(c=>c&&!s.includes(c)))}else n=e;this._formFieldDescribedBy=e,n.length?r.setAttribute("aria-describedby",n.join(" ")):r.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let r=e.target;!r.value&&r.selectionStart===0&&r.selectionEnd===0&&(r.setSelectionRange(1,1),r.setSelectionRange(0,0))};_webkitBlinkWheelListener=()=>{};_ensureWheelDefaultBehavior(){this._cleanupWebkitWheel?.(),this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._cleanupWebkitWheel=this._renderer.listen(this._elementRef.nativeElement,"wheel",this._webkitBlinkWheelListener))}_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=ae({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(r,o){r&1&&_t("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),r&2&&(vt("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),xt("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),ce("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Er]},exportAs:["matInput"],features:[qe([{provide:cr,useExisting:t}]),Oi]})}return t})(),vw=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=We({type:t});static \u0275inj=Be({imports:[Je,mr,mr,Un,Je]})}return t})();export{Te as a,St as b,mo as c,Ye as d,Rr as e,lo as f,Fp as g,iu as h,$r as i,J as j,Vf as k,pt as l,au as m,La as n,ja as o,Hr as p,Sn as q,X0 as r,Cn as s,Gr as t,Ru as u,Nu as v,cr as w,fr as x,Rn as y,ju as z,mr as A,Ln as B,ur as C,xw as D,vw as E};