@mxtommy/kip 4.5.0-beta.1 → 4.5.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +11 -7
  3. package/package.json +21 -8
  4. package/plugin/duckdb-parquet-storage.service.js +1182 -0
  5. package/plugin/history-series.service.js +439 -0
  6. package/plugin/index.js +705 -30
  7. package/plugin/openApi.json +253 -3
  8. package/plugin/plugin-auth.service.js +75 -0
  9. package/public/assets/help-docs/chartplotter.md +5 -18
  10. package/public/assets/help-docs/community.md +0 -3
  11. package/public/assets/help-docs/configuration.md +1 -1
  12. package/public/assets/help-docs/contact-us.md +0 -4
  13. package/public/assets/help-docs/dashboards.md +20 -18
  14. package/public/assets/help-docs/datainspector.md +7 -5
  15. package/public/assets/help-docs/history-api.md +116 -0
  16. package/public/assets/help-docs/menu.json +18 -6
  17. package/public/assets/help-docs/nodered-control-flows.md +125 -0
  18. package/public/assets/help-docs/putcontrols.md +101 -60
  19. package/public/assets/help-docs/welcome.md +6 -7
  20. package/public/assets/help-docs/widget-historical-series.md +66 -0
  21. package/public/assets/help-docs/zones.md +5 -10
  22. package/public/chunk-A6DQJFP4.js +16 -0
  23. package/public/chunk-B75MT7ND.js +1 -0
  24. package/public/{chunk-T6TFVZVM.js → chunk-CEB42O2C.js} +1 -1
  25. package/public/chunk-CHGXAEKT.js +2 -0
  26. package/public/chunk-D7VDX7ZF.js +5 -0
  27. package/public/{chunk-ZQER6AIQ.js → chunk-DEGYRCMI.js} +1 -1
  28. package/public/{chunk-M2B5OYGO.js → chunk-DEM56G4S.js} +1 -1
  29. package/public/chunk-DYTBBUMI.js +4 -0
  30. package/public/chunk-EQ2N7KDA.js +3 -0
  31. package/public/chunk-FNF7M3AE.js +1 -0
  32. package/public/chunk-IHURI4IH.js +5 -0
  33. package/public/{chunk-YIYYVDFO.js → chunk-IYRLINL7.js} +2 -2
  34. package/public/{chunk-5FEX27I4.js → chunk-JB4YVVNW.js} +1 -1
  35. package/public/chunk-JGGMFMY5.js +1 -0
  36. package/public/chunk-KPHICV76.js +5 -0
  37. package/public/{chunk-QZKCRH3H.js → chunk-KZ5DUKAX.js} +1 -1
  38. package/public/{chunk-HMOOTAEA.js → chunk-LQDSU4WS.js} +3 -3
  39. package/public/{chunk-IXQ7KIFY.js → chunk-MGPPVLZ7.js} +1 -1
  40. package/public/{chunk-QVCLOCEC.js → chunk-R7RQHWKJ.js} +1 -1
  41. package/public/chunk-RONXIZ2U.js +9 -0
  42. package/public/chunk-S72JTJPN.js +6 -0
  43. package/public/{chunk-KFFAA7DL.js → chunk-VCY32MWT.js} +8 -8
  44. package/public/chunk-YCEXTKGG.js +1 -0
  45. package/public/chunk-YKJKIWXO.js +6 -0
  46. package/public/chunk-ZV7IYYEQ.js +50 -0
  47. package/public/index.html +1 -1
  48. package/public/main-FQESQQV6.js +1 -0
  49. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -84
  50. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  51. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -35
  52. package/.github/copilot-instructions.md +0 -205
  53. package/.github/instructions/angular.instructions.md +0 -123
  54. package/.github/instructions/best-practices.instructions.md +0 -59
  55. package/.github/instructions/project.instructions.md +0 -432
  56. package/.github/workflows/ci.yml +0 -37
  57. package/docs/widget-schematic.md +0 -102
  58. package/images/ActionSidenav.png +0 -0
  59. package/images/ChartplotterMode.png +0 -0
  60. package/images/KIPDemo.png +0 -0
  61. package/images/KipBrightness-1024.png +0 -0
  62. package/images/KipConfig-Units-1024.png +0 -0
  63. package/images/KipConfig-display-1024x488.png +0 -0
  64. package/images/KipFreeboard-SK-1024.png +0 -0
  65. package/images/KipGaugeSample1-1024x545.png +0 -0
  66. package/images/KipGaugeSample2-1024x488.png +0 -0
  67. package/images/KipGaugeSample3-1024x508.png +0 -0
  68. package/images/KipNightMode-1024.png +0 -0
  69. package/images/KipWidgetConfig-layout-1024.png +0 -0
  70. package/images/KipWidgetConfig-paths-1024x488.png +0 -0
  71. package/images/Options.png +0 -0
  72. package/images/exterior_user_installs.png +0 -0
  73. package/images/formfactor.png +0 -0
  74. package/public/assets/help-docs/datasets.md +0 -95
  75. package/public/chunk-2OB7ZJBR.js +0 -3
  76. package/public/chunk-6GGJZDRE.js +0 -1
  77. package/public/chunk-6V4GGGXE.js +0 -2
  78. package/public/chunk-A5BW6BUM.js +0 -1
  79. package/public/chunk-DGE5YFPU.js +0 -5
  80. package/public/chunk-G6M3Z3BY.js +0 -53
  81. package/public/chunk-GMGZLXY7.js +0 -4
  82. package/public/chunk-GUZ3BDVZ.js +0 -2
  83. package/public/chunk-ICDGHQFP.js +0 -6
  84. package/public/chunk-JCNE4QHQ.js +0 -15
  85. package/public/chunk-K6XYUNG4.js +0 -8
  86. package/public/chunk-LGCQEN7V.js +0 -4
  87. package/public/chunk-O3JH7UTR.js +0 -1
  88. package/public/chunk-Q3USFT4F.js +0 -2
  89. package/public/chunk-VIKU7BH7.js +0 -1
  90. package/public/chunk-XMQPXXLW.js +0 -8
  91. package/public/main-4URMGBQS.js +0 -1
  92. package/rm-npmjs-beta.sh +0 -50
  93. package/tools/schematics/collection.json +0 -9
  94. package/tools/schematics/create-host2-widget/files/readme/README.md.template +0 -109
  95. package/tools/schematics/create-host2-widget/files/spec/widget-__name@dasherize__.component.spec.ts +0 -38
  96. package/tools/schematics/create-host2-widget/files/widget/widget-__name@dasherize__.component.html +0 -6
  97. package/tools/schematics/create-host2-widget/files/widget/widget-__name@dasherize__.component.scss +0 -5
  98. package/tools/schematics/create-host2-widget/files/widget/widget-__name@dasherize__.component.ts.template +0 -94
  99. package/tools/schematics/create-host2-widget/index.js +0 -138
  100. package/tools/schematics/create-host2-widget/schema.json +0 -89
  101. package/tools/schematics/create-host2-widget/test/create-host2-widget.spec.ts +0 -70
  102. package/tools/schematics/create-host2-widget/utils/formatting.js +0 -119
@@ -1,4 +0,0 @@
1
- import{b as Ni,c as Fi,f as Ui,g as Wi,h as Li,k as $i,m as pt}from"./chunk-DGE5YFPU.js";import{s as Ei,t as Ai,w as Ri}from"./chunk-K6XYUNG4.js";import{G as Oi,O as Ii,P as Pi,d as ge,f as ni,g as Q,h as ai,i as oi,k as li,m as ci,q as Mi,r as Ti,w as xi}from"./chunk-6V4GGGXE.js";import{a as vi,i as We,m as wi,o as Ci,p as Di,r as ut,s as dt,t as Le}from"./chunk-GUZ3BDVZ.js";import{A as Wt,Aa as Bt,Ab as tt,Ad as ui,Ae as Ue,Ba as De,Bb as it,Bd as di,Cd as ot,Da as Me,E as Lt,Ea as Te,Fc as ri,Fd as pi,G as $t,Ga as Ht,Gb as rt,Hb as $,I as zt,Ib as X,J as we,Ja as Kt,Jb as Yt,K as de,Kb as st,Kd as hi,Lb as Xt,Ma as se,Mc as Pe,Oc as K,Pc as at,Q as Vt,Qb as he,Qd as mi,Rd as fi,Sb as J,Sd as gi,Tb as Jt,Td as oe,Ub as ne,Ud as _i,Vb as Qt,Wb as nt,Wd as yi,Xb as Zt,Xd as lt,Ya as L,Yb as Re,Yd as bi,Zb as z,_a as Ze,_b as V,_c as si,a as le,ba as Je,bb as xe,ca as Qe,cc as ei,ce as _e,d as Pr,da as O,e as Nr,ec as ae,ee as ct,fb as jt,g as Pt,gc as Ie,h as Nt,hc as me,ic as fe,j as ce,jb as Oe,k as w,kb as Ee,l as Ft,la as re,lb as et,le as Ne,m as W,ma as Ce,me as Fe,n as ie,oa as Y,pb as Gt,qa as g,qd as T,s as Ut,uc as ti,va as B,vc as ii,wa as H,we as Si,xa as qt,yb as Ae,ye as ki,z as ue,za as pe}from"./chunk-JCNE4QHQ.js";var Hi=Pr((mt,ft)=>{(function(l,y){typeof mt=="object"&&typeof ft<"u"?ft.exports=y():typeof define=="function"&&define.amd?define(y):(l=typeof globalThis<"u"?globalThis:l||self,l.Qty=y())})(mt,function(){"use strict";function l(i){return typeof i=="string"||i instanceof String}var y=Number.isFinite||window.isFinite;function e(i){return y(i)}function t(i){return i}function r(i){var s={};return i.filter(function(a){return s.hasOwnProperty(a)?!1:s[a]=!0})}function n(i,s){if(s.length!==i.length)return!1;for(var a=0;a<i.length;a++)if(s[a].compareArray&&!s[a].compareArray(i[a])||s[a]!==i[a])return!1;return!0}function o(i,s){Object.keys(s).forEach(function(a){i[a]=s[a]})}function u(){for(var i=1,s=0,a=0;a<arguments.length;a++){var c=arguments[a];s=s+R(c),i*=c}return s!==0?v(i,s):i}function h(i,s){if(s===0)throw new Error("Divide by zero");var a=Math.pow(10,R(s)),c=a/(a*s);return u(i,c)}function v(i,s){return Math.round(i*Math.pow(10,s))/Math.pow(10,s)}function R(i){if(!isFinite(i))return 0;for(var s=0;i%1!==0;)i*=10,s++;return s}function f(){var i;if(!this)return i=Object.create(f.prototype),f.apply(i,arguments),i;i=Error.apply(this,arguments),this.name="QtyError",this.message=i.message,this.stack=i.stack}f.prototype=Object.create(Error.prototype,{constructor:{value:f}});function S(i,s){throw new f("Incompatible units: "+i+" and "+s)}var b={"<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>"]]},ze=["<meter>","<kilogram>","<second>","<mole>","<ampere>","<radian>","<kelvin>","<temp-K>","<byte>","<dollar>","<candela>","<each>","<steradian>","<decibel>"],I="<1>",D=[I];function tr(i,s){var a=s[1],c=s[3]||[],d=s[4]||[];if(!e(a))throw new f(i+": Invalid unit definition. 'scalar' must be a number");c.forEach(function(p){if(b[p]===void 0)throw new f(i+": Invalid unit definition. Unit "+p+" in 'numerator' is not recognized")}),d.forEach(function(p){if(b[p]===void 0)throw new f(i+": Invalid unit definition. Unit "+p+" in 'denominator' is not recognized")})}var U={},be={},E={},ee={},ve={};for(var q in b)if(b.hasOwnProperty(q)){var P=b[q];if(P[2]==="prefix"){U[q]=P[1];for(var Ve=0;Ve<P[0].length;Ve++)be[P[0][Ve]]=q}else{tr(q,P),E[q]={scalar:P[1],numerator:P[3],denominator:P[4]};for(var qe=0;qe<P[0].length;qe++)ee[P[0][qe]]=q}ve[q]=P[0][0]}function ir(i){var s,a=[],c=Object.keys(b);if(typeof i>"u")for(s=0;s<c.length;s++)["","prefix"].indexOf(b[c[s]][2])===-1&&a.push(c[s].substr(1,c[s].length-2));else{if(this.getKinds().indexOf(i)===-1)throw new f("Kind not recognized");for(s=0;s<c.length;s++)b[c[s]][2]===i&&a.push(c[s].substr(1,c[s].length-2))}return a.sort(function(d,p){return d.toLowerCase()<p.toLowerCase()?-1:d.toLowerCase()>p.toLowerCase()?1:0})}function rr(i){if(!ee[i])throw new f("Unit not recognized");return b[ee[i]][0]}var Be=["length","time","temperature","mass","current","substance","luminosity","currency","information","angle"];function sr(){if(this.signature)return this.signature;for(var i=yt.call(this),s=0;s<i.length;s++)i[s]*=Math.pow(20,s);return i.reduce(function(a,c){return a+c},0)}function yt(){if(!this.isBase())return yt.call(this.toBase());for(var i=new Array(Be.length),s=0;s<i.length;s++)i[s]=0;for(var a,c,d=0;d<this.numerator.length;d++)(a=b[this.numerator[d]])&&(c=Be.indexOf(a[2]),c>=0&&(i[c]=i[c]+1));for(var p=0;p<this.denominator.length;p++)(a=b[this.denominator[p]])&&(c=Be.indexOf(a[2]),c>=0&&(i[c]=i[c]-1));return i}var bt="[+-]",He="\\d+",nr=bt+"?"+He,vt="\\."+He,ar="(?:"+He+"(?:"+vt+")?)|(?:"+vt+")",or="[Ee]"+nr,lr="(?:"+ar+")(?:"+or+")?",cr=bt+"?\\s*"+lr,ur="("+cr+")?\\s*([^/]*)(?:/(.+))?",dr=new RegExp("^"+ur+"$"),St="\\^|\\*{2}",kt="[01234]",pr=new RegExp("([^ \\*\\d]+?)(?:"+St+")?(-?"+kt+"(?![a-zA-Z]))"),hr=new RegExp("([^ \\*\\d]+?)(?:"+St+")?("+kt+"(?![a-zA-Z]))");function wt(i){l(i)||(i=i.toString()),i=i.trim();var s=dr.exec(i);if(!s)throw new f(i+": Quantity not recognized");var a=s[1];a?(a=a.replace(/\s/g,""),this.scalar=parseFloat(a)):this.scalar=1;for(var c=s[2],d=s[3],p,C,k;s=pr.exec(c);){if(p=parseFloat(s[2]),isNaN(p))throw new f("Unit exponent is not a number");if(p===0&&!Ke.test(s[1]))throw new f("Unit not recognized");C=s[1]+" ",k="";for(var M=0;M<Math.abs(p);M++)k+=C;p>=0?c=c.replace(s[0],k):(d=d?d+k:k,c=c.replace(s[0],""))}for(;s=hr.exec(d);){if(p=parseFloat(s[2]),isNaN(p))throw new f("Unit exponent is not a number");if(p===0&&!Ke.test(s[1]))throw new f("Unit not recognized");C=s[1]+" ",k="";for(var A=0;A<p;A++)k+=C;d=d.replace(s[0],k)}c&&(this.numerator=Mt(c.trim())),d&&(this.denominator=Mt(d.trim()))}var mr=Object.keys(be).sort(function(i,s){return s.length-i.length}).join("|"),fr=Object.keys(ee).sort(function(i,s){return s.length-i.length}).join("|"),gr="\\b|$",Ct="("+mr+")??("+fr+")(?:"+gr+")",Ke=new RegExp("^\\s*("+Ct+"[\\s\\*]*)+$"),_r=new RegExp(Ct,"g"),Dt={};function Mt(i){var s=Dt[i];if(s)return s;var a,c=[];if(!Ke.test(i))throw new f("Unit not recognized");for(;a=_r.exec(i);)c.push(a.slice(1));return c=c.map(function(d){return be[d[0]]?[be[d[0]],ee[d[1]]]:[ee[d[1]]]}),c=c.reduce(function(d,p){return d.concat(p)},[]),c=c.filter(function(d){return d}),Dt[i]=c,c}function yr(i){if(!l(i))throw new f("Argument should be a string");try{return this(i)}catch(s){return null}}function Se(i){return i instanceof m}function m(i,s){if(br.apply(null,arguments),!Se(this))return new m(i,s);if(this.scalar=null,this.baseScalar=null,this.signature=null,this._conversionCache={},this.numerator=D,this.denominator=D,Tt(i)?(this.scalar=i.scalar,this.numerator=i.numerator&&i.numerator.length!==0?i.numerator:D,this.denominator=i.denominator&&i.denominator.length!==0?i.denominator:D):s?(wt.call(this,s),this.scalar=i):wt.call(this,i),this.denominator.join("*").indexOf("temp")>=0)throw new f("Cannot divide with temperatures");if(this.numerator.join("*").indexOf("temp")>=0){if(this.numerator.length>1)throw new f("Cannot multiply by temperatures");if(!n(this.denominator,D))throw new f("Cannot divide with temperatures")}if(this.initValue=i,vr.call(this),this.isTemperature()&&this.baseScalar<0)throw new f("Temperatures must not be less than absolute zero")}m.prototype={constructor:m};function br(i,s){if(s){if(!(e(i)&&l(s)))throw new f("Only number accepted as initialization value when units are explicitly provided")}else if(!(l(i)||e(i)||Se(i)||Tt(i)))throw new f("Only string, number or quantity accepted as single initialization value")}function Tt(i){return i&&typeof i=="object"&&i.hasOwnProperty("scalar")}function vr(){if(this.baseScalar)return this.baseScalar;if(this.isBase())this.baseScalar=this.scalar,this.signature=sr.call(this);else{var i=this.toBase();this.baseScalar=i.scalar,this.signature=i.signature}}var je={"-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 Sr(){return r(Object.keys(je).map(function(i){return je[i]}))}m.prototype.kind=function(){return je[this.signature.toString()]},o(m.prototype,{isDegrees:function(){return(this.signature===null||this.signature===400)&&this.numerator.length===1&&n(this.denominator,D)&&(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 kr(i,s){var a=i.units(),c=s.to(a),d=m(Ge(a));return m({scalar:i.scalar-c.scalar,numerator:d.numerator,denominator:d.denominator})}function wr(i,s){var a=s.to(Ge(i.units()));return m({scalar:i.scalar-a.scalar,numerator:i.numerator,denominator:i.denominator})}function xt(i,s){var a=s.to(Ge(i.units()));return m({scalar:i.scalar+a.scalar,numerator:i.numerator,denominator:i.denominator})}function Ge(i){if(i==="tempK")return"degK";if(i==="tempC")return"degC";if(i==="tempF")return"degF";if(i==="tempR")return"degR";throw new f("Unknown type for temp conversion from: "+i)}function Cr(i,s){var a=Dr(i),c=s.units(),d;if(c==="degK")d=a.scalar;else if(c==="degC")d=a.scalar;else if(c==="degF")d=a.scalar*9/5;else if(c==="degR")d=a.scalar*9/5;else throw new f("Unknown type for degree conversion to: "+c);return m({scalar:d,numerator:s.numerator,denominator:s.denominator})}function Dr(i){var s=i.units(),a;if(s.match(/(deg)[CFRK]/))a=i.baseScalar;else if(s==="tempK")a=i.scalar;else if(s==="tempC")a=i.scalar;else if(s==="tempF")a=i.scalar*5/9;else if(s==="tempR")a=i.scalar*5/9;else throw new f("Unknown type for temp conversion from: "+s);return m({scalar:a,numerator:["<kelvin>"],denominator:D})}function Mr(i,s){var a=s.units(),c;if(a==="tempK")c=i.baseScalar;else if(a==="tempC")c=i.baseScalar-273.15;else if(a==="tempF")c=i.baseScalar*9/5-459.67;else if(a==="tempR")c=i.baseScalar*9/5;else throw new f("Unknown type for temp conversion to: "+a);return m({scalar:c,numerator:s.numerator,denominator:s.denominator})}function Tr(i){var s=i.units(),a;if(s.match(/(deg)[CFRK]/))a=i.baseScalar;else if(s==="tempK")a=i.scalar;else if(s==="tempC")a=i.scalar+273.15;else if(s==="tempF")a=(i.scalar+459.67)*5/9;else if(s==="tempR")a=i.scalar*5/9;else throw new f("Unknown type for temp conversion from: "+s);return m({scalar:a,numerator:["<temp-K>"],denominator:D})}o(m.prototype,{to:function(i){var s,a;if(i==null)return this;if(!l(i))return this.to(i.units());if(s=this._conversionCache[i],s)return s;if(a=m(i),a.units()===this.units())return this;if(!this.isCompatible(a))this.isInverse(a)?a=this.inverse().to(i):S(this.units(),a.units());else if(a.isTemperature())a=Mr(this,a);else if(a.isDegrees())a=Cr(this,a);else{var c=h(this.baseScalar,a.baseScalar);a=m({scalar:c,numerator:a.numerator,denominator:a.denominator})}return this._conversionCache[i]=a,a},toBase:function(){if(this.isBase())return this;if(this.isTemperature())return Tr(this);var i=Ot[this.units()];return i||(i=Or(this.numerator,this.denominator),Ot[this.units()]=i),i.mul(this.scalar)},toFloat:function(){if(this.isUnitless())return this.scalar;throw new f("Can't convert to Float unless unitless. Use Unit#scalar")},toPrec:function(i){if(l(i)&&(i=m(i)),e(i)&&(i=m(i+" "+this.units())),this.isUnitless()?i.isUnitless()||S(this.units(),i.units()):i=i.to(this.units()),i.scalar===0)throw new f("Divide by zero");var s=u(Math.round(this.scalar/i.scalar),i.scalar);return m(s+this.units())}});function xr(i,s){var a=m(i),c=m(s);if(a.eq(c))return t;var d;return a.isTemperature()?d=function(p){return a.mul(p).to(c).scalar}:d=function(p){return p*a.baseScalar/c.baseScalar},function(C){var k,M,A;if(Array.isArray(C)){for(M=C.length,A=[],k=0;k<M;k++)A.push(d(C[k]));return A}else return d(C)}}var Ot={};function Or(i,s){for(var a=[],c=[],d=1,p,C=0;C<i.length;C++)p=i[C],U[p]?d=u(d,U[p]):E[p]&&(d*=E[p].scalar,E[p].numerator&&a.push(E[p].numerator),E[p].denominator&&c.push(E[p].denominator));for(var k=0;k<s.length;k++)p=s[k],U[p]?d/=U[p]:E[p]&&(d/=E[p].scalar,E[p].numerator&&c.push(E[p].numerator),E[p].denominator&&a.push(E[p].denominator));return a=a.reduce(function(M,A){return M.concat(A)},[]),c=c.reduce(function(M,A){return M.concat(A)},[]),m({scalar:d,numerator:a,denominator:c})}m.parse=yr,m.getUnits=ir,m.getAliases=rr,m.mulSafe=u,m.divSafe=h,m.getKinds=Sr,m.swiftConverter=xr,m.Error=f,o(m.prototype,{add:function(i){if(l(i)&&(i=m(i)),this.isCompatible(i)||S(this.units(),i.units()),this.isTemperature()&&i.isTemperature())throw new f("Cannot add two temperatures");return this.isTemperature()?xt(this,i):i.isTemperature()?xt(i,this):m({scalar:this.scalar+i.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},sub:function(i){if(l(i)&&(i=m(i)),this.isCompatible(i)||S(this.units(),i.units()),this.isTemperature()&&i.isTemperature())return kr(this,i);if(this.isTemperature())return wr(this,i);if(i.isTemperature())throw new f("Cannot subtract a temperature from a differential degree unit");return m({scalar:this.scalar-i.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},mul:function(i){if(e(i))return m({scalar:u(this.scalar,i),numerator:this.numerator,denominator:this.denominator});if(l(i)&&(i=m(i)),(this.isTemperature()||i.isTemperature())&&!(this.isUnitless()||i.isUnitless()))throw new f("Cannot multiply by temperatures");var s=this,a=i;s.isCompatible(a)&&s.signature!==400&&(a=a.to(s));var c=Et(s.numerator,s.denominator,a.numerator,a.denominator);return m({scalar:u(s.scalar,a.scalar,c[2]),numerator:c[0],denominator:c[1]})},div:function(i){if(e(i)){if(i===0)throw new f("Divide by zero");return m({scalar:this.scalar/i,numerator:this.numerator,denominator:this.denominator})}else l(i)&&(i=m(i));if(i.scalar===0)throw new f("Divide by zero");if(i.isTemperature())throw new f("Cannot divide with temperatures");if(this.isTemperature()&&!i.isUnitless())throw new f("Cannot divide with temperatures");var s=this,a=i;s.isCompatible(a)&&s.signature!==400&&(a=a.to(s));var c=Et(s.numerator,s.denominator,a.denominator,a.numerator);return m({scalar:u(s.scalar,c[2])/a.scalar,numerator:c[0],denominator:c[1]})},inverse:function(){if(this.isTemperature())throw new f("Cannot divide with temperatures");if(this.scalar===0)throw new f("Divide by zero");return m({scalar:1/this.scalar,numerator:this.denominator,denominator:this.numerator})}});function Et(i,s,a,c){function d(N){return N!==I}i=i.filter(d),a=a.filter(d),s=s.filter(d),c=c.filter(d);var p={};function C(N,j){for(var F,ke,Xe,G=0;G<N.length;G++)if(U[N[G]]?(F=N[G+1],ke=N[G],Xe=U[ke],G++):(F=N[G],ke=null,Xe=1),F&&F!==I)if(p[F]){p[F][0]+=j;var Ir=p[F][2]?U[p[F][2]]:1;p[F][j===1?3:4]*=h(Xe,Ir)}else p[F]=[j,F,ke,1,1]}C(i,1),C(s,-1),C(a,1),C(c,-1);var k=[],M=[],A=1;for(var It in p)if(p.hasOwnProperty(It)){var x=p[It],te;if(x[0]>0)for(te=0;te<x[0];te++)k.push(x[2]===null?x[1]:[x[2],x[1]]);else if(x[0]<0)for(te=0;te<-x[0];te++)M.push(x[2]===null?x[1]:[x[2],x[1]]);A*=h(x[3],x[4])}return k.length===0&&(k=D),M.length===0&&(M=D),k=k.reduce(function(N,j){return N.concat(j)},[]),M=M.reduce(function(N,j){return N.concat(j)},[]),[k,M,A]}o(m.prototype,{eq:function(i){return this.compareTo(i)===0},lt:function(i){return this.compareTo(i)===-1},lte:function(i){return this.eq(i)||this.lt(i)},gt:function(i){return this.compareTo(i)===1},gte:function(i){return this.eq(i)||this.gt(i)},compareTo:function(i){if(l(i))return this.compareTo(m(i));if(this.isCompatible(i)||S(this.units(),i.units()),this.baseScalar<i.baseScalar)return-1;if(this.baseScalar===i.baseScalar)return 0;if(this.baseScalar>i.baseScalar)return 1},same:function(i){return this.scalar===i.scalar&&this.units()===i.units()}}),o(m.prototype,{isUnitless:function(){return[this.numerator,this.denominator].every(function(i){return n(i,D)})},isCompatible:function(i){return l(i)?this.isCompatible(m(i)):Se(i)&&i.signature!==void 0?this.signature===i.signature:!1},isInverse:function(i){return this.inverse().isCompatible(i)},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(i){i!==I&&ze.indexOf(i)===-1&&(this._isBase=!1)},this),this._isBase===!1?this._isBase:(this._isBase=!0,this._isBase))}});function Ye(){}Ye.prototype.get=function(i){return arguments.length>1&&(i=Array.apply(null,arguments)),i.reduce(function(s,a,c){if(s){var d=s[a];return c===i.length-1?d?d.data:void 0:d}},this)},Ye.prototype.set=function(i,s){return arguments.length>2&&(i=Array.prototype.slice.call(arguments,0,-1),s=arguments[arguments.length-1]),i.reduce(function(a,c,d){var p=a[c];return p===void 0&&(p=a[c]={}),d===i.length-1?(p.data=s,s):p},this)};function Er(i,s){return(i+" "+s).trim()}m.formatter=Er,o(m.prototype,{units:function(){if(this._units!==void 0)return this._units;var i=n(this.numerator,D),s=n(this.denominator,D);if(i&&s)return this._units="",this._units;var a=Rt(this.numerator),c=Rt(this.denominator);return this._units=a+(s?"":"/"+c),this._units},toString:function(i,s){var a;if(e(i))a=this.units(),s=i;else if(l(i))a=i;else if(Se(i))return this.toPrec(i).toString(s);var c=this.to(a),d=s!==void 0?v(c.scalar,s):c.scalar;return c=(d+" "+c.units()).trim(),c},format:function(i,s){arguments.length===1&&typeof i=="function"&&(s=i,i=void 0),s=s||m.formatter;var a=this.to(i);return s.call(this,a.scalar,a.units())}});var At=new Ye;function Rt(i){var s=At.get(i);if(s)return s;var a=n(i,D);return a?s="1":s=Rr(Ar(i)).join("*"),At.set(i,s),s}function Ar(i){for(var s=[],a,c,d=0;d<i.length;d++)a=i[d],c=i[d+1],U[a]?(s.push(ve[a]+ve[c]),d++):s.push(ve[a]);return s}function Rr(i){var s=i.reduce(function(a,c){var d=a[c];return d||a.push(d=a[c]=[c,0]),d[1]++,a},[]);return s.map(function(a){return a[0]+(a[1]>1?a[1]:"")})}return m.version="1.8.0",m})});var Fr={url:"",deserializer:l=>JSON.parse(l.data),serializer:l=>JSON.stringify(l)},Ur="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",$e=class l extends Ft{constructor(y,e){if(super(),this._socket=null,y instanceof ce)this.destination=e,this.source=y;else{let t=this._config=Object.assign({},Fr);if(this._output=new w,typeof y=="string")t.url=y;else for(let r in y)y.hasOwnProperty(r)&&(t[r]=y[r]);if(!t.WebSocketCtor&&WebSocket)t.WebSocketCtor=WebSocket;else if(!t.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new ie}}lift(y){let e=new l(this._config,this.destination);return e.operator=y,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new ie),this._output=new w}multiplex(y,e,t){let r=this;return new ce(n=>{try{r.next(y())}catch(u){n.error(u)}let o=r.subscribe({next:u=>{try{t(u)&&n.next(u)}catch(h){n.error(h)}},error:u=>n.error(u),complete:()=>n.complete()});return()=>{try{r.next(e())}catch(u){n.error(u)}o.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:y,protocol:e,url:t,binaryType:r}=this._config,n=this._output,o=null;try{o=e?new y(t,e):new y(t),this._socket=o,r&&(this._socket.binaryType=r)}catch(h){n.error(h);return}let u=new Pt(()=>{this._socket=null,o&&o.readyState===1&&o.close()});o.onopen=h=>{let{_socket:v}=this;if(!v){o.close(),this._resetState();return}let{openObserver:R}=this._config;R&&R.next(h);let f=this.destination;this.destination=Nt.create(S=>{if(o.readyState===1)try{let{serializer:b}=this._config;o.send(b(S))}catch(b){this.destination.error(b)}},S=>{let{closingObserver:b}=this._config;b&&b.next(void 0),S&&S.code?o.close(S.code,S.reason):n.error(new TypeError(Ur)),this._resetState()},()=>{let{closingObserver:S}=this._config;S&&S.next(void 0),o.close(),this._resetState()}),f&&f instanceof ie&&u.add(f.subscribe(this.destination))},o.onerror=h=>{this._resetState(),n.error(h)},o.onclose=h=>{o===this._socket&&this._resetState();let{closeObserver:v}=this._config;v&&v.next(h),h.wasClean?n.complete():n.error(h)},o.onmessage=h=>{try{let{deserializer:v}=this._config;n.next(v(h))}catch(v){n.error(v)}}}_subscribe(y){let{source:e}=this;return e?e.subscribe(y):(this._socket||this._connectSocket(),this._output.subscribe(y),y.add(()=>{let{_socket:t}=this;this._output.observers.length===0&&(t&&(t.readyState===1||t.readyState===0)&&t.close(),this._resetState())}),y)}unsubscribe(){let{_socket:y}=this;y&&(y.readyState===1||y.readyState===0)&&y.close(),this._resetState(),super.unsubscribe()}};function ht(l){return new $e(l)}var zi=(()=>{class l{_destroyRef=g(De);_skRequests$=new w;_skNotificationsMsg$=new w;_skValue$=new w;_skMetadata$=new w;_vesselSelfUrn$=new w;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new W(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new w;socketWSOpenEvent$=new w;authToken=null;server=g(oi);auth=g(li);connectionStateMachine=g(ai);zones=g(Te);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};DO_NOT_FLATTEN_PATHS=["displays."];constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(T(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(T(this._destroyRef)).subscribe(e=>{switch(e){case Q.WebSocketConnecting:this.handleWebSocketConnecting();break;case Q.Connected:break;case Q.Disconnected:case Q.WebSocketError:case Q.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(T(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(T(this._destroyRef)).subscribe(()=>{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.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(T(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),$t(document,"visibilitychange").pipe(T(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(T(this._destroyRef)).subscribe({next:t=>this.processWebsocketMessage(t),error:t=>{console.error("[Delta Service] WebSocket error:",t)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}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,ht({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)):console.log("[Delta Service] No WebSocket present to send message - dropping 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,t){e.forEach(r=>{r.meta!==void 0&&r.meta.forEach(n=>this.parseSkMeta(n,t)),r.values!==void 0&&r.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)if(this.DO_NOT_FLATTEN_PATHS.some(o=>n.path.includes(o))){let o={context:t,path:n.path,source:r.$source,timestamp:r.timestamp,value:n.value};this._skValue$.next(o)}else this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(n.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(n.value,n.path).forEach(u=>{let h={context:t,path:u.path,source:r.$source,timestamp:r.timestamp,value:u.value};this._skValue$.next(h)}):Object.keys(n.value).forEach(o=>{let u={context:t,path:`${n.path}.${o}`,source:r.$source,timestamp:r.timestamp,value:n.value[o]};this._skValue$.next(u)});else{let o={context:t,path:n.path,source:r.$source,timestamp:r.timestamp,value:n.value};this._skValue$.next(o)}})})}canFlattenCompletely(e,t,r,n=0){if(n>=t)return!1;if(typeof e!="object"||e===null)return!0;let o=Object.keys(e);if(o.length>r)return!1;for(let u of o)if(!this.canFlattenCompletely(e[u],t,r,n+1))return!1;return!0}flattenObjectValue(e,t,r=0){let n=[];if(typeof e!="object"||e===null||r>=this.FLATTEN_CONFIG.maxDepth)return[{path:t,value:e}];let o=Object.keys(e);for(let u of o){let h=t?`${t}.${u}`:u,v=this.flattenObjectValue(e[u],h,r+1);n.push(...v)}return n}parseSkMeta(e,t){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(r=>{this._skMetadata$.next({context:t,path:`${e.path}.${r}`,meta:e.value.properties[r]})}):this._skMetadata$.next({context:t,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.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==Q.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}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()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var Z=(function(l){return l.Normal="normal",l.Nominal="nominal",l.Alert="alert",l.Warn="warn",l.Alarm="alarm",l.Emergency="emergency",l})(Z||{});var Wr=(function(l){return l.Visual="visual",l.Sound="sound",l})(Wr||{});var Lr="self",Vi=l=>isFinite(+(l instanceof Date?l:new Date(l)))?!!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(l):!1,qi=l=>{if(l)return l==="RFC 3339 (UTC)"?"Date":"number"},Bi=(()=>{class l{delta=g(zi);_destroyRef=g(De);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new ie(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new W([]);_dataServiceMeta=[];_dataServiceMetaByPath=new Map;_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new W([]);_skNotificationMsg$=new w;_skNotificationMeta$=new w;_isReset=new w;_pathUpdates$=new w;_selfUrn="self";_skData=new Map;_skDataArrayCache=[];_skDataIndexByPath=new Map;_pathRegister=[];_pathRegisterByPath=new Map;constructor(){zt(1e3).pipe(T(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(T(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(T(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(T(this._destroyRef)).subscribe(e=>{let t=e.path.replace("notifications.","self."),r=this._skData.get(t);if(r&&r.state!==e.value.state){r.state=e.value.state;let n=this._pathRegisterByPath.get(t);if(n?.length)for(let o of n)o._pathState$.next(r.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(T(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=new Map,this._skDataArrayCache=[],this._skDataIndexByPath.clear(),this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let t=this._pathRegister.findIndex(r=>r.path===e);if(t!==-1){let r=this._pathRegister[t];r.combinedSub?.unsubscribe(),r._pathData$?.complete(),r._pathState$?.complete(),r.pathDataUpdate$?.complete(),r.pathMeta$?.complete(),this._pathRegister.splice(t,1);let n=this._pathRegisterByPath.get(e);if(n){let o=n.filter(u=>u!==r);o.length?this._pathRegisterByPath.set(e,o):this._pathRegisterByPath.delete(e)}}}subscribePath(e,t){let r=this._pathRegisterByPath.get(e),n=r?.find(I=>I.path===e&&I.source===t);if(n)return n.pathDataUpdate$;let o=null,u=null,h=null,v=Z.Normal,R={data:{value:null,timestamp:null},state:v},f=null,S=this._skData.get(e);S&&(o=t==="default"?S.pathValue:S.sources?.[t]?.sourceValue??null,u=t==="default"?S.pathTimestamp:S.sources?.[t]?.sourceTimestamp??null,h=u?new Date(u):null,R={data:{value:o,timestamp:h},state:S.state||v},v=S.state||v,f=S.meta||null);let b={path:e,source:t,_pathData$:new W(R.data),_pathState$:new W(R.state),pathDataUpdate$:new W(R),pathMeta$:new W(f?ge(f):null)},ze=Wt([b._pathData$,b._pathState$]).pipe(ue(([I,D])=>({data:I,state:D})));return b.combinedSub=ze.subscribe(I=>b.pathDataUpdate$.next(I)),this._pathRegister.push(b),r?r.push(b):this._pathRegisterByPath.set(e,[b]),b.pathDataUpdate$}subscribePathTree(e,t="default"){let r=this.normalizePathPrefix(e);return new ce(n=>{for(let u of this._skData.values())u.path.startsWith(r)&&n.next({path:u.path,update:this.buildPathUpdate(u,t)});let o=this._pathUpdates$.pipe(de(u=>u.fullPath.startsWith(r))).subscribe(u=>{let h=this._skData.get(u.fullPath);h&&n.next({path:h.path,update:this.buildPathUpdate(h,t)})});return()=>o.unsubscribe()}).pipe(T(this._destroyRef))}updatePathData(e){this._deltaUpdatesCounter++;let t=this.setPathContext(e.context,e.path),r=this._skData.get(t);if(r)r.defaultSource===void 0&&(r.defaultSource=e.source),r.type===void 0&&e.value!==null&&(r.type=typeof e.value,r.type==="string"&&Vi(e.value)&&(r.type="Date")),r.pathValue=e.value,r.pathTimestamp=e.timestamp,r.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let o=e.value===null?void 0:typeof e.value;o==="string"&&Vi(e.value)&&(o="Date"),r={path:t,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:o,state:Z.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.set(t,r)}let n=this._pathRegisterByPath.get(t)??[];if(n.length){let o={value:r.pathValue,timestamp:r.pathTimestamp?new Date(r.pathTimestamp):null},u=n.find(v=>v.source==="default");u&&u._pathData$.next(o);let h=n.find(v=>v.source===e.source);h&&h._pathData$.next(o)}this._isSkDataFullTreeActive&&(this.upsertSkDataCache(r),this._skDataSubject$.next(this._skDataArrayCache)),this._pathUpdates$.next({fullPath:t,update:e})}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let t=this.setPathContext(e.context,e.path),r=this._skData.get(t);r?(r.type==="object"&&e.meta.units&&(r.type=qi(e.meta.units)),r.meta=ni({},r.meta,e.meta)):(r={path:t,pathValue:void 0,pathTimestamp:void 0,type:qi(e.meta.units),state:Z.Normal,defaultSource:void 0,sources:{},meta:e.meta?ge(e.meta):null},this._skData.set(t,r),this._isSkDataFullTreeActive&&(this.upsertSkDataCache(r),this._skDataSubject$.next(this._skDataArrayCache)));let n=this._pathRegisterByPath.get(t);if(n?.length)for(let o of n)o.pathMeta$.next(r.meta?ge(r.meta):null);this._isSkMetaFullTreeActive&&(this._dataServiceMetaByPath.set(t,{path:t,meta:r.meta}),this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){this._isSkMetaFullTreeActive=!0,this._dataServiceMetaByPath.clear();for(let e of this.getSkDataArray())e.meta!==void 0&&e.path.startsWith("self.")&&this._dataServiceMetaByPath.set(e.path,{path:e.path,meta:e.meta});return this._dataServiceMeta=Array.from(this._dataServiceMetaByPath.values()),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next([]),this._dataServiceMeta=[],this._dataServiceMetaByPath.clear()}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this.refreshSkDataCache(),this._skDataSubject$.next(this._skDataArrayCache),this._skDataSubject$}getSkDataArray(){return this._isSkDataFullTreeActive?this._skDataArrayCache:Array.from(this._skData.values())}observePathUpdates(){return this._pathUpdates$.asObservable()}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1,this._skDataArrayCache=[],this._skDataIndexByPath.clear()}refreshSkDataCache(){this._skDataArrayCache=Array.from(this._skData.values()),this._skDataIndexByPath.clear(),this._skDataArrayCache.forEach((e,t)=>this._skDataIndexByPath.set(e.path,t))}upsertSkDataCache(e){let t=this._skDataIndexByPath.get(e.path);t===void 0?(this._skDataIndexByPath.set(e.path,this._skDataArrayCache.length),this._skDataArrayCache.push(e)):this._skDataArrayCache[t]=e}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,t){return e!==this._selfUrn?`${e}.${t}`:`${Lr}.${t}`}normalizePathPrefix(e){let t=e?.trim()??"";return(t.endsWith(".*")||t.endsWith(":*")||t.endsWith("*"))&&(t=t.slice(0,-1)),t&&!t.endsWith(".")&&!t.endsWith(":")&&(t=`${t}.`),t}buildPathUpdate(e,t){let r=t==="default",n=r?e.pathValue:e.sources?.[t]?.sourceValue??null,o=r?e.pathTimestamp:e.sources?.[t]?.sourceTimestamp??null;return{data:{value:n,timestamp:o?new Date(o):null},state:e.state||Z.Normal}}getPathsByType(e,t){return this.getSkDataArray().filter(r=>r.type===e&&(!t||r.path.startsWith("self"))).map(r=>r.path)}getPathsAndMetaByType(e,t=!1,r=!1,n=!0){return this.getSkDataArray().filter(o=>{let h=["string","number","boolean","object","undefined","function","symbol","bigint","Date"].includes(e)?o.type===e:o.meta?.type===e,v=!n||o.path.startsWith("self"),R=t===!0?o.meta?.supportsPut===!0:!0,f=r===!0?Array.isArray(o.meta?.zones)&&o.meta.zones.length>0:!0;return h&&v&&R&&f}).map(o=>({path:o.path,meta:o.meta}))}getPathObject(e){return ge(this._skData.get(e))||null}getPathUnitType(e){return this._skData.get(e)?.meta?.units||null}timeoutPathObservable(e,t){let r=this._pathRegister.find(n=>n.path==e);if(r){let n;["string","Date","number","multiple"].includes(t)&&(n={data:{value:null,timestamp:null},state:Z.Normal}),r.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegisterByPath.get(e)?.[0]?.pathMeta$.asObservable()||Ut(null)}getPathMeta(e){return this._skData.get(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._pathUpdates$?.complete()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var _=Nr(Hi());var $s=(()=>{class l{AppSettingsService=g(ci);data=g(Bi);_defaultUnitsSub;_conversionList=[{group:"Unitless",units:[{measure:"unitless",description:"As-Is numeric value"},{measure:" ",description:"No unit label - As-Is numeric value"}]},{group:"Speed",units:[{measure:"knots",description:"Knots - Nautical miles per hour"},{measure:"kph",description:"kph - Kilometers per hour"},{measure:"mph",description:"mph - Miles per hour"},{measure:"m/s",description:"m/s - Meters per second (base)"}]},{group:"Flow",units:[{measure:"m3/s",description:"Cubic meters per second (base)"},{measure:"l/min",description:"Liters per minute"},{measure:"l/h",description:"Liters per hour"},{measure:"g/min",description:"Gallons per minute"},{measure:"g/h",description:"Gallons per hour"}]},{group:"Fuel Distance",units:[{measure:"m/m3",description:"Meters per cubic meter (base)"},{measure:"nm/l",description:"Nautical Miles per liter"},{measure:"nm/g",description:"Nautical Miles per gallon"},{measure:"km/l",description:"Kilometers per liter"},{measure:"mpg",description:"Miles per Gallon"}]},{group:"Energy Distance",units:[{measure:"m/J",description:"Meters per Joule (base)"},{measure:"nm/J",description:"Nautical Miles per Joule"},{measure:"km/J",description:"Kilometers per Joule"},{measure:"nm/kWh",description:"Nautical Miles per Kilowatt-hour"},{measure:"km/kWh",description:"Kilometers per Kilowatt-hour"}]},{group:"Temperature",units:[{measure:"K",description:"Kelvin (base)"},{measure:"celsius",description:"Celsius"},{measure:"fahrenheit",description:"Fahrenheit"}]},{group:"Length",units:[{measure:"m",description:"Meters (base)"},{measure:"mm",description:"Millimeters"},{measure:"fathom",description:"Fathoms"},{measure:"nm",description:"Nautical Miles"},{measure:"km",description:"Kilometers"},{measure:"mi",description:"Miles"},{measure:"feet",description:"Feet"},{measure:"inch",description:"Inches"}]},{group:"Volume",units:[{measure:"liter",description:"Liters (base)"},{measure:"m3",description:"Cubic Meters"},{measure:"gallon",description:"Gallons"}]},{group:"Current",units:[{measure:"A",description:"Amperes (base)"},{measure:"mA",description:"Milliamperes"}]},{group:"Potential",units:[{measure:"V",description:"Volts (base)"},{measure:"mV",description:"Millivolts"}]},{group:"Charge",units:[{measure:"C",description:"Coulomb (base)"},{measure:"Ah",description:"Ampere*Hours"}]},{group:"Power",units:[{measure:"W",description:"Watts (base)"},{measure:"mW",description:"Milliwatts"}]},{group:"Energy",units:[{measure:"J",description:"Joules (base)"},{measure:"kWh",description:"Kilowatt*Hours"}]},{group:"Resistance",units:[{measure:"ohm",description:"\u2126 (base)"},{measure:"kiloohm",description:"k\u2126"}]},{group:"Pressure",units:[{measure:"Pa",description:"Pa (base)"},{measure:"kPa",description:"kPa"},{measure:"hPa",description:"hPa"},{measure:"mbar",description:"mbar"},{measure:"bar",description:"Bars"},{measure:"psi",description:"psi"},{measure:"mmHg",description:"mmHg"},{measure:"inHg",description:"inHg"}]},{group:"Density",units:[{measure:"kg/m3",description:"Air density - kg/cubic meter (base)"}]},{group:"Time",units:[{measure:"s",description:"Seconds (base)"},{measure:"Minutes",description:"Minutes"},{measure:"Hours",description:"Hours"},{measure:"Days",description:"Days"},{measure:"D HH:MM:SS",description:"Day Hour:Minute:sec"}]},{group:"Angular Velocity",units:[{measure:"rad/s",description:"Radians per second (base)"},{measure:"deg/s",description:"Degrees per second"},{measure:"deg/min",description:"Degrees per minute"}]},{group:"Angle",units:[{measure:"rad",description:"Radians (base)"},{measure:"deg",description:"Degrees"},{measure:"grad",description:"Gradians"}]},{group:"Frequency",units:[{measure:"rpm",description:"RPM - Rotations per minute"},{measure:"Hz",description:"Hz - Hertz (base)"},{measure:"KHz",description:"KHz - Kilohertz"},{measure:"MHz",description:"MHz - Megahertz"},{measure:"GHz",description:"GHz - Gigahertz"}]},{group:"Ratio",units:[{measure:"percent",description:"As percentage value"},{measure:"percentraw",description:"As ratio 0-1 with % sign"},{measure:"ratio",description:"Ratio 0-1 (base)"}]},{group:"Position",units:[{measure:"pdeg",description:"Position Degrees"},{measure:"latitudeMin",description:"Latitude in minutes"},{measure:"latitudeSec",description:"Latitude in seconds"},{measure:"longitudeMin",description:"Longitude in minutes"},{measure:"longitudeSec",description:"Longitude in seconds"}]}];skBaseUnits=[{unit:"s",properties:{display:"s",quantity:"Time",quantityDisplay:"t",description:"Elapsed time (interval) in seconds"}},{unit:"Hz",properties:{display:"Hz",quantity:"Frequency",quantityDisplay:"f",description:"Frequency in Hertz"}},{unit:"m3",properties:{display:"m\xB3",quantity:"Volume",quantityDisplay:"V",description:"Volume in cubic meters"}},{unit:"m3/s",properties:{display:"m\xB3/s",quantity:"Flow",quantityDisplay:"Q",description:"Liquid or gas flow in cubic meters per second"}},{unit:"kg/s",properties:{display:"kg/s",quantity:"Mass flow rate",quantityDisplay:"\u1E41",description:"Liquid or gas flow in kilograms per second"}},{unit:"kg/m3",properties:{display:"kg/m\xB3",quantity:"Density",quantityDisplay:"\u03C1",description:"Density in kg per cubic meter"}},{unit:"deg",properties:{display:"Position",quantity:"Angle",quantityDisplay:"\u2220",description:"Latitude or longitude in decimal degrees"}},{unit:"rad",properties:{display:"\xB0",quantity:"Angle",quantityDisplay:"\u2220",description:"Angular arc in radians"}},{unit:"rad/s",properties:{display:"\u33AD/s",quantity:"Rotation",quantityDisplay:"\u03C9",description:"Angular rate in radians per second"}},{unit:"A",properties:{display:"A",quantity:"Current",quantityDisplay:"I",description:"Electrical current in ampere"}},{unit:"C",properties:{display:"C",quantity:"Charge",quantityDisplay:"Q",description:"Electrical charge in Coulomb"}},{unit:"V",properties:{display:"V",quantity:"Voltage",quantityDisplay:"V",description:"Electrical potential in volt"}},{unit:"W",properties:{display:"W",quantity:"Power",quantityDisplay:"P",description:"Power in watt"}},{unit:"Nm",properties:{display:"Nm",quantity:"Torque",quantityDisplay:"\u03C4",description:"Torque in Newton meter"}},{unit:"J",properties:{display:"J",quantity:"Energy",quantityDisplay:"E",description:"Electrical energy in joule"}},{unit:"ohm",properties:{display:"\u2126",quantity:"Resistance",quantityDisplay:"R",description:"Electrical resistance in ohm"}},{unit:"m",properties:{display:"m",quantity:"Distance",quantityDisplay:"d",description:"Distance in meters"}},{unit:"m/s",properties:{display:"m/s",quantity:"Speed",quantityDisplay:"v",description:"Speed in meters per second"}},{unit:"m2",properties:{display:"\u33A1",quantity:"Area",quantityDisplay:"A",description:"(Surface) area in square meters"}},{unit:"K",properties:{display:"K",quantity:"Temperature",quantityDisplay:"T",description:"Temperature in kelvin"}},{unit:"Pa",properties:{display:"Pa",quantity:"Pressure",quantityDisplay:"P",description:"Pressure in pascal"}},{unit:"kg",properties:{display:"kg",quantity:"Mass",quantityDisplay:"m",description:"Mass in kilogram"}},{unit:"ratio",properties:{display:"",quantity:"Ratio",quantityDisplay:"\u03C6",description:"Relative value compared to reference or normal value. 0 = 0%, 1 = 100%, 1e-3 = 1 ppt"}},{unit:"m/s2",properties:{display:"m/s\xB2",quantity:"Acceleration",quantityDisplay:"a",description:"Acceleration in meters per second squared"}},{unit:"rad/s2",properties:{display:"rad/s\xB2",quantity:"Angular acceleration",quantityDisplay:"a",description:"Angular acceleration in radians per second squared"}},{unit:"N",properties:{display:"N",quantity:"Force",quantityDisplay:"F",description:"Force in newton"}},{unit:"T",properties:{display:"T",quantity:"Magnetic field",quantityDisplay:"B",description:"Magnetic field strength in tesla"}},{unit:"Lux",properties:{display:"lx",quantity:"Light Intensity",quantityDisplay:"Ev",description:"Light Intensity in lux"}},{unit:"Pa/s",properties:{display:"Pa/s",quantity:"Pressure rate",quantityDisplay:"R",description:"Pressure change rate in pascal per second"}},{unit:"Pa.s",properties:{display:"Pa s",quantity:"Viscosity",quantityDisplay:"\u03BC",description:"Viscosity in pascal seconds"}}];_defaultUnits=null;constructor(){this._defaultUnitsSub=this.AppSettingsService.getDefaultUnitsAsO().subscribe(e=>{this._defaultUnits=e})}unitConversionFunctions={unitless:function(e){return e}," ":function(e){return e},knots:_.default.swiftConverter("m/s","kn"),kph:_.default.swiftConverter("m/s","kph"),"m/s":function(e){return e},mph:_.default.swiftConverter("m/s","mph"),liter:_.default.swiftConverter("m^3","liter"),gallon:_.default.swiftConverter("m^3","gallon"),m3:function(e){return e},"m3/s":function(e){return e},"l/min":_.default.swiftConverter("m^3/s","liter/minute"),"l/h":_.default.swiftConverter("m^3/s","liter/hour"),"g/min":_.default.swiftConverter("m^3/s","gallon/minute"),"g/h":_.default.swiftConverter("m^3/s","gallon/hour"),"m/m3":function(e){return e},"nm/l":_.default.swiftConverter("m/m^3","naut-mile/liter"),"nm/g":_.default.swiftConverter("m/m^3","naut-mile/gallon"),"km/l":_.default.swiftConverter("m/m^3","km/liter"),mpg:_.default.swiftConverter("m/m^3","mile/gallon"),"m/J":function(e){return e},"nm/J":_.default.swiftConverter("m/J","naut-mile/J"),"km/J":_.default.swiftConverter("km/J","km/J"),"nm/kWh":_.default.swiftConverter("m/J","naut-mile/kWh"),"km/kWh":_.default.swiftConverter("m/J","km/kWh"),K:function(e){return e},celsius:_.default.swiftConverter("tempK","tempC"),fahrenheit:_.default.swiftConverter("tempK","tempF"),m:function(e){return e},mm:function(e){return e*1e3},fathom:_.default.swiftConverter("m","fathom"),feet:_.default.swiftConverter("m","foot"),inch:_.default.swiftConverter("m","in"),km:_.default.swiftConverter("m","km"),nm:_.default.swiftConverter("m","nmi"),mi:_.default.swiftConverter("m","mi"),V:function(e){return e},mV:function(e){return e*1e3},A:function(e){return e},mA:function(e){return e*1e3},C:function(e){return e},Ah:_.default.swiftConverter("C","Ah"),W:function(e){return e},mW:function(e){return e*1e3},J:function(e){return e},kWh:_.default.swiftConverter("J","kWh"),ohm:function(e){return e},kiloohm:function(e){return e/1e3},Pa:function(e){return e},bar:_.default.swiftConverter("Pa","bar"),psi:_.default.swiftConverter("Pa","psi"),mmHg:_.default.swiftConverter("Pa","mmHg"),inHg:_.default.swiftConverter("Pa","inHg"),hPa:_.default.swiftConverter("Pa","hPa"),kPa:_.default.swiftConverter("Pa","kPa"),mbar:_.default.swiftConverter("Pa","millibar"),"kg/m3":function(e){return e},s:function(e){return e},Minutes:_.default.swiftConverter("s","minutes"),Hours:_.default.swiftConverter("s","hours"),Days:_.default.swiftConverter("s","days"),"D HH:MM:SS":function(e){e=parseInt(e,10);let t=e<0;e=Math.abs(e);let r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),u=Math.floor(e%60),h=t?"-":"";return r>0?h+=r+"d "+n.toString()+":"+o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"):h+=n.toString()+":"+o.toString().padStart(2,"0")+":"+u.toString().padStart(2,"0"),h},"rad/s":function(e){return e},"deg/s":_.default.swiftConverter("rad/s","deg/s"),"deg/min":_.default.swiftConverter("rad/s","deg/min"),rpm:function(e){return e*60},Hz:function(e){return e},KHz:function(e){return e/1e3},MHz:function(e){return e/1e6},GHz:function(e){return e/1e9},rad:function(e){return e},deg:_.default.swiftConverter("rad","deg"),grad:_.default.swiftConverter("rad","grad"),percent:function(e){return e*100},percentraw:function(e){return e},ratio:function(e){return e},pdeg:function(e){return e},latitudeMin:function(e){let t=Math.trunc(e),r="N";e<0&&(r="S",t=t*-1);let n=e%1*60;return r=="S"&&(n=n*-1),t+"\xB0 "+n.toFixed(2).padStart(5,"0")+"' "+r},latitudeSec:function(e){let t=Math.trunc(e),r="N";e<0&&(r="S",t=t*-1);let n=e%1*60;r=="S"&&(n=n*-1);let o=Math.trunc(n),u=n%1*60;return t+"\xB0 "+o+"' "+u.toFixed(2).padStart(5,"0")+'" '+r},longitudeMin:function(e){let t=Math.trunc(e),r="E";e<0&&(r="W",t=t*-1);let n=e%1*60;return r=="W"&&(n=n*-1),t+"\xB0 "+n.toFixed(2).padStart(5,"0")+"' "+r},longitudeSec:function(e){let t=Math.trunc(e),r="E";e<0&&(r="W",t=t*-1);let n=e%1*60;r=="W"&&(n=n*-1);let o=Math.trunc(n),u=n%1*60;return t+"\xB0 "+o+"' "+u.toFixed(2).padStart(5,"0")+'" '+r}};convertToUnit(e,t){if(!(e in this.unitConversionFunctions)||t===null)return null;let r=+t;return this.unitConversionFunctions[e](r)}getDefaults(){return this._defaultUnits}getConversions(){return this._conversionList}getConversionsForPath(e){let t=this.data.getPathUnitType(e),r="unitless",n="unitless";if(t===null||t==="RFC 3339 (UTC)")return{base:r,conversions:this._conversionList};{let o=this._conversionList.filter(u=>u.group=="Position"&&(e.includes("position.latitude")||e.includes("position.longitude"))?!0:u.units.find(v=>v.measure==t)?(n=this._defaultUnits[u.group],!0):!1);return o.length>0?{base:n,conversions:o}:(console.log("[Units Service] Unit type: "+t+", found for path: "+e+`
2
- but Kip does not support it.`),{base:r,conversions:this._conversionList})}}ngOnDestroy(){this._defaultUnitsSub?.unsubscribe()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac})}return l})();var $r=["tooltip"],ji=20;var Gi=new Y("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let l=g(pe);return()=>We(l,{scrollThrottle:ji})}}),Yi=new Y("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ki="tooltip-panel",zr={passive:!0},Vr=8,qr=8,Br=24,Hr=200,Kr=(()=>{class l{_elementRef=g(se);_ngZone=g(Te);_platform=g(di);_ariaDescriber=g(bi);_focusMonitor=g(pi);_dir=g(Ne);_injector=g(pe);_viewContainerRef=g(jt);_mediaMatcher=g(hi);_document=g(Bt);_renderer=g(xe);_animationsDisabled=_e();_defaultOptions=g(Yi,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Xi;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=ct(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=ct(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=ot(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=ot(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new w;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=Vr}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(O(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(t=>t()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let r=this._createOverlay(t);this._detach(),this._portal=this._portal||new vi(this._tooltipComponent,this._viewContainerRef);let n=this._tooltipInstance=r.attach(this._portal).instance;n._triggerElement=this._elementRef.nativeElement,n._mouseLeaveHideDelay=this._hideDelay,n.afterHidden().pipe(O(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),n.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof se)return this._overlayRef;this._detach()}let t=this._injector.get(Si).getAncestorScrollContainers(this._elementRef),r=`${this._cssClassPrefix}-${Ki}`,n=wi(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return n.positionChanges.pipe(O(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=Di(this._injector,{direction:this._dir,positionStrategy:n,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,r]:r,scrollStrategy:this._injector.get(Gi)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(O(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(O(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(O(this._destroyed)).subscribe(o=>{o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(O(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,r=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([this._addOffset(le(le({},r.main),n.main)),this._addOffset(le(le({},r.fallback),n.fallback))])}_addOffset(e){let t=qr,r=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=r?-t:t:e.originX==="end"&&(e.offsetX=r?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,r;t=="above"||t=="below"?r={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?r={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(r={originX:"end",originY:"center"});let{x:n,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:n,originY:o}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,r;t=="above"?r={overlayX:"center",overlayY:"bottom"}:t=="below"?r={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?r={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:n,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:n,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ze(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e instanceof Set?Array.from(e):e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:r,originY:n}=e,o;if(t==="center"?this._dir&&this._dir.value==="rtl"?o=r==="end"?"left":"right":o=r==="start"?"left":"right":o=t==="bottom"&&n==="top"?"above":"below",o!==this._currentPosition){let u=this._overlayRef;if(u){let h=`${this._cssClassPrefix}-${Ki}-`;u.removePanelClass(h+this._currentPosition),u.addPanelClass(h+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",e=>{let t=e.targetTouches?.[0],r=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let n=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,r)},this._defaultOptions?.touchLongPressShowDelay??n)})):this._addListener("mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",e=>{let t=e.relatedTarget;(!t||!this._overlayRef?.overlayElement.contains(t))&&this.hide()}),this._addListener("wheel",e=>{if(this._isTooltipVisible()){let t=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;t!==r&&!r.contains(t)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let e=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",e),this._addListener("touchcancel",e)}}}_addListener(e,t){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,e,t,zr))}_isTouchPlatform(){return this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!this._defaultOptions?.detectHoverCapability&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,r=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),(e==="on"||!t.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ze({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=e=>e.type==="keydown"?this._isTooltipVisible()&&e.keyCode===27&&!oe(e):!0;static \u0275fac=function(t){return new(t||l)};static \u0275dir=et({type:l,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,r){t&2&&ae("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return l})(),Xi=(()=>{class l{_changeDetectorRef=g(Pe);_elementRef=g(se);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=_e();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new w;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>Br&&e.width>=Hr}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,r=this._showAnimation,n=this._hideAnimation;if(t.classList.remove(e?n:r),t.classList.add(e?r:n),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let o=getComputedStyle(t);(o.getPropertyValue("animation-duration")==="0s"||o.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=Oe({type:l,selectors:[["mat-tooltip-component"]],viewQuery:function(t,r){if(t&1&&Re($r,7),t&2){let n;z(n=V())&&(r._tooltip=n.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,r){t&1&&J("mouseleave",function(o){return r._handleMouseLeave(o)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,r){if(t&1){let n=he();st(0,"div",1,0),Jt("animationend",function(u){return B(n),H(r._handleAnimationEnd(u))}),st(2,"div",2),me(3),Xt()()}t&2&&(Ie(r.tooltipClass),ae("mdc-tooltip--multiline",r._isMultiline),L(3),fe(r.message))},styles:[`.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}
3
- `],encapsulation:2,changeDetection:0})}return l})();var gn=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=Ee({type:l});static \u0275inj=Ce({imports:[fi,Le,Fe,Ue]})}return l})();var Xr=["trigger"],Jr=["panel"],Qr=[[["mat-select-trigger"]],"*"],Zr=["mat-select-trigger","*"];function es(l,y){if(l&1&&($(0,"span",4),me(1),X()),l&2){let e=ne();L(),fe(e.placeholder)}}function ts(l,y){l&1&&nt(0)}function is(l,y){if(l&1&&($(0,"span",11),me(1),X()),l&2){let e=ne(2);L(),fe(e.triggerValue)}}function rs(l,y){if(l&1&&($(0,"span",5),tt(1,ts,1,0)(2,is,2,1,"span",11),X()),l&2){let e=ne();L(),it(e.customTrigger?1:2)}}function ss(l,y){if(l&1){let e=he();$(0,"div",12,1),J("keydown",function(r){B(e);let n=ne();return H(n._handleKeydown(r))}),nt(2,1),X()}if(l&2){let e=ne();Ie(ti("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),ae("mat-select-panel-animations-enabled",!e._animationsDisabled),rt("ngClass",e.panelClass),Ae("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var ns=new Y("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let l=g(pe);return()=>We(l)}}),as=new Y("MAT_SELECT_CONFIG"),os=new Y("MatSelectTrigger"),_t=class{source;value;constructor(y,e){this.source=y,this.value=e}},Yn=(()=>{class l{_viewportRuler=g(ki);_changeDetectorRef=g(Pe);_elementRef=g(se);_dir=g(Ne,{optional:!0});_idGenerator=g(gi);_renderer=g(xe);_parentFormField=g(Ai,{optional:!0});ngControl=g(Ti,{self:!0,optional:!0});_liveAnnouncer=g(mi);_defaultOptions=g(as,{optional:!0});_animationsDisabled=_e();_popoverLocation;_initialized=new w;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let r=this.panel.nativeElement,n=Wi(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&n===1?r.scrollTop=0:r.scrollTop=Li(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new _t(this,e)}_scrollStrategyFactory=g(ns);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new w;_errorStateTracker;stateChanges=new w;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=Ht(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Mi.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Lt(()=>{let e=this.options;return e?e.changes.pipe(Je(e),Qe(()=>we(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(Qe(()=>this.optionSelectionChanges))});openedChange=new Me;_openedStream=this.openedChange.pipe(de(e=>e),ue(()=>{}));_closedStream=this.openedChange.pipe(de(e=>!e),ue(()=>{}));selectionChange=new Me;valueChange=new Me;constructor(){let e=g(Ii),t=g(xi,{optional:!0}),r=g(Oi,{optional:!0}),n=g(new ri("tabindex"),{optional:!0}),o=g(Ci,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Pi(e,this.ngControl,r,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=n==null?0:parseInt(n)||0,this._popoverLocation=o?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new $i(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(O(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(O(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Je(null),O(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(Vt(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&lt(this._trackedModal,"aria-owns",t),yi(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;lt(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(r),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",n=>{n.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),r=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,r=t===40||t===38||t===37||t===39,n=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&n&&!oe(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let u=this.selected;o.onKeydown(e);let h=this.selected;h&&u!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,r=e.keyCode,n=r===40||r===38,o=t.isTyping();if(n&&e.altKey)e.preventDefault(),this.close();else if(!o&&(r===13||r===32)&&t.activeItem&&!oe(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&r===65&&e.ctrlKey){e.preventDefault();let u=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(u?h.select():h.deselect())})}else{let u=t.activeItemIndex;t.onKeydown(e),this._multiple&&n&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==u&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!oe(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return(r.value!=null||this.canSelectNullableOptions)&&this._compareWith(r.value,e)}catch(n){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof ut?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new _i(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=we(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(O(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),we(...this.options.map(t=>t._stateChanges)).pipe(O(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let r=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,r)=>this.sortComparator?this.sortComparator(t,r,e):e.indexOf(t)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(r=>r.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=ui(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=Oe({type:l,selectors:[["mat-select"]],contentQueries:function(t,r,n){if(t&1&&Zt(n,os,5)(n,Ui,5)(n,Fi,5),t&2){let o;z(o=V())&&(r.customTrigger=o.first),z(o=V())&&(r.options=o),z(o=V())&&(r.optionGroups=o)}},viewQuery:function(t,r){if(t&1&&Re(Xr,5)(Jr,5)(dt,5),t&2){let n;z(n=V())&&(r.trigger=n.first),z(n=V())&&(r.panel=n.first),z(n=V())&&(r._overlayDir=n.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,r){t&1&&J("keydown",function(o){return r._handleKeydown(o)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),t&2&&(Ae("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),ae("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple)("mat-select-open",r.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",K],disableRipple:[2,"disableRipple","disableRipple",K],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:at(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",K],placeholder:"placeholder",required:[2,"required","required",K],multiple:[2,"multiple","multiple",K],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",K],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",at],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",K]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[ii([{provide:Ei,useExisting:l},{provide:Ni,useExisting:l}]),Kt],ngContentSelectors:Zr,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(t,r){if(t&1){let n=he();Qt(Qr),$(0,"div",2,0),J("click",function(){return B(n),H(r.open())}),$(3,"div",3),tt(4,es,2,1,"span",4)(5,rs,3,1,"span",5),X(),$(6,"div",6)(7,"div",7),qt(),$(8,"svg",8),Yt(9,"path",9),X()()()(),Gt(10,ss,3,10,"ng-template",10),J("detach",function(){return B(n),H(r.close())})("backdropClick",function(){return B(n),H(r.close())})("overlayKeydown",function(u){return B(n),H(r._handleOverlayKeydown(u))})}if(t&2){let n=ei(1);L(3),Ae("id",r._valueId),L(),it(r.empty?4:5),L(6),rt("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||n)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",r._popoverLocation)}},dependencies:[ut,dt,si],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
4
- `],encapsulation:2,changeDetection:0})}return l})();var Xn=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=Ee({type:l});static \u0275inj=Ce({imports:[Le,pt,Fe,Ue,Ri,pt]})}return l})();export{Yn as a,Xn as b,Z as c,Wr as d,zi as e,Bi as f,$s as g,Yi as h,Kr as i,gn as j};
@@ -1 +0,0 @@
1
- import{a as B}from"./chunk-2OB7ZJBR.js";import{b as I,i as q}from"./chunk-G6M3Z3BY.js";import"./chunk-XMQPXXLW.js";import"./chunk-GMGZLXY7.js";import"./chunk-Q3USFT4F.js";import"./chunk-LGCQEN7V.js";import"./chunk-DGE5YFPU.js";import"./chunk-5FEX27I4.js";import"./chunk-T6TFVZVM.js";import"./chunk-K6XYUNG4.js";import{m as N}from"./chunk-6V4GGGXE.js";import"./chunk-GUZ3BDVZ.js";import{Ab as b,Bb as P,Dc as u,De as V,Ea as x,Ee as Z,Ga as r,Gb as w,Ha as l,Hb as s,Ib as c,Ic as D,Jb as h,Ld as X,Qb as y,Sb as O,Ub as g,Ya as d,_c as T,ac as z,ae as L,bc as E,dc as m,ec as R,hd as A,jb as W,qa as a,qe as F,rd as S,re as U,va as v,wa as C,xc as k}from"./chunk-JCNE4QHQ.js";var G=["panel"],Q=(i,f)=>[i,f];function j(i,f){if(i&1&&h(0,"div",7),i&2){let t=g();m("transform",t.ghostTransform())}}function H(i,f){if(i&1){let t=y();s(0,"div",8),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),s(1,"button",9),O("pointerdown",function(e){v(t);let o=g();return C(o.startResize(e))}),h(2,"mat-icon",10),c()()}}var ct=(()=>{class i{panelEl=D.required("panel");_settings=a(N);_dashboard=a(I);breakpointObserver=a(X);ngZone=a(x);side=r(this._settings.getSplitShellSide());panelRatio=r(this._settings.getSplitShellWidth());originalPanelRatio=null;panelWidth=r(0);panelCollapsed=u(()=>!!this._dashboard.dashboards()[this._dashboard.activeDashboard()]?.collapseSplitShell);fskShellSwipeDisabled=S(this._settings.getSplitShellSwipeDisabledAsO());handset$=this.breakpointObserver.observe(L.HandsetPortrait);handset=S(this.handset$,{initialValue:{matches:!1,breakpoints:{}}});freeboardWidgetStub={uuid:"persistent-freeboard-shell",type:"widget-freeboardsk",config:{}};chartplotterModeInPortrait=u(()=>this.handset().matches&&!this.panelCollapsed());canResize=u(()=>!this._dashboard.isDashboardStatic()&&!this.panelCollapsed());resizing=!1;startX=0;startW=0;boundMove=t=>this.onMove(t);boundUp=()=>this.onUp();static MIN_DELTA_PX=1;ghostActive=r(!1);ghostTransform=r("");ghostWidth=0;recomputeWidth=()=>{let t=this.panelEl()?.nativeElement.parentElement;if(!t)return;let n=t.clientWidth;this.panelWidth.set(Math.round(n*this.panelRatio()))};constructor(){window.addEventListener("resize",this.recomputeWidth,{passive:!0}),queueMicrotask(this.recomputeWidth),l(()=>{this.chartplotterModeInPortrait(),this.panelRatio(),this.recomputeWidth(),setTimeout(()=>window.dispatchEvent(new Event("resize")),0)}),l(()=>{let t=this._dashboard.isDashboardStatic();t||this.originalPanelRatio===null&&(this.originalPanelRatio=this.panelRatio()),t&&this.originalPanelRatio}),l(()=>{if(this._dashboard.layoutEditSaved(),this.originalPanelRatio!==null){let t=this.panelRatio();this._settings.setSplitShellWidth(t),this.originalPanelRatio=null}}),l(()=>{if(this._dashboard.layoutEditCanceled(),this.originalPanelRatio!==null){let t=this.originalPanelRatio;this.panelRatio.set(t),queueMicrotask(()=>this.recomputeWidth()),this.originalPanelRatio=null}})}startResize(t){this.canResize()&&(this.resizing=!0,this.startX=t.clientX,this.startW=this.panelWidth(),this.ghostWidth=this.startW,this.ghostActive.set(!0),this.updateGhostTransform(this.startW),t.target.setPointerCapture(t.pointerId),this.ngZone.runOutsideAngular(()=>{window.addEventListener("pointermove",this.boundMove,{passive:!0}),window.addEventListener("pointerup",this.boundUp,{passive:!0})}))}onMove(t){if(!this.resizing)return;let n=this.side()==="left"?t.clientX-this.startX:this.startX-t.clientX,o=this.panelEl()?.nativeElement.parentElement?.clientWidth??1,p=this.startW+n,_=o*.1,$=o*.9,M=Math.min($,Math.max(_,p));Math.abs(M-this.ghostWidth)<i.MIN_DELTA_PX||(this.ghostWidth=M,this.ngZone.runOutsideAngular(()=>this.updateGhostTransform(M)))}onUp(){if(!this.resizing)return;this.resizing=!1,window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp);let t=this.ghostWidth;this.ghostActive.set(!1);let n=this.panelEl();n&&!this.panelCollapsed()&&(n.nativeElement.style.width=t+"px"),this.ngZone.run(()=>{this.panelWidth.set(t);let o=this.panelEl()?.nativeElement.parentElement?.clientWidth??t,p=o?t/o:.3,_=this.panelRatio();Math.abs(p-_)>5e-4&&this.panelRatio.set(p)})}updateGhostTransform(t){this.side()==="left"?this.ghostTransform.set(`translateX(${t}px)`):this.ghostTransform.set(`translateX(-${t}px)`)}ngOnDestroy(){window.removeEventListener("resize",this.recomputeWidth),this.resizing&&(window.removeEventListener("pointermove",this.boundMove),window.removeEventListener("pointerup",this.boundUp))}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=W({type:i,selectors:[["split-shell"]],viewQuery:function(n,e){n&1&&z(e.panelEl,G,5),n&2&&E()},decls:8,vars:18,consts:[["panel",""],[1,"split-root",3,"ngClass"],[1,"resize-ghost",3,"transform"],[1,"fsk-shell"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle"],[1,"fsk-iframe",3,"type","id","swipeDisabled","disableWidgetShell"],[1,"dash-container"],[1,"resize-ghost"],["role","separator","aria-label","Resize Freeboard chartplotter panel","aria-orientation","vertical",1,"drag-handle",3,"pointerdown"],["mat-mini-fab","","tabindex","-1","aria-hidden","true",1,"drag-fab",3,"pointerdown"],["fontIcon","drag_indicator"]],template:function(n,e){n&1&&(s(0,"div",1),b(1,j,1,2,"div",2),s(2,"div",3,0),b(4,H,3,0,"div",4),h(5,"widget-freeboardsk",5),c(),s(6,"div",6),h(7,"dashboard"),c()()),n&2&&(m("--panel-ratio",e.panelRatio()),w("ngClass",k(15,Q,e.side()==="left"?"side-left":"side-right",e.chartplotterModeInPortrait()?"portrait-column":"")),d(),P(e.ghostActive()?1:-1),d(),m("width",e.chartplotterModeInPortrait()?null:e.panelWidth(),"px"),R("collapsed",e.panelCollapsed())("drag-disabled",!e.canResize()),d(2),P(e.canResize()?4:-1),d(),w("type",e.freeboardWidgetStub.type)("id",e.freeboardWidgetStub.uuid)("swipeDisabled",e.fskShellSwipeDisabled())("disableWidgetShell",!0))},dependencies:[A,T,q,B,U,F,Z,V],styles:[".split-root[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.split-root.side-left[_ngcontent-%COMP%]{flex-direction:row}.split-root.side-right[_ngcontent-%COMP%]{flex-direction:row-reverse}.split-root.portrait-column[_ngcontent-%COMP%]{flex-direction:column}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{width:100%!important;min-height:0}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{flex:0 0 calc(var(--panel-ratio, .3) * 100%)}.split-root.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow:hidden}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:2}.split-root.side-left.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:1}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .fsk-shell[_ngcontent-%COMP%]{order:2}.split-root.side-right.portrait-column[_ngcontent-%COMP%] .dash-container[_ngcontent-%COMP%]{order:1}.split-root.portrait-column[_ngcontent-%COMP%] .fsk-shell.collapsed[_ngcontent-%COMP%]{flex:0 0 0!important}.split-root.portrait-column[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%], .split-root.portrait-column[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{display:none}.fsk-shell[_ngcontent-%COMP%]{position:relative;height:100%;display:flex;flex-direction:column;background:var(--mat-sys-surface-container, #111);transition:width .2s ease}.fsk-shell.collapsed[_ngcontent-%COMP%]{width:1px!important;visibility:hidden;opacity:0;pointer-events:none}.fsk-iframe[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.dash-container[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;height:100%}.drag-handle[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:3px;cursor:col-resize;background:var(--mat-sys-inverse-primary);z-index:5}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28px;height:28px;min-width:28px;cursor:col-resize;pointer-events:auto}.drag-handle[_ngcontent-%COMP%] .drag-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;line-height:20px}.side-left[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{right:-2px}.side-right[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{left:-2px}.drag-handle[_ngcontent-%COMP%]:hover{background:var(--mat-sys-error-container)}.side-left[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{left:.25rem}.side-right[_ngcontent-%COMP%] .collapse-toggle[_ngcontent-%COMP%]{right:.25rem}.fsk-shell.drag-disabled[_ngcontent-%COMP%] .drag-handle[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.4}.resize-ghost[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:2px;background:var(--mat-sys-error-container);opacity:.9;pointer-events:none;z-index:30;will-change:transform;transition:none}.side-left[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{left:0}.side-right[_ngcontent-%COMP%] .resize-ghost[_ngcontent-%COMP%]{right:0}"]})}return i})();export{ct as SplitShellComponent};
@@ -1,2 +0,0 @@
1
- import{b as J,d as Ye,i as Xe,j as je,m as ze,p as We,t as Qe}from"./chunk-GUZ3BDVZ.js";import{$a as H,Aa as N,Ab as Me,Ae as Ve,Bb as ye,Da as w,Ea as me,Fd as q,Ga as ue,Gb as ve,Hb as X,Hd as Se,Ib as j,J as C,Jb as z,K as ae,Kb as W,Lb as Ce,Ma as k,Mc as y,Na as ce,Oc as m,Q as oe,Qb as xe,Rb as we,Sb as Q,Sd as Oe,Tb as ke,Td as Ee,Ub as l,Vb as U,Vd as Ae,Wb as I,Xb as De,Ya as L,Yb as Ie,Zb as b,_a as de,_b as M,a as A,b as ne,ba as x,bb as he,ca as B,ce as Z,da as se,db as pe,ec as K,fb as Y,g as v,gc as Pe,ie as Fe,jb as V,je as Be,k as d,kb as _e,lb as D,le as Ne,ma as re,me as Le,ne as He,oa as h,ob as ge,qa as o,qb as fe,s as F,va as p,vc as G,wa as _,wb as be,wd as Re,xa as le,xd as Te,yb as f,za as g}from"./chunk-JCNE4QHQ.js";var it=["mat-menu-item",""],nt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],at=["mat-icon, [matMenuItemIcon]","*"];function ot(a,qe){a&1&&(le(),X(0,"svg",2),z(1,"polygon",3),j())}var st=["*"];function rt(a,qe){if(a&1){let e=xe();W(0,"div",0),ke("click",function(){p(e);let i=l();return _(i.closed.emit("click"))})("animationstart",function(i){p(e);let n=l();return _(n._onAnimationStart(i.animationName))})("animationend",function(i){p(e);let n=l();return _(n._onAnimationDone(i.animationName))})("animationcancel",function(i){p(e);let n=l();return _(n._onAnimationDone(i.animationName))}),W(1,"div",1),I(2),Ce()()}if(a&2){let e=l();Pe(e._classList),K("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),we("id",e.panelId),f("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var te=new h("MAT_MENU_PANEL"),ee=(()=>{class a{_elementRef=o(k);_document=o(N);_focusMonitor=o(q);_parentMenu=o(te,{optional:!0});_changeDetectorRef=o(y);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new d;_focused=new d;_highlighted=!1;_triggersSubmenu=!1;constructor(){o(Se).load(Be),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let i=0;i<t.length;i++)t[i].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=V({type:a,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,i){t&1&&Q("click",function(s){return i._checkDisabled(s)})("mouseenter",function(){return i._handleMouseEnter()}),t&2&&(f("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled)("disabled",i.disabled||null),K("mat-mdc-menu-item-highlighted",i._highlighted)("mat-mdc-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",m],disableRipple:[2,"disableRipple","disableRipple",m]},exportAs:["matMenuItem"],attrs:it,ngContentSelectors:at,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,i){t&1&&(U(nt),I(0),X(1,"span",0),I(2,1),j(),z(3,"div",1),Me(4,ot,2,0,":svg:svg",2)),t&2&&(L(3),ve("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),L(),ye(i._triggersSubmenu?4:-1))},dependencies:[Fe],encapsulation:2,changeDetection:0})}return a})();var Ge=new h("MatMenuContent"),Ht=(()=>{class a{_template=o(H);_appRef=o(be);_injector=o(g);_viewContainerRef=o(Y);_document=o(N);_changeDetectorRef=o(y);_portal;_outlet;_attached=new d;constructor(){}attach(e={}){this._portal||(this._portal=new J(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new Ye(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(t){return new(t||a)};static \u0275dir=D({type:a,selectors:[["ng-template","matMenuContent",""]],features:[G([{provide:Ge,useExisting:a}])]})}return a})(),lt=new h("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),$="_mat-menu-enter",P="_mat-menu-exit",R=(()=>{class a{_elementRef=o(k);_changeDetectorRef=o(y);_injector=o(g);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=Z();_allItems;_directDescendantItems=new ce;_classList={};_panelAnimationState="void";_animationDone=new d;_isAnimating=ue(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,i=A({},this._classList);t&&t.length&&t.split(" ").forEach(n=>{i[n]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(n=>{i[n]=!0}),this._elementRef.nativeElement.className=""),this._classList=i}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new w;close=this.closed;panelId=o(Oe).getId("mat-menu-panel-");constructor(){let e=o(lt);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ae(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(x(this._directDescendantItems),B(e=>C(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let i=e.toArray(),n=Math.max(0,Math.min(i.length-1,t.activeItemIndex||0));i[n]&&!i[n].disabled?t.setActiveItem(n):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(x(this._directDescendantItems),B(t=>C(...t.map(i=>i._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,i=this._keyManager;switch(t){case 27:Ee(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&i.setFocusOrigin("keyboard"),i.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=de(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let i=this._keyManager;i.setFocusOrigin(e).setFirstItemActive(),!i.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=ne(A({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===P;(t||e===$)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===$||e===P)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(P),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?$:P)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(x(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=V({type:a,selectors:[["mat-menu"]],contentQueries:function(t,i,n){if(t&1&&De(n,Ge,5)(n,ee,5)(n,ee,4),t&2){let s;b(s=M())&&(i.lazyContent=s.first),b(s=M())&&(i._allItems=s),b(s=M())&&(i.items=s)}},viewQuery:function(t,i){if(t&1&&Ie(H,5),t&2){let n;b(n=M())&&(i.templateRef=n.first)}},hostVars:3,hostBindings:function(t,i){t&2&&f("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",m],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:m(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[G([{provide:te,useExisting:a}])],ngContentSelectors:st,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,i){t&1&&(U(),fe(0,rt,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
2
- `],encapsulation:2,changeDetection:0})}return a})(),mt=new h("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let a=o(g);return()=>Xe(a)}});var u=new WeakMap,ut=(()=>{class a{_canHaveBackdrop;_element=o(k);_viewContainerRef=o(Y);_menuItemInstance=o(ee,{optional:!0,self:!0});_dir=o(Ne,{optional:!0});_focusMonitor=o(q);_ngZone=o(me);_injector=o(g);_scrollStrategy=o(mt);_changeDetectorRef=o(y);_animationsDisabled=Z();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=v.EMPTY;_menuCloseSubscription=v.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=o(te,{optional:!0});this._parentMaterialMenu=t instanceof R?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&u.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let i=u.get(t);u.set(t,this),i&&i!==this&&i._closeMenu();let n=this._createOverlay(t),s=n.getConfig(),r=s.positionStrategy;this._setPosition(t,r),this._canHaveBackdrop?s.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:s.hasBackdrop=!1,n.hasAttached()||(n.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof R&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(se(t.close)).subscribe(()=>{r.withLockedPosition(!1).reapplyLastPosition(),r.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,i=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),i instanceof R&&this._ownsMenu(i)?(this._pendingRemoval=i._animationDone.pipe(oe(1)).subscribe(()=>{t.detach(),u.has(i)||i.lazyContent?.detach()}),i._setIsOpen(!1)):(t.detach(),i?.lazyContent?.detach()),i&&this._ownsMenu(i)&&u.delete(i),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=We(this._injector,t),this._overlayRef.keydownEvents().subscribe(i=>{this._menu instanceof R&&this._menu._handleKeydown(i)})}return this._overlayRef}_getOverlayConfig(e){return new je({positionStrategy:ze(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(i=>{this._ngZone.run(()=>{let n=i.connectionPair.overlayX==="start"?"after":"before",s=i.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(n,s)})})}_setPosition(e,t){let[i,n]=e.xPosition==="before"?["end","start"]:["start","end"],[s,r]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[T,S]=[s,r],[O,E]=[i,n],c=0;if(this._triggersSubmenu()){if(E=i=e.xPosition==="before"?"start":"end",n=O=i==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let ie=this._parentMaterialMenu.items.first;this._parentInnerPadding=ie?ie._getHostElement().offsetTop:0}c=s==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(T=s==="top"?"bottom":"top",S=r==="top"?"bottom":"top");t.withPositions([{originX:i,originY:T,overlayX:O,overlayY:s,offsetY:c},{originX:n,originY:T,overlayX:E,overlayY:s,offsetY:c},{originX:i,originY:S,overlayX:O,overlayY:r,offsetY:-c},{originX:n,originY:S,overlayX:E,overlayY:r,offsetY:-c}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),i=this._parentMaterialMenu?this._parentMaterialMenu.closed:F(),n=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ae(s=>this._menuOpen&&s!==this._menuItemInstance)):F();return C(e,i,n,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new J(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return u.get(e)===this}_triggerIsAriaDisabled(){return m(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){pe()};static \u0275dir=D({type:a})}return a})(),Yt=(()=>{class a extends ut{_cleanupTouchstart;_hoverSubscription=v.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new w;onMenuOpen=this.menuOpened;menuClosed=new w;onMenuClose=this.menuClosed;constructor(){super(!0);let e=o(he);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Te(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Re(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||a)};static \u0275dir=D({type:a,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,i){t&1&&Q("click",function(s){return i._handleClick(s)})("mousedown",function(s){return i._handleMousedown(s)})("keydown",function(s){return i._handleKeydown(s)}),t&2&&f("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu==null?null:i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[ge]})}return a})();var Vt=(()=>{class a{static \u0275fac=function(t){return new(t||a)};static \u0275mod=_e({type:a});static \u0275inj=re({imports:[He,Qe,Le,Ve]})}return a})();export{ee as a,Ht as b,R as c,Yt as d,Vt as e};
@@ -1 +0,0 @@
1
- import{a as c}from"./chunk-ZQER6AIQ.js";import"./chunk-T6TFVZVM.js";import{a as g,h as l}from"./chunk-K6XYUNG4.js";import{k as a,m as r}from"./chunk-6V4GGGXE.js";import"./chunk-GUZ3BDVZ.js";import{jb as s,qa as o}from"./chunk-JCNE4QHQ.js";var v=(()=>{class t{dialog=o(l);auth=o(a);toast=o(g);appSettingsService=o(r);connectionConfig=null;ngOnInit(){this.connectionConfig=this.appSettingsService.getConnectionConfig(),this.openUserCredentialModal("Sign in failed: Incorrect user/password. Enter valide credentials or access the Confifuration/Settings menu, validate the server URL or/and disable the user Sign in option")}openUserCredentialModal(e){this.dialog.open(c,{disableClose:!0,data:{user:this.connectionConfig.loginName,password:this.connectionConfig.loginPassword,error:e}}).afterClosed().subscribe(i=>{i===void 0||!i||(this.connectionConfig.loginName=i.user,this.connectionConfig.loginPassword=i.password,this.appSettingsService.setConnectionConfig(this.connectionConfig),this.serverLogin())})}serverLogin(e){this.auth.login({usr:this.connectionConfig.loginName,pwd:this.connectionConfig.loginPassword,newUrl:e}).then(()=>{this.appSettingsService.reloadApp()}).catch(n=>{n.status==401?(this.openUserCredentialModal("Sign in failed: Invalide user/password. Enter valide credentials"),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==404?(this.toast.show("Login API not found at URL. See connection detail status in Configuration/Settings",5e3,!1,"error"),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==0?(this.toast.show("Cannot reach server at Signal K URL. See connection detail status in Configuration/Settings",5e3,!1,"error"),console.log("[Setting-SignalK Component] Sign in failed: Cannot reach server at Signal K URL:"+n.message)):(this.toast.show("Unknown authentication failure: "+JSON.stringify(n),5e3,!1,"error"),console.log("[Setting-SignalK Component] Unknown login error response: "+JSON.stringify(n)))})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=s({type:t,selectors:[["app-widget-login"]],decls:0,vars:0,template:function(n,i){},encapsulation:2})}return t})();export{v as WidgetLoginComponent};