homebridge-config-ui-x 5.10.0 → 5.10.1-beta.0

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 (160) hide show
  1. package/TODO-MATTER.md +15 -0
  2. package/dist/core/auth/auth.controller.d.ts +4 -0
  3. package/dist/core/config/config.interfaces.d.ts +14 -0
  4. package/dist/core/config/config.service.d.ts +6 -0
  5. package/dist/core/config/config.service.js +8 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/core/config/config.startup.js +48 -17
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/feature-flags/feature-flags.registry.js +5 -0
  10. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  11. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +1 -0
  12. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  13. package/dist/core/spa/spa-html.service.d.ts +5 -0
  14. package/dist/core/spa/spa-html.service.js +32 -0
  15. package/dist/core/spa/spa-html.service.js.map +1 -0
  16. package/dist/core/spa/spa.filter.d.ts +3 -0
  17. package/dist/core/spa/spa.filter.js +22 -2
  18. package/dist/core/spa/spa.filter.js.map +1 -1
  19. package/dist/core/ssl/ssl-cert-generator.service.d.ts +15 -0
  20. package/dist/core/ssl/ssl-cert-generator.service.js +125 -0
  21. package/dist/core/ssl/ssl-cert-generator.service.js.map +1 -0
  22. package/dist/globalDefaults.js +3 -0
  23. package/dist/globalDefaults.js.map +1 -1
  24. package/dist/main.js +18 -4
  25. package/dist/main.js.map +1 -1
  26. package/dist/modules/accessories/accessories.controller.d.ts +1 -1
  27. package/dist/modules/accessories/accessories.interfaces.d.ts +94 -0
  28. package/dist/modules/accessories/accessories.interfaces.js +2 -0
  29. package/dist/modules/accessories/accessories.interfaces.js.map +1 -0
  30. package/dist/modules/accessories/accessories.module.js +2 -0
  31. package/dist/modules/accessories/accessories.module.js.map +1 -1
  32. package/dist/modules/accessories/accessories.service.d.ts +21 -3
  33. package/dist/modules/accessories/accessories.service.js +280 -17
  34. package/dist/modules/accessories/accessories.service.js.map +1 -1
  35. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +9 -0
  36. package/dist/modules/config-editor/config-editor.controller.d.ts +4 -0
  37. package/dist/modules/config-editor/config-editor.controller.js +64 -0
  38. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  39. package/dist/modules/config-editor/config-editor.service.d.ts +6 -1
  40. package/dist/modules/config-editor/config-editor.service.js +45 -1
  41. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  42. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  43. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  44. package/dist/modules/plugins/plugins.service.js +15 -0
  45. package/dist/modules/plugins/plugins.service.js.map +1 -1
  46. package/dist/modules/server/server.controller.d.ts +50 -0
  47. package/dist/modules/server/server.controller.js +201 -2
  48. package/dist/modules/server/server.controller.js.map +1 -1
  49. package/dist/modules/server/server.service.d.ts +48 -0
  50. package/dist/modules/server/server.service.js +502 -14
  51. package/dist/modules/server/server.service.js.map +1 -1
  52. package/dist/modules/status/status.gateway.d.ts +2 -0
  53. package/dist/modules/status/status.interfaces.d.ts +11 -0
  54. package/dist/modules/status/status.service.d.ts +4 -1
  55. package/dist/modules/status/status.service.js +21 -2
  56. package/dist/modules/status/status.service.js.map +1 -1
  57. package/docs/ssl-upload-pr.md +103 -0
  58. package/package.json +3 -1
  59. package/public/3rdpartylicenses.txt +52 -52
  60. package/public/assets/matter.svg +8 -0
  61. package/public/chunk-2G3RYG7T.js +4 -0
  62. package/public/{chunk-INEQMM2I.js → chunk-2OV2S53D.js} +1 -1
  63. package/public/{chunk-WZOQNFMH.js → chunk-2PQS43HJ.js} +1 -1
  64. package/public/chunk-3MP4NIEN.js +1 -0
  65. package/public/chunk-3NF5LSRS.js +1 -0
  66. package/public/{chunk-ABJURGQA.js → chunk-3OCGL4VG.js} +1 -1
  67. package/public/chunk-3OS2E7NT.js +1 -0
  68. package/public/chunk-3U4TTBN3.js +1 -0
  69. package/public/{chunk-QDT36PQN.js → chunk-4C4OAXTJ.js} +1 -1
  70. package/public/{chunk-QH66HEIY.js → chunk-4EQFXSOO.js} +1 -1
  71. package/public/{chunk-GOWJQFU3.js → chunk-4Y574DAY.js} +1 -1
  72. package/public/{chunk-PBN5VTOU.js → chunk-5FFAA6YO.js} +1 -1
  73. package/public/{chunk-SAWH3ANN.js → chunk-6AGYELAU.js} +1 -1
  74. package/public/{chunk-G4HQSJ23.js → chunk-6VUYO4JJ.js} +1 -1
  75. package/public/chunk-6Y44WRYZ.js +5 -0
  76. package/public/{chunk-IJB6PBR5.js → chunk-7RBF5X4H.js} +1 -1
  77. package/public/chunk-AEA5MWJV.js +1 -0
  78. package/public/chunk-AQ7KVNYY.js +1 -0
  79. package/public/chunk-BRVBWBXQ.js +1 -0
  80. package/public/{chunk-5DT3N4NO.js → chunk-BZZVKG3V.js} +1 -1
  81. package/public/{chunk-WGI4RZDV.js → chunk-CYZAN4CD.js} +1 -1
  82. package/public/{chunk-2ATI5RL3.js → chunk-DSA6B4PW.js} +1 -1
  83. package/public/chunk-DT7PMMCU.js +1 -0
  84. package/public/{chunk-TDRGDK3T.js → chunk-EXSN7ASU.js} +1 -1
  85. package/public/chunk-F5RNPJMD.js +16 -0
  86. package/public/{chunk-3TGMHJM3.js → chunk-FFBQ244V.js} +1 -1
  87. package/public/{chunk-E3OCSFY5.js → chunk-G4KDX4LF.js} +5 -5
  88. package/public/{chunk-XS5676NQ.js → chunk-GBXDLKOS.js} +1 -1
  89. package/public/{chunk-DN72EAQ5.js → chunk-HUESZB2Q.js} +1 -1
  90. package/public/{chunk-STKYISTF.js → chunk-HXBITOYP.js} +1 -1
  91. package/public/{chunk-OKTWUEQP.js → chunk-IC3ZXYWP.js} +1 -1
  92. package/public/{chunk-ERT4USI6.js → chunk-ICS7ZICH.js} +1 -1
  93. package/public/chunk-ILKO7HAU.js +68 -0
  94. package/public/chunk-JL6T3BSX.js +1 -0
  95. package/public/{chunk-4TYE7FOW.js → chunk-JXLJRPJS.js} +1 -1
  96. package/public/chunk-K3NHKO4E.js +1 -0
  97. package/public/{chunk-UD5DX3PK.js → chunk-K3PIHMRS.js} +1 -1
  98. package/public/chunk-KKHQOHXA.js +1 -0
  99. package/public/chunk-LGUE3JKA.js +1 -0
  100. package/public/chunk-LNBMZDII.js +1 -0
  101. package/public/{chunk-FKIJIVEG.js → chunk-LXMBIF6W.js} +1 -1
  102. package/public/chunk-M3CXG4MR.js +1 -0
  103. package/public/{chunk-LFWS6OUH.js → chunk-MA74SXNP.js} +1 -1
  104. package/public/chunk-N3WEHNOH.js +1 -0
  105. package/public/{chunk-726EPARV.js → chunk-NP2OU6PT.js} +1 -1
  106. package/public/chunk-NRCW2EPZ.js +50 -0
  107. package/public/{chunk-MGSFT332.js → chunk-OJ37C3YB.js} +1 -1
  108. package/public/{chunk-AY5APEAK.js → chunk-P2DQFTI7.js} +1 -1
  109. package/public/{chunk-B57RMJ4J.js → chunk-PYAOOAFS.js} +1 -1
  110. package/public/chunk-QRB4TY6A.js +1 -0
  111. package/public/chunk-QTWA67OK.js +2 -0
  112. package/public/{chunk-Z6SZHO36.js → chunk-RAWL26R7.js} +1 -1
  113. package/public/{chunk-5FAEMT7K.js → chunk-RFNZZH35.js} +1 -1
  114. package/public/{chunk-OQU6YMM6.js → chunk-RHJH4NAL.js} +1 -1
  115. package/public/{chunk-RWL56OKC.js → chunk-UASZBKBZ.js} +1 -1
  116. package/public/{chunk-N7EXU2NV.js → chunk-UCNN3X7L.js} +1 -1
  117. package/public/{chunk-UX77G732.js → chunk-UYFTDKBB.js} +1 -1
  118. package/public/{chunk-UD7BEYXY.js → chunk-VXWLFCOQ.js} +1 -1
  119. package/public/chunk-W7GOVRP4.js +1 -0
  120. package/public/{chunk-H5WFRSS4.js → chunk-WDFYORD4.js} +1 -1
  121. package/public/chunk-WL5GK7PI.js +19 -0
  122. package/public/{chunk-TNZDCJJB.js → chunk-WTSUWA7S.js} +1 -1
  123. package/public/{chunk-QONMKSXQ.js → chunk-XCJH7PUD.js} +1 -1
  124. package/public/{chunk-RFQQSATI.js → chunk-XKXSOWIU.js} +1 -1
  125. package/public/{chunk-DMDEAXJH.js → chunk-YCRH56FY.js} +1 -1
  126. package/public/{chunk-SQWHIT2O.js → chunk-ZMTA7EPT.js} +1 -1
  127. package/public/chunk-ZTJZA6OC.js +1 -0
  128. package/public/chunk-ZUM4REDQ.js +1 -0
  129. package/public/{chunk-RUWA3EFR.js → chunk-ZUYIWQNV.js} +1 -1
  130. package/public/index.html +2 -2
  131. package/public/main-ZIKN743D.js +1 -0
  132. package/public/media/matter-P563JGDL.svg +8 -0
  133. package/public/{styles-7EFV5QBG.css → styles-WNHDEKE4.css} +1 -1
  134. package/scripts/extract-plugin-alias.js +53 -2
  135. package/public/chunk-6FMRO7HY.js +0 -19
  136. package/public/chunk-6WCXE37R.js +0 -4
  137. package/public/chunk-ALWUQZSW.js +0 -1
  138. package/public/chunk-ASYRF2UP.js +0 -1
  139. package/public/chunk-BDFSTR4R.js +0 -1
  140. package/public/chunk-CKGQSHVZ.js +0 -1
  141. package/public/chunk-EZCJGSOY.js +0 -5
  142. package/public/chunk-HPLLPVW3.js +0 -1
  143. package/public/chunk-IHZHS7ZW.js +0 -40
  144. package/public/chunk-IR2HMKD2.js +0 -1
  145. package/public/chunk-J3RGEHLW.js +0 -1
  146. package/public/chunk-JEESCTKG.js +0 -16
  147. package/public/chunk-LKJ4JJLK.js +0 -1
  148. package/public/chunk-MJHLBHHD.js +0 -1
  149. package/public/chunk-MK4QUOAX.js +0 -1
  150. package/public/chunk-RV34PNIK.js +0 -1
  151. package/public/chunk-S2OEXAQE.js +0 -1
  152. package/public/chunk-SBHNM2QO.js +0 -1
  153. package/public/chunk-SDSUBQRV.js +0 -2
  154. package/public/chunk-TTFY54LY.js +0 -1
  155. package/public/chunk-TXPIYSRT.js +0 -50
  156. package/public/chunk-VLO3EC7G.js +0 -1
  157. package/public/chunk-X4UYQV4U.js +0 -1
  158. package/public/chunk-XDYNVDC3.js +0 -1
  159. package/public/chunk-YHWOJFWU.js +0 -1
  160. package/public/main-BIEDFTMT.js +0 -1
@@ -0,0 +1,68 @@
1
+ import{a as lt,b as Ie,c as K}from"./chunk-3U4TTBN3.js";import{m as X,n as J}from"./chunk-G4KDX4LF.js";import{C as ee,a as rn,e as oe,l as re}from"./chunk-ICS7ZICH.js";import{a as Z}from"./chunk-N3WEHNOH.js";import{b as be}from"./chunk-JL6T3BSX.js";import{l as T}from"./chunk-LGUE3JKA.js";import{$b as v,Ab as ne,Bb as le,Bc as si,Ca as Ui,Cb as xe,Db as Xi,Eb as Ji,Fa as ji,H as Oi,Ib as $,J as Ni,La as Re,Lb as C,Nb as f,P as Y,Qa as r,Rc as E,Sa as Xe,T as $i,Ta as Gi,Xb as qe,Xc as De,Yb as Lt,Za as zi,_a as It,_b as p,_c as Se,ac as y,bc as F,cc as Ne,db as M,dc as en,ec as rt,fb as qi,fc as W,gb as Zi,gc as U,ha as Ri,hc as j,ia as Wi,kc as tn,lc as ye,mc as N,n as Q,na as b,nc as V,o as Hi,oc as at,pb as x,pc as st,qb as _,qc as nn,rb as k,rc as on,sa as D,sc as l,ta as I,tb as Ki,tc as c,ua as B,ub as Qi,uc as se,va as L,vb as Yi,wb as u,xb as n,ya as ie,yb as s,zb as m}from"./chunk-6Y44WRYZ.js";var Je=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(Je||{}),Fe=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(Fe||{});function Gr(e){return Pt(e)&&typeof e.from=="function"}function Pt(e){return typeof e=="object"&&typeof e.to=="function"}function an(e){e.parentElement.removeChild(e)}function li(e){return e!=null}function sn(e){e.preventDefault()}function zr(e){return e.filter(function(a){return this[a]?!1:this[a]=!0},{})}function qr(e,a){return Math.round(e/a)*a}function Zr(e,a){var t=e.getBoundingClientRect(),o=e.ownerDocument,i=o.documentElement,d=dn(o);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(d.x=0),a?t.top+d.y-i.clientTop:t.left+d.x-i.clientLeft}function We(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function ln(e,a,t){t>0&&(Le(e,a),setTimeout(function(){At(e,a)},t))}function cn(e){return Math.max(Math.min(e,100),0)}function Ft(e){return Array.isArray(e)?e:[e]}function Kr(e){e=String(e);var a=e.split(".");return a.length>1?a[1].length:0}function Le(e,a){e.classList&&!/\s/.test(a)?e.classList.add(a):e.className+=" "+a}function At(e,a){e.classList&&!/\s/.test(a)?e.classList.remove(a):e.className=e.className.replace(new RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," ")}function Qr(e,a){return e.classList?e.classList.contains(a):new RegExp("\\b"+a+"\\b").test(e.className)}function dn(e){var a=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",o=a?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=a?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:o,y:i}}function Yr(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Xr(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,a)}catch{}return e}function Jr(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function pi(e,a){return 100/(a-e)}function ci(e,a,t){return a*100/(e[t+1]-e[t])}function ea(e,a){return ci(e,e[0]<0?a+Math.abs(e[0]):a-e[0],0)}function ta(e,a){return a*(e[1]-e[0])/100+e[0]}function _t(e,a){for(var t=1;e>=a[t];)t+=1;return t}function ia(e,a,t){if(t>=e.slice(-1)[0])return 100;var o=_t(t,e),i=e[o-1],d=e[o],h=a[o-1],te=a[o];return h+ea([i,d],t)/pi(h,te)}function na(e,a,t){if(t>=100)return e.slice(-1)[0];var o=_t(t,a),i=e[o-1],d=e[o],h=a[o-1],te=a[o];return ta([i,d],(t-h)*pi(h,te))}function oa(e,a,t,o){if(o===100)return o;var i=_t(o,e),d=e[i-1],h=e[i];return t?o-d>(h-d)/2?h:d:a[i-1]?e[i-1]+qr(o-e[i-1],a[i-1]):o}var ra=(function(){function e(a,t,o){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[o||!1],this.xNumSteps=[!1],this.snap=t;var i,d=[];for(Object.keys(a).forEach(function(h){d.push([Ft(a[h]),h])}),d.sort(function(h,te){return h[0][0]-te[0][0]}),i=0;i<d.length;i++)this.handleEntryPoint(d[i][1],d[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(a){for(var t=[],o=0;o<this.xNumSteps.length-1;o++)t[o]=ci(this.xVal,a,o);return t},e.prototype.getAbsoluteDistance=function(a,t,o){var i=0;if(a<this.xPct[this.xPct.length-1])for(;a>this.xPct[i+1];)i++;else a===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!o&&a===this.xPct[i+1]&&i++,t===null&&(t=[]);var d,h=1,te=t[i],de=0,z=0,ce=0,ve=0;for(o?d=(a-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):d=(this.xPct[i+1]-a)/(this.xPct[i+1]-this.xPct[i]);te>0;)de=this.xPct[i+1+ve]-this.xPct[i+ve],t[i+ve]*h+100-d*100>100?(z=de*d,h=(te-100*d)/t[i+ve],d=1):(z=t[i+ve]*de/100*h,h=0),o?(ce=ce-z,this.xPct.length+ve>=1&&ve--):(ce=ce+z,this.xPct.length-ve>=1&&ve++),te=t[i+ve]*h;return a+ce},e.prototype.toStepping=function(a){return a=ia(this.xVal,this.xPct,a),a},e.prototype.fromStepping=function(a){return na(this.xVal,this.xPct,a)},e.prototype.getStep=function(a){return a=oa(this.xPct,this.xSteps,this.snap,a),a},e.prototype.getDefaultStep=function(a,t,o){var i=_t(a,this.xPct);return(a===100||t&&a===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/o},e.prototype.getNearbySteps=function(a){var t=_t(a,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var a=this.xNumSteps.map(Kr);return Math.max.apply(null,a)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(a){return this.getStep(this.toStepping(a))},e.prototype.handleEntryPoint=function(a,t){var o;if(a==="min"?o=0:a==="max"?o=100:o=parseFloat(a),!We(o)||!We(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(o),this.xVal.push(t[0]);var i=Number(t[1]);o?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(a,t){if(t){if(this.xVal[a]===this.xVal[a+1]){this.xSteps[a]=this.xHighestCompleteStep[a]=this.xVal[a];return}this.xSteps[a]=ci([this.xVal[a],this.xVal[a+1]],t,0)/pi(this.xPct[a],this.xPct[a+1]);var o=(this.xVal[a+1]-this.xVal[a])/this.xNumSteps[a],i=Math.ceil(Number(o.toFixed(3))-1),d=this.xVal[a]+this.xNumSteps[a]*i;this.xHighestCompleteStep[a]=d}},e})(),pn={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},aa={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},Ze={tooltips:".__tooltips",aria:".__aria"};function sa(e,a){if(!We(a))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=a}function la(e,a){if(!We(a))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=a}function ca(e,a){if(!We(a))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=a}function pa(e,a){if(!We(a))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=a}function da(e,a){if(typeof a!="object"||Array.isArray(a))throw new Error("noUiSlider: 'range' is not an object.");if(a.min===void 0||a.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new ra(a,e.snap||!1,e.singleStep)}function ma(e,a){if(a=Ft(a),!Array.isArray(a)||!a.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=a.length,e.start=a}function ua(e,a){if(typeof a!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=a}function fa(e,a){if(typeof a!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=a}function va(e,a){if(typeof a!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=a}function mn(e,a){var t=[!1],o;if(a==="lower"?a=[!0,!1]:a==="upper"&&(a=[!1,!0]),a===!0||a===!1){for(o=1;o<e.handles;o++)t.push(a);t.push(!1)}else{if(!Array.isArray(a)||!a.length||a.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=a}e.connect=t}function ga(e,a){switch(a){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function un(e,a){if(!We(a))throw new Error("noUiSlider: 'margin' option must be numeric.");a!==0&&(e.margin=e.spectrum.getDistance(a))}function ha(e,a){if(!We(a))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(a),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Ca(e,a){var t;if(!We(a)&&!Array.isArray(a))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(a)&&!(a.length===2||We(a[0])||We(a[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(a!==0){for(Array.isArray(a)||(a=[a,a]),e.padding=[e.spectrum.getDistance(a[0]),e.spectrum.getDistance(a[1])],t=0;t<e.spectrum.xNumSteps.length-1;t++)if(e.padding[0][t]<0||e.padding[1][t]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var o=a[0]+a[1],i=e.spectrum.xVal[0],d=e.spectrum.xVal[e.spectrum.xVal.length-1];if(o/(d-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function ya(e,a){switch(a){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function xa(e,a){if(typeof a!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=a.indexOf("tap")>=0,o=a.indexOf("drag")>=0,i=a.indexOf("fixed")>=0,d=a.indexOf("snap")>=0,h=a.indexOf("hover")>=0,te=a.indexOf("unconstrained")>=0,de=a.indexOf("invert-connects")>=0,z=a.indexOf("drag-all")>=0,ce=a.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");un(e,e.start[1]-e.start[0])}if(de&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(te&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||d,drag:o,dragAll:z,smoothSteps:ce,fixed:i,snap:d,hover:h,unconstrained:te,invertConnects:de}}function _a(e,a){if(a!==!1)if(a===!0||Pt(a)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(a)}else{if(a=Ft(a),a.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");a.forEach(function(o){if(typeof o!="boolean"&&!Pt(o))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=a}}function ka(e,a){if(a.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=a}function Sa(e,a){if(!Pt(a))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=a}function ba(e,a){if(!Gr(a))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=a}function Ma(e,a){if(typeof a!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=a}function Ta(e,a){e.documentElement=a}function wa(e,a){if(typeof a!="string"&&a!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=a}function Ea(e,a){if(typeof a!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(a).forEach(function(t){e.cssClasses[t]=e.cssPrefix+a[t]})):e.cssClasses=a}function fn(e){var a={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:pn,format:pn},t={step:{r:!1,t:sa},keyboardPageMultiplier:{r:!1,t:la},keyboardMultiplier:{r:!1,t:ca},keyboardDefaultStep:{r:!1,t:pa},start:{r:!0,t:ma},connect:{r:!0,t:mn},direction:{r:!0,t:ya},snap:{r:!1,t:ua},animate:{r:!1,t:fa},animationDuration:{r:!1,t:va},range:{r:!0,t:da},orientation:{r:!1,t:ga},margin:{r:!1,t:un},limit:{r:!1,t:ha},padding:{r:!1,t:Ca},behaviour:{r:!0,t:xa},ariaFormat:{r:!1,t:Sa},format:{r:!1,t:ba},tooltips:{r:!1,t:_a},keyboardSupport:{r:!0,t:Ma},documentElement:{r:!1,t:Ta},cssPrefix:{r:!0,t:wa},cssClasses:{r:!0,t:Ea},handleAttributes:{r:!1,t:ka}},o={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:aa,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(de){if(!li(e[de])&&o[de]===void 0){if(t[de].r)throw new Error("noUiSlider: '"+de+"' is required.");return}t[de].t(a,li(e[de])?e[de]:o[de])}),a.pips=e.pips;var i=document.createElement("div"),d=i.style.msTransform!==void 0,h=i.style.transform!==void 0;a.transformRule=h?"transform":d?"msTransform":"webkitTransform";var te=[["left","top"],["right","bottom"]];return a.style=te[a.dir][a.ort],a}function Ba(e,a,t){var o=Yr(),i=Jr(),d=i&&Xr(),h=e,te,de,z,ce,ve,Be,pe=a.spectrum,je=[],ge=[],Pe=[],zt=0,Ge={},Ct=!1,ot=e.ownerDocument,wt=a.documentElement||ot.documentElement,Et=ot.body,Cr=ot.dir==="rtl"||a.ort===1?0:100;function ze(g,S){var w=ot.createElement("div");return S&&Le(w,S),g.appendChild(w),w}function yr(g,S){var w=ze(g,a.cssClasses.origin),A=ze(w,a.cssClasses.handle);if(ze(A,a.cssClasses.touchArea),A.setAttribute("data-handle",String(S)),a.keyboardSupport&&(A.setAttribute("tabindex","0"),A.addEventListener("keydown",function(O){return Pr(O,S)})),a.handleAttributes!==void 0){var H=a.handleAttributes[S];Object.keys(H).forEach(function(O){A.setAttribute(O,H[O])})}return A.setAttribute("role","slider"),A.setAttribute("aria-orientation",a.ort?"vertical":"horizontal"),S===0?Le(A,a.cssClasses.handleLower):S===a.handles-1&&Le(A,a.cssClasses.handleUpper),w.handle=A,w}function qt(g,S){return S?ze(g,a.cssClasses.connect):!1}function xr(g,S){de=ze(S,a.cssClasses.connects),z=[],ce=[],ce.push(qt(de,g[0]));for(var w=0;w<a.handles;w++)z.push(yr(S,w)),Pe[w]=w,ce.push(qt(de,g[w+1]))}function _r(g){Le(g,a.cssClasses.target),a.dir===0?Le(g,a.cssClasses.ltr):Le(g,a.cssClasses.rtl),a.ort===0?Le(g,a.cssClasses.horizontal):Le(g,a.cssClasses.vertical);var S=getComputedStyle(g).direction;return S==="rtl"?Le(g,a.cssClasses.textDirectionRtl):Le(g,a.cssClasses.textDirectionLtr),ze(g,a.cssClasses.base)}function kr(g,S){return!a.tooltips||!a.tooltips[S]?!1:ze(g.firstChild,a.cssClasses.tooltip)}function ki(){return h.hasAttribute("disabled")}function Zt(g){var S=z[g];return S.hasAttribute("disabled")}function Sr(g){g!=null?(z[g].setAttribute("disabled",""),z[g].handle.removeAttribute("tabindex")):(h.setAttribute("disabled",""),z.forEach(function(S){S.handle.removeAttribute("tabindex")}))}function br(g){g!=null?(z[g].removeAttribute("disabled"),z[g].handle.setAttribute("tabindex","0")):(h.removeAttribute("disabled"),z.forEach(function(S){S.removeAttribute("disabled"),S.handle.setAttribute("tabindex","0")}))}function Kt(){Be&&(yt("update"+Ze.tooltips),Be.forEach(function(g){g&&an(g)}),Be=null)}function Si(){Kt(),Be=z.map(kr),ei("update"+Ze.tooltips,function(g,S,w){if(!(!Be||!a.tooltips)&&Be[S]!==!1){var A=g[S];a.tooltips[S]!==!0&&(A=a.tooltips[S].to(w[S])),Be[S].innerHTML=A}})}function Mr(){yt("update"+Ze.aria),ei("update"+Ze.aria,function(g,S,w,A,H){Pe.forEach(function(O){var q=z[O],R=Bt(ge,O,0,!0,!0,!0),ue=Bt(ge,O,100,!0,!0,!0),fe=H[O],he=String(a.ariaFormat.to(w[O]));R=pe.fromStepping(R).toFixed(1),ue=pe.fromStepping(ue).toFixed(1),fe=pe.fromStepping(fe).toFixed(1),q.children[0].setAttribute("aria-valuemin",R),q.children[0].setAttribute("aria-valuemax",ue),q.children[0].setAttribute("aria-valuenow",fe),q.children[0].setAttribute("aria-valuetext",he)})})}function Tr(g){if(g.mode===Je.Range||g.mode===Je.Steps)return pe.xVal;if(g.mode===Je.Count){if(g.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var S=g.values-1,w=100/S,A=[];S--;)A[S]=S*w;return A.push(100),bi(A,g.stepped)}return g.mode===Je.Positions?bi(g.values,g.stepped):g.mode===Je.Values?g.stepped?g.values.map(function(H){return pe.fromStepping(pe.getStep(pe.toStepping(H)))}):g.values:[]}function bi(g,S){return g.map(function(w){return pe.fromStepping(S?pe.getStep(w):w)})}function wr(g){function S(fe,he){return Number((fe+he).toFixed(7))}var w=Tr(g),A={},H=pe.xVal[0],O=pe.xVal[pe.xVal.length-1],q=!1,R=!1,ue=0;return w=zr(w.slice().sort(function(fe,he){return fe-he})),w[0]!==H&&(w.unshift(H),q=!0),w[w.length-1]!==O&&(w.push(O),R=!0),w.forEach(function(fe,he){var Ce,me,ke,Ve=fe,Te=w[he+1],we,ni,oi,ri,Ai,ai,Pi,Fi=g.mode===Je.Steps;for(Fi&&(Ce=pe.xNumSteps[he]),Ce||(Ce=Te-Ve),Te===void 0&&(Te=Ve),Ce=Math.max(Ce,1e-7),me=Ve;me<=Te;me=S(me,Ce)){for(we=pe.toStepping(me),ni=we-ue,Ai=ni/(g.density||1),ai=Math.round(Ai),Pi=ni/ai,ke=1;ke<=ai;ke+=1)oi=ue+ke*Pi,A[oi.toFixed(5)]=[pe.fromStepping(oi),0];ri=w.indexOf(me)>-1?Fe.LargeValue:Fi?Fe.SmallValue:Fe.NoValue,!he&&q&&me!==Te&&(ri=0),me===Te&&R||(A[we.toFixed(5)]=[me,ri]),ue=we}}),A}function Er(g,S,w){var A,H,O=ot.createElement("div"),q=(A={},A[Fe.None]="",A[Fe.NoValue]=a.cssClasses.valueNormal,A[Fe.LargeValue]=a.cssClasses.valueLarge,A[Fe.SmallValue]=a.cssClasses.valueSub,A),R=(H={},H[Fe.None]="",H[Fe.NoValue]=a.cssClasses.markerNormal,H[Fe.LargeValue]=a.cssClasses.markerLarge,H[Fe.SmallValue]=a.cssClasses.markerSub,H),ue=[a.cssClasses.valueHorizontal,a.cssClasses.valueVertical],fe=[a.cssClasses.markerHorizontal,a.cssClasses.markerVertical];Le(O,a.cssClasses.pips),Le(O,a.ort===0?a.cssClasses.pipsHorizontal:a.cssClasses.pipsVertical);function he(me,ke){var Ve=ke===a.cssClasses.value,Te=Ve?ue:fe,we=Ve?q:R;return ke+" "+Te[a.ort]+" "+we[me]}function Ce(me,ke,Ve){if(Ve=S?S(ke,Ve):Ve,Ve!==Fe.None){var Te=ze(O,!1);Te.className=he(Ve,a.cssClasses.marker),Te.style[a.style]=me+"%",Ve>Fe.NoValue&&(Te=ze(O,!1),Te.className=he(Ve,a.cssClasses.value),Te.setAttribute("data-value",String(ke)),Te.style[a.style]=me+"%",Te.innerHTML=String(w.to(ke)))}}return Object.keys(g).forEach(function(me){Ce(me,g[me][0],g[me][1])}),O}function Qt(){ve&&(an(ve),ve=null)}function Yt(g){Qt();var S=wr(g),w=g.filter,A=g.format||{to:function(H){return String(Math.round(H))}};return ve=h.appendChild(Er(S,w,A)),ve}function Mi(){var g=te.getBoundingClientRect(),S="offset"+["Width","Height"][a.ort];return a.ort===0?g.width||te[S]:g.height||te[S]}function Qe(g,S,w,A){var H=function(q){var R=Br(q,A.pageOffset,A.target||S);if(!R||ki()&&!A.doNotReject||Qr(h,a.cssClasses.tap)&&!A.doNotReject||g===o.start&&R.buttons!==void 0&&R.buttons>1||A.hover&&R.buttons)return!1;d||R.preventDefault(),R.calcPoint=R.points[a.ort],w(R,A)},O=[];return g.split(" ").forEach(function(q){S.addEventListener(q,H,d?{passive:!0}:!1),O.push([q,H])}),O}function Br(g,S,w){var A=g.type.indexOf("touch")===0,H=g.type.indexOf("mouse")===0,O=g.type.indexOf("pointer")===0,q=0,R=0;if(g.type.indexOf("MSPointer")===0&&(O=!0),g.type==="mousedown"&&!g.buttons&&!g.touches)return!1;if(A){var ue=function(Ce){var me=Ce.target;return me===w||w.contains(me)||g.composed&&g.composedPath().shift()===w};if(g.type==="touchstart"){var fe=Array.prototype.filter.call(g.touches,ue);if(fe.length>1)return!1;q=fe[0].pageX,R=fe[0].pageY}else{var he=Array.prototype.find.call(g.changedTouches,ue);if(!he)return!1;q=he.pageX,R=he.pageY}}return S=S||dn(ot),(H||O)&&(q=g.clientX+S.x,R=g.clientY+S.y),g.pageOffset=S,g.points=[q,R],g.cursor=H||O,g}function Ti(g){var S=g-Zr(te,a.ort),w=S*100/Mi();return w=cn(w),a.dir?100-w:w}function Vr(g){var S=100,w=!1;return z.forEach(function(A,H){if(!Zt(H)){var O=ge[H],q=Math.abs(O-g),R=q===100&&S===100,ue=q<S,fe=q<=S&&g>O;(ue||fe||R)&&(w=H,S=q)}}),w}function Dr(g,S){g.type==="mouseout"&&g.target.nodeName==="HTML"&&g.relatedTarget===null&&Xt(g,S)}function Ir(g,S){if(navigator.appVersion.indexOf("MSIE 9")===-1&&g.buttons===0&&S.buttonsProperty!==0)return Xt(g,S);var w=(a.dir?-1:1)*(g.calcPoint-S.startCalcPoint),A=w*100/S.baseSize;Ei(w>0,A,S.locations,S.handleNumbers,S.connect)}function Xt(g,S){S.handle&&(At(S.handle,a.cssClasses.active),zt-=1),S.listeners.forEach(function(w){wt.removeEventListener(w[0],w[1])}),zt===0&&(At(h,a.cssClasses.drag),ii(),g.cursor&&(Et.style.cursor="",Et.removeEventListener("selectstart",sn))),a.events.smoothSteps&&(S.handleNumbers.forEach(function(w){Ye(w,ge[w],!0,!0,!1,!1)}),S.handleNumbers.forEach(function(w){_e("update",w)})),S.handleNumbers.forEach(function(w){_e("change",w),_e("set",w),_e("end",w)})}function Jt(g,S){if(!S.handleNumbers.some(Zt)){var w;if(S.handleNumbers.length===1){var A=z[S.handleNumbers[0]];w=A.children[0],zt+=1,Le(w,a.cssClasses.active)}g.stopPropagation();var H=[],O=Qe(o.move,wt,Ir,{target:g.target,handle:w,connect:S.connect,listeners:H,startCalcPoint:g.calcPoint,baseSize:Mi(),pageOffset:g.pageOffset,handleNumbers:S.handleNumbers,buttonsProperty:g.buttons,locations:ge.slice()}),q=Qe(o.end,wt,Xt,{target:g.target,handle:w,listeners:H,doNotReject:!0,handleNumbers:S.handleNumbers}),R=Qe("mouseout",wt,Dr,{target:g.target,handle:w,listeners:H,doNotReject:!0,handleNumbers:S.handleNumbers});H.push.apply(H,O.concat(q,R)),g.cursor&&(Et.style.cursor=getComputedStyle(g.target).cursor,z.length>1&&Le(h,a.cssClasses.drag),Et.addEventListener("selectstart",sn,!1)),S.handleNumbers.forEach(function(ue){_e("start",ue)})}}function Lr(g){g.stopPropagation();var S=Ti(g.calcPoint),w=Vr(S);w!==!1&&(a.events.snap||ln(h,a.cssClasses.tap,a.animationDuration),Ye(w,S,!0,!0),ii(),_e("slide",w,!0),_e("update",w,!0),a.events.snap?Jt(g,{handleNumbers:[w]}):(_e("change",w,!0),_e("set",w,!0)))}function Ar(g){var S=Ti(g.calcPoint),w=pe.getStep(S),A=pe.fromStepping(w);Object.keys(Ge).forEach(function(H){H.split(".")[0]==="hover"&&Ge[H].forEach(function(O){O.call(Dt,A)})})}function Pr(g,S){if(ki()||Zt(S))return!1;var w=["Left","Right"],A=["Down","Up"],H=["PageDown","PageUp"],O=["Home","End"];a.dir&&!a.ort?w.reverse():a.ort&&!a.dir&&(A.reverse(),H.reverse());var q=g.key.replace("Arrow",""),R=q===H[0],ue=q===H[1],fe=q===A[0]||q===w[0]||R,he=q===A[1]||q===w[1]||ue,Ce=q===O[0],me=q===O[1];if(!fe&&!he&&!Ce&&!me)return!0;g.preventDefault();var ke;if(he||fe){var Ve=fe?0:1,Te=Ii(S),we=Te[Ve];if(we===null)return!1;we===!1&&(we=pe.getDefaultStep(ge[S],fe,a.keyboardDefaultStep)),ue||R?we*=a.keyboardPageMultiplier:we*=a.keyboardMultiplier,we=Math.max(we,1e-7),we=(fe?-1:1)*we,ke=je[S]+we}else me?ke=a.spectrum.xVal[a.spectrum.xVal.length-1]:ke=a.spectrum.xVal[0];return Ye(S,pe.toStepping(ke),!0,!0),_e("slide",S),_e("update",S),_e("change",S),_e("set",S),!1}function wi(g){g.fixed||z.forEach(function(S,w){Qe(o.start,S.children[0],Jt,{handleNumbers:[w]})}),g.tap&&Qe(o.start,te,Lr,{}),g.hover&&Qe(o.move,te,Ar,{hover:!0}),g.drag&&ce.forEach(function(S,w){if(!(S===!1||w===0||w===ce.length-1)){var A=z[w-1],H=z[w],O=[S],q=[A,H],R=[w-1,w];Le(S,a.cssClasses.draggable),g.fixed&&(O.push(A.children[0]),O.push(H.children[0])),g.dragAll&&(q=z,R=Pe),O.forEach(function(ue){Qe(o.start,ue,Jt,{handles:q,handleNumbers:R,connect:S})})}})}function ei(g,S){Ge[g]=Ge[g]||[],Ge[g].push(S),g.split(".")[0]==="update"&&z.forEach(function(w,A){_e("update",A)})}function Fr(g){return g===Ze.aria||g===Ze.tooltips}function yt(g){var S=g&&g.split(".")[0],w=S?g.substring(S.length):g;Object.keys(Ge).forEach(function(A){var H=A.split(".")[0],O=A.substring(H.length);(!S||S===H)&&(!w||w===O)&&(!Fr(O)||w===O)&&delete Ge[A]})}function _e(g,S,w){Object.keys(Ge).forEach(function(A){var H=A.split(".")[0];g===H&&Ge[A].forEach(function(O){O.call(Dt,je.map(a.format.to),S,je.slice(),w||!1,ge.slice(),Dt)})})}function Bt(g,S,w,A,H,O,q){var R;return z.length>1&&!a.events.unconstrained&&(A&&S>0&&(R=pe.getAbsoluteDistance(g[S-1],a.margin,!1),w=Math.max(w,R)),H&&S<z.length-1&&(R=pe.getAbsoluteDistance(g[S+1],a.margin,!0),w=Math.min(w,R))),z.length>1&&a.limit&&(A&&S>0&&(R=pe.getAbsoluteDistance(g[S-1],a.limit,!1),w=Math.min(w,R)),H&&S<z.length-1&&(R=pe.getAbsoluteDistance(g[S+1],a.limit,!0),w=Math.max(w,R))),a.padding&&(S===0&&(R=pe.getAbsoluteDistance(0,a.padding[0],!1),w=Math.max(w,R)),S===z.length-1&&(R=pe.getAbsoluteDistance(100,a.padding[1],!0),w=Math.min(w,R))),q||(w=pe.getStep(w)),w=cn(w),w===g[S]&&!O?!1:w}function ti(g,S){var w=a.ort;return(w?S:g)+", "+(w?g:S)}function Ei(g,S,w,A,H){var O=w.slice(),q=A[0],R=a.events.smoothSteps,ue=[!g,g],fe=[g,!g];A=A.slice(),g&&A.reverse(),A.length>1?A.forEach(function(Ce,me){var ke=Bt(O,Ce,O[Ce]+S,ue[me],fe[me],!1,R);ke===!1?S=0:(S=ke-O[Ce],O[Ce]=ke)}):ue=fe=[!0];var he=!1;A.forEach(function(Ce,me){he=Ye(Ce,w[Ce]+S,ue[me],fe[me],!1,R)||he}),he&&(A.forEach(function(Ce){_e("update",Ce),_e("slide",Ce)}),H!=null&&_e("drag",q))}function Bi(g,S){return a.dir?100-g-S:g}function Hr(g,S){ge[g]=S,je[g]=pe.fromStepping(S);var w=Bi(S,0)-Cr,A="translate("+ti(w+"%","0")+")";if(z[g].style[a.transformRule]=A,a.events.invertConnects&&ge.length>1){var H=ge.every(function(O,q,R){return q===0||O>=R[q-1]});if(Ct!==!H){Ur();return}}xt(g),xt(g+1),Ct&&(xt(g-1),xt(g+2))}function ii(){Pe.forEach(function(g){var S=ge[g]>50?-1:1,w=3+(z.length+S*g);z[g].style.zIndex=String(w)})}function Ye(g,S,w,A,H,O){return H||(S=Bt(ge,g,S,w,A,!1,O)),S===!1?!1:(Hr(g,S),!0)}function xt(g){if(ce[g]){var S=ge.slice();Ct&&S.sort(function(R,ue){return R-ue});var w=0,A=100;g!==0&&(w=S[g-1]),g!==ce.length-1&&(A=S[g]);var H=A-w,O="translate("+ti(Bi(w,H)+"%","0")+")",q="scale("+ti(H/100,"1")+")";ce[g].style[a.transformRule]=O+" "+q}}function Vi(g,S){return g===null||g===!1||g===void 0||(typeof g=="number"&&(g=String(g)),g=a.format.from(g),g!==!1&&(g=pe.toStepping(g)),g===!1||isNaN(g))?ge[S]:g}function Vt(g,S,w){var A=Ft(g),H=ge[0]===void 0;S=S===void 0?!0:S,a.animate&&!H&&ln(h,a.cssClasses.tap,a.animationDuration),Pe.forEach(function(R){Ye(R,Vi(A[R],R),!0,!1,w)});var O=Pe.length===1?0:1;if(H&&pe.hasNoSize()&&(w=!0,ge[0]=0,Pe.length>1)){var q=100/(Pe.length-1);Pe.forEach(function(R){ge[R]=R*q})}for(;O<Pe.length;++O)Pe.forEach(function(R){Ye(R,ge[R],!0,!0,w)});ii(),Pe.forEach(function(R){_e("update",R),A[R]!==null&&S&&_e("set",R)})}function Or(g){Vt(a.start,g)}function Nr(g,S,w,A){if(g=Number(g),!(g>=0&&g<Pe.length))throw new Error("noUiSlider: invalid handle number, got: "+g);Ye(g,Vi(S,g),!0,!0,A),_e("update",g),w&&_e("set",g)}function Di(g){if(g===void 0&&(g=!1),g)return je.length===1?je[0]:je.slice(0);var S=je.map(a.format.to);return S.length===1?S[0]:S}function $r(){for(yt(Ze.aria),yt(Ze.tooltips),Object.keys(a.cssClasses).forEach(function(g){At(h,a.cssClasses[g])});h.firstChild;)h.removeChild(h.firstChild);delete h.noUiSlider}function Ii(g){var S=ge[g],w=pe.getNearbySteps(S),A=je[g],H=w.thisStep.step,O=null;if(a.snap)return[A-w.stepBefore.startValue||null,w.stepAfter.startValue-A||null];H!==!1&&A+H>w.stepAfter.startValue&&(H=w.stepAfter.startValue-A),A>w.thisStep.startValue?O=w.thisStep.step:w.stepBefore.step===!1?O=!1:O=A-w.stepBefore.highestStep,S===100?H=null:S===0&&(O=null);var q=pe.countStepDecimals();return H!==null&&H!==!1&&(H=Number(H.toFixed(q))),O!==null&&O!==!1&&(O=Number(O.toFixed(q))),[O,H]}function Rr(){return Pe.map(Ii)}function Wr(g,S){var w=Di(),A=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];A.forEach(function(O){g[O]!==void 0&&(t[O]=g[O])});var H=fn(t);A.forEach(function(O){g[O]!==void 0&&(a[O]=H[O])}),pe=H.spectrum,a.margin=H.margin,a.limit=H.limit,a.padding=H.padding,a.pips?Yt(a.pips):Qt(),a.tooltips?Si():Kt(),ge=[],Vt(li(g.start)?g.start:w,S),g.connect&&Li()}function Li(){for(;de.firstChild;)de.removeChild(de.firstChild);for(var g=0;g<=a.handles;g++)ce[g]=qt(de,a.connect[g]),xt(g);wi({drag:a.events.drag,fixed:!0})}function Ur(){Ct=!Ct,mn(a,a.connect.map(function(g){return!g})),Li()}function jr(){te=_r(h),xr(a.connect,te),wi(a.events),Vt(a.start),a.pips&&Yt(a.pips),a.tooltips&&Si(),Mr()}jr();var Dt={destroy:$r,steps:Rr,on:ei,off:yt,get:Di,set:Vt,setHandle:Nr,reset:Or,disable:Sr,enable:br,__moveHandles:function(g,S,w){Ei(g,S,ge,w)},options:t,updateOptions:Wr,target:h,removePips:Qt,removeTooltips:Kt,getPositions:function(){return ge.slice()},getTooltips:function(){return Be},getOrigins:function(){return z},pips:Yt};return Dt}function vn(e,a){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var t=fn(a),o=Ba(e,t,a);return e.noUiSlider=o,o}var di=class{to(a){return String(parseFloat(parseFloat(String(a)).toFixed(2)))}from(a){return parseFloat(a)}},ae=(()=>{class e{constructor(t,o,i){this.ngZone=t,this.el=o,this.renderer=i,this.handles=[],this.config={},this.change=new Xe(!0),this.update=new Xe(!0),this.slide=new Xe(!0),this.set=new Xe(!0),this.start=new Xe(!0),this.end=new Xe(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(d,h,te,de)=>{let z=this.toValues(h),ce=!1;if(this.value===void 0){this.value=z;return}Array.isArray(z)&&this.value[te]!=z[te]&&(ce=!0),!Array.isArray(z)&&this.value!=z&&(ce=!0),ce&&this.ngZone.run(()=>{d.observers.length>0&&d.emit(z),this.onChange(z)}),Array.isArray(z)?this.value[te]=z[te]:this.value=z},this.defaultKeyHandler=d=>{let h=this.slider.steps(),te=parseInt(d.target.getAttribute("data-handle")),de=1,z=1,ce=0,ve=0;switch(d.which){case 34:z=this.config.pageSteps;break;case 40:case 37:de=-1,ce=h[te][0],d.preventDefault();break;case 33:z=this.config.pageSteps;break;case 38:case 39:ce=h[te][1],d.preventDefault();break;default:break}ve=de*z*ce;let Be;Array.isArray(this.value)?(Be=[...this.value],Be[te]=Be[te]+ve):Be=this.value+ve,this.slider.set(Be)}}ngOnChanges(t){this.slider&&(t.min||t.max||t.step||t.range)&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.updateOptions({range:Object.assign({},{min:this.min,max:this.max},this.range||{}),step:this.step})})})}ngOnDestroy(){for(this.slider.destroy();this.cleanups.length;)this.cleanups.pop()?.()}toValues(t){let o=t.map(this.config.format.from);return o.length==1?o[0]:o}writeValue(t){this.slider?this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.set(t)})}):t!==null&&(this.value=t,this.createSlider(t))}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){t?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")}createSlider(t){let o=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:t,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(o.tooltips=this.tooltips||this.config.tooltips,o.format=this.format||this.config.format||new di,this.ngZone.runOutsideAngular(()=>{this.slider=vn(this.el.nativeElement.querySelector("div"),Object.assign(this.config,o))}),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===void 0&&(this.config.pageSteps=10);for(let i of this.handles){i.setAttribute("tabindex",0);let d=this.config.onKeydown||this.defaultKeyHandler;this.ngZone.runOutsideAngular(()=>{this.cleanups.push(this.renderer.listen(i,"keydown",d),this.renderer.listen(i,"click",()=>{i.focus()}))})}}this.slider.on("set",(i,d,h)=>{this.eventHandler(this.set,i,d,h)}),this.slider.on("update",(i,d,h)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,d,h)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,d,h)=>{this.eventHandler(this.slide,i,d,h)}),this.slider.on("start",(i,d,h)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,d,h)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(It(Gi),It(ji),It(zi))},e.\u0275cmp=M({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,o){t&2&&Lt("ng2-nouislider",!0)},inputs:{disabled:"disabled",behaviour:"behaviour",connect:"connect",limit:"limit",min:"min",max:"max",snap:"snap",animate:"animate",range:"range",step:"step",format:"format",pageSteps:"pageSteps",config:"config",keyboard:"keyboard",onKeydown:"onKeydown",tooltips:"tooltips"},outputs:{change:"change",update:"update",slide:"slide",set:"set",start:"start",end:"end"},features:[tn([{provide:rn,useExisting:Ri(()=>e),multi:!0}]),Ui],decls:1,vars:1,template:function(t,o){t&1&&xe(0,"div"),t&2&&x("disabled",o.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var Ht=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function Da(e,a){if(e&1){let t=$();n(0,"button",6),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(0,i))}),n(1,"div",7),m(2,"i",8),s(),p(3),l(4,"translate"),n(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,Ht,t.targetMode===0,t.targetMode!==0)),r(),y(" ",c(4,2,"accessories.control.manual")," ")}}function Ia(e,a){if(e&1){let t=$();n(0,"button",6),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(1,i))}),n(1,"div",7),m(2,"i",8),s(),p(3),l(4,"translate"),n(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,Ht,t.targetMode===1,t.targetMode!==1)),r(),y(" ",c(4,2,"accessories.control.auto")," ")}}function La(e,a){if(e&1&&(n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"div",5),l(4,"translate"),_(5,Da,7,7,"button",13),_(6,Ia,7,7,"button",13),s()),e&2){let t=f();r(),v(c(2,4,"accessories.control.mode")),r(2),x("aria-label",c(4,6,"accessories.control.mode_control")),r(2),k(t.targetModeValidValues.includes(0)?5:-1),r(),k(t.targetModeValidValues.includes(1)?6:-1)}}function Aa(e,a){if(e&1){let t=$();n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"nouislider",14),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),r(2),u("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),W("ngModel",t.targetRotationSpeed.value)}}var gn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new Q;constructor(){this.targetRotationSpeedChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetState?(this.targetState=1,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!0)):!this.targetRotationSpeed.value&&this.targetState&&(this.targetState=0,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(0):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!1))})}ngOnInit(){this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,"TargetAirPurifierState"in this.service.values&&(this.targetModeValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues),this.loadRotationSpeed(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetState(t,o){this.targetState=t,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.targetState):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(this.targetState===1),o.target.blur()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),o.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetState(0,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetState(1,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,La,7,8),_(23,Aa,4,8),s(),m(24,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,9,"form.button_close")),r(3),x("aria-label",c(7,11,"accessories.control.state_control")),r(4),u("ngClass",V(17,Ht,i.targetState===0,i.targetState!==0)),r(),y(" ",c(12,13,"accessories.control.off")," "),r(6),u("ngClass",V(20,Ht,i.targetState===1,i.targetState!==1)),r(),y(" ",c(19,15,"accessories.control.on")," "),r(4),k(i.targetModeValidValues.length?22:-1),r(),k(i.targetRotationSpeed?23:-1))},dependencies:[ee,oe,re,ae,E,T],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var G=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=350;longClick=si();shortClick=si();onEnter(t){this.shortClick.emit(t)}onMouseUp(t){!this.touchInProgress&&!this.isSyntheticEvent()&&(clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)))}onTouchEnd(t){clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)),setTimeout(()=>{this.touchInProgress=!1},150)}onMouseDown(t){if("touches"in t){this.touchInProgress=!0,this.done=!1,this.touchStartTime=Date.now(),t.cancelable&&this.isSafariMobile()&&t.preventDefault(),this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration);return}!this.touchInProgress&&!this.isSyntheticEvent()&&t.button===0&&(this.done=!1,this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration))}onMouseMove(){this.done=!0,clearTimeout(this.downTimeout)}isSyntheticEvent(){let t=Date.now()-this.touchStartTime;return this.touchInProgress&&t<300}isSafariMobile(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&/Safari/.test(t)&&!/Chrome|CriOS|FxiOS|EdgiOS/.test(t)}ngOnDestroy(){clearTimeout(this.downTimeout),this.touchInProgress=!1}static \u0275fac=function(o){return new(o||e)};static \u0275dir=qi({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(o,i){o&1&&C("keyup.enter",function(h){return i.onEnter(h)})("mouseup",function(h){return i.onMouseUp(h)})("touchend",function(h){return i.onTouchEnd(h)})("touchstart",function(h){return i.onMouseDown(h)})("mousedown",function(h){return i.onMouseDown(h)})("mousemove",function(h){return i.onMouseMove(h)})("touchmove",function(h){return i.onMouseMove(h)})},inputs:{duration:"duration"},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var Pa=(e,a)=>({"accessory-on":e,purifying:a});function Fa(e,a){if(e&1&&(n(0,"div",18),p(1),s()),e&2){let t=f(2);r(),y("",t.service.values.RotationSpeed,"%")}}function Ha(e,a){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.on")))}function Oa(e,a){if(e&1&&_(0,Fa,2,1,"div",18)(1,Ha,3,3,"div",18),e&2){let t=f();k("RotationSpeed"in t.service.values?0:1)}}function Na(e,a){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.idle")))}function $a(e,a){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.off")))}var hn=(()=>{class e{$accessories=b(K);$modal=b(J);hasTargetValidValues=!1;service;readyForControl=!1;ngOnInit(){"TargetAirPurifierState"in this.service.values&&(this.hasTargetValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues.length>0)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&(this.hasTargetValidValues||"RotationSpeed"in this.service.values)){let t=this.$modal.open(gn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-air-purifier"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:23,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M3,3.0706147 C3.28945166,3.8007217 5.978098,4.1773883 10.0660175,4.2006147 C12.5085124,4.2144929 18.5053297,1.8514837 22.4060749,1.1943647 C24.1588716,0.898084 26.5955382,1.1756219 28.716875,2.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave"],["d","M3,9.0706147 C3.28945166,9.8007217 5.978098,10.1773883 10.0660175,10.2006147 C12.5085124,10.2144929 18.5053297,7.8514837 22.4060749,7.1943647 C24.1588716,6.898084 26.5955382,7.1756219 28.716875,8.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave","bottom-line"],["x1","7","y1","14","x2","25","y2","14","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","7","y1","14","x2","2","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","25","y1","14","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","8","y1","16.5","x2","24","y2","16.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","7","y1","18.5","x2","25","y2","18.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","6","y1","20.5","x2","26","y2","20.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","2","y1","23","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","30","y1","23","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","2","y1","23","x2","2","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","27","r","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x1","2","y1","31","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"circle",15)(17,"line",16),s()(),L(),n(18,"div",17),p(19),s(),_(20,Oa,2,1)(21,Na,3,3,"div",18)(22,$a,3,3,"div",18),s()()),o&2&&(u("ngClass",V(6,Pa,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState!==0||i.service.values.On,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On)),r(2),x("aria-label",c(3,4,"accessories.core.air_purifier")),r(17),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On?20:i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===1||i.service.values.On?21:22))},dependencies:[G,E,T],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var Ra=()=>[3,4],Wa=()=>[1,2],Ua=(e,a,t,o)=>({"accessory-on":e,"fill-red":a,"fill-orange":t,"fill-green":o}),ja=(e,a)=>({"grey-text":e,"red-text":a}),Cn=(()=>{class e{service;labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-air-quality-sensor"]],inputs:{service:"service"},decls:25,vars:17,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label",3,"ngClass"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),m(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),s()(),L(),n(21,"div",20),p(22),s(),n(23,"div",21),p(24),s()()()),o&2&&(u("ngClass",st(9,Ua,i.service.values.AirQuality===5,i.service.values.AirQuality===5,ye(7,Ra).includes(i.service.values.AirQuality),ye(8,Wa).includes(i.service.values.AirQuality))),r(2),x("aria-label",c(3,5,"accessories.core.air_quality_sensor")),r(20),v(i.service.customName||i.service.serviceName),r(),u("ngClass",V(14,ja,i.service.values.AirQuality<5,i.service.values.AirQuality===5)),r(),y(" ",i.labels[i.service.values.AirQuality||0]," "))},dependencies:[E,T],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var Ga=e=>({"accessory-on":e});function za(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.battery_notcharging")," ")}function qa(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.battery_charging")," ")}function Za(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.battery_notchargeable")," ")}function Ka(e,a){e&1&&(n(0,"span",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.battery_low")))}function Qa(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.battery_charged")," ")}var yn=(()=>{class e{service;Math=Math;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-battery"]],inputs:{service:"service"},decls:18,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","5","height","13","rx","2","stroke","none","stroke-width","0"],["x","29.5","y","8","width","2","height","7","rx","2","stroke","none","fill","#7f7f7f","stroke-width","1"],["x","1","y","5","width","29","height","13","rx","2","stroke","#7f7f7f","fill","none","stroke-width","0.75"],["x","16","y","28","font-size","9","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"red-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6),n(8,"text",7),p(9),s()()(),L(),n(10,"div",8),p(11),s(),n(12,"div",9),_(13,za,2,3)(14,qa,2,3)(15,Za,2,3)(16,Ka,3,3,"span",10)(17,Qa,2,3),s()()()),o&2&&(u("ngClass",N(10,Ga,i.service.values.ChargingState===1)),r(2),x("aria-label",c(3,8,"accessories.core.battery")),r(3),x("width",i.Math.round(29/100*(i.service.values.BatteryLevel||0)))("fill",i.service.values.ChargingState===1?"#4caf50":i.service.values.StatusLowBattery===1?"#e69533":"#808080")("fill-opacity",i.service.values.ChargingState===1||i.service.values.StatusLowBattery===1?"0.5":"1"),r(4),y(" ",i.service.values.BatteryLevel||0,"% "),r(2),v(i.service.customName||i.service.serviceName),r(2),k(i.service.values.ChargingState===0?13:i.service.values.ChargingState===1?14:i.service.values.ChargingState===2?15:i.service.values.StatusLowBattery===1||i.service.values.BatteryLevel===0?16:17))},dependencies:[E,T],styles:['.batterylevel-battery[_ngcontent-%COMP%]{position:relative;width:75px;height:30px;border:1px solid rgb(128,128,128);border-radius:4px;margin-bottom:6px;text-align:center;display:flex;align-items:center;justify-content:center;color:#d3d3d3;font-size:14px}.batterylevel-battery[_ngcontent-%COMP%]:after{content:"";position:absolute;top:7px;right:-6px;width:6px;height:13px;background-color:gray;border-radius:2px}.batterylevel-battery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;background-color:gray;z-index:1;transition:width .3s ease-in-out}.batterylevel-battery[_ngcontent-%COMP%] .battery-text[_ngcontent-%COMP%]{position:relative;z-index:2}.batterylevel-battery[_ngcontent-%COMP%] .battery-over[_ngcontent-%COMP%]{color:#d3d3d3}.batterylevel-battery[_ngcontent-%COMP%] .battery-under[_ngcontent-%COMP%]{color:gray}@media (max-width: 575px){.batterylevel-battery[_ngcontent-%COMP%]{width:50px;height:25px;font-size:12px}.batterylevel-battery[_ngcontent-%COMP%]:after{top:4px}}.lowbattery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#e69533}.charging[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#4caf50}']})}return e})();var Ya=e=>({"accessory-on":e});function Xa(e,a){e&1&&(n(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function Ja(e,a){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var xn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-carbon-dioxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,24.0706147 C3.28945166,24.8007217 5.978098,25.1773883 10.0660175,25.2006147 C12.5085124,25.2144929 18.5053297,22.8514837 22.4060749,22.1943647 C24.1588716,21.898084 26.5955382,22.1756219 28.716875,23.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30.0706147 C3.28945166,30.8007217 5.978098,31.1773883 10.0660175,31.2006147 C12.5085124,31.2144929 18.5053297,28.8514837 22.4060749,28.1943647 C24.1588716,27.898084 26.5955382,28.1756219 28.716875,29.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," CO2 "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),L(),n(17,"div",15),p(18),s(),_(19,Xa,3,3,"div",16)(20,Ja,3,3,"div",17),s()()),o&2&&(u("ngClass",N(6,Ya,i.service.values.CarbonDioxideDetected)),r(2),x("aria-label",c(3,4,"accessories.core.carbon_dioxide_sensor")),r(16),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.CarbonDioxideDetected?19:20))},dependencies:[E,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var es=e=>({"accessory-on":e});function ts(e,a){e&1&&(n(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function is(e,a){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var _n=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-carbon-monoxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,23 C6,25 9,21 12,23 C15,25 18,21 21,23 C24,25 27,21 30,23","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30 C6,32 9,28 12,30 C15,32 18,28 21,30 C24,32 27,28 30,30","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," CO "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),L(),n(17,"div",15),p(18),s(),_(19,ts,3,3,"div",16)(20,is,3,3,"div",17),s()()),o&2&&(u("ngClass",N(6,es,i.service.values.CarbonMonoxideDetected)),r(2),x("aria-label",c(3,4,"accessories.core.carbon_monoxide_sensor")),r(16),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.CarbonMonoxideDetected?19:20))},dependencies:[E,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var ns=e=>({"accessory-on":e});function os(e,a){e&1&&(n(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.open")))}function rs(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.closed")))}var kn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-contact-sensor"]],inputs:{service:"service"},decls:13,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),L(),n(9,"div",8),p(10),s(),_(11,os,3,3,"div",9)(12,rs,3,3,"div",10),s()()),o&2&&(u("ngClass",N(6,ns,i.service.values.ContactSensorState)),r(2),x("aria-label",c(3,4,"accessories.core.contact_sensor")),r(8),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.ContactSensorState?11:12))},dependencies:[E,T],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();function as(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function ss(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function ls(e,a){if(e&1&&_(0,as,2,3)(1,ss,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function cs(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.opening"),"... ")}function ps(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closing"),"... ")}var Sn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetMode;targetPositionChanged=new Q;targetPosition;constructor(){this.targetPositionChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,ls,2,1)(9,cs,2,3)(10,ps,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),j("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),j("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,20,"form.button_close")),r(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),F("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),W("ngModel",i.targetPosition.value),r(3),v(c(18,24,"accessories.control.closed")),r(3),v(c(21,26,"accessories.control.open")),r(3),F(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),u("min",0)("max",100)("step",1)("disabled",!0),W("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),v(c(29,30,"accessories.control.closed")),r(3),v(c(32,32,"accessories.control.open")))},dependencies:[ae,ee,oe,re,T],encapsulation:2})}return e})();var ds=e=>({"accessory-on":e});function ms(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function us(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function fs(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.open")," ")}function vs(e,a){if(e&1&&(n(0,"div",11),_(1,ms,2,3),_(2,us,2,4),_(3,fs,2,3),s()),e&2){let t=f();r(),k(t.service.values.CurrentPosition===0?1:-1),r(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),k(t.service.values.CurrentPosition===100?3:-1)}}function gs(e,a){e&1&&(n(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.opening"),"..."))}function hs(e,a){e&1&&(n(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.closing"),"..."))}var bn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Sn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-door"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:16,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),s()(),L(),n(11,"div",10),p(12),s(),_(13,vs,4,3,"div",11)(14,gs,3,3,"div",12)(15,hs,3,3,"div",12),s()()),o&2&&(u("ngClass",N(6,ds,i.service.values.CurrentPosition)),r(2),x("aria-label",c(3,4,"accessories.core.door")),r(10),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.PositionState===2?13:i.service.values.PositionState===1?14:i.service.values.PositionState===0?15:-1))},dependencies:[G,E,T],styles:["svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s}"]})}return e})();var et=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function Cs(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,5,"accessories.control.mode_control")),r(4),u("ngClass",V(11,et,t.service.values.Active===0,t.service.values.Active!==0)),r(),y(" ",c(6,7,"accessories.control.off")," "),r(6),u("ngClass",V(14,et,t.service.values.Active===1,t.service.values.Active!==1)),r(),y(" ",c(13,9,"accessories.control.on")," ")}}function ys(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,7,"accessories.control.media_control")),r(4),u("ngClass",V(15,et,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),y(" ",c(6,9,"accessories.control.play")," "),r(6),u("ngClass",V(18,et,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),y(" ",c(13,11,"accessories.control.pause")," "),r(6),u("ngClass",V(21,et,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),y(" ",c(20,13,"accessories.control.stop")," ")}}function xs(e,a){if(e&1){let t=$();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();r(),y(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),x("aria-label",c(4,8,"accessories.control.mute_control")),r(4),u("ngClass",V(14,et,!t.targetMode,t.targetMode)),r(),y(" ",c(9,10,"accessories.control.not_mute")," "),r(6),u("ngClass",V(17,et,t.targetMode,!t.targetMode)),r(),y(" ",c(16,12,"accessories.control.mute")," ")}}function _s(e,a){if(e&1){let t=$();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onVolumeStateChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),W("ngModel",t.targetVolume.value)}}var Mn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetMode;targetVolume;targetVolumeChanged=new Q;constructor(){this.targetVolumeChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),o.target.blur()}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),o.target.blur()}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),o.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,Cs,16,17,"div",5)(7,ys,23,24,"div",5),_(8,xs,19,20),_(9,_s,4,8),s(),m(10,"div",6),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,5,"form.button_close")),r(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),k("Mute"in i.service.values?8:-1),r(),k(i.targetVolume?9:-1))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var ks=()=>[0,1],Ss=(e,a)=>({"accessory-on":e,paused:a}),bs=()=>["Speaker","SmartSpeaker"];function Ms(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.play")," ")}function Ts(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.pause")," ")}function ws(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.stop")," ")}function Es(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Bs(e,a){if(e&1&&p(0),e&2){let t=f(3);y(" \xB7 ",t.service.values.Volume,"% ")}}function Vs(e,a){if(e&1&&_(0,Bs,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function Ds(e,a){if(e&1&&(n(0,"div",7),_(1,Ms,2,3)(2,Ts,2,3)(3,ws,2,3),_(4,Es,2,3)(5,Vs,1,1),s()),e&2){let t,o=f();r(),k((t=o.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),k("Mute"in o.service.values&&o.service.values.Mute?4:5)}}function Is(e,a){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function Ls(e,a){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function As(e,a){if(e&1&&(n(0,"div",7),p(1),s()),e&2){let t=f();r(),y("",t.service.values.Volume,"%")}}function Ps(e,a){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.on")))}function Fs(e,a){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.core.doorbell")))}var Tn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(Mn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-doorbell"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:15,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","15","cy","16","r","5","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),s()(),L(),n(7,"div",6),p(8),s(),_(9,Ds,6,2,"div",7)(10,Is,2,3,"div",8)(11,Ls,2,3,"div",8)(12,As,2,1,"div",7)(13,Ps,3,3,"div",7)(14,Fs,3,3,"div",7),s()()),o&2&&(u("ngClass",V(7,Ss,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?ye(6,ks).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),r(2),x("aria-label",c(3,4,"accessories.core.doorbell")),r(6),v(i.service.customName||i.service.serviceName),r(),k("CurrentMediaState"in i.service.values?9:"Active"in i.service.values&&!i.service.values.Active?10:"Mute"in i.service.values&&i.service.values.Mute?11:"Volume"in i.service.values?12:ye(10,bs).includes(i.service.customType||i.service.type)?13:14))},dependencies:[G,E,T],encapsulation:2})}return e})();var Ot=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function Hs(e,a){if(e&1){let t=$();n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"div",13),l(4,"translate"),n(5,"button",6),C("click",function(i){D(t);let d=f();return I(d.setRotationDirection(0,i))}),n(6,"div",7),m(7,"i",8),s(),p(8),l(9,"translate"),n(10,"div",9),m(11,"i",10),s()(),n(12,"button",6),C("click",function(i){D(t);let d=f();return I(d.setRotationDirection(1,i))}),n(13,"div",7),m(14,"i",8),s(),p(15),l(16,"translate"),n(17,"div",9),m(18,"i",10),s()()()}if(e&2){let t=f();r(),v(c(2,6,"accessories.control.rotation_direction")),r(2),x("aria-label",c(4,8,"accessories.control.direction_control")),r(4),u("ngClass",V(14,Ot,t.service.values.RotationDirection===0,t.service.values.RotationDirection!==0)),r(),y(" ",c(9,10,"accessories.control.rotation_clockwise")," "),r(6),u("ngClass",V(17,Ot,t.service.values.RotationDirection===1,t.service.values.RotationDirection!==1)),r(),y(" ",c(16,12,"accessories.control.rotation_c_clockwise")," ")}}function Os(e,a){e&1&&p(0,"%")}function Ns(e,a){if(e&1){let t=$();n(0,"h6",12),p(1),l(2,"translate"),_(3,Os,1,0),s(),n(4,"nouislider",14),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=f();r(),F(" ",c(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),r(2),k(t.targetRotationSpeed.unit==="percentage"?3:-1),r(),u("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),W("ngModel",t.targetRotationSpeed.value)}}var wn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetMode;targetRotationSpeed;targetRotationSpeedChanged=new Q;hasRotationDirection=!1;constructor(){this.targetRotationSpeedChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetMode?(this.targetMode=!0,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0)):!this.targetRotationSpeed.value&&this.targetMode&&(this.targetMode=!1,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0))})}ngOnInit(){this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.loadRotationSpeed(),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0),this.targetMode&&this.targetRotationSpeed&&!this.targetRotationSpeed.value&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed").maxValue),o.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,o){this.service.getCharacteristic("RotationDirection").setValue(t),o.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,Hs,19,20),_(23,Ns,5,9),s(),m(24,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,9,"form.button_close")),r(3),x("aria-label",c(7,11,"accessories.control.mode_control")),r(4),u("ngClass",V(17,Ot,!i.targetMode,i.targetMode)),r(),y(" ",c(12,13,"accessories.control.off")," "),r(6),u("ngClass",V(20,Ot,i.targetMode,!i.targetMode)),r(),y(" ",c(19,15,"accessories.control.on")," "),r(4),k(i.hasRotationDirection?22:-1),r(),k(i.targetRotationSpeed?23:-1))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var $s=e=>({"accessory-on":e}),Rs=(e,a)=>({spin:e,"spin-counter":a});function Ws(e,a){if(e&1&&(n(0,"div",8),p(1),s()),e&2){let t=f();r(),F("",t.service.values.RotationSpeed,"",t.rotationSpeedUnit)}}function Us(e,a){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=f();u("innerText",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on":"accessories.control.off"))}}var En=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service.values&&this.service.serviceCharacteristics.find(o=>o.type==="RotationSpeed").unit==="percentage"&&(this.rotationSpeedUnit="%"),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"RotationSpeed"in this.service.values&&!this.service.values.On&&!this.service.values.RotationSpeed&&(this.service.values.RotationSpeed=this.service.getCharacteristic("RotationSpeed").maxValue))}onLongClick(){if(this.readyForControl&&("RotationSpeed"in this.service.values||"RotationDirection"in this.service.values)){let t=this.$modal.open(wn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-fan"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg",3,"ngClass"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"g",4),m(6,"path",5),s(),m(7,"circle",6),s()(),L(),n(8,"div",7),p(9),s(),_(10,Ws,2,2,"div",8)(11,Us,2,3,"div",9),s()()),o&2&&(u("ngClass",N(7,$s,i.service.values.On||i.service.values.Active)),r(2),u("ngClass",V(9,Rs,(i.service.values.On||i.service.values.Active)&&(!i.hasRotationDirection||i.hasRotationDirection&&i.service.values.RotationDirection===0),(i.service.values.On||i.service.values.Active)&&i.hasRotationDirection&&i.service.values.RotationDirection===1)),x("aria-label",c(3,5,"accessories.core.fan")),r(7),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.On&&i.service.values.RotationSpeed?10:11))},dependencies:[G,E,T],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();var Bn=(()=>{class e{$activeModal=b(X);service;$accessories;stateSubscription;targetMode;ngOnInit(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)"})},10),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),t.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:16,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mb-4"],[3,"ngModelChange","min","max","step","disabled","ngModel"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mt-5","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),p(7),l(8,"translate"),s(),n(9,"nouislider",6),j("ngModelChange",function(h){return U(i.service.values.FilterLifeLevel,h)||(i.service.values.FilterLifeLevel=h),h}),s(),n(10,"div",7),l(11,"translate"),n(12,"button",8),C("click",function(h){return i.resetFilterLife(h)}),p(13),l(14,"translate"),s()()(),m(15,"div",9),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,11,"form.button_close")),r(4),F("",c(8,13,"accessories.control.filter_level"),": ",i.service.values.FilterLifeLevel,"%"),r(2),u("min",0)("max",100)("step",1)("disabled",!0),W("ngModel",i.service.values.FilterLifeLevel),r(),x("aria-label",c(11,15,"accessories.core.filter_maintenance")),r(3),y(" ",c(14,17,"form.button_reset")," "))},dependencies:[ee,oe,re,ae,T],encapsulation:2})}return e})();var js=(e,a)=>({replace:e,dirty:a}),Gs=e=>({"red-text":e});function zs(e,a){e&1&&(p(0," \xB7 "),n(1,"span",28),p(2),l(3,"translate"),s()),e&2&&(r(2),v(c(3,1,"accessories.control.replace")))}var Vn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Bn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-filter-maintenance"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:32,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","7","rx","11","ry","5","stroke","#7f7f7f","stroke-width","1.75","fill","#4caf50","fill-opacity","0.5",1,"status"],["cx","16","cy","7","rx","6","ry","2","stroke","#7f7f7f","stroke-width","1","fill","#e0e0e0","fill-opacity","1",1,"back"],["x1","5","y1","7","x2","5","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["x1","27","y1","7","x2","27","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["d","M4.7,27 A13,6.9 0 0,0 27.3,27","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","7","y1","10","x2","7","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","11","x2","9","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","12","x2","11","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","12","x2","13","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","12","x2","15","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","12","x2","17","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","12","x2","19","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","12","x2","21","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","23","y1","11","x2","23","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","25","y1","10","x2","25","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","6","x2","11","y2","8","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","5","x2","13","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","5","x2","15","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","5","x2","17","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","5","x2","19","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","6","x2","21","y2","8","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[3,"ngClass"],[1,"red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"ellipse",4)(6,"ellipse",5)(7,"line",6)(8,"line",7)(9,"path",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24),s()(),L(),n(26,"div",25),p(27),s(),n(28,"div",26)(29,"span",27),p(30),s(),_(31,zs,4,3),s()()()),o&2&&(u("ngClass",V(8,js,i.service.values.FilterChangeIndication===1||i.service.values.FilterLifeLevel<10,i.service.values.FilterChangeIndication!==1&&i.service.values.FilterLifeLevel<50)),r(2),x("aria-label",c(3,6,"accessories.core.filter_maintenance")),r(25),v(i.service.customName||i.service.serviceName),r(2),u("ngClass",N(11,Gs,i.service.values.FilterChangeIndication===1)),r(),y(" ",i.service.values.FilterLifeLevel,"% "),r(),k(i.service.values.FilterChangeIndication===1?31:-1))},dependencies:[E,G,T],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var qs=()=>[0,2,3,4],Zs=(e,a,t,o,i,d,h)=>({"accessory-on":e,opening:a,open:t,closing:o,closed:i,stopped:d,obstructed:h});function Ks(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.obstructed")))}function Qs(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.open")))}function Ys(e,a){e&1&&(n(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.closed")))}function Xs(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.opening"),"..."))}function Js(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.closing"),"..."))}function el(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.stopped")))}function tl(e,a){if(e&1&&_(0,Qs,3,3,"div",30)(1,Ys,3,3,"div",31)(2,Xs,3,3,"div",30)(3,Js,3,3,"div",30)(4,el,3,3,"div",30),e&2){let t,o=f();k((t=o.service.values.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function il(e,a){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.open")))}function nl(e,a){e&1&&(n(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.closed")))}function ol(e,a){if(e&1&&_(0,il,3,3,"div",30)(1,nl,3,3,"div",31),e&2){let t=f();k(t.service.values.On||t.service.values.Active?0:1)}}var Dn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("TargetDoorState"in this.service.values?this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1):"On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(!this.service.values.Active))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-garage-door-opener"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:35,vars:15,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","15.5","cy","10.25","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#1976d2","fill-opacity","0.5",1,"window"],["x1","1","y1","12","x2","15","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","31","y1","12","x2","16","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","1.3","r","0.5","stroke","#7f7f7f","stroke-width","1.5"],["x1","3","y1","11","x2","3","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","29","y1","11","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","3","y1","31","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","26","y1","31","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","6","y1","17","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap",""],["x1","26","y1","17","x2","26","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x1","5.25","y1","17","x2","26.75","y2","17","stroke","#7f7f7f","stroke-width","1"],["x1","6.75","y1","18","x2","25.25","y2","18","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line1"],["x1","5.25","y1","19","x2","26.75","y2","19","stroke","#7f7f7f","stroke-width","1",1,"line","line2"],["x1","6.75","y1","20","x2","25.25","y2","20","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line3"],["x1","5.25","y1","21","x2","26.75","y2","21","stroke","#7f7f7f","stroke-width","1",1,"line","line4"],["x1","6.75","y1","22","x2","25.25","y2","22","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line5"],["x1","5.25","y1","23","x2","26.75","y2","23","stroke","#7f7f7f","stroke-width","1",1,"line","line6"],["x1","6.75","y1","24","x2","25.25","y2","24","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line7"],["x1","5.25","y1","25","x2","26.75","y2","25","stroke","#7f7f7f","stroke-width","1",1,"line","line8"],["x1","6.75","y1","26","x2","25.25","y2","26","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line9"],["x1","5.25","y1","27","x2","26.75","y2","27","stroke","#7f7f7f","stroke-width","1",1,"line","line10"],["x1","6.75","y1","28","x2","25.25","y2","28","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line11"],["x1","5.25","y1","29","x2","26.75","y2","29","stroke","#7f7f7f","stroke-width","1",1,"line","line12"],["x1","6.75","y1","30","x2","25.25","y2","30","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line13"],["x1","5.25","y1","31","x2","26.75","y2","31","stroke","#7f7f7f","stroke-width","1",1,"line","line14"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"line",6)(8,"circle",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27)(29,"line",28),s()(),L(),n(30,"div",29),p(31),s(),_(32,Ks,3,3,"div",30)(33,tl,5,1)(34,ol,2,1),s()()),o&2&&(u("ngClass",on(7,Zs,i.service.values.ObstructionDetected||ye(6,qs).includes(i.service.values.CurrentDoorState)||i.service.values.On||i.service.values.Active,i.service.values.CurrentDoorState===2&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===0&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===3&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===1&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===4&&!i.service.values.ObstructionDetected,i.service.values.ObstructionDetected)),r(2),x("aria-label",c(3,4,"accessories.core.garage_door_opener")),r(29),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.ObstructionDetected?32:"CurrentDoorState"in i.service.values?33:34))},dependencies:[G,E,T],styles:[".opening svg .window{fill:#ff9800!important;fill-opacity:.5!important} .opening svg .line{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards} .opening svg .line1{animation-delay:9.282s} .opening svg .line2{animation-delay:8.568s} .opening svg .line3{animation-delay:7.854s} .opening svg .line4{animation-delay:7.14s} .opening svg .line5{animation-delay:6.426s} .opening svg .line6{animation-delay:5.712s} .opening svg .line7{animation-delay:4.998s} .opening svg .line8{animation-delay:4.284s} .opening svg .line9{animation-delay:3.57s} .opening svg .line10{animation-delay:2.856s} .opening svg .line11{animation-delay:2.142s} .opening svg .line12{animation-delay:1.428s} .opening svg .line13{animation-delay:.714s} .opening svg .line14{animation-delay:0s}@keyframes _ngcontent-%COMP%_fade-out{to{opacity:0}} .open .window{fill:#d32f2f!important;fill-opacity:.5!important} .open .line{opacity:0} .closing svg .window{fill:#ff9800!important;fill-opacity:.5!important} .closing svg .line{opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards} .closing svg .line1{animation-delay:0s} .closing svg .line2{animation-delay:.714s} .closing svg .line3{animation-delay:1.428s} .closing svg .line4{animation-delay:2.142s} .closing svg .line5{animation-delay:2.856s} .closing svg .line6{animation-delay:3.57s} .closing svg .line7{animation-delay:4.284s} .closing svg .line8{animation-delay:4.998s} .closing svg .line9{animation-delay:5.712s} .closing svg .line10{animation-delay:6.426s} .closing svg .line11{animation-delay:7.14s} .closing svg .line12{animation-delay:7.854s} .closing svg .line13{animation-delay:8.568s} .closing svg .line14{animation-delay:9.282s}@keyframes _ngcontent-%COMP%_fade-in{to{opacity:1}} .closed .window{fill:#4caf50!important;fill-opacity:.5!important} .closed .line{opacity:1} .stopped .window{fill:#d32f2f!important} .stopped .line7, .stopped .line8, .stopped .line9, .stopped .line10, .stopped .line11, .stopped .line12, .stopped .line13, .stopped .line14{opacity:0} .obstructed .window{animation:_ngcontent-%COMP%_flash 2s infinite;fill:#d32f2f!important}@keyframes _ngcontent-%COMP%_flash{0%,to{fill-opacity:.5}50%{fill-opacity:.1}} .obstructed .line7, .obstructed .line8, .obstructed .line9, .obstructed .line10, .obstructed .line11, .obstructed .line12, .obstructed .line13, .obstructed .line14{opacity:0}"]})}return e})();var kt=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function rl(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,kt,t.targetMode===0,t.targetMode!==0)),r(),y(" ",c(4,2,"accessories.control.auto")," ")}}function al(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,kt,t.targetMode===1,t.targetMode!==1)),r(),y(" ",c(4,2,"accessories.control.heat")," ")}}function sl(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,kt,t.targetMode===2,t.targetMode!==2)),r(),y(" ",c(4,2,"accessories.control.cool")," ")}}function ll(e,a){if(e&1&&(n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"div",15),l(4,"translate"),_(5,rl,7,7,"button",16),_(6,al,7,7,"button",16),_(7,sl,7,7,"button",16),s()),e&2){let t=f();r(),v(c(2,5,"accessories.control.mode")),r(2),x("aria-label",c(4,7,"accessories.control.mode_control")),r(2),k(t.targetStateValidValues.includes(0)?5:-1),r(),k(t.targetStateValidValues.includes(1)?6:-1),r(),k(t.targetStateValidValues.includes(2)?7:-1)}}function cl(e,a){if(e&1){let t=$();n(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),n(9,"nouislider",18),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoTemp,i)||(d.autoTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onAutoTemperatureStateChange())}),s()}if(e&2){let t=f(2);r(),rt(" ",c(2,9,"accessories.control.target_auto"),": ",se(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",se(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),u("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),W("ngModel",t.autoTemp)}}function pl(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",18),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onTemperatureStateChange())}),s()}if(e&2){let t=f(2);r(),Ne(" ",c(2,7,"accessories.control.target_auto"),": ",se(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),W("ngModel",t.targetHeatingTemp)}}function dl(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",18),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onTemperatureStateChange())}),s()}if(e&2){let t=f(2);r(),Ne(" ",c(2,7,"accessories.control.target_auto"),": ",se(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),W("ngModel",t.targetCoolingTemp)}}function ml(e,a){if(e&1&&_(0,cl,10,25)(1,pl,7,16)(2,dl,7,16),e&2){let t=f();k(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var In=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);$settings=b(be);service;type;$accessories;stateSubscription;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new Q;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;constructor(){this.targetTemperatureChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeaterCoolerState").validValues,this.loadTargetTemperature(),this.applySliderGradient(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applySliderGradient()}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetState(t,o){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),o.target.blur()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),o.target.blur(),this.applySliderGradient()}onTemperatureStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetTemperatureChanged.next(void 0)}onAutoTemperatureStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetTemperatureChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetTemperature(){this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}applySliderGradient(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type",$accessories:"$accessories"},decls:31,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),s(),n(12,"div",7),l(13,"translate"),n(14,"button",8),C("click",function(h){return i.setTargetState(0,h)}),n(15,"div",9),m(16,"i",10),s(),p(17),l(18,"translate"),n(19,"div",11),m(20,"i",12),s()(),n(21,"button",8),C("click",function(h){return i.setTargetState(1,h)}),n(22,"div",9),m(23,"i",10),s(),p(24),l(25,"translate"),n(26,"div",11),m(27,"i",12),s()()(),_(28,ll,8,9),_(29,ml,3,1),s(),m(30,"div",13),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,13,"form.button_close")),r(4),qe("color",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),F("",se(10,17,c(9,15,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,20,i.temperatureUnits)," "),r(4),x("aria-label",c(13,22,"accessories.control.state_control")),r(4),u("ngClass",V(28,kt,i.targetState===0,i.targetState!==0)),r(),y(" ",c(18,24,"accessories.control.off")," "),r(6),u("ngClass",V(31,kt,i.targetState===1,i.targetState!==1)),r(),y(" ",c(25,26,"accessories.control.on")," "),r(4),k(i.targetStateValidValues.length?28:-1),r(),k(i.targetStateValidValues.includes(0)?29:-1))},dependencies:[E,ee,oe,re,ae,Se,T,Ie,De],encapsulation:2})}return e})();var ul=e=>({"accessory-on":e});function fl(e,a){if(e&1&&(B(),n(0,"text",23),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=f();r(),F(" ",se(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function vl(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.off")," ")}function gl(e,a){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),l(5,"convertTemp"),l(6,"number"),l(7,"uppercase")),e&2){let t=f(2);r(),en(" ",se(3,6,c(2,4,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,9,t.temperatureUnits)," - ",se(6,13,c(5,11,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(7,16,t.temperatureUnits)," ")}}function hl(e,a){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f(2);r(),F(" ",se(3,4,c(2,2,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Cl(e,a){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f(2);r(),F(" ",se(3,4,c(2,2,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function yl(e,a){if(e&1&&_(0,gl,8,18)(1,hl,5,9)(2,Cl,5,9),e&2){let t=f();k(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function xl(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.heat")," ")}function _l(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.cool")," ")}function kl(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.on")," ")}var Ln=(()=>{class e{$modal=b(J);$settings=b(be);$accessories=b(K);service;readyForControl=!1;type;temperatureUnits=this.$settings.env.temperatureUnits;hasHeating=!1;hasCooling=!1;ngOnInit(){this.hasHeating="HeatingThresholdTemperature"in this.service.values,this.hasCooling="CoolingThresholdTemperature"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHeaterCoolerState"in this.service.values){let t=this.$modal.open(In,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-heater-cooler"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","8","y1","7","x2","8","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","12","y1","7","x2","12","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","16","y1","7","x2","16","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","20","y1","7","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","24","y1","7","x2","24","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","3.5","y","4","width","25","height","15","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16","y","27.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),_(27,fl,5,9,":svg:text",23),s()(),L(),n(28,"div",24),p(29),s(),n(30,"div",25),_(31,vl,2,3)(32,yl,3,1)(33,xl,2,3)(34,_l,2,3)(35,kl,2,3),s()()()),o&2&&(u("ngClass",N(8,ul,i.service.values.Active||i.service.values.On)),r(2),x("aria-label",c(3,6,"accessories.core.heater_cooler")),r(24),x("fill",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"url(#coolingGradient)":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"url(#heatingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),k("CurrentTemperature"in i.service.values?27:-1),r(2),v(i.service.customName||i.service.serviceName),r(2),k("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?31:i.service.values.TargetHeaterCoolerState===0&&(i.hasHeating||i.hasCooling)?32:i.service.values.TargetHeaterCoolerState===1?33:i.service.values.TargetHeaterCoolerState===2?34:35))},dependencies:[G,E,Se,T,Ie,De],encapsulation:2})}return e})();var St=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function Sl(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,St,t.targetMode===0,t.targetMode!==0)),r(),y(" ",c(4,2,"accessories.control.auto")," ")}}function bl(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,St,t.targetMode===1,t.targetMode!==1)),r(),y(" ",c(4,2,"accessories.control.humidify")," ")}}function Ml(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return I(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);r(2),u("ngClass",V(4,St,t.targetMode===2,t.targetMode!==2)),r(),y(" ",c(4,2,"accessories.control.dehumidify")," ")}}function Tl(e,a){if(e&1&&(n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"div",15),l(4,"translate"),_(5,Sl,7,7,"button",16),_(6,bl,7,7,"button",16),_(7,Ml,7,7,"button",16),s()),e&2){let t=f();r(),v(c(2,5,"accessories.control.mode")),r(2),x("aria-label",c(4,7,"accessories.control.mode_control")),r(2),k(t.targetStateValidValues.includes(0)?5:-1),r(),k(t.targetStateValidValues.includes(1)?6:-1),r(),k(t.targetStateValidValues.includes(2)?7:-1)}}function wl(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoHumidity,i)||(d.autoHumidity=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onAutoHumidityStateChange())}),s()}if(e&2){let t=f(2);r(),Ne(" ",c(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),r(2),u("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),W("ngModel",t.autoHumidity)}}function El(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHumidifierHumidity,i)||(d.targetHumidifierHumidity=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onHumidityStateChange())}),s()}if(e&2){let t=f(2);r(),F("",c(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),r(2),u("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),W("ngModel",t.targetHumidifierHumidity)}}function Bl(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetDehumidifierHumidity,i)||(d.targetDehumidifierHumidity=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onHumidityStateChange())}),s()}if(e&2){let t=f(2);r(),F("",c(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),r(2),u("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),W("ngModel",t.targetDehumidifierHumidity)}}function Vl(e,a){if(e&1&&_(0,wl,4,9)(1,El,4,8)(2,Bl,4,8),e&2){let t=f();k(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var An=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;type;$accessories;stateSubscription;targetState;targetMode;targetHumidityChanged=new Q;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;constructor(){this.targetHumidityChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.RelativeHumidityHumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityHumidifierThreshold").setValue(this.targetHumidifierHumidity),this.RelativeHumidityDehumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold").setValue(this.targetDehumidifierHumidity)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.RelativeHumidityDehumidifierThreshold=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold"),this.RelativeHumidityHumidifierThreshold=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold"),this.targetStateValidValues=this.service.getCharacteristic("TargetHumidifierDehumidifierState").validValues,this.loadTargetHumidity(),this.applySliderGradient(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.applySliderGradient()}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,o){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),o.target.blur()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),o.target.blur(),this.applySliderGradient()}onHumidityStateChange(){this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.targetHumidityChanged.next(void 0)}onAutoHumidityStateChange(){this.targetHumidifierHumidity=this.autoHumidity[0],this.targetDehumidifierHumidity=this.autoHumidity[1],this.targetHumidityChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}applySliderGradient(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type",$accessories:"$accessories"},decls:28,vars:26,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),s(),n(9,"div",7),l(10,"translate"),n(11,"button",8),C("click",function(h){return i.setTargetState(0,h)}),n(12,"div",9),m(13,"i",10),s(),p(14),l(15,"translate"),n(16,"div",11),m(17,"i",12),s()(),n(18,"button",8),C("click",function(h){return i.setTargetState(1,h)}),n(19,"div",9),m(20,"i",10),s(),p(21),l(22,"translate"),n(23,"div",11),m(24,"i",12),s()()(),_(25,Tl,8,9),_(26,Vl,3,1),s(),m(27,"div",13),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,12,"form.button_close")),r(4),qe("color",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),y("",i.service.values.CurrentRelativeHumidity,"% "),r(),x("aria-label",c(10,14,"accessories.control.state_control")),r(4),u("ngClass",V(20,St,i.targetState===0,i.targetState!==0)),r(),y(" ",c(15,16,"accessories.control.off")," "),r(6),u("ngClass",V(23,St,i.targetState===1,i.targetState!==1)),r(),y(" ",c(22,18,"accessories.control.on")," "),r(4),k(i.targetStateValidValues.length?25:-1),r(),k(i.targetStateValidValues.includes(0)?26:-1))},dependencies:[E,ee,oe,re,ae,T],encapsulation:2})}return e})();var Dl=e=>({"accessory-on":e});function Il(e,a){if(e&1&&(B(),n(0,"text",36),p(1),s()),e&2){let t=f();r(),y(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function Ll(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.off")," ")}function Al(e,a){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);r(),F(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% - ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function Pl(e,a){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);r(),y(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% ")}}function Fl(e,a){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);r(),y(" ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function Hl(e,a){if(e&1&&_(0,Al,2,2)(1,Pl,2,1)(2,Fl,2,1),e&2){let t=f();k(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function Ol(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.humidify")," ")}function Nl(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.dehumidify")," ")}function $l(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.on")," ")}function Rl(e,a){if(e&1&&_(0,Nl,2,3)(1,$l,2,3),e&2){let t=f();k(t.service.values.TargetHumidifierDehumidifierState===2?0:1)}}var Pn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;type;hasHumidifier=!1;hasDehumidifier=!1;ngOnInit(){this.hasHumidifier="RelativeHumidityHumidifierThreshold"in this.service.values,this.hasDehumidifier="RelativeHumidityDehumidifierThreshold"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHumidifierDehumidifierState"in this.service.values){let t=this.$modal.open(An,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-humidifier-dehumidifier"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:48,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","humidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","dehumidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","3.5","width","30","height","25","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","6","y1","10","x2","6","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","12","x2","6","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","14","x2","6","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","10","x2","10","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","12","x2","10","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","14","x2","10","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","10","x2","14","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","12","x2","14","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","14","x2","14","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","10","x2","18","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","12","x2","18","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","14","x2","18","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","10","x2","22","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","12","x2","22","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","10","x2","26","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","12","x2","26","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","14","x2","26","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","1","y","7","width","30","height","10","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16.5","y","25.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"line",22)(27,"line",23)(28,"line",24)(29,"line",25)(30,"line",26)(31,"line",27)(32,"line",28)(33,"line",29)(34,"line",30)(35,"line",31)(36,"line",32)(37,"line",33)(38,"line",34)(39,"rect",35),_(40,Il,2,1,":svg:text",36),s()(),L(),n(41,"div",37),p(42),s(),n(43,"div",38),_(44,Ll,2,3)(45,Hl,3,1)(46,Ol,2,3)(47,Rl,2,1),s()()()),o&2&&(u("ngClass",N(8,Dl,i.service.values.Active||i.service.values.On)),r(2),x("aria-label",c(3,6,"accessories.core.humidifier_dehumidifier")),r(37),x("fill",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"url(#humidifyingGradient)":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"url(#dehumidifyingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),k("CurrentRelativeHumidity"in i.service.values?40:-1),r(2),v(i.service.customName||i.service.serviceName),r(2),k("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?44:i.service.values.TargetHumidifierDehumidifierState===0&&(i.hasHumidifier||i.hasDehumidifier)?45:i.service.values.TargetHumidifierDehumidifierState===1?46:47))},dependencies:[G,E,T],encapsulation:2})}return e})();function Wl(e,a){if(e&1&&p(0),e&2){let t=f();y(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function Ul(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.no_data")," ")}var Fn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-humidity-sensor"]],inputs:{service:"service"},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4),ne(6,"g",5),xe(7,"path",6),le(),xe(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),le()(),L(),ne(21,"div",20),p(22),le(),ne(23,"div",21),_(24,Wl,1,1)(25,Ul,2,3),le()()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.humidity_sensor")),r(20),v(i.service.customName||i.service.serviceName),r(2),k("CurrentRelativeHumidity"in i.service.values?24:25))},dependencies:[T],styles:[".humidity-drop[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:42px;border-radius:5% 55% 70%;font-size:14px;text-align:center;margin-bottom:6px;margin-top:9px;background-color:gray;color:#d3d3d3;transform:rotate(45deg)}@media (max-width: 575px){.humidity-drop-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:28px;font-size:10px;margin-bottom:7px;margin-top:5px}.humidity-drop-collapse[_ngcontent-%COMP%] .humidity-drop-text[_ngcontent-%COMP%]{margin-left:-2px}}.humidity-drop-text[_ngcontent-%COMP%]{transform:rotate(-45deg);margin-left:-5px}"]})}return e})();var jl=e=>({"accessory-on":e});function Gl(e,a){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.running")))}function zl(e,a){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.off")))}var Hn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-irrigation-system"]],inputs:{service:"service"},decls:18,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","9","y","1","width","14","height","6.5","rx","2","fill","#1976d2","stroke","#7b7b7b","stroke-width","0.5","fill-opacity","0.5"],["x1","16","y1","8","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","9","x2","31","y2","9","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","20","x2","31","y2","20","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","31","x2","31","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x","1","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","1","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12),s()(),L(),n(14,"div",13),p(15),s(),_(16,Gl,3,3,"div",14)(17,zl,3,3,"div",14),s()()),o&2&&(u("ngClass",N(6,jl,i.service.values.InUse)),r(2),x("aria-label",c(3,4,"accessories.core.irrigation_system")),r(13),y(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),k(i.service.values.InUse?16:17))},dependencies:[E,T],styles:[".accessory-on svg .field{fill:#4caf50} .accessory-on svg .pipe{animation:_ngcontent-%COMP%_pulse 5s infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{stroke:#7f7f7f;stroke-opacity:.5}50%{stroke:#1976d2;stroke-opacity:1}}"]})}return e})();var ql=e=>({"accessory-on":e});function Zl(e,a){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function Kl(e,a){e&1&&(n(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var On=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-leak-sensor"]],inputs:{service:"service"},decls:28,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),n(8,"g",7),m(9,"path",6),s(),m(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),s()(),L(),n(24,"div",22),p(25),s(),_(26,Zl,3,3,"div",23)(27,Kl,3,3,"div",24),s()()),o&2&&(u("ngClass",N(6,ql,i.service.values.LeakDetected)),r(2),x("aria-label",c(3,4,"accessories.core.leak_sensor")),r(23),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.LeakDetected?26:27))},dependencies:[E,T],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Ql(e,a){if(e&1&&(ne(0,"div",28),p(1),l(2,"number"),le()),e&2){let t=f();r(),y("",se(2,1,t.service.values.CurrentAmbientLightLevel,"0.1-1")," lux")}}function Yl(e,a){if(e&1&&(ne(0,"div",28),p(1),l(2,"number"),le()),e&2){let t=f();r(),y("",se(2,1,t.service.values.CurrentAmbientLightLevel,"1.0-0")," lux")}}var Nn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-light-sensor"]],inputs:{service:"service"},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),le()(),L(),ne(28,"div",27),p(29),le(),_(30,Ql,3,4,"div",28)(31,Yl,3,4,"div",28),le()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.light_sensor")),r(27),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.CurrentAmbientLightLevel<1?30:31))},dependencies:[Se,T],encapsulation:2})}return e})();var Ue=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let o=t/100,i,d,h;o<=66?(i=255,d=Math.min(99.4708025861*Math.log(o)-161.1195681661,255),h=o<=19?0:Math.min(138.5177312231*Math.log(o-10)-305.0447927307,255)):(i=Math.min(329.698727446*(o-60)**-.1332047592,255),d=Math.min(288.1221695283*(o-60)**-.0755148492,255),h=255),i/=255,d/=255,h/=255;let te=Math.max(i,d,h),de=Math.min(i,d,h),z=te-de,ce=0;z!==0&&(te===i?ce=(d-h)/z%6:te===d?ce=(h-i)/z+2:ce=(i-d)/z+4,ce=Math.round(ce*60),ce<0&&(ce+=360));let ve=(te+de)/2,Be=z===0?0:z/(1-Math.abs(2*ve-1));return`hsl(${Math.round(ce)}, ${Math.round(Be*100)}%, ${Math.round(ve*100)}%)`}static \u0275fac=function(o){return new(o||e)};static \u0275prov=Wi({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $n=(e,a)=>({"fa-check-circle":e,"fa-blank":a}),Xl=(e,a)=>({"off-text":e,"on-text":a}),mi=(e,a)=>({"mb-1":e,"":a});function Jl(e,a){e&1&&m(0,"div")}function ec(e,a){if(e&1&&(n(0,"div",11)(1,"div",13)(2,"div",7),m(3,"i",14),s(),p(4),l(5,"translate"),n(6,"div",9),m(7,"i",10),s()()()),e&2){let t=f();r(3),u("ngClass",V(5,Xl,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),r(),F(" ",c(5,3,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function tc(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",16),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetBrightness.value,i)||(d.targetBrightness.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onBrightnessStateChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),r(2),u("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),W("ngModel",t.targetBrightness.value)}}function ic(e,a){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function nc(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetHue.value,i)||(d.targetHue.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onHueStateChange())}),s(),_(4,ic,4,3,"div",18)}if(e&2){let t=f();r(),F("",c(2,8,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),r(2),u("min",0)("max",360)("step",1),W("ngModel",t.targetHue.value),u("ngClass",V(10,mi,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),k(t.isAdaptiveLightingEnabled?4:-1)}}function oc(e,a){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function rc(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetSaturation.value,i)||(d.targetSaturation.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onSaturationStateChange())}),s(),_(4,oc,4,3,"div",18)}if(e&2){let t=f();r(),F("",c(2,8,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),r(2),u("min",0)("max",100)("step",1),W("ngModel",t.targetSaturation.value),u("ngClass",V(10,mi,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),k(t.isAdaptiveLightingEnabled?4:-1)}}function ac(e,a){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function sc(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertMired"),s(),n(4,"nouislider",17),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onColorTemperatureStateChange())}),s(),_(5,ac,4,3,"div",18)}if(e&2){let t=f();r(),F(" ",c(2,8,"accessories.control.color_temperature"),": ",c(3,10,t.targetColorTemperature.mired)," "),r(3),u("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),W("ngModel",t.targetColorTemperature.value),u("ngClass",V(12,mi,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),k(t.isAdaptiveLightingEnabled?5:-1)}}var Rn=(()=>{class e{$destroyRef=b(ie);$activeModal=b(X);$colour=b(Ue);service;$accessories;isAdaptiveLightingEnabled$;stateSubscription;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetHue;targetHueChanged=new Q;targetSaturation;targetSaturationChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;constructor(){this.targetBrightnessChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Brightness").setValue(this.targetBrightness.value),this.targetBrightness.value&&!this.service.values.On?(this.targetMode=!0,this.service.getCharacteristic("On").setValue(this.targetMode)):!this.targetBrightness.value&&this.service.values.On&&(this.targetMode=!1,this.service.getCharacteristic("On").setValue(this.targetMode))}),this.targetHueChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value)}),this.targetSaturationChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.targetColorTemperatureChanged.pipe(Y(500)).subscribe(t=>{this.service.getCharacteristic("ColorTemperature").setValue(t)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{if(this.targetMode=this.service.values.On,this.targetBrightness&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness")?.value),this.targetHue&&(this.targetHue.value=this.service.getCharacteristic("Hue")?.value),this.targetSaturation&&(this.targetSaturation.value=this.service.getCharacteristic("Saturation")?.value),this.targetColorTemperature){let t=this.service.getCharacteristic("ColorTemperature")?.value;this.targetColorTemperature.value=this.$colour.miredToKelvin(t),this.targetColorTemperature.mired=t}}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("On").setValue(this.targetMode),this.targetMode&&this.targetBrightness&&!this.targetBrightness.value&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness").maxValue),o.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value);let t=document.querySelectorAll(".noUi-target")[this.sliderIndex-1];if(t){let o=this.targetHue.value;t.style.background=`linear-gradient(to right,
2
+ hsl(${o}, 0%, 50%),
3
+ hsl(${o}, 100%, 50%))`}}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=this.service.getCharacteristic("Brightness");t&&(this.targetBrightness={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];o&&(o.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10))}loadTargetHue(){this.service.getCharacteristic("Hue")&&(this.targetHue={value:this.service.getCharacteristic("Hue").value},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];o&&(o.style.background=`linear-gradient(to right,
4
+ hsl(0, 100%, 50%),
5
+ hsl(60, 100%, 50%),
6
+ hsl(120, 100%, 50%),
7
+ hsl(180, 100%, 50%),
8
+ hsl(240, 100%, 50%),
9
+ hsl(300, 100%, 50%),
10
+ hsl(360, 100%, 50%))`),this.sliderIndex+=1},10))}loadTargetSaturation(){this.service.getCharacteristic("Saturation")&&(this.targetSaturation={value:this.service.getCharacteristic("Saturation").value},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(o){let i=this.targetHue.value||0;o.style.background=`linear-gradient(to right,
11
+ hsl(${i}, 0%, 50%),
12
+ hsl(${i}, 100%, 50%))`}this.sliderIndex+=1},10))}loadTargetColorTemperature(){let t=this.service.getCharacteristic("ColorTemperature");t&&(this.targetColorTemperature={value:this.$colour.miredToKelvin(t.value),mired:t.value,min:this.$colour.miredToKelvin(t.maxValue),max:this.$colour.miredToKelvin(t.minValue),step:t.minStep},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(o){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);o.style.background=`linear-gradient(to right, ${i}, ${d})`}},10),this.isAdaptiveLightingEnabled$&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.pipe(Z(this.$destroyRef)).subscribe(o=>{this.isAdaptiveLightingEnabled=o})))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories",isAdaptiveLightingEnabled$:"isAdaptiveLightingEnabled$"},decls:29,vars:27,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"d-flex","justify-content-center","mb-0","p-0","mt-0","grey-outline"],[1,"modal-footer"],[1,"mb-0","mx-0","p-3","btn-read","w-100","no-round-top"],[1,"fas","fa-xl","fa-sun",3,"ngClass"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[3,"ngModelChange","min","max","step","ngModel","ngClass"],[1,"d-flex","text-center","mt-0","mb-1"],[1,"grey-text","small"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()(),_(22,Jl,1,0,"div"),s(),_(23,ec,8,8,"div",11),_(24,tc,4,8),_(25,nc,5,13),_(26,rc,5,13),_(27,sc,6,15),s(),m(28,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,13,"form.button_close")),r(3),x("aria-label",c(7,15,"accessories.control.mode_control")),r(4),u("ngClass",V(21,$n,!i.targetMode,i.targetMode)),r(),y(" ",c(12,17,"accessories.control.off")," "),r(6),u("ngClass",V(24,$n,i.targetMode,!i.targetMode)),r(),y(" ",c(19,19,"accessories.control.on")," "),r(4),k(i.hasAdaptiveLighting?22:-1),r(),k(i.hasAdaptiveLighting?23:-1),r(),k(i.targetBrightness?24:-1),r(),k(i.targetHue?25:-1),r(),k(i.targetSaturation?26:-1),r(),k(i.targetColorTemperature?27:-1))},dependencies:[ee,oe,re,ae,E,T,lt],encapsulation:2})}return e})();var lc=e=>({"accessory-on":e});function cc(e,a){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=f();u("innerHTML",t.service.values.On?t.service.values.Brightness+"%"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):c(1,1,"accessories.control.off"),Re)}}function pc(e,a){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=f();u("innerHTML",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):"accessories.control.off"),Re)}}var Wn=(()=>{class e{$accessories=b(K);$destroyRef=b(ie);$modal=b(J);intervalId;$colour=b(Ue);service;readyForControl=!1;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new Hi(!1);ngOnInit(){this.loadAdaptiveLighting()}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"Brightness"in this.service.values&&!this.service.values.On&&!this.service.values.Brightness&&(this.service.values.Brightness=this.service.getCharacteristic("Brightness").maxValue))}onLongClick(){if(this.readyForControl&&("Brightness"in this.service.values||"Hue"in this.service.values||"Saturation"in this.service.values||"ColorTemperature"in this.service.values)){let t=this.$modal.open(Rn,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e3);let o=this.isAdaptiveLightingEnabled$.pipe(Z(this.$destroyRef)).subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),o.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let o=t/100,i,d,h;return o<=66?(i=255,d=o,d=99.4708025861*Math.log(d)-161.1195681661,h=o<=19?0:138.5177312231*Math.log(o-10)-305.0447927307):(i=329.698727446*(o-60)**-.1332047592,d=288.1221695283*(o-60)**-.0755148492,h=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),h=Math.round(Math.min(Math.max(h,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}loadAdaptiveLighting(){"CharacteristicValueActiveTransitionCount"in this.service.values&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4),this.isAdaptiveLightingEnabled$.pipe(Z(this.$destroyRef)).subscribe(t=>{this.isAdaptiveLightingEnabled=t}))}Math=Math;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-lightbulb"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),_(12,cc,2,3,"div",10)(13,pc,2,3,"div",10),s()()),o&2&&(u("ngClass",N(8,lc,i.service.values.On||i.service.values.Active)),r(2),x("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),x("fill",i.service.values.On||i.service.values.Active?"Hue"in i.service.values?"hsl("+i.service.values.Hue+", "+i.service.values.Saturation+"%, 50%)":"ColorTemperature"in i.service.values?i.$colour.kelvinToHsl(i.$colour.miredToKelvin(i.service.values.ColorTemperature)):"#ffcf55":"none")("fill-opacity","Brightness"in i.service.values?.25+i.service.values.Brightness/100*.5:.75),r(6),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.Brightness?12:13))},dependencies:[G,E,T],encapsulation:2})}return e})();var Nt=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let o=Math.floor(t/60),i=t%60;return[o>0?`${o.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=Zi({name:"duration",type:e,pure:!0})}return e})();var Un=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function dc(e,a){if(e&1){let t=$();n(0,"h6",12),p(1),l(2,"translate"),l(3,"duration"),s(),n(4,"nouislider",13),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetLockManagementAutoSecurityTimeout.value,i)||(d.targetLockManagementAutoSecurityTimeout.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onLockManagementAutoSecurityTimeoutStateChange())}),s()}if(e&2){let t=f();r(),F(" ",c(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":c(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),r(3),u("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),W("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var jn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);lockTimeout;service;$accessories;stateSubscription;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new Q;ngOnInit(){this.targetMode=this.service.values.LockTargetState,this.service.linkedServices&&(this.serviceManagement=Object.values(this.service.linkedServices).find(t=>t.type==="LockManagement")),this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeoutChanged.pipe(Y(300),$i(),Z(this.$destroyRef)).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.loadTargetLockManagementAutoSecurityTimeout()),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.LockTargetState,this.targetLockManagementAutoSecurityTimeout&&this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeout.value=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("LockTargetState").setValue(this.targetMode),this.lockTimeout&&(clearTimeout(this.lockTimeout),this.lockTimeout=null),this.targetMode===0&&this.targetLockManagementAutoSecurityTimeout?.value>0&&(this.lockTimeout=setTimeout(()=>{this.targetMode=1},(this.targetLockManagementAutoSecurityTimeout.value+.3)*1e3)),o.target.blur()}onLockManagementAutoSecurityTimeoutStateChange(){this.targetLockManagementAutoSecurityTimeoutChanged.next(this.targetLockManagementAutoSecurityTimeout.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetLockManagementAutoSecurityTimeout(){let t=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout");t&&(this.targetLockManagementAutoSecurityTimeout={value:t.value||0,min:t.minValue||0,max:t.maxValue||3600,step:t.minStep||10},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,dc,5,10),s(),m(23,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,8,"form.button_close")),r(3),x("aria-label",c(7,10,"accessories.control.mode_control")),r(4),u("ngClass",V(16,Un,i.targetMode===1,i.targetMode!==1)),r(),y(" ",c(12,12,"accessories.control.locked")," "),r(6),u("ngClass",V(19,Un,i.targetMode===0,i.targetMode!==0)),r(),y(" ",c(19,14,"accessories.control.unlocked")," "),r(4),k(i.serviceManagement?22:-1))},dependencies:[ee,oe,re,ae,E,T,Nt],encapsulation:2})}return e})();var mc=(e,a,t,o)=>({"accessory-on":e,unlocked:a,jammed:t,error:o}),uc=(e,a)=>({"red-text":e,"grey-text":a});function fc(e,a){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=f();u("innerText",c(1,2,t.service.values.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))("ngClass",V(4,uc,!t.service.values.LockCurrentState,t.service.values.LockCurrentState))}}function vc(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.jammed")))}function gc(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.unknown")))}var Gn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&("LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"LockTargetState"in this.service.values){let t=this.$modal.open(jn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-lock-mechanism"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText","ngClass"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),L(),n(9,"div",8),p(10),s(),_(11,fc,2,7,"div",9)(12,vc,3,3,"div",10)(13,gc,3,3,"div",10),s()()),o&2&&(u("ngClass",st(6,mc,"LockCurrentState"in i.service.values&&i.service.values.LockCurrentState!==1||i.service.values.On===1,i.service.values.LockCurrentState===0||i.service.values.On===1,i.service.values.LockCurrentState===2,i.service.values.LockCurrentState===3)),r(2),x("aria-label",c(3,4,"accessories.core.lock_mechanism")),r(8),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.LockCurrentState<2?11:i.service.values.LockCurrentState===2?12:i.service.values.LockCurrentState===3?13:-1))},dependencies:[G,E,T],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var tt=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function hc(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,5,"accessories.control.mode_control")),r(4),u("ngClass",V(11,tt,t.service.values.Active===0,t.service.values.Active!==0)),r(),y(" ",c(6,7,"accessories.control.off")," "),r(6),u("ngClass",V(14,tt,t.service.values.Active===1,t.service.values.Active!==1)),r(),y(" ",c(13,9,"accessories.control.on")," ")}}function Cc(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,7,"accessories.control.media_control")),r(4),u("ngClass",V(15,tt,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),y(" ",c(6,9,"accessories.control.play")," "),r(6),u("ngClass",V(18,tt,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),y(" ",c(13,11,"accessories.control.pause")," "),r(6),u("ngClass",V(21,tt,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),y(" ",c(20,13,"accessories.control.stop")," ")}}function yc(e,a){if(e&1){let t=$();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();r(),y(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),x("aria-label",c(4,8,"accessories.control.mute_control")),r(4),u("ngClass",V(14,tt,!t.targetMode,t.targetMode)),r(),y(" ",c(9,10,"accessories.control.not_mute")," "),r(6),u("ngClass",V(17,tt,t.targetMode,!t.targetMode)),r(),y(" ",c(16,12,"accessories.control.mute")," ")}}function xc(e,a){if(e&1){let t=$();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onVolumeStateChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),W("ngModel",t.targetVolume.value)}}var zn=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetMode;targetVolume;targetVolumeChanged=new Q;constructor(){this.targetVolumeChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),o.target.blur()}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),o.target.blur()}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),o.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,hc,16,17,"div",5)(7,Cc,23,24,"div",5),_(8,yc,19,20),_(9,xc,4,8),s(),m(10,"div",6),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,5,"form.button_close")),r(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),k("Mute"in i.service.values?8:-1),r(),k(i.targetVolume?9:-1))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var _c=()=>[0,1],kc=(e,a)=>({"accessory-on":e,paused:a}),Sc=()=>["Speaker","SmartSpeaker"];function bc(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.play")," ")}function Mc(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.pause")," ")}function Tc(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.stop")," ")}function wc(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Ec(e,a){if(e&1&&p(0),e&2){let t=f(3);y(" \xB7 ",t.service.values.Volume,"% ")}}function Bc(e,a){if(e&1&&_(0,Ec,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function Vc(e,a){if(e&1&&(n(0,"div",10),_(1,bc,2,3)(2,Mc,2,3)(3,Tc,2,3),_(4,wc,2,3)(5,Bc,1,1),s()),e&2){let t,o=f();r(),k((t=o.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),k("Mute"in o.service.values&&o.service.values.Mute?4:5)}}function Dc(e,a){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function Ic(e,a){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function Lc(e,a){if(e&1&&(n(0,"div",10),p(1),s()),e&2){let t=f();r(),y("",t.service.values.Volume,"%")}}function Ac(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.on")))}function Pc(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.microphone")))}var qn=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(zn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-microphone"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:18,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["stroke-linecap","round","x1","10","y1","6","x2","20","y2","6","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","10","x2","20","y2","10","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","14","x2","20","y2","14","stroke","#7f7f7f","stroke-width","2"],["cx","15","cy","23","r","3","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"circle",8),s()(),L(),n(10,"div",9),p(11),s(),_(12,Vc,6,2,"div",10)(13,Dc,2,3,"div",11)(14,Ic,2,3,"div",11)(15,Lc,2,1,"div",10)(16,Ac,3,3,"div",10)(17,Pc,3,3,"div",10),s()()),o&2&&(u("ngClass",V(7,kc,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?ye(6,_c).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),r(2),x("aria-label",c(3,4,"accessories.core.microphone")),r(9),v(i.service.customName||i.service.serviceName),r(),k("CurrentMediaState"in i.service.values?12:"Active"in i.service.values&&!i.service.values.Active?13:"Mute"in i.service.values&&i.service.values.Mute?14:"Volume"in i.service.values?15:ye(10,Sc).includes(i.service.customType||i.service.type)?16:17))},dependencies:[G,E,T],encapsulation:2})}return e})();var Fc=e=>({"accessory-on":e});function Hc(e,a){e&1&&(n(0,"div",25),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function Oc(e,a){e&1&&(n(0,"div",26),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var Zn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-motion-sensor"]],inputs:{service:"service"},decls:29,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(7, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["x","9","y","9","width","2","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","7","y","13","width","3","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","8","y","17","width","4","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23),s()(),L(),n(25,"div",24),p(26),s(),_(27,Hc,3,3,"div",25)(28,Oc,3,3,"div",26),s()()),o&2&&(u("ngClass",N(6,Fc,i.service.values.MotionDetected)),r(2),x("aria-label",c(3,4,"accessories.core.motion_sensor")),r(24),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.MotionDetected?27:28))},dependencies:[E,T],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Nc=e=>({"accessory-on":e});function $c(e,a){e&1&&(n(0,"div",22),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function Rc(e,a){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var Kn=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-occupancy-sensor"]],inputs:{service:"service"},decls:26,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),s()(),L(),n(22,"div",21),p(23),s(),_(24,$c,3,3,"div",22)(25,Rc,3,3,"div",23),s()()),o&2&&(u("ngClass",N(6,Nc,i.service.values.OccupancyDetected)),r(2),x("aria-label",c(3,4,"accessories.core.occupancy_sensor")),r(21),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.OccupancyDetected?24:25))},dependencies:[E,T],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Qn=()=>[0,2],Wc=e=>({"accessory-on":e});function Uc(e,a){e&1&&(B(),m(0,"line",8)(1,"line",9)(2,"line",10))}function jc(e,a){e&1&&(B(),m(0,"line",11)(1,"line",12)(2,"line",13))}function Gc(e,a){e&1&&(B(),m(0,"line",13)(1,"line",14)(2,"line",15))}var Yn=(()=>{class e{$settings=b(be);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-outlet"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),_(7,Uc,3,0)(8,jc,3,0)(9,Gc,3,0),s()(),L(),n(10,"div",6),p(11),s(),m(12,"div",7),l(13,"translate"),s()()),o&2&&(u("ngClass",N(10,Wc,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&ye(9,Qn).includes(i.service.values.CurrentDoorState))),r(2),x("aria-label",c(3,5,"accessories.core.outlet")),r(5),k(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),r(4),v(i.service.customName||i.service.serviceName),r(),u("innerText",c(13,7,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&ye(12,Qn).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[G,E,T],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var zc=e=>({"accessory-on":e}),Xn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-robot-vacuum"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"clipPath",4),m(7,"rect",5),s()(),n(8,"g",6),m(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),s(),n(19,"g",17)(20,"line",18),m(21,"animate",19)(22,"animate",20)(23,"animate",21),s(),n(24,"line",22),m(25,"animate",23)(26,"animate",24)(27,"animate",25),s(),n(28,"line",26),m(29,"animate",27)(30,"animate",28)(31,"animate",29),s()()()(),L(),n(32,"div",30),p(33),s(),m(34,"div",31),l(35,"translate"),s()()),o&2&&(u("ngClass",N(8,zc,i.service.values.On||i.service.values.Active)),r(2),x("aria-label",c(3,4,"accessories.core.robot_vacuum")),r(31),v(i.service.customName||i.service.serviceName),r(),u("innerText",c(35,6,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[G,E,T],styles:[".accessory-on svg .motion-lines{display:inline!important}"]})}return e})();var $t=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function qc(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(3,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,$t,t.targetMode===3,t.targetMode!==3)),r(),y(" ",c(4,2,"accessories.control.off")," ")}}function Zc(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,$t,t.targetMode===0,t.targetMode!==0)),r(),y(" ",c(4,2,"accessories.control.home")," ")}}function Kc(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,$t,t.targetMode===1,t.targetMode!==1)),r(),y(" ",c(4,2,"accessories.control.away")," ")}}function Qc(e,a){if(e&1){let t=$();n(0,"button",8),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,$t,t.targetMode===2,t.targetMode!==2)),r(),y(" ",c(4,2,"accessories.control.night")," ")}}var Jn=(()=>{class e{$activeModal=b(X);service;$accessories;targetMode;targetModeValidValues=[];stateSubscription;ngOnInit(){this.targetMode=this.service.values.SecuritySystemTargetState,this.targetModeValidValues=this.service.getCharacteristic("SecuritySystemTargetState").validValues,this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.SecuritySystemTargetState})}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("SecuritySystemTargetState").setValue(this.targetMode),o.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:13,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),_(8,qc,7,7,"button",6),_(9,Zc,7,7,"button",6),_(10,Kc,7,7,"button",6),_(11,Qc,7,7,"button",6),s()(),m(12,"div",7),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,7,"form.button_close")),r(3),x("aria-label",c(7,9,"accessories.control.mode_control")),r(2),k(i.targetModeValidValues.includes(3)?8:-1),r(),k(i.targetModeValidValues.includes(0)?9:-1),r(),k(i.targetModeValidValues.includes(1)?10:-1),r(),k(i.targetModeValidValues.includes(2)?11:-1))},dependencies:[ee,E,T],encapsulation:2})}return e})();var Yc=(e,a,t,o,i)=>({"accessory-on":e,home:a,away:t,night:o,triggered:i});function Xc(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.home")))}function Jc(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.away")))}function e0(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.night")))}function t0(e,a){e&1&&(n(0,"div",11),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.off")))}function i0(e,a){e&1&&(n(0,"div",11),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.triggered")))}var eo=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Jn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-security-system"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M7 18 C7 5, 25 5, 25 18 V26 H7 V18 Z","fill","none","stroke","#7f7f7f","stroke-width","1.5","fill-opacity","0.5",1,"dome"],["x","2","y","26","width","28","height","4","fill","none","stroke","#7f7f7f","stroke-width","1.5","rx","1"],["x1","6","y1","3","x2","10","y2","7","stroke-width","3",1,"ray"],["x1","16","y1","0","x2","16","y2","5","stroke-width","3",1,"ray"],["x1","26","y1","3","x2","22","y2","7","stroke-width","3",1,"ray"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){if(o&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"rect",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),_(12,Xc,3,3,"div",10)(13,Jc,3,3,"div",10)(14,e0,3,3,"div",10)(15,t0,3,3,"div",11)(16,i0,3,3,"div",11),s()()),o&2){let d;u("ngClass",nn(6,Yc,i.service.values.SecuritySystemCurrentState!==3,i.service.values.SecuritySystemCurrentState===0,i.service.values.SecuritySystemCurrentState===1,i.service.values.SecuritySystemCurrentState===2,i.service.values.SecuritySystemCurrentState===4)),r(2),x("aria-label",c(3,4,"accessories.core.security_system")),r(9),v(i.service.customName||i.service.serviceName),r(),k((d=i.service.values.SecuritySystemCurrentState)===0?12:d===1?13:d===2?14:d===3?15:d===4?16:-1)}},dependencies:[G,E,T],styles:[".home svg .dome{fill:#1976d2!important} .away svg .dome{fill:#ff9800!important} .night svg .dome{fill:#673ab7!important} .triggered svg .dome{fill:#d32f2f!important} .triggered svg .ray{stroke:#d32f2f;stroke-opacity:.5;animation:_ngcontent-%COMP%_blink 1s infinite}@keyframes _ngcontent-%COMP%_blink{0%,to{stroke-opacity:1}50%{stroke-opacity:.2}}"]})}return e})();var n0=e=>({"accessory-on":e});function o0(e,a){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function r0(e,a){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var to=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-smoke-sensor"]],inputs:{service:"service"},decls:22,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," SMOKE "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),s()(),L(),n(18,"div",16),p(19),s(),_(20,o0,3,3,"div",17)(21,r0,3,3,"div",18),s()()),o&2&&(u("ngClass",N(6,n0,i.service.values.SmokeDetected)),r(2),x("aria-label",c(3,4,"accessories.core.smoke_sensor")),r(17),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.SmokeDetected?20:21))},dependencies:[E,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var it=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function a0(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,5,"accessories.control.mode_control")),r(4),u("ngClass",V(11,it,t.service.values.Active===0,t.service.values.Active!==0)),r(),y(" ",c(6,7,"accessories.control.off")," "),r(6),u("ngClass",V(14,it,t.service.values.Active===1,t.service.values.Active!==1)),r(),y(" ",c(13,9,"accessories.control.on")," ")}}function s0(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();x("aria-label",c(1,7,"accessories.control.media_control")),r(4),u("ngClass",V(15,it,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),y(" ",c(6,9,"accessories.control.play")," "),r(6),u("ngClass",V(18,it,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),y(" ",c(13,11,"accessories.control.pause")," "),r(6),u("ngClass",V(21,it,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),y(" ",c(20,13,"accessories.control.stop")," ")}}function l0(e,a){if(e&1){let t=$();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();r(),y(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),x("aria-label",c(4,8,"accessories.control.mute_control")),r(4),u("ngClass",V(14,it,!t.targetMode,t.targetMode)),r(),y(" ",c(9,10,"accessories.control.not_mute")," "),r(6),u("ngClass",V(17,it,t.targetMode,!t.targetMode)),r(),y(" ",c(16,12,"accessories.control.mute")," ")}}function c0(e,a){if(e&1){let t=$();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onVolumeStateChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),W("ngModel",t.targetVolume.value)}}var io=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetMode;targetVolume;targetVolumeChanged=new Q;stateSubscription;constructor(){this.targetVolumeChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&"Volume"in this.service.values&&(this.targetVolume.value=this.service.getCharacteristic("Volume").value)})}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),o.target.blur()}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),o.target.blur()}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),o.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,a0,16,17,"div",5)(7,s0,23,24,"div",5),_(8,l0,19,20),_(9,c0,4,8),s(),m(10,"div",6),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,5,"form.button_close")),r(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),k("Mute"in i.service.values?8:-1),r(),k(i.targetVolume?9:-1))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var p0=()=>[0,1],d0=(e,a,t)=>({"accessory-on":e,paused:a,muted:t}),m0=()=>["Speaker","SmartSpeaker"];function u0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.play")," ")}function f0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.pause")," ")}function v0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.stop")," ")}function g0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function h0(e,a){if(e&1&&p(0),e&2){let t=f(3);y(" \xB7 ",t.service.values.Volume,"% ")}}function C0(e,a){if(e&1&&_(0,h0,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function y0(e,a){if(e&1&&(n(0,"div",14),_(1,u0,2,3)(2,f0,2,3)(3,v0,2,3),_(4,g0,2,3)(5,C0,1,1),s()),e&2){let t,o=f();r(),k((t=o.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),k("Mute"in o.service.values&&o.service.values.Mute?4:5)}}function x0(e,a){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function _0(e,a){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function k0(e,a){if(e&1&&(n(0,"div",14),p(1),s()),e&2){let t=f();r(),y("",t.service.values.Volume,"%")}}function S0(e,a){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.on")))}function b0(e,a){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.speaker")))}var no=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(io,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-speaker"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","20","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1"],["cx","16","cy","9","r","4.5","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","9","r","1.5","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["cx","16","cy","22","r","6","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","22","r","2","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["d","M4,12 Q1,16 4,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M3,10 Q-2,16 3,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],["d","M28,12 Q31,16 28,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M29,10 Q34,16 29,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12),s()(),L(),n(14,"div",13),p(15),s(),_(16,y0,6,2,"div",14)(17,x0,2,3,"div",15)(18,_0,2,3,"div",15)(19,k0,2,1,"div",14)(20,S0,3,3,"div",14)(21,b0,3,3,"div",14),s()()),o&2&&(u("ngClass",at(7,d0,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?ye(6,p0).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1,"Mute"in i.service.values&&i.service.values.Mute)),r(2),x("aria-label",c(3,4,"accessories.core.speaker")),r(13),v(i.service.customName||i.service.serviceName),r(),k("CurrentMediaState"in i.service.values?16:"Active"in i.service.values&&!i.service.values.Active?17:"Mute"in i.service.values&&i.service.values.Mute?18:"Volume"in i.service.values?19:ye(11,m0).includes(i.service.customType||i.service.type)?20:21))},dependencies:[G,E,T],styles:[".accessory-on:not(.paused):not(.muted) svg .wave-inner{animation:_ngcontent-%COMP%_pulse-inner 2s infinite} .accessory-on:not(.paused):not(.muted) svg .wave-outer{animation:_ngcontent-%COMP%_pulse-outer 2s infinite}@keyframes _ngcontent-%COMP%_pulse-inner{0%{stroke-opacity:.5}50%{stroke-opacity:1}to{stroke-opacity:.5}}@keyframes _ngcontent-%COMP%_pulse-outer{0%{stroke-opacity:.3}50%{stroke-opacity:.8}to{stroke-opacity:.3}} body.dark-mode div.accessory-box:not(.accessory-on) svg .inner{fill:#2b2b2b!important}"]})}return e})();var M0=(e,a,t)=>({"press-single":e,"press-double":a,"press-long":t}),oo=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-stateless-programmable-switch"]],inputs:{service:"service"},decls:17,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"single"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"double"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"long"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),s()(),L(),n(12,"div",11),p(13),s(),n(14,"div",12),p(15),l(16,"translate"),s()()()),o&2&&(u("ngClass",at(8,M0,i.service.values.ProgrammableSwitchEvent===0,i.service.values.ProgrammableSwitchEvent===1,i.service.values.ProgrammableSwitchEvent===2)),r(2),x("aria-label",c(3,4,"accessories.core.stateless_programmable_switch")),r(11),v(i.service.customName||i.service.serviceName),r(2),v(c(16,6,"accessories.control.stateless")))},dependencies:[E,T],styles:[".press-single svg .single{fill:#1976d2!important} .press-double svg .double{fill:#1976d2!important} .press-long svg .long{fill:#1976d2!important}"]})}return e})();var ro=()=>[0,2],T0=e=>({"accessory-on":e}),ao=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-switch"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
13
+ C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
14
+ C22.4505994,12.4811551 23,14.065977 23,15.7447101
15
+ C23,19.7640218 19.8532802,23 16,23
16
+ C12.1467198,23 9,19.7640218 9,15.7447101
17
+ C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
18
+ C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
19
+ C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
20
+ C7.75536735,11.4998488 7,13.5315645 7,15.7447101
21
+ C7,20.8562656 11.0294373,25 16,25
22
+ C20.9705627,25 25,20.8562656 25,15.7447101
23
+ C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
24
+ C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"path",6),s()(),L(),n(8,"div",7),p(9),s(),m(10,"div",8),l(11,"translate"),s()()),o&2&&(u("ngClass",N(9,T0,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&ye(8,ro).includes(i.service.values.CurrentDoorState))),r(2),x("aria-label",c(3,4,"accessories.core.switch")),r(7),v(i.service.customName||i.service.serviceName),r(),u("innerText",c(11,6,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&ye(11,ro).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[G,E,T],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.75}"]})}return e})();var w0=(e,a)=>({"mb-4":e,"mb-0":a}),ui=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function E0(e,a){if(e&1){let t=$();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return I(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();u("ngClass",V(12,w0,t.sourceList.length,!t.sourceList.length)),x("aria-label",c(1,6,"accessories.control.mode_control")),r(4),u("ngClass",V(15,ui,t.service.values.Active===0,t.service.values.Active!==0)),r(),y(" ",c(6,8,"accessories.control.off")," "),r(6),u("ngClass",V(18,ui,t.service.values.Active===1,t.service.values.Active!==1)),r(),y(" ",c(13,10,"accessories.control.on")," ")}}function B0(e,a){e&1&&(n(0,"h6"),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.input")))}function V0(e,a){if(e&1){let t=$();n(0,"button",7),C("click",function(i){let d=D(t).$implicit,h=f(2);return I(h.setInput(d.identifier,i))}),n(1,"div",8),m(2,"i",9),s(),p(3),n(4,"div",10),m(5,"i",11),s()()}if(e&2){let t=a.$implicit,o=f(2);r(2),u("ngClass",V(2,ui,o.service.values.ActiveIdentifier===t.identifier,o.service.values.ActiveIdentifier!==t.identifier)),r(),y(" ",t.name," ")}}function D0(e,a){if(e&1&&(_(0,B0,3,3,"h6"),n(1,"div",12),l(2,"translate"),Qi(3,V0,6,5,"button",13,Ki),s()),e&2){let t=f();k(t.hasActive?0:-1),r(),x("aria-label",c(2,2,"accessories.control.input_control")),r(2),Yi(t.sourceList)}}var so=(()=>{class e{$activeModal=b(X);service;inputList;$accessories;hasActive=!1;sourceList=[];stateSubscription;ngOnInit(){"Active"in this.service.values&&(this.hasActive=!0),Object.keys(this.inputList).length&&Object.entries(this.inputList).forEach(([t,o])=>{this.sourceList.push({identifier:Number.parseInt(t,10),name:o})}),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{"Active"in this.service.values&&(this.hasActive=!0)})}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),o.target.blur()}setInput(t,o){this.service.getCharacteristic("ActiveIdentifier").setValue(t),o.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",inputList:"inputList",$accessories:"$accessories"},decls:9,vars:6,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,E0,16,21,"div",5),_(7,D0,5,4),s(),m(8,"div",6),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,4,"form.button_close")),r(3),k(i.hasActive?6:-1),r(),k(i.sourceList.length?7:-1))},dependencies:[ee,E,T],encapsulation:2})}return e})();var I0=e=>({"accessory-on":e});function L0(e,a){if(e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2){let t=f();r(),y(" ",t.channelList[t.service.values.ActiveIdentifier]||c(2,1,"accessories.control.on")," ")}}function A0(e,a){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.off")))}var lo=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;channelList={};ngOnInit(){if(this.service.linkedServices)for(let[,t]of Object.entries(this.service.linkedServices))t.type==="InputSource"&&(this.channelList[t.values.Identifier]=t.values.ConfiguredName||`Input ${t.values.Identifier}`)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||Object.keys(this.channelList).length)){let t=this.$modal.open(so,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.inputList=this.channelList,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-television"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","10","y1","27.25","x2","22","y2","27.25","stroke","#d32f2f","stroke-width","4","stroke-linecap","round","stroke-opacity","0.75",1,"stand"],["x","1","y","6","width","30","height","20","rx","2","stroke","#7f7f7f","fill","#808080","stroke-width","1.5",1,"screen"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"line",4)(6,"rect",5),s()(),L(),n(7,"div",6),p(8),s(),_(9,L0,3,3,"div",7)(10,A0,3,3,"div",7),s()()),o&2&&(u("ngClass",N(6,I0,i.service.values.Active||i.service.values.On)),r(2),x("aria-label",c(3,4,"accessories.core.television")),r(6),y(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),k(i.service.values.On||i.service.values.Active?9:10))},dependencies:[G,E,T],styles:["body.dark-mode .screen{fill:#2b2b2b;stroke:#7f7f7f} .accessory-on svg .screen{animation:_ngcontent-%COMP%_color-change 3s infinite alternate} .accessory-on svg .stand{stroke:#7f7f7f;stroke-opacity:1}@keyframes _ngcontent-%COMP%_color-change{0%{fill:#4fc3f7}to{fill:#0288d1}}"]})}return e})();function P0(e,a){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=f();F(" ",se(2,4,c(1,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(3,7,t.temperatureUnits)," ")}}function F0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.no_data")," ")}var co=(()=>{class e{$settings=b(be);service;temperatureUnits=this.$settings.env.temperatureUnits;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-temperature-sensor"]],inputs:{service:"service"},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),le()(),L(),ne(29,"div",28),p(30),le(),ne(31,"div",29),_(32,P0,4,9)(33,F0,2,3),le()()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.temperature_sensor")),r(28),v(i.service.customName||i.service.serviceName),r(2),k("CurrentTemperature"in i.service.values?32:33))},dependencies:[Se,Ie,De,T],styles:[".temperature-circle[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:50px;border-radius:50%;font-size:14px;text-align:center;margin-bottom:6px;background-color:gray;color:#d3d3d3}@media (max-width: 575px){.temperature-circle-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:31px;font-size:10px;margin-bottom:7px}}"]})}return e})();var Rt=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function H0(e,a){if(e&1&&p(0),e&2){let t=f();y(" \xB7 ",t.service.values.CurrentRelativeHumidity,"% ")}}function O0(e,a){if(e&1){let t=$();n(0,"button",10),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(0,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,Rt,t.targetMode===0,t.targetMode!==0)),r(),y(" ",c(4,2,"accessories.control.off")," ")}}function N0(e,a){if(e&1){let t=$();n(0,"button",10),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(3,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,Rt,t.targetMode===3,t.targetMode!==3)),r(),y(" ",c(4,2,"accessories.control.auto")," ")}}function $0(e,a){if(e&1){let t=$();n(0,"button",10),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(1,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,Rt,t.targetMode===1,t.targetMode!==1)),r(),y(" ",c(4,2,"accessories.control.heat")," ")}}function R0(e,a){if(e&1){let t=$();n(0,"button",10),C("click",function(i){D(t);let d=f();return I(d.setTargetMode(2,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();r(2),u("ngClass",V(4,Rt,t.targetMode===2,t.targetMode!==2)),r(),y(" ",c(4,2,"accessories.control.cool")," ")}}function W0(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetTemperature.value,i)||(d.targetTemperature.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onTemperatureStateChange())}),s()}if(e&2){let t=f();r(),Ne(" ",c(2,7,"accessories.control.target"),": ",se(4,11,c(3,9,t.targetTemperature.value),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.targetTemperature.min)("max",t.targetTemperature.max)("step",t.targetTemperature.step),W("ngModel",t.targetTemperature.value)}}function U0(e,a){if(e&1){let t=$();n(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),n(9,"nouislider",16),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoTemp,i)||(d.autoTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onAutoThresholdStateChange())}),s()}if(e&2){let t=f(2);r(),rt(" ",c(2,9,"accessories.control.threshold_auto"),": ",se(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",se(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),u("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),W("ngModel",t.autoTemp)}}function j0(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onThresholdStateChange())}),s()}if(e&2){let t=f(2);r(),Ne(" ",c(2,7,"accessories.control.threshold_auto"),": ",se(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),W("ngModel",t.targetHeatingTemp)}}function G0(e,a){if(e&1){let t=$();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),j("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f(2);return I(i.onThresholdStateChange())}),s()}if(e&2){let t=f(2);r(),Ne(" ",c(2,7,"accessories.control.threshold_auto"),": ",se(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),W("ngModel",t.targetCoolingTemp)}}function z0(e,a){if(e&1&&_(0,U0,10,25)(1,j0,7,16)(2,G0,7,16),e&2){let t=f();k(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var po=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);$settings=b(be);service;$accessories;targetMode;targetTemperature;targetTemperatureChanged=new Q;targetThresholdChanged=new Q;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;hasHumidity=!1;temperatureUnits=this.$settings.env.temperatureUnits;stateSubscription;constructor(){this.targetTemperatureChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("TargetTemperature").setValue(this.targetTemperature.value)}),this.targetThresholdChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetMode=this.service.values.TargetHeatingCoolingState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeatingCoolingState").validValues,this.loadTargetTemperature(),this.service.getCharacteristic("CurrentRelativeHumidity")&&(this.hasHumidity=!0),this.applySliderGradient(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.TargetHeatingCoolingState,this.targetTemperature&&(this.targetTemperature.value=this.service.getCharacteristic("TargetTemperature").value),this.CoolingThresholdTemperature&&(this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature").value),this.HeatingThresholdTemperature&&(this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature").value),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applySliderGradient()})}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHeatingCoolingState").setValue(this.targetMode),o.target.blur(),this.applySliderGradient()}onTemperatureStateChange(){this.targetTemperatureChanged.next(this.targetTemperature.value)}onThresholdStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetThresholdChanged.next(void 0)}onAutoThresholdStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetThresholdChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetTemperature(){let t=this.service.getCharacteristic("TargetTemperature");this.targetTemperature={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep||.5},this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}applySliderGradient(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:22,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4","mb-1"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),_(12,H0,1,1),s(),n(13,"div",7),l(14,"translate"),_(15,O0,7,7,"button",8),_(16,N0,7,7,"button",8),_(17,$0,7,7,"button",8),_(18,R0,7,7,"button",8),s(),_(19,W0,7,16),_(20,z0,3,1),s(),m(21,"div",9),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,14,"form.button_close")),r(4),qe("color",i.service.values.CurrentHeatingCoolingState===2?"#1e8bbd":i.service.values.CurrentHeatingCoolingState===1?"#e69533":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),r(),F("",se(10,18,c(9,16,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,21,i.temperatureUnits)," "),r(4),k(i.hasHumidity?12:-1),r(),x("aria-label",c(14,23,"accessories.control.mode_control")),r(2),k(i.targetStateValidValues.includes(0)?15:-1),r(),k(i.targetStateValidValues.includes(3)?16:-1),r(),k(i.targetStateValidValues.includes(1)?17:-1),r(),k(i.targetStateValidValues.includes(2)?18:-1),r(),k("TargetTemperature"in i.service.values?19:-1),r(),k(i.targetStateValidValues.includes(3)?20:-1))},dependencies:[E,ee,oe,re,ae,Se,T,Ie,De],encapsulation:2})}return e})();var q0=e=>({"accessory-on":e});function Z0(e,a){if(e&1&&(B(),n(0,"text",18),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=f();r(),F(" ",se(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function K0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.off")," ")}function Q0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.heat")," ")}function Y0(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.cool")," ")}function X0(e,a){if(e&1&&(m(0,"i",21),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f();r(),F(" ",se(3,4,c(2,2,t.service.values.TargetTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}var mo=(()=>{class e{$modal=b(J);$settings=b(be);$accessories=b(K);service;readyForControl=!1;temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(po,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-thermostat"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:30,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"rect",17),_(22,Z0,5,9,":svg:text",18),s()(),L(),n(23,"div",19),p(24),s(),n(25,"div",20),_(26,K0,2,3)(27,Q0,2,3)(28,Y0,2,3)(29,X0,5,9),s()()()),o&2&&(u("ngClass",N(8,q0,i.service.values.TargetHeatingCoolingState>0)),r(2),x("aria-label",c(3,6,"accessories.core.thermostat")),r(19),x("fill",i.service.values.CurrentHeatingCoolingState===2?"url(#coolingGradient)":i.service.values.CurrentHeatingCoolingState===1?"url(#heatingGradient)":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),r(),k("CurrentTemperature"in i.service.values?22:-1),r(2),v(i.service.customName||i.service.serviceName),r(2),k(i.service.values.TargetHeatingCoolingState===0?26:i.service.values.CurrentHeatingCoolingState===1?27:i.service.values.CurrentHeatingCoolingState===2?28:i.service.values.TargetHeatingCoolingState===3?29:-1))},dependencies:[G,E,Se,T,Ie,De],encapsulation:2})}return e})();var uo=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-unknown"]],inputs:{service:"service"},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
25
+ L12.1868707,17.7112593
26
+ C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
27
+ L16.4805582,7.35415962
28
+ C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
29
+ L15.7252918,12.6132252
30
+ C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
31
+ L20.1977772,14.5048291
32
+ L20.1846183,14.5177121
33
+ L20.2552868,14.5177121
34
+ C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
35
+ L16.1844844,24.5082506
36
+ C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
37
+ L16.7168658,19.6157462
38
+ C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
39
+ L12.2443804,17.7241422
40
+ L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),B(),ne(3,"svg",3),xe(4,"circle",4)(5,"path",5),le()(),L(),ne(6,"div",6),p(7),le(),ne(8,"div",7),p(9),le()()()),o&2&&(r(2),x("aria-label",i.service.humanType),r(5),v(i.service.customName||i.service.serviceName),r(2),v(i.service.humanType))},encapsulation:2})}return e})();var fo=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function J0(e,a){if(e&1){let t=$();n(0,"h6"),p(1),l(2,"translate"),l(3,"duration"),s(),n(4,"nouislider",12),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetSetDuration.value,i)||(d.targetSetDuration.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onSetDurationStateChange())}),s()}if(e&2){let t=f();r(),F(" ",c(2,6,"accessories.control.set_duration"),": ",t.targetSetDuration.value===0?"\u221E":c(3,8,t.targetSetDuration.value)," "),r(3),u("min",t.targetSetDuration.min)("max",t.targetSetDuration.max)("step",15),W("ngModel",t.targetSetDuration.value)}}var vo=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetMode;targetSetDuration;targetSetDurationChanged=new Q;stateSubscription;constructor(){this.targetSetDurationChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("SetDuration").setValue(this.targetSetDuration.value)})}ngOnInit(){this.targetMode=this.service.values.Active,this.loadTargetSetDuration(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Active,this.targetSetDuration&&"SetDuration"in this.service.values&&(this.targetSetDuration.value=this.service.getCharacteristic("SetDuration").value)})}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Active").setValue(this.targetMode),o.target.blur()}onSetDurationStateChange(){this.targetSetDurationChanged.next(this.targetSetDuration.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetSetDuration(){let t=this.service.getCharacteristic("SetDuration");t&&(this.targetSetDuration={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[0];o&&(o.style.background="linear-gradient(to right, #add8e6, #416bdf)")},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,J0,5,10),s(),m(23,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,8,"form.button_close")),r(3),x("aria-label",c(7,10,"accessories.control.mode_control")),r(4),u("ngClass",V(16,fo,!i.targetMode,i.targetMode)),r(),y(" ",c(12,12,"accessories.control.off")," "),r(6),u("ngClass",V(19,fo,i.targetMode,!i.targetMode)),r(),y(" ",c(19,14,"accessories.control.on")," "),r(4),k(i.targetSetDuration?22:-1))},dependencies:[ee,oe,re,ae,E,T,Nt],encapsulation:2})}return e})();var ep=e=>({"accessory-on":e});function tp(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"line",6)(4,"line",7)(5,"line",8)(6,"line",9)(7,"circle",10)(8,"circle",11)(9,"circle",12)(10,"circle",13)(11,"circle",14)(12,"circle",15),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.generic_valve"))}function ip(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"circle",16)(4,"circle",17)(5,"circle",18)(6,"circle",19)(7,"circle",20)(8,"circle",21)(9,"circle",22)(10,"circle",23)(11,"circle",24)(12,"circle",25)(13,"line",26)(14,"line",27)(15,"line",28),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.irrigation_valve"))}function np(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"line",29)(4,"line",30)(5,"line",31)(6,"path",32)(7,"line",33)(8,"circle",34)(9,"circle",35)(10,"circle",36)(11,"circle",37)(12,"circle",38)(13,"circle",39)(14,"circle",40)(15,"circle",41)(16,"circle",42)(17,"circle",43)(18,"circle",44)(19,"circle",45),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.shower_head_valve"))}function op(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"rect",46)(4,"line",47)(5,"line",48)(6,"rect",49)(7,"path",50)(8,"line",51)(9,"line",52),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.faucet_valve"))}function rp(e,a){if(e&1&&(n(0,"div",4),p(1),s()),e&2){let t=f();r(),v(t.remainingDuration)}}function ap(e,a){e&1&&(n(0,"div",4),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.running")))}function sp(e,a){e&1&&(n(0,"div",4),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.off")))}var go=(()=>{class e{$destroyRef=b(ie);$accessories=b(K);$modal=b(J);service;readyForControl=!1;secondsActive=0;remainingDuration;remainingDurationInterval=Oi(1e3).pipe(Ni(()=>this.isActive()));remainingDurationSubscription;ngOnInit(){"SetDuration"in this.service.values&&this.setupRemainingDurationCounter()}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"SetDuration"in this.service.values){let t=this.$modal.open(vo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}ngOnDestroy(){this.remainingDurationSubscription&&this.remainingDurationSubscription.unsubscribe()}isActive(){return this.service.values.Active?!0:(this.resetRemainingDuration(),!1)}setupRemainingDurationCounter(){this.remainingDurationSubscription=this.remainingDurationInterval.pipe(Z(this.$destroyRef)).subscribe(()=>{this.secondsActive++;let t=this.service.getCharacteristic("RemainingDuration").value-this.secondsActive;t>0?this.remainingDuration=t<3600?new Date(t*1e3).toISOString().substring(14,19):new Date(t*1e3).toISOString().substring(11,19):this.remainingDuration=""})}resetRemainingDuration(){this.secondsActive=0,this.service.getCharacteristic("RemainingDuration")&&(this.remainingDuration="")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-valve"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:6,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","1","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","6","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","16","cy","4","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","26","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","31","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","7","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","25","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","10.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","21.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","16","cy","9","r","1.5",1,"drop","drop-in"],["x1","16","y1","16","x2","16","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","14","y1","16","x2","18","y2","16","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","4","y1","31","x2","28","y2","31","stroke","#7f7f7f","stroke-opacity","0.5","stroke-width","10","stroke-linecap","round",1,"grass"],["x1","1","y1","1","x2","16","y2","1","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","1","y1","1","x2","1","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","16","y1","1","x2","16","y2","3","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["d","M8 11 A8 7 0 0 1 24 11","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","7","y1","11","x2","25","y2","11","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","8","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","24","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","8","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","24","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","8","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","24","cy","28","r","0.75",1,"drop","drop-bottom"],["x","-3","y","28","width","21","height","6.5","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"sink"],["stroke-linecap","round","x1","24","y1","18","x2","26","y2","18","stroke","#1976d2","stroke-width","3","stroke-opacity","0.5"],["stroke-linecap","round","x1","20","y1","18","x2","22","y2","18","stroke","#d32f2f","stroke-width","3","stroke-opacity","0.5"],["x","19","y","16.5","rx","1","width","8","height","3","fill","none","stroke-width","1","stroke","#7f7f7f"],["d","M10 9 C10 -1, 23 -1, 23 10 V26","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","10","y1","9","x2","10","y2","28","stroke","#1976d2","stroke-opacity","0","stroke-width","1.5",1,"stream"],["x1","20","y1","31","x2","26","y2","31","stroke","#7f7f7f","stroke-width","10","stroke-linecap","round"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1),_(2,tp,13,3,"div",2)(3,ip,16,3,"div",2)(4,np,20,3,"div",2)(5,op,10,3,"div",2),n(6,"div",3),p(7),s(),_(8,rp,2,1,"div",4)(9,ap,3,3,"div",4)(10,sp,3,3,"div",4),s()()),o&2&&(u("ngClass",N(4,ep,i.service.values.Active||i.service.values.On)),r(2),k(i.service.values.ValveType===0||!i.service.values.ValveType?2:i.service.values.ValveType===1?3:i.service.values.ValveType===2?4:i.service.values.ValveType===3?5:-1),r(5),y(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),k(i.service.values.Active&&i.remainingDuration?8:i.service.values.Active&&!i.remainingDuration||i.service.values.On?9:10))},dependencies:[G,E,T],styles:[".accessory-on svg .grass{stroke:#4caf50!important} .accessory-on svg .drop{fill-opacity:.5} .accessory-on svg .drop-in{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-out{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.75s} .accessory-on svg .drop-top{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-middle{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s} .accessory-on svg .drop-bottom{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}@keyframes _ngcontent-%COMP%_blink-on-off{0%,to{opacity:1}50%{opacity:.5}} .accessory-on svg .stream{stroke-opacity:.5;animation:_ngcontent-%COMP%_blink-on-off 4s infinite} .accessory-on svg .sink{fill:#1976d2}"]})}return e})();var lp=e=>({"accessory-on":e}),ho=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-washing-machine"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3","y","1","width","25","height","30","rx","2","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","6","y","4","width","5","rx","0.5","height","4","stroke","#7f7f7f","fill","none","stroke-width","0.5"],["x","7","y","6","width","3","rx","0.25","height","1","stroke","#7f7f7f","fill","none","stroke-width","0.25"],["x","14","y","4","width","11","height","4","rx","0.5","fill","none","stroke","#7f7f7f","stroke-width","0.5"],["x","19","y","5","width","5","height","2","rx","0.25","fill","#1976d2","fill-opacity","0.5","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","19","y","15.5","rx","1","width","3","height","3","fill","#7f7f7f",1,"handle"],["cx","15.5","cy","17","r","6.5","stroke","#7f7f7f","fill","none","stroke-width","1.2"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12)(14,"rect",13)(15,"rect",14)(16,"rect",15)(17,"circle",16),s()(),L(),n(18,"div",17),p(19),s(),m(20,"div",18),l(21,"translate"),s()()),o&2&&(u("ngClass",N(8,lp,i.service.values.On||i.service.values.Active)),r(2),x("aria-label",c(3,4,"accessories.core.washing_machine")),r(17),v(i.service.customName||i.service.serviceName),r(),u("innerText",c(21,6,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[G,E,T],styles:[".accessory-on svg .handle{fill:#1976d2;fill-opacity:.5;transform-origin:48% 53%;animation:_ngcontent-%COMP%_rotate-handle 2s linear infinite}@keyframes _ngcontent-%COMP%_rotate-handle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();function cp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function pp(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function dp(e,a){if(e&1&&_(0,cp,2,3)(1,pp,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function mp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.opening"),"... ")}function up(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closing"),"... ")}var Co=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetMode;targetPositionChanged=new Q;targetPosition;stateSubscription;constructor(){this.targetPositionChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value)})}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,dp,2,1)(9,mp,2,3)(10,up,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),j("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),j("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,20,"form.button_close")),r(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),F("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),W("ngModel",i.targetPosition.value),r(3),v(c(18,24,"accessories.control.closed")),r(3),v(c(21,26,"accessories.control.open")),r(3),F(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),u("min",0)("max",100)("step",1)("disabled",!0),W("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),v(c(29,30,"accessories.control.closed")),r(3),v(c(32,32,"accessories.control.open")))},dependencies:[ae,ee,oe,re,T],encapsulation:2})}return e})();var fp=e=>({"accessory-on":e});function vp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function gp(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function hp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.open")," ")}function Cp(e,a){if(e&1&&(n(0,"div",12),_(1,vp,2,3),_(2,gp,2,4),_(3,hp,2,3),s()),e&2){let t=f();r(),k(t.service.values.CurrentPosition===0?1:-1),r(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),k(t.service.values.CurrentPosition===100?3:-1)}}function yp(e,a){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.opening"),"..."))}function xp(e,a){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.closing"),"..."))}var yo=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Co,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-window-covering"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),L(),n(12,"div",11),p(13),s(),_(14,Cp,4,3,"div",12)(15,yp,3,3,"div",13)(16,xp,3,3,"div",13),s()()),o&2&&(u("ngClass",N(6,fp,i.service.values.CurrentPosition)),r(2),x("aria-label",c(3,4,"accessories.core.window_covering")),r(11),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[G,E,T],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px}"]})}return e})();function _p(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function kp(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Sp(e,a){if(e&1&&_(0,_p,2,3)(1,kp,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function bp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.opening"),"... ")}function Mp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closing"),"... ")}var xo=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetMode;targetPositionChanged=new Q;targetPosition;stateSubscription;constructor(){this.targetPositionChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value)})}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,Sp,2,1)(9,bp,2,3)(10,Mp,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),j("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),j("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,20,"form.button_close")),r(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),F("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),W("ngModel",i.targetPosition.value),r(3),v(c(18,24,"accessories.control.closed")),r(3),v(c(21,26,"accessories.control.open")),r(3),F(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),u("min",0)("max",100)("step",1)("disabled",!0),W("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),v(c(29,30,"accessories.control.closed")),r(3),v(c(32,32,"accessories.control.open")))},dependencies:[ae,ee,oe,re,T],encapsulation:2})}return e})();var Tp=e=>({"accessory-on":e});function wp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function Ep(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);F(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function Bp(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.open")," ")}function Vp(e,a){if(e&1&&(n(0,"div",12),_(1,wp,2,3),_(2,Ep,2,4),_(3,Bp,2,3),s()),e&2){let t=f();r(),k(t.service.values.CurrentPosition===0?1:-1),r(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),k(t.service.values.CurrentPosition===100?3:-1)}}function Dp(e,a){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.opening"),"..."))}function Ip(e,a){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(r(),y("",c(2,1,"accessories.control.closing"),"..."))}var _o=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(xo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-window"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),L(),n(12,"div",11),p(13),s(),_(14,Vp,4,3,"div",12)(15,Dp,3,3,"div",13)(16,Ip,3,3,"div",13),s()()),o&2&&(u("ngClass",N(6,Tp,i.service.values.CurrentPosition)),r(2),x("aria-label",c(3,4,"accessories.core.window")),r(11),v(i.service.customName||i.service.serviceName),r(),k(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[G,E,T],styles:["svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();var bt={OnOffLight:"OnOffLight",OnOffLightSwitch:"OnOffLightSwitch",OnOffPlugInUnit:"OnOffPlugInUnit",DimmableLight:"DimmableLight",ColorTemperatureLight:"ColorTemperatureLight",ExtendedColorLight:"ExtendedColorLight",RoboticVacuumCleaner:"RoboticVacuumCleaner",ContactSensor:"ContactSensor",OccupancySensor:"OccupancySensor",LightSensor:"LightSensor",TemperatureSensor:"TemperatureSensor",HumiditySensor:"HumiditySensor",SmokeCoAlarm:"SmokeCoAlarm",WaterLeakDetector:"WaterLeakDetector",AirQualitySensor:"AirQualitySensor",DoorLock:"DoorLock",WindowCovering:"WindowCovering",Door:"Door",Window:"Window",Fan:"Fan",Thermostat:"Thermostat"},Ae=(function(e){return e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked",e})(Ae||{}),fi=(function(e){return e[e.Idle=0]="Idle",e[e.Cleaning=1]="Cleaning",e})(fi||{}),Ee={Min:0,Max:254},ct={MinMired:147,MaxMired:500};function ko(e){return e.deviceType===bt.OnOffLight||e.deviceType===bt.OnOffLightSwitch||e.deviceType===bt.OnOffPlugInUnit}function vi(e){return e.deviceType===bt.RoboticVacuumCleaner}function gi(e){return e.clusters?.rvcOperationalState?.operationalState??Ae.Stopped}function Lp(e){let a=gi(e);return a===Ae.Running||a===Ae.Paused}function Ap(e){let a=gi(e);if(a===Ae.Running){let t=e.getCluster?.("rvcOperationalState");t&&t.setAttributes({operationalState:Ae.Paused}).catch(o=>{console.error("Failed to pause Matter robotic vacuum:",o)})}else if(a===Ae.Paused){let t=e.getCluster?.("rvcOperationalState");t&&t.setAttributes({operationalState:Ae.Running}).catch(o=>{console.error("Failed to resume Matter robotic vacuum:",o)})}else{let t=e.getCluster?.("rvcRunMode");t?t.setAttributes({currentMode:fi.Cleaning}).catch(o=>{console.error("Failed to start Matter robotic vacuum:",o)}):console.error("RvcRunMode cluster not found")}}function Pp(e){let t=!(e.clusters?.onOff?.onOff??!1),o=e.getCluster?.("onOff");o&&o.setAttributes({onOff:t}).catch(i=>{console.error("Failed to control Matter device:",i)})}function Oe(e){return e.clusters?.onOff?.onOff??!1}function Fp(e){return e.clusters?.levelControl!==void 0}function He(e){if(vi(e))return Lp(e);if(Fp(e)){let a=Oe(e),t=$e(e)>0;return a&&t}return Oe(e)}function Ke(e){vi(e)?Ap(e):Pp(e)}function Hp(e){switch(gi(e)){case Ae.Running:return"accessories.control.cleaning";case Ae.Paused:return"accessories.control.paused";case Ae.SeekingCharger:return"Seeking Charger";case Ae.Charging:return"Charging";case Ae.Docked:return"Docked";case Ae.Stopped:default:return"accessories.control.stopped"}}function Op(e){return Oe(e)?"accessories.control.on":"accessories.control.off"}function So(e){return vi(e)?Hp(e):Op(e)}function $e(e){return e.clusters?.levelControl?.currentLevel??Ee.Min}function pt(e){let a=$e(e);return Math.round(a/Ee.Max*100)}function dt(e){return Math.round(e/Ee.Max*100)}function mt(e){let a=$e(e);if(Oe(e)){let o=e.getCluster?.("onOff");o&&o.setAttributes({onOff:!1}).catch(i=>{console.error("Failed to turn Matter light off:",i)})}else{let o=a||Ee.Max,i=e.getCluster?.("levelControl");i&&i.setAttributes({currentLevel:o}).catch(d=>{console.error("Failed to turn Matter light on:",d)})}}function ut(e){return e.clusters?.colorControl?.colorTemperatureMireds??250}function bo(e){return e.clusters?.colorControl?.colorTemperatureMireds!==void 0}function Mt(e){return e.clusters?.colorControl?.currentHue??0}function Tt(e){return e.clusters?.colorControl?.currentSaturation??0}function Mo(e){return!(e.clusters?.booleanState?.stateValue??!1)}function To(e){return e.clusters?.occupancySensing?.occupancy?.occupied??!1}function wo(e){let a=e.clusters?.illuminanceMeasurement?.measuredValue??0;return a===0||a===null?0:10**((a-1)/1e4)}function Eo(e){let a=e.clusters?.temperatureMeasurement?.measuredValue;return a==null?null:a/100}function Bo(e){let a=e.clusters?.relativeHumidityMeasurement?.measuredValue;return a==null?null:a/100}function Np(e){return e.clusters?.smokeCoAlarm?.smokeState??0}function $p(e){return e.clusters?.smokeCoAlarm?.coState??0}function Vo(e){let a=Np(e),t=$p(e);return a>0||t>0}function Do(e){return e.clusters?.booleanState?.stateValue??!1}function Io(e){return e.clusters?.airQuality?.airQuality??0}function ft(e){return e.clusters?.doorLock?.lockState??1}function Lo(e){let a=ft(e),t=e.getCluster?.("doorLock");if(!t){console.error("Door lock cluster not found");return}a===1?t.setAttributes({lockState:2}).catch(o=>{console.error("Failed to unlock door:",o)}):t.setAttributes({lockState:1}).catch(o=>{console.error("Failed to lock door:",o)})}function Ao(e,a){let t=e.getCluster?.("doorLock");if(!t){console.error("Door lock cluster not found");return}let o=a?1:2;t.setAttributes({lockState:o}).catch(i=>{console.error("Failed to set door lock state:",i)})}function Rp(e){return e.clusters?.windowCovering?.currentPositionLiftPercent100ths??0}function Wp(e){return Math.round(100-e/100)}function Up(e){return Math.round((100-e)*100)}function nt(e){let a=Rp(e);return Wp(a)}function Wt(e,a){let t=e.getCluster?.("windowCovering");if(!t){console.error("Window covering cluster not found");return}let o=Up(a);t.setAttributes({targetPositionLiftPercent100ths:o}).catch(i=>{console.error("Failed to set window covering position:",i)})}function Po(e){nt(e)>50?Wt(e,0):Wt(e,100)}function jp(e){return e.clusters?.fanControl?.fanMode??0}function vt(e){return e.clusters?.fanControl?.percentSetting??0}function gt(e){let a=jp(e),t=vt(e);return a>0||t>0}function Fo(e){let a=gt(e),t=e.getCluster?.("fanControl");if(!t){console.error("Fan control cluster not found");return}a?t.setAttributes({percentSetting:0}).catch(o=>{console.error("Failed to turn fan off:",o)}):t.setAttributes({percentSetting:100}).catch(o=>{console.error("Failed to turn fan on:",o)})}function Ut(e,a){let t=e.getCluster?.("fanControl");if(!t){console.error("Fan control cluster not found");return}t.setAttributes({percentSetting:a}).catch(o=>{console.error("Failed to set fan speed:",o)})}function jt(e){let a=e.clusters?.thermostat?.externalMeasuredIndoorTemperature;return a==null?null:a/100}function ht(e){return e.clusters?.thermostat?.systemMode??0}function hi(e){return(e.clusters?.thermostat?.occupiedHeatingSetpoint??2e3)/100}function Ci(e){return(e.clusters?.thermostat?.occupiedCoolingSetpoint??2400)/100}function Ho(e){return ht(e)>0}function Oo(e,a){let t=e.getCluster?.("thermostat");if(!t){console.error("Thermostat cluster not found");return}t.setAttributes({systemMode:a}).catch(o=>{console.error("Failed to set thermostat system mode:",o)})}function yi(e,a){let t=e.getCluster?.("thermostat");if(!t){console.error("Thermostat cluster not found");return}let o=Math.round(a*100);t.setAttributes({occupiedHeatingSetpoint:o}).catch(i=>{console.error("Failed to set heating setpoint:",i)})}function xi(e,a){let t=e.getCluster?.("thermostat");if(!t){console.error("Thermostat cluster not found");return}let o=Math.round(a*100);t.setAttributes({occupiedCoolingSetpoint:o}).catch(i=>{console.error("Failed to set cooling setpoint:",i)})}var Gp=()=>[3,4],zp=()=>[1,2],qp=(e,a,t,o)=>({"accessory-on":e,"fill-red":a,"fill-orange":t,"fill-green":o}),Zp=(e,a)=>({"grey-text":e,"red-text":a}),No=(()=>{class e{service;labels=["Unknown","Good","Fair","Moderate","Poor","Very Poor","Extremely Poor"];get airQuality(){return Io(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-air-quality-sensor"]],inputs:{service:"service"},decls:25,vars:17,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label",3,"ngClass"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),m(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),s()(),L(),n(21,"div",20),p(22),s(),n(23,"div",21),p(24),s()()()),o&2&&(u("ngClass",st(9,qp,i.airQuality===5,i.airQuality===5,ye(7,Gp).includes(i.airQuality),ye(8,zp).includes(i.airQuality))),r(2),x("aria-label",c(3,5,"accessories.core.air_quality_sensor")),r(20),v(i.service.customName||i.service.displayName),r(),u("ngClass",V(14,Zp,i.airQuality<5,i.airQuality===5)),r(),y(" ",i.labels[i.airQuality||0]," "))},dependencies:[E,T],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var $o=(e,a)=>({"fa-check-circle":e,"fa-blank":a}),Ro=(()=>{class e{$activeModal=b(X);$colour=b(Ue);$destroyRef=b(ie);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;sliderIndex=0;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(()=>{if(this.targetBrightness.value===Ee.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(o=>{console.error("Failed to turn Matter light off:",o)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(o=>{console.error("Failed to set Matter light brightness:",o)})}this.targetMode=this.targetBrightness.value>0}),this.targetColorTemperatureChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(t=>{let o=this.service.getCluster?.("colorControl");o&&o.setAttributes({colorTemperatureMireds:t}).catch(i=>{console.error("Failed to set Matter light color temperature:",i)})})}ngOnInit(){this.targetMode=Oe(this.service),this.loadTargetBrightness(),this.loadTargetColorTemperature(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=Oe(this.service),this.targetBrightness.value=$e(this.service);let t=ut(this.service);this.targetColorTemperature.mired=t,this.targetColorTemperature.value=this.$colour.miredToKelvin(t)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(te=>{console.error("Failed to turn Matter light on:",te)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}o.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=$e(this.service);this.targetBrightness={value:t,min:Ee.Min,max:Ee.Max,step:1},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];o&&(o.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10)}loadTargetColorTemperature(){let t=ut(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(ct.MaxMired),max:this.$colour.miredToKelvin(ct.MinMired),step:10},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(o){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);o.style.background=`linear-gradient(to right, ${i}, ${d})`}},10)}get brightnessPercentage(){return dt(this.targetBrightness.value)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:32,vars:39,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),j("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s(),n(26,"h6",11),p(27),l(28,"translate"),l(29,"convertMired"),s(),n(30,"nouislider",12),j("ngModelChange",function(h){return U(i.targetColorTemperature.value,h)||(i.targetColorTemperature.value=h),h}),C("ngModelChange",function(){return i.onColorTemperatureStateChange()}),s()(),m(31,"div",13),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,19,"form.button_close")),r(3),x("aria-label",c(7,21,"accessories.control.mode_control")),r(4),u("ngClass",V(33,$o,!i.targetMode,i.targetMode)),r(),y(" ",c(12,23,"accessories.control.off")," "),r(6),u("ngClass",V(36,$o,i.targetMode,!i.targetMode)),r(),y(" ",c(19,25,"accessories.control.on")," "),r(5),F("",c(24,27,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),r(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),W("ngModel",i.targetBrightness.value),r(2),F(" ",c(28,29,"accessories.control.color_temperature"),": ",c(29,31,i.targetColorTemperature.mired)," "),r(3),u("min",i.targetColorTemperature.min)("max",i.targetColorTemperature.max)("step",i.targetColorTemperature.step),W("ngModel",i.targetColorTemperature.value))},dependencies:[ee,oe,re,ae,E,T,lt],encapsulation:2})}return e})();var Kp=e=>({"accessory-on":e}),Wo=(()=>{class e{$accessories=b(K);$modal=b(J);$colour=b(Ue);service;readyForControl=!1;onClick(){this.readyForControl&&mt(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Ro,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return He(this.service)}get brightness(){return pt(this.service)}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let o=t/100,i,d,h;return o<=66?(i=255,d=o,d=99.4708025861*Math.log(d)-161.1195681661,h=o<=19?0:138.5177312231*Math.log(o-10)-305.0447927307):(i=329.698727446*(o-60)**-.1332047592,d=288.1221695283*(o-60)**-.0755148492,h=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),h=Math.round(Math.min(Math.max(h,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}Math=Math;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-color-temperature-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),o&2&&(u("ngClass",N(10,Kp,i.isOn)),r(2),x("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),x("fill",i.isOn?i.kelvinToHex(i.$colour.miredToKelvin((i.service.clusters==null||i.service.clusters.colorControl==null?null:i.service.clusters.colorControl.colorTemperatureMireds)||250)):"none")("fill-opacity",.25+i.brightness/100*.5),r(6),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Re))},dependencies:[G,E,T],encapsulation:2})}return e})();var Qp=e=>({"accessory-on":e});function Yp(e,a){e&1&&(n(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.open")))}function Xp(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.closed")))}var Uo=(()=>{class e{service;get isOpen(){return Mo(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-contact-sensor"]],inputs:{service:"service"},decls:13,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),L(),n(9,"div",8),p(10),s(),_(11,Yp,3,3,"div",9)(12,Xp,3,3,"div",10),s()()),o&2&&(u("ngClass",N(6,Qp,i.isOpen)),r(2),x("aria-label",c(3,4,"accessories.core.contact_sensor")),r(8),v(i.service.customName||i.service.serviceName),r(),k(i.isOpen?11:12))},dependencies:[E,T],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();var jo=(e,a)=>({"fa-check-circle":e,"fa-blank":a}),Go=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(()=>{if(this.targetBrightness.value===Ee.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(o=>{console.error("Failed to turn Matter light off:",o)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(o=>{console.error("Failed to set Matter light brightness:",o)})}this.targetMode=this.targetBrightness.value>0})}ngOnInit(){this.targetMode=Oe(this.service),this.loadTargetBrightness(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=Oe(this.service),this.targetBrightness.value=$e(this.service)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(te=>{console.error("Failed to turn Matter light on:",te)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}o.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=$e(this.service);this.targetBrightness={value:t,min:Ee.Min,max:Ee.Max,step:1},setTimeout(()=>{let o=document.querySelector(".noUi-target");o&&(o.style.background="linear-gradient(to right, #242424, #ffd6aa)")},10)}get brightnessPercentage(){return dt(this.targetBrightness.value)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:27,vars:29,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),j("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s()(),m(26,"div",13),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,13,"form.button_close")),r(3),x("aria-label",c(7,15,"accessories.control.mode_control")),r(4),u("ngClass",V(23,jo,!i.targetMode,i.targetMode)),r(),y(" ",c(12,17,"accessories.control.off")," "),r(6),u("ngClass",V(26,jo,i.targetMode,!i.targetMode)),r(),y(" ",c(19,19,"accessories.control.on")," "),r(5),F("",c(24,21,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),r(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),W("ngModel",i.targetBrightness.value))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var Jp=e=>({"accessory-on":e}),zo=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&mt(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Go,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return He(this.service)}get brightness(){return pt(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-dimmable-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),o&2&&(u("ngClass",N(10,Jp,i.isOn)),r(2),x("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),x("fill",i.isOn?"#ffcf55":"none")("fill-opacity",.25+i.brightness/100*.5),r(6),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Re))},dependencies:[G,E,T],encapsulation:2})}return e})();var qo=(e,a)=>({"fa-check-circle":e,"fa-blank":a}),Zo=(()=>{class e{$activeModal=b(X);service;$accessories;stateSubscription;targetMode;ngOnInit(){this.targetMode=ft(this.service),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=ft(this.service)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){this.targetMode=t;let i=t===1;Ao(this.service,i),o.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:23,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(2,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()()(),m(22,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,7,"form.button_close")),r(3),x("aria-label",c(7,9,"accessories.control.mode_control")),r(4),u("ngClass",V(15,qo,i.targetMode===1,i.targetMode!==1)),r(),y(" ",c(12,11,"accessories.control.locked")," "),r(6),u("ngClass",V(18,qo,i.targetMode===2,i.targetMode!==2)),r(),y(" ",c(19,13,"accessories.control.unlocked")," "))},dependencies:[E,T],encapsulation:2})}return e})();var ed=(e,a,t)=>({"accessory-on":e,unlocked:a,jammed:t});function td(e,a){e&1&&(n(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.locked")))}function id(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.unlocked")))}function nd(e,a){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.jammed")))}var Ko=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&Lo(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Zo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get lockState(){return ft(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-door-lock"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),L(),n(9,"div",8),p(10),s(),_(11,td,3,3,"div",9)(12,id,3,3,"div",10)(13,nd,3,3,"div",10),s()()),o&2&&(u("ngClass",at(6,ed,i.lockState!==1,i.lockState===2,i.lockState===0)),r(2),x("aria-label",c(3,4,"accessories.core.lock_mechanism")),r(8),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),k(i.lockState===1?11:i.lockState===2?12:i.lockState===0?13:-1))},dependencies:[G,E,T],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var Qo=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function od(e,a){if(e&1){let t=$();n(0,"h6",11),p(1),l(2,"translate"),l(3,"convertMired"),s(),n(4,"nouislider",12),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onColorTemperatureStateChange())}),s()}if(e&2){let t=f();r(),F(" ",c(2,6,"accessories.control.color_temperature"),": ",c(3,8,t.targetColorTemperature.mired)," "),r(3),u("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),W("ngModel",t.targetColorTemperature.value)}}var Yo=(()=>{class e{$activeModal=b(X);$colour=b(Ue);$destroyRef=b(ie);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;targetHue;targetHueChanged=new Q;targetSaturation;targetSaturationChanged=new Q;sliderIndex=0;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(()=>{if(this.targetBrightness.value===Ee.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(o=>{console.error("Failed to turn Matter light off:",o)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(o=>{console.error("Failed to set Matter light brightness:",o)})}this.targetMode=this.targetBrightness.value>0}),this.targetColorTemperatureChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(t=>{let o=this.service.getCluster?.("colorControl");o&&o.setAttributes({colorTemperatureMireds:t}).catch(i=>{console.error("Failed to set Matter light color temperature:",i)})}),this.targetHueChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(()=>{let t=this.service.getCluster?.("colorControl");t&&t.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value}).catch(o=>{console.error("Failed to set Matter light hue:",o)})}),this.targetSaturationChanged.pipe(Y(300),Z(this.$destroyRef)).subscribe(()=>{let t=this.service.getCluster?.("colorControl");t&&t.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value}).catch(o=>{console.error("Failed to set Matter light saturation:",o)})})}ngOnInit(){this.targetMode=Oe(this.service),this.loadTargetBrightness(),this.supportsColorTemperature&&this.loadTargetColorTemperature(),this.loadTargetHueSaturation(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{if(this.targetMode=Oe(this.service),this.targetBrightness.value=$e(this.service),this.supportsColorTemperature){let o=ut(this.service);this.targetColorTemperature.mired=o,this.targetColorTemperature.value=this.$colour.miredToKelvin(o)}let t=Mt(this.service);this.targetHue.value!==t&&(this.targetHue.value=t,this.updateSaturationSliderGradient()),this.targetSaturation.value=Tt(this.service)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(te=>{console.error("Failed to turn Matter light on:",te)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}o.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value),this.updateSaturationSliderGradient()}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=$e(this.service);this.targetBrightness={value:t,min:Ee.Min,max:Ee.Max,step:1},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];o&&(o.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10)}loadTargetColorTemperature(){let t=ut(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(ct.MaxMired),max:this.$colour.miredToKelvin(ct.MinMired),step:10},setTimeout(()=>{let o=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(o){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);o.style.background=`linear-gradient(to right, ${i}, ${d})`,this.sliderIndex+=1}},10)}loadTargetHueSaturation(){let t=Mt(this.service),o=Tt(this.service);this.targetHue={value:t,min:0,max:254,step:1},this.targetSaturation={value:o,min:0,max:254,step:1},setTimeout(()=>{let i=document.querySelectorAll(".noUi-target")[this.sliderIndex];i&&(i.style.background="linear-gradient(to right, hsl(0, 100%, 50%), hsl(60, 100%, 50%), hsl(120, 100%, 50%), hsl(180, 100%, 50%), hsl(240, 100%, 50%), hsl(300, 100%, 50%), hsl(360, 100%, 50%))",this.sliderIndex+=1)},10),setTimeout(()=>{let i=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(i){let d=t/254*360;i.style.background=`linear-gradient(to right, hsl(${d}, 0%, 50%), hsl(${d}, 100%, 50%))`,this.sliderIndex+=1}},10)}get brightnessPercentage(){return dt(this.targetBrightness.value)}get huePercentage(){return Math.round(this.targetHue.value/254*100)}get saturationPercentage(){return Math.round(this.targetSaturation.value/254*100)}get previewColor(){let t=this.targetHue.value/254*360,o=this.targetSaturation.value/254*100;return`hsl(${t}, ${o}%, 50%)`}get supportsColorTemperature(){return bo(this.service)}updateSaturationSliderGradient(){let t=this.supportsColorTemperature?3:2,o=document.querySelectorAll(".noUi-target")[t];if(o){let i=this.targetHue.value/254*360;o.style.background=`linear-gradient(to right, hsl(${i}, 0%, 50%), hsl(${i}, 100%, 50%))`}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:36,vars:46,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-3"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),j("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s(),_(26,od,5,10),n(27,"h6",13),p(28),l(29,"translate"),s(),n(30,"nouislider",12),j("ngModelChange",function(h){return U(i.targetHue.value,h)||(i.targetHue.value=h),h}),C("ngModelChange",function(){return i.onHueStateChange()}),s(),n(31,"h6",13),p(32),l(33,"translate"),s(),n(34,"nouislider",12),j("ngModelChange",function(h){return U(i.targetSaturation.value,h)||(i.targetSaturation.value=h),h}),C("ngModelChange",function(){return i.onSaturationStateChange()}),s()(),m(35,"div",14),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,26,"form.button_close")),r(3),x("aria-label",c(7,28,"accessories.control.mode_control")),r(4),u("ngClass",V(40,Qo,!i.targetMode,i.targetMode)),r(),y(" ",c(12,30,"accessories.control.off")," "),r(6),u("ngClass",V(43,Qo,i.targetMode,!i.targetMode)),r(),y(" ",c(19,32,"accessories.control.on")," "),r(5),F("",c(24,34,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),r(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),W("ngModel",i.targetBrightness.value),r(),k(i.supportsColorTemperature?26:-1),r(2),F("",c(29,36,"accessories.control.hue"),": ",i.huePercentage,"%"),r(2),u("min",i.targetHue.min)("max",i.targetHue.max)("step",i.targetHue.step),W("ngModel",i.targetHue.value),r(2),F("",c(33,38,"accessories.control.saturation"),": ",i.saturationPercentage,"%"),r(2),u("min",i.targetSaturation.min)("max",i.targetSaturation.max)("step",i.targetSaturation.step),W("ngModel",i.targetSaturation.value))},dependencies:[ee,oe,re,ae,E,T,lt],encapsulation:2})}return e})();var rd=e=>({"accessory-on":e}),Xo=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&mt(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(Yo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return He(this.service)}get brightness(){return pt(this.service)}get lightColor(){let t=Mt(this.service),o=Tt(this.service),i=t/254*360,d=o/254*100;return`hsl(${i}, ${d}%, 50%)`}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-extended-color-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),o&2&&(u("ngClass",N(10,rd,i.isOn)),r(2),x("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),x("fill",i.isOn?i.lightColor:"none")("fill-opacity",.25+i.brightness/100*.5),r(6),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Re))},dependencies:[G,E,T],encapsulation:2})}return e})();var Jo=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function ad(e,a){if(e&1){let t=$();n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"nouislider",13),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetSpeed.value,i)||(d.targetSpeed.value=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onTargetSpeedChange())}),s()}if(e&2){let t=f();r(),F("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetSpeed.value,"%"),r(2),u("min",t.targetSpeed.min)("max",t.targetSpeed.max)("step",t.targetSpeed.step),W("ngModel",t.targetSpeed.value)}}var er=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;stateSubscription;targetMode;targetSpeed;targetSpeedChanged=new Q;constructor(){this.targetSpeedChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{Ut(this.service,this.targetSpeed.value)})}ngOnInit(){this.targetMode=gt(this.service),this.loadSpeed(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=gt(this.service),this.targetSpeed&&(this.targetSpeed.value=vt(this.service))}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,o){if(this.targetMode=t,t){let d=this.targetSpeed.value||100;Ut(this.service,d),this.targetSpeed.value=d}else Ut(this.service,0),this.targetSpeed.value=0;o.target.blur()}onTargetSpeedChange(){this.targetSpeedChanged.next(this.targetSpeed.value),this.targetMode=this.targetSpeed.value>0}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadSpeed(){this.targetSpeed={value:vt(this.service),min:0,max:100,step:1},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,ad,4,8),s(),m(23,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,8,"form.button_close")),r(3),x("aria-label",c(7,10,"accessories.control.mode_control")),r(4),u("ngClass",V(16,Jo,!i.targetMode,i.targetMode)),r(),y(" ",c(12,12,"accessories.control.off")," "),r(6),u("ngClass",V(19,Jo,i.targetMode,!i.targetMode)),r(),y(" ",c(19,14,"accessories.control.on")," "),r(4),k(i.targetSpeed?22:-1))},dependencies:[ee,oe,re,ae,E,T],encapsulation:2})}return e})();var sd=e=>({"accessory-on":e}),ld=e=>({spin:e});function cd(e,a){if(e&1&&(n(0,"div",8),p(1),s()),e&2){let t=f();r(),y("",t.fanSpeed,"%")}}function pd(e,a){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=f();u("innerText",c(1,1,t.isOn?"accessories.control.on":"accessories.control.off"))}}var tr=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&Fo(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(er,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return gt(this.service)}get fanSpeed(){return vt(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-fan"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg",3,"ngClass"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"g",4),m(6,"path",5),s(),m(7,"circle",6),s()(),L(),n(8,"div",7),p(9),s(),_(10,cd,2,1,"div",8)(11,pd,2,3,"div",9),s()()),o&2&&(u("ngClass",N(7,sd,i.isOn)),r(2),u("ngClass",N(9,ld,i.isOn)),x("aria-label",c(3,5,"accessories.core.fan")),r(7),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),k(i.isOn&&i.fanSpeed>0?10:11))},dependencies:[G,E,T],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();function dd(e,a){if(e&1&&p(0),e&2){let t=f();y(" ",t.humidity,"% ")}}function md(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.no_data")," ")}var ir=(()=>{class e{service;get humidity(){return Bo(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-humidity-sensor"]],inputs:{service:"service"},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4),ne(6,"g",5),xe(7,"path",6),le(),xe(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),le()(),L(),ne(21,"div",20),p(22),le(),ne(23,"div",21),_(24,dd,1,1)(25,md,2,3),le()()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.humidity_sensor")),r(20),v(i.service.customName||i.service.serviceName),r(2),k(i.humidity!==null?24:25))},dependencies:[T],encapsulation:2})}return e})();function ud(e,a){if(e&1&&(ne(0,"div",28),p(1),l(2,"number"),le()),e&2){let t=f();r(),y("",se(2,1,t.illuminance,"0.1-1")," lux")}}function fd(e,a){if(e&1&&(ne(0,"div",28),p(1),l(2,"number"),le()),e&2){let t=f();r(),y("",se(2,1,t.illuminance,"1.0-0")," lux")}}var nr=(()=>{class e{service;get illuminance(){return wo(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-light-sensor"]],inputs:{service:"service"},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),le()(),L(),ne(28,"div",27),p(29),le(),_(30,ud,3,4,"div",28)(31,fd,3,4,"div",28),le()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.light_sensor")),r(27),v(i.service.customName||i.service.serviceName),r(),k(i.illuminance<1?30:31))},dependencies:[Se,T],encapsulation:2})}return e})();var vd=e=>({"accessory-on":e});function gd(e,a){e&1&&(n(0,"div",22),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function hd(e,a){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var or=(()=>{class e{service;get isOccupied(){return To(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-occupancy-sensor"]],inputs:{service:"service"},decls:26,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),s()(),L(),n(22,"div",21),p(23),s(),_(24,gd,3,3,"div",22)(25,hd,3,3,"div",23),s()()),o&2&&(u("ngClass",N(6,vd,i.isOccupied)),r(2),x("aria-label",c(3,4,"accessories.core.occupancy_sensor")),r(21),v(i.service.customName||i.service.serviceName),r(),k(i.isOccupied?24:25))},dependencies:[E,T],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Cd=e=>({"accessory-on":e}),rr=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&Ke(this.service)}get isOn(){return He(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-light-switch"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
41
+ C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
42
+ C22.4505994,12.4811551 23,14.065977 23,15.7447101
43
+ C23,19.7640218 19.8532802,23 16,23
44
+ C12.1467198,23 9,19.7640218 9,15.7447101
45
+ C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
46
+ C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
47
+ C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
48
+ C7.75536735,11.4998488 7,13.5315645 7,15.7447101
49
+ C7,20.8562656 11.0294373,25 16,25
50
+ C20.9705627,25 25,20.8562656 25,15.7447101
51
+ C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
52
+ C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"path",6),s()(),L(),n(8,"div",7),p(9),s(),m(10,"div",8),l(11,"translate"),s()()),o&2&&(u("ngClass",N(8,Cd,i.isOn)),r(2),x("aria-label",c(3,4,"accessories.core.switch")),r(7),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerText",c(11,6,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[E,T],encapsulation:2})}return e})();var yd=e=>({"accessory-on":e}),ar=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&Ke(this.service)}get isOn(){return He(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["fill-opacity","0.75","stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){o&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),o&2&&(u("ngClass",N(9,yd,i.isOn)),r(2),x("aria-label",c(3,5,"accessories.core.lightbulb")),r(3),x("fill",i.isOn?"#ffcf55":"none"),r(6),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerHTML",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off"),Re))},dependencies:[E,T],encapsulation:2})}return e})();var xd=e=>({"accessory-on":e});function _d(e,a){e&1&&(B(),m(0,"line",8)(1,"line",9)(2,"line",10))}function kd(e,a){e&1&&(B(),m(0,"line",11)(1,"line",12)(2,"line",13))}function Sd(e,a){e&1&&(B(),m(0,"line",13)(1,"line",14)(2,"line",15))}var sr=(()=>{class e{$settings=b(be);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){this.readyForControl&&Ke(this.service)}get isOn(){return He(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-plug-in-unit"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(o,i){o&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),_(7,_d,3,0)(8,kd,3,0)(9,Sd,3,0),s()(),L(),n(10,"div",6),p(11),s(),m(12,"div",7),l(13,"translate"),s()()),o&2&&(u("ngClass",N(9,xd,i.isOn)),r(2),x("aria-label",c(3,5,"accessories.core.outlet")),r(5),k(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),r(4),v(i.service.customName||i.service.serviceName||i.service.displayName),r(),u("innerText",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[E,T],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var _i=(e,a)=>({"fa-check-circle":e,"fa-blank":a}),lr=(()=>{class e{$activeModal=b(X);service;$accessories;currentMode=0;stateSubscription;ngOnInit(){this.updateModeFromService(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.updateModeFromService()})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}updateModeFromService(){let t=this.service.clusters?.rvcOperationalState?.operationalState??0;t===1?this.currentMode=1:t===2?this.currentMode=2:this.currentMode=0}setMode(t,o){if(t===2&&this.currentMode===0)return;if(this.currentMode=t,t===0){let d=this.service.getCluster?.("rvcRunMode");d&&d.setAttributes({currentMode:0}).catch(h=>{console.error("Failed to stop robotic vacuum:",h)})}else if(t===1){let d=this.service.getCluster?.("rvcRunMode");d&&d.setAttributes({currentMode:1}).catch(h=>{console.error("Failed to start robotic vacuum:",h)})}else if(t===2){let d=this.service.getCluster?.("rvcOperationalState");d&&d.setAttributes({operationalState:2}).catch(h=>{console.error("Failed to pause robotic vacuum:",h)})}o.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}get isPauseDisabled(){return this.currentMode===0}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:30,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setMode(0,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setMode(2,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()(),n(22,"button",6),C("click",function(h){return i.setMode(1,h)}),n(23,"div",7),m(24,"i",8),s(),p(25),l(26,"translate"),n(27,"div",9),m(28,"i",10),s()()()(),m(29,"div",11),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName),r(),x("aria-label",c(4,11,"form.button_close")),r(3),x("aria-label",c(7,13,"accessories.control.mode_control")),r(4),u("ngClass",V(21,_i,i.currentMode===0,i.currentMode!==0)),r(),y(" ",c(12,15,"accessories.control.stopped")," "),r(4),Lt("btn-pause-disabled",i.isPauseDisabled),r(2),u("ngClass",V(24,_i,i.currentMode===2,i.currentMode!==2)),r(),y(" ",c(19,17,"accessories.control.paused")," "),r(6),u("ngClass",V(27,_i,i.currentMode===1,i.currentMode!==1)),r(),y(" ",c(26,19,"accessories.control.cleaning")," "))},dependencies:[E,T],styles:[".btn-control.btn-pause-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed!important;pointer-events:auto!important}.btn-control.btn-pause-disabled[_ngcontent-%COMP%]:hover{cursor:not-allowed!important}"]})}return e})();var bd=e=>({"accessory-on":e}),cr=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){if(!this.readyForControl){console.warn("Robotic vacuum: Not ready for control");return}Ke(this.service)}onLongClick(){if(!this.readyForControl||!this.canShowModal)return;let t=this.$modal.open(lr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isActive(){return He(this.service)}get statusText(){return So(this.service)}get canShowModal(){return!ko(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-robotic-vacuum-cleaner"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.canShowModal&&i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"clipPath",4),m(7,"rect",5),s()(),n(8,"g",6),m(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),s(),n(19,"g",17)(20,"line",18),m(21,"animate",19)(22,"animate",20)(23,"animate",21),s(),n(24,"line",22),m(25,"animate",23)(26,"animate",24)(27,"animate",25),s(),n(28,"line",26),m(29,"animate",27)(30,"animate",28)(31,"animate",29),s()()()(),L(),n(32,"div",30),p(33),s(),m(34,"div",31),l(35,"translate"),s()()),o&2&&(u("ngClass",N(8,bd,i.isActive)),r(2),x("aria-label",c(3,4,"accessories.core.robotic_vacuum_cleaner")),r(31),v(i.service.customName||i.service.serviceName),r(),u("innerText",c(35,6,i.statusText)))},dependencies:[G,E,T],styles:[".accessory-box.accessory-on[_ngcontent-%COMP%] .motion-lines[_ngcontent-%COMP%]{display:block!important}"]})}return e})();var Md=e=>({"accessory-on":e});function Td(e,a){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function wd(e,a){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var pr=(()=>{class e{service;get isTriggered(){return Vo(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-smoke-co-alarm"]],inputs:{service:"service"},decls:22,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," ALARM "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),s()(),L(),n(18,"div",16),p(19),s(),_(20,Td,3,3,"div",17)(21,wd,3,3,"div",18),s()()),o&2&&(u("ngClass",N(6,Md,i.isTriggered)),r(2),x("aria-label",c(3,4,"accessories.core.smoke_sensor")),r(17),v(i.service.customName||i.service.serviceName),r(),k(i.isTriggered?20:21))},dependencies:[E,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Ed(e,a){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=f();F(" ",se(2,4,c(1,2,t.temperature),"1.0-1"),"\xB0",c(3,7,t.temperatureUnits)," ")}}function Bd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.no_data")," ")}var dr=(()=>{class e{$settings=b(be);service;temperatureUnits=this.$settings.env.temperatureUnits;get temperature(){return Eo(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-temperature-sensor"]],inputs:{service:"service"},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),ne(4,"svg",3),xe(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),le()(),L(),ne(29,"div",28),p(30),le(),ne(31,"div",29),_(32,Ed,4,9)(33,Bd,2,3),le()()()),o&2&&(r(2),x("aria-label",c(3,3,"accessories.core.temperature_sensor")),r(28),v(i.service.customName||i.service.serviceName),r(2),k(i.temperature!==null?32:33))},dependencies:[Se,Ie,De,T],encapsulation:2})}return e})();var Gt=(e,a)=>({"fa-check-circle":e,"fa-blank":a});function Vd(e,a){if(e&1&&(n(0,"h6",5),m(1,"i",13),p(2),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s()),e&2){let t=f();r(),qe("color",t.targetMode===3?"#1e8bbd":t.targetMode===4?"#e69533":t.targetMode===1?"#42d672":"#7b7b7b"),r(),F("",se(4,6,c(3,4,t.currentTemperature),"1.0-1"),"\xB0",c(5,9,t.temperatureUnits)," ")}}function Dd(e,a){if(e&1){let t=$();n(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),n(9,"nouislider",15),j("ngModelChange",function(i){D(t);let d=f();return U(d.autoTemp,i)||(d.autoTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onAutoTempChange())}),s()}if(e&2){let t=f();r(),rt(" ",c(2,9,"accessories.control.threshold_auto"),": ",se(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",se(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),u("min",t.minHeatSetpoint)("max",t.maxCoolSetpoint)("step",.5),W("ngModel",t.autoTemp)}}function Id(e,a){if(e&1){let t=$();n(0,"h6",16),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",15),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onHeatingTempChange())}),s()}if(e&2){let t=f();r(),Ne(" ",c(2,7,"accessories.control.target"),": ",se(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.minHeatSetpoint)("max",t.maxHeatSetpoint)("step",.5),W("ngModel",t.targetHeatingTemp)}}function Ld(e,a){if(e&1){let t=$();n(0,"h6",16),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",15),j("ngModelChange",function(i){D(t);let d=f();return U(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),I(i)}),C("ngModelChange",function(){D(t);let i=f();return I(i.onCoolingTempChange())}),s()}if(e&2){let t=f();r(),Ne(" ",c(2,7,"accessories.control.target"),": ",se(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),u("min",t.minCoolSetpoint)("max",t.maxCoolSetpoint)("step",.5),W("ngModel",t.targetCoolingTemp)}}var mr=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);$settings=b(be);service;$accessories;targetMode;targetHeatingTemp;targetCoolingTemp;autoTemp;temperatureUnits=this.$settings.env.temperatureUnits;stateSubscription;heatingTempChanged=new Q;coolingTempChanged=new Q;autoTempChanged=new Q;minHeatSetpoint=7;maxHeatSetpoint=30;minCoolSetpoint=10;maxCoolSetpoint=35;constructor(){this.heatingTempChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{yi(this.service,this.targetHeatingTemp)}),this.coolingTempChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{xi(this.service,this.targetCoolingTemp)}),this.autoTempChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{yi(this.service,this.autoTemp[0]),xi(this.service,this.autoTemp[1])})}ngOnInit(){this.targetMode=ht(this.service),this.targetHeatingTemp=hi(this.service),this.targetCoolingTemp=Ci(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp];let t=this.service.clusters?.thermostat;t&&(this.minHeatSetpoint=t.minHeatSetpointLimit?t.minHeatSetpointLimit/100:7,this.maxHeatSetpoint=t.maxHeatSetpointLimit?t.maxHeatSetpointLimit/100:30,this.minCoolSetpoint=t.minCoolSetpointLimit?t.minCoolSetpointLimit/100:10,this.maxCoolSetpoint=t.maxCoolSetpointLimit?t.maxCoolSetpointLimit/100:35),this.applySliderGradient(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=ht(this.service),this.targetHeatingTemp=hi(this.service),this.targetCoolingTemp=Ci(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applySliderGradient()})}setTargetMode(t,o){this.targetMode=t,Oo(this.service,this.targetMode),o.target.blur(),this.applySliderGradient()}onHeatingTempChange(){this.heatingTempChanged.next(this.targetHeatingTemp)}onCoolingTempChange(){this.coolingTempChanged.next(this.targetCoolingTemp)}onAutoTempChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.autoTempChanged.next(this.autoTemp)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}get currentTemperature(){return jt(this.service)}applySliderGradient(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:41,vars:39,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"fas","fa-temperature-full"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,Vd,6,11,"h6",5),n(7,"div",6),l(8,"translate"),n(9,"button",7),C("click",function(h){return i.setTargetMode(0,h)}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(h){return i.setTargetMode(1,h)}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()(),n(23,"button",7),C("click",function(h){return i.setTargetMode(4,h)}),n(24,"div",8),m(25,"i",9),s(),p(26),l(27,"translate"),n(28,"div",10),m(29,"i",11),s()(),n(30,"button",7),C("click",function(h){return i.setTargetMode(3,h)}),n(31,"div",8),m(32,"i",9),s(),p(33),l(34,"translate"),n(35,"div",10),m(36,"i",11),s()()(),_(37,Dd,10,25),_(38,Id,7,16),_(39,Ld,7,16),s(),m(40,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,15,"form.button_close")),r(3),k(i.currentTemperature!==null?6:-1),r(),x("aria-label",c(8,17,"accessories.control.mode_control")),r(4),u("ngClass",V(27,Gt,i.targetMode===0,i.targetMode!==0)),r(),y(" ",c(13,19,"accessories.control.off")," "),r(6),u("ngClass",V(30,Gt,i.targetMode===1,i.targetMode!==1)),r(),y(" ",c(20,21,"accessories.control.auto")," "),r(6),u("ngClass",V(33,Gt,i.targetMode===4,i.targetMode!==4)),r(),y(" ",c(27,23,"accessories.control.heat")," "),r(6),u("ngClass",V(36,Gt,i.targetMode===3,i.targetMode!==3)),r(),y(" ",c(34,25,"accessories.control.cool")," "),r(4),k(i.targetMode===1?37:-1),r(),k(i.targetMode===4?38:-1),r(),k(i.targetMode===3?39:-1))},dependencies:[E,ee,oe,re,ae,Se,T,Ie,De],encapsulation:2})}return e})();var Ad=e=>({"accessory-on":e});function Pd(e,a){if(e&1&&(B(),n(0,"text",18),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=f();r(),F(" ",se(3,4,c(2,2,t.currentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Fd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.off")," ")}function Hd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.cool")," ")}function Od(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.heat")," ")}function Nd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.auto")," ")}var ur=(()=>{class e{$modal=b(J);$settings=b(be);$accessories=b(K);service;readyForControl=!1;temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(mr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return Ho(this.service)}get systemMode(){return ht(this.service)}get currentTemperature(){return jt(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-thermostat"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:30,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"rect",17),_(22,Pd,5,9,":svg:text",18),s()(),L(),n(23,"div",19),p(24),s(),n(25,"div",20),_(26,Fd,2,3)(27,Hd,2,3)(28,Od,2,3)(29,Nd,2,3),s()()()),o&2&&(u("ngClass",N(8,Ad,i.isOn)),r(2),x("aria-label",c(3,6,"accessories.core.thermostat")),r(19),x("fill",i.systemMode===3?"url(#coolingGradient)":i.systemMode===4?"url(#heatingGradient)":i.systemMode===1?"#42d672":"#7b7b7b"),r(),k(i.currentTemperature!==null?22:-1),r(2),v(i.service.customName||i.service.serviceName||i.service.displayName),r(2),k(i.systemMode===0?26:i.systemMode===3?27:i.systemMode===4?28:i.systemMode===1?29:-1))},dependencies:[G,E,Se,T,Ie,De],encapsulation:2})}return e})();var fr=(()=>{class e{service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-unknown"]],inputs:{service:"service"},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
53
+ L12.1868707,17.7112593
54
+ C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
55
+ L16.4805582,7.35415962
56
+ C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
57
+ L15.7252918,12.6132252
58
+ C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
59
+ L20.1977772,14.5048291
60
+ L20.1846183,14.5177121
61
+ L20.2552868,14.5177121
62
+ C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
63
+ L16.1844844,24.5082506
64
+ C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
65
+ L16.7168658,19.6157462
66
+ C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
67
+ L12.2443804,17.7241422
68
+ L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ne(0,"div",0)(1,"div",1)(2,"div",2),B(),ne(3,"svg",3),xe(4,"circle",4)(5,"path",5),le()(),L(),ne(6,"div",6),p(7),le(),ne(8,"div",7),p(9),le()()()),o&2&&(r(2),x("aria-label",i.service.humanType),r(5),v(i.service.customName||i.service.serviceName),r(2),v(i.service.humanType))},encapsulation:2})}return e})();var $d=e=>({"accessory-on":e});function Rd(e,a){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.detected")))}function Wd(e,a){e&1&&(n(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(r(),v(c(2,1,"accessories.control.not_detected")))}var vr=(()=>{class e{service;get isLeaking(){return Do(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-water-leak-detector"]],inputs:{service:"service"},decls:28,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),n(8,"g",7),m(9,"path",6),s(),m(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),s()(),L(),n(24,"div",22),p(25),s(),_(26,Rd,3,3,"div",23)(27,Wd,3,3,"div",24),s()()),o&2&&(u("ngClass",N(6,$d,i.isLeaking)),r(2),x("aria-label",c(3,4,"accessories.core.leak_sensor")),r(23),v(i.service.customName||i.service.serviceName),r(),k(i.isLeaking?26:27))},dependencies:[E,T],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Ud(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function jd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.open")," ")}function Gd(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f();F(" ",c(1,2,"accessories.control.open")," ",t.currentPosition,"% ")}}var gr=(()=>{class e{$activeModal=b(X);$destroyRef=b(ie);service;$accessories;targetPositionChanged=new Q;targetPosition;stateSubscription;constructor(){this.targetPositionChanged.pipe(Y(500),Z(this.$destroyRef)).subscribe(()=>{Wt(this.service,this.targetPosition.value)})}ngOnInit(){this.loadTargetPosition(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetPosition&&(this.targetPosition.value=nt(this.service))})}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetPosition(){this.targetPosition={value:nt(this.service),min:0,max:100,step:1},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(o=>{o.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10)}get currentPosition(){return nt(this.service)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,Ud,2,3)(9,jd,2,3)(10,Gd,2,4),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),j("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),j("ngModelChange",function(h){return U(i.currentPosition,h)||(i.currentPosition=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),o&2&&(r(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),r(),x("aria-label",c(4,20,"form.button_close")),r(5),k(i.currentPosition===0?8:i.currentPosition===100?9:10),r(4),F("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),W("ngModel",i.targetPosition.value),r(3),v(c(18,24,"accessories.control.closed")),r(3),v(c(21,26,"accessories.control.open")),r(3),F("",c(24,28,"accessories.control.current"),": ",i.currentPosition,"%"),r(2),u("min",0)("max",100)("step",1)("disabled",!0),W("ngModel",i.currentPosition),r(3),v(c(29,30,"accessories.control.closed")),r(3),v(c(32,32,"accessories.control.open")))},dependencies:[ae,ee,oe,re,T],encapsulation:2})}return e})();var zd=e=>({"accessory-on":e});function qd(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"rect",6)(4,"rect",7)(5,"rect",8)(6,"rect",9)(7,"rect",10)(8,"rect",11)(9,"rect",12),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.window_covering"))}function Zd(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"rect",13)(4,"rect",14)(5,"rect",15)(6,"rect",16)(7,"line",17)(8,"rect",18),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.door"))}function Kd(e,a){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"rect",6)(4,"rect",19)(5,"rect",20)(6,"rect",21)(7,"rect",22)(8,"rect",23)(9,"rect",24),s()()),e&2&&x("aria-label",c(1,1,"accessories.core.window"))}function Qd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.closed")," ")}function Yd(e,a){e&1&&(p(0),l(1,"translate")),e&2&&y(" ",c(1,1,"accessories.control.open")," ")}function Xd(e,a){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f();F(" ",c(1,2,"accessories.control.open")," ",t.currentPosition,"% ")}}var hr=(()=>{class e{$accessories=b(K);$modal=b(J);service;readyForControl=!1;onClick(){this.readyForControl&&Po(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(gr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get currentPosition(){return nt(this.service)}get deviceType(){return this.service.customType||this.service.deviceType||"WindowCovering"}get isWindowCovering(){return this.deviceType==="WindowCovering"}get isDoor(){return this.deviceType==="Door"}get isWindow(){return this.deviceType==="Window"}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-window-covering"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"]],template:function(o,i){o&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1),_(2,qd,10,3,"div",2),_(3,Zd,9,3,"div",2),_(4,Kd,10,3,"div",2),n(5,"div",3),p(6),s(),n(7,"div",4),_(8,Qd,2,3)(9,Yd,2,3)(10,Xd,2,4),s()()()),o&2&&(u("ngClass",N(6,zd,i.currentPosition>0)),r(2),k(i.isWindowCovering?2:-1),r(),k(i.isDoor?3:-1),r(),k(i.isWindow?4:-1),r(2),v(i.service.customName||i.service.serviceName||i.service.displayName),r(2),k(i.currentPosition===0?8:i.currentPosition===100?9:10))},dependencies:[G,E,T],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px} svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s} svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();function Jd(e,a){if(e&1){let t=$();n(0,"a",2),C("click",function(){D(t);let i=f();return I(i.$accessories.showAccessoryInformation(i.service))}),m(1,"i",3),s()}}function e1(e,a){e&1&&m(0,"i",1)}function t1(e,a){if(e&1&&(n(0,"app-on-off-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.on_off_light"))}}function i1(e,a){if(e&1&&(n(0,"app-dimmable-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.dimmable_light"))}}function n1(e,a){if(e&1&&(n(0,"app-color-temperature-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.color_temperature_light"))}}function o1(e,a){if(e&1&&(n(0,"app-extended-color-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.extended_color_light"))}}function r1(e,a){if(e&1&&(n(0,"app-on-off-plug-in-unit",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.on_off_plug_in_unit"))}}function a1(e,a){if(e&1&&(n(0,"app-on-off-light-switch",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.on_off_light_switch"))}}function s1(e,a){if(e&1&&(n(0,"app-robotic-vacuum-cleaner",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.robotic_vacuum_cleaner"))}}function l1(e,a){if(e&1&&(n(0,"app-matter-contact-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.contact_sensor"))}}function c1(e,a){if(e&1&&(n(0,"app-matter-occupancy-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.occupancy_sensor"))}}function p1(e,a){if(e&1&&(n(0,"app-matter-light-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.light_sensor"))}}function d1(e,a){if(e&1&&(n(0,"app-matter-temperature-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.temperature_sensor"))}}function m1(e,a){if(e&1&&(n(0,"app-matter-humidity-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.humidity_sensor"))}}function u1(e,a){if(e&1&&(n(0,"app-matter-smoke-co-alarm",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.smoke_co_alarm"))}}function f1(e,a){if(e&1&&(n(0,"app-matter-water-leak-detector",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.leak_sensor"))}}function v1(e,a){if(e&1&&(n(0,"app-matter-air-quality-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.air_quality_sensor"))}}function g1(e,a){if(e&1&&(n(0,"app-matter-door-lock",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.lock_mechanism"))}}function h1(e,a){if(e&1&&(n(0,"app-matter-window-covering",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.window_covering"))}}function C1(e,a){if(e&1&&(n(0,"app-matter-window-covering",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.door"))}}function y1(e,a){if(e&1&&(n(0,"app-matter-window-covering",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.window"))}}function x1(e,a){if(e&1&&(n(0,"app-matter-fan",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.fan"))}}function _1(e,a){if(e&1&&(n(0,"app-matter-thermostat",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),r(),v(c(2,3,"accessories.core.thermostat"))}}function k1(e,a){if(e&1&&(n(0,"app-matter-unknown",5),p(1),s()),e&2){let t=f(2);u("service",t.service),r(),v(t.service.humanType)}}function S1(e,a){if(e&1&&_(0,t1,3,5,"app-on-off-light",4)(1,i1,3,5,"app-dimmable-light",4)(2,n1,3,5,"app-color-temperature-light",4)(3,o1,3,5,"app-extended-color-light",4)(4,r1,3,5,"app-on-off-plug-in-unit",4)(5,a1,3,5,"app-on-off-light-switch",4)(6,s1,3,5,"app-robotic-vacuum-cleaner",4)(7,l1,3,4,"app-matter-contact-sensor",5)(8,c1,3,4,"app-matter-occupancy-sensor",5)(9,p1,3,4,"app-matter-light-sensor",5)(10,d1,3,4,"app-matter-temperature-sensor",5)(11,m1,3,4,"app-matter-humidity-sensor",5)(12,u1,3,4,"app-matter-smoke-co-alarm",5)(13,f1,3,4,"app-matter-water-leak-detector",5)(14,v1,3,4,"app-matter-air-quality-sensor",5)(15,g1,3,5,"app-matter-door-lock",4)(16,h1,3,5,"app-matter-window-covering",4)(17,C1,3,5,"app-matter-window-covering",4)(18,y1,3,5,"app-matter-window-covering",4)(19,x1,3,5,"app-matter-fan",4)(20,_1,3,5,"app-matter-thermostat",4)(21,k1,2,2,"app-matter-unknown",5),e&2){let t,o=f();k((t=o.service.customType||o.service.deviceType)==="OnOffLight"?0:t==="DimmableLight"?1:t==="ColorTemperatureLight"?2:t==="ExtendedColorLight"?3:t==="OnOffPlugInUnit"?4:t==="OnOffLightSwitch"?5:t==="RoboticVacuumCleaner"?6:t==="ContactSensor"?7:t==="OccupancySensor"?8:t==="LightSensor"?9:t==="TemperatureSensor"?10:t==="HumiditySensor"?11:t==="SmokeCoAlarm"?12:t==="WaterLeakDetector"?13:t==="AirQualitySensor"?14:t==="DoorLock"?15:t==="WindowCovering"?16:t==="Door"?17:t==="Window"?18:t==="Fan"?19:t==="Thermostat"?20:21)}}function b1(e,a){if(e&1&&(n(0,"app-switch",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.switch"))}}function M1(e,a){if(e&1&&(n(0,"app-thermostat",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.thermostat"))}}function T1(e,a){if(e&1&&(n(0,"app-outlet",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.outlet"))}}function w1(e,a){if(e&1&&(n(0,"app-fan",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.fan"))}}function E1(e,a){if(e&1&&(n(0,"app-fan",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.fan"))}}function B1(e,a){if(e&1&&(n(0,"app-air-purifier",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.air_purifier"))}}function V1(e,a){if(e&1&&(n(0,"app-lightbulb",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.lightbulb"))}}function D1(e,a){if(e&1&&(n(0,"app-light-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.light_sensor"))}}function I1(e,a){if(e&1&&(n(0,"app-lock-mechanism",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.lock_mechanism"))}}function L1(e,a){if(e&1&&(n(0,"app-temperature-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.temperature_sensor"))}}function A1(e,a){if(e&1&&(n(0,"app-garage-door-opener",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.garage_door_opener"))}}function P1(e,a){if(e&1&&(n(0,"app-motion-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.motion_sensor"))}}function F1(e,a){if(e&1&&(n(0,"app-occupancy-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.occupancy_sensor"))}}function H1(e,a){if(e&1&&(n(0,"app-contact-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.contact_sensor"))}}function O1(e,a){if(e&1&&(n(0,"app-humidity-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.humidity_sensor"))}}function N1(e,a){if(e&1&&(n(0,"app-air-quality-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.air_quality_sensor"))}}function $1(e,a){if(e&1&&(n(0,"app-window-covering",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.window_covering"))}}function R1(e,a){if(e&1&&(n(0,"app-window",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.window"))}}function W1(e,a){if(e&1&&(n(0,"app-door",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.door"))}}function U1(e,a){if(e&1&&(n(0,"app-television",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.television"))}}function j1(e,a){if(e&1&&(n(0,"app-battery",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.battery"))}}function G1(e,a){if(e&1&&(n(0,"app-battery",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.battery"))}}function z1(e,a){if(e&1&&(n(0,"app-speaker",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.speaker"))}}function q1(e,a){if(e&1&&(n(0,"app-speaker",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.speaker"))}}function Z1(e,a){if(e&1&&(n(0,"app-doorbell",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.doorbell"))}}function K1(e,a){if(e&1&&(n(0,"app-microphone",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.microphone"))}}function Q1(e,a){if(e&1&&(n(0,"app-security-system",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.security_system"))}}function Y1(e,a){if(e&1&&(n(0,"app-leak-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.leak_sensor"))}}function X1(e,a){if(e&1&&(n(0,"app-smoke-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.smoke_sensor"))}}function J1(e,a){if(e&1&&(n(0,"app-carbon-monoxide-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.carbon_monoxide_sensor"))}}function em(e,a){if(e&1&&(n(0,"app-carbon-dioxide-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.carbon_dioxide_sensor"))}}function tm(e,a){if(e&1&&(n(0,"app-valve",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.valve"))}}function im(e,a){if(e&1&&(n(0,"app-irrigation-system",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.irrigation_system"))}}function nm(e,a){if(e&1&&(n(0,"app-heater-cooler",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.heater_cooler"))}}function om(e,a){if(e&1&&(n(0,"app-heater-cooler",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","heater")("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,4,"accessories.core.heater"))}}function rm(e,a){if(e&1&&(n(0,"app-heater-cooler",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","cooler")("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,4,"accessories.core.cooler"))}}function am(e,a){if(e&1&&(n(0,"app-humidifier-dehumidifier",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.humidifier_dehumidifier"))}}function sm(e,a){if(e&1&&(n(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","humidifier")("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,4,"accessories.core.humidifier"))}}function lm(e,a){if(e&1&&(n(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","dehumidifier")("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,4,"accessories.core.dehumidifier"))}}function cm(e,a){if(e&1&&(n(0,"app-stateless-programmable-switch",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),r(),v(c(2,2,"accessories.core.stateless_programmable_switch"))}}function pm(e,a){if(e&1&&(n(0,"app-filter-maintenance",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.filter_maintenance"))}}function dm(e,a){if(e&1&&(n(0,"app-robot-vacuum",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.robot_vacuum"))}}function mm(e,a){if(e&1&&(n(0,"app-washing-machine",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),r(),v(c(2,3,"accessories.core.washing_machine"))}}function um(e,a){if(e&1&&(n(0,"app-unknown",5),p(1),s()),e&2){let t=f(2);u("service",t.service),r(),v(t.service.humanType)}}function fm(e,a){if(e&1&&_(0,b1,3,5,"app-switch",4)(1,M1,3,5,"app-thermostat",4)(2,T1,3,5,"app-outlet",4)(3,w1,3,5,"app-fan",6)(4,E1,3,5,"app-fan",6)(5,B1,3,5,"app-air-purifier",6)(6,V1,3,5,"app-lightbulb",4)(7,D1,3,4,"app-light-sensor",5)(8,I1,3,5,"app-lock-mechanism",4)(9,L1,3,4,"app-temperature-sensor",5)(10,A1,3,5,"app-garage-door-opener",4)(11,P1,3,4,"app-motion-sensor",5)(12,F1,3,4,"app-occupancy-sensor",5)(13,H1,3,4,"app-contact-sensor",5)(14,O1,3,4,"app-humidity-sensor",5)(15,N1,3,4,"app-air-quality-sensor",5)(16,$1,3,5,"app-window-covering",4)(17,R1,3,5,"app-window",4)(18,W1,3,5,"app-door",4)(19,U1,3,5,"app-television",4)(20,j1,3,4,"app-battery",5)(21,G1,3,4,"app-battery",5)(22,z1,3,5,"app-speaker",4)(23,q1,3,5,"app-speaker",4)(24,Z1,3,5,"app-doorbell",4)(25,K1,3,5,"app-microphone",4)(26,Q1,3,5,"app-security-system",4)(27,Y1,3,4,"app-leak-sensor",5)(28,X1,3,4,"app-smoke-sensor",5)(29,J1,3,4,"app-carbon-monoxide-sensor",5)(30,em,3,4,"app-carbon-dioxide-sensor",5)(31,tm,3,5,"app-valve",4)(32,im,3,4,"app-irrigation-system",5)(33,nm,3,5,"app-heater-cooler",4)(34,om,3,6,"app-heater-cooler",7)(35,rm,3,6,"app-heater-cooler",7)(36,am,3,5,"app-humidifier-dehumidifier",4)(37,sm,3,6,"app-humidifier-dehumidifier",7)(38,lm,3,6,"app-humidifier-dehumidifier",7)(39,cm,3,4,"app-stateless-programmable-switch",5)(40,pm,3,5,"app-filter-maintenance",4)(41,dm,3,5,"app-robot-vacuum",4)(42,mm,3,5,"app-washing-machine",4)(43,um,2,2,"app-unknown",5),e&2){let t,o=f();k((t=o.service.customType||o.service.type||o.service.deviceType)==="Switch"?0:t==="Thermostat"?1:t==="Outlet"?2:t==="Fan"?3:t==="Fanv2"?4:t==="AirPurifier"?5:t==="Lightbulb"?6:t==="LightSensor"?7:t==="LockMechanism"?8:t==="TemperatureSensor"?9:t==="GarageDoorOpener"?10:t==="MotionSensor"?11:t==="OccupancySensor"?12:t==="ContactSensor"?13:t==="HumiditySensor"?14:t==="AirQualitySensor"?15:t==="WindowCovering"?16:t==="Window"?17:t==="Door"?18:t==="Television"?19:t==="Battery"?20:t==="BatteryService"?21:t==="Speaker"?22:t==="SmartSpeaker"?23:t==="Doorbell"?24:t==="Microphone"?25:t==="SecuritySystem"?26:t==="LeakSensor"?27:t==="SmokeSensor"?28:t==="CarbonMonoxideSensor"?29:t==="CarbonDioxideSensor"?30:t==="Valve"?31:t==="IrrigationSystem"?32:t==="HeaterCooler"?33:t==="Heater"?34:t==="Cooler"?35:t==="HumidifierDehumidifier"?36:t==="Humidifier"?37:t==="Dehumidifier"?38:t==="StatelessProgrammableSwitch"?39:t==="FilterMaintenance"?40:t==="RobotVacuum"?41:t==="WashingMachine"?42:43)}}var Ak=(()=>{class e{$accessories=b(K);service;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["app-accessory-tile"]],inputs:{service:"service"},decls:5,vars:2,consts:[["href","javascript:void(0)",1,"manage-accessory-button"],[1,"fas","fa-spin","fa-sync-alt","refreshing-accessory-status-icon","grey-text"],["href","javascript:void(0)",1,"manage-accessory-button",3,"click"],[1,"fas","fa-bars","grey-text"],[3,"service","readyForControl"],[3,"service"],[1,"w-100",3,"service","readyForControl"],[3,"service","type","readyForControl"]],template:function(o,i){o&1&&(Xi(0),_(1,Jd,2,0,"a",0)(2,e1,1,0,"i",1),_(3,S1,22,1)(4,fm,44,1),Ji()),o&2&&(r(),k(i.service.protocol==="matter"&&i.$accessories.matterReadyForControl||i.service.protocol!=="matter"&&i.$accessories.hapReadyForControl?1:2),r(2),k(i.service.protocol==="matter"?3:4))},dependencies:[ao,mo,Yn,En,hn,Wn,Nn,Gn,co,Dn,Zn,Kn,kn,Fn,Cn,yo,_o,bn,lo,yn,no,eo,On,to,_n,xn,go,Hn,Ln,Pn,oo,Vn,Tn,uo,qn,Xn,ho,ar,sr,rr,zo,Wo,Xo,cr,Uo,or,nr,dr,ir,pr,vr,No,Ko,hr,tr,ur,fr,T],encapsulation:2})}return e})();export{Ak as a};