homebridge-config-ui-x 4.78.2-beta.10 → 4.78.2-beta.2

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 (169) hide show
  1. package/CHANGELOG.md +3 -21
  2. package/dist/core/config/config.service.js +1 -1
  3. package/dist/core/config/config.service.js.map +1 -1
  4. package/dist/main.js +0 -1
  5. package/dist/main.js.map +1 -1
  6. package/dist/modules/backup/backup.controller.d.ts +0 -1
  7. package/dist/modules/backup/backup.controller.js +0 -11
  8. package/dist/modules/backup/backup.controller.js.map +1 -1
  9. package/dist/modules/backup/backup.service.d.ts +0 -1
  10. package/dist/modules/backup/backup.service.js +7 -20
  11. package/dist/modules/backup/backup.service.js.map +1 -1
  12. package/dist/modules/plugins/plugins.service.js +1 -2
  13. package/dist/modules/plugins/plugins.service.js.map +1 -1
  14. package/dist/modules/status/status.service.js +0 -9
  15. package/dist/modules/status/status.service.js.map +1 -1
  16. package/package.json +1 -1
  17. package/public/3rdpartylicenses.txt +132 -132
  18. package/public/assets/hap-icons/{air-purifier.svg → airpurifier.svg} +11 -11
  19. package/public/assets/hap-icons/{filter-maintenance.svg → filtermaintenance.svg} +1 -1
  20. package/public/assets/hap-icons/{smoke-sensor.svg → smokesensor.svg} +2 -15
  21. package/public/chunk-27SRZWQJ.js +2 -0
  22. package/public/{chunk-CF2ZN7LY.js → chunk-2NQ5FYSH.js} +1 -1
  23. package/public/chunk-2Y3A5UAH.js +1 -0
  24. package/public/chunk-3SHDLHXK.js +1 -0
  25. package/public/chunk-3TOR4GFU.js +1 -0
  26. package/public/chunk-3WKKT3UG.js +20 -0
  27. package/public/{chunk-LXXELGX4.js → chunk-555LSHXI.js} +1 -1
  28. package/public/{chunk-BU6UAZVK.js → chunk-5LN3J3YW.js} +1 -1
  29. package/public/{chunk-T252YJXA.js → chunk-5NG7YGKN.js} +1 -1
  30. package/public/chunk-5NJ2HA6I.js +1 -0
  31. package/public/chunk-6432VRST.js +1 -0
  32. package/public/{chunk-UQYCFN3T.js → chunk-6XANA56B.js} +2 -2
  33. package/public/chunk-7AZSDBF4.js +1 -0
  34. package/public/chunk-7R7NWAKM.js +1 -0
  35. package/public/{chunk-UD6SVFW2.js → chunk-AJTG3DAQ.js} +1 -1
  36. package/public/chunk-BJIYU2W4.js +1 -0
  37. package/public/chunk-BVVB4BOY.js +4 -0
  38. package/public/chunk-BY2CUGGW.js +1 -0
  39. package/public/chunk-C62M6LGL.js +1 -0
  40. package/public/chunk-COC7OWGU.js +1 -0
  41. package/public/chunk-D35WUZO6.js +1 -0
  42. package/public/chunk-DFDF3KH6.js +12 -0
  43. package/public/chunk-DPCLHABQ.js +1 -0
  44. package/public/chunk-DUPETM2M.js +23 -0
  45. package/public/{chunk-SRP6QX5M.js → chunk-EM4PY2IW.js} +1 -1
  46. package/public/chunk-FEAC537U.js +1 -0
  47. package/public/chunk-FN262E5A.js +1 -0
  48. package/public/chunk-FYQLISMQ.js +1 -0
  49. package/public/{chunk-ROYACDP2.js → chunk-G5J5T7GW.js} +1 -1
  50. package/public/chunk-GAB2DBLR.js +1 -0
  51. package/public/chunk-IBMIIFQE.js +1 -0
  52. package/public/chunk-IMPGSXGE.js +1 -0
  53. package/public/{chunk-7EQ4BJZB.js → chunk-J764EFYE.js} +1 -1
  54. package/public/{chunk-X7PVYZAE.js → chunk-JBQX4JBH.js} +1 -1
  55. package/public/chunk-JRB7XUYR.js +1 -0
  56. package/public/chunk-KFUUWA7X.js +1 -0
  57. package/public/chunk-KQLDPMEJ.js +1 -0
  58. package/public/chunk-KROD5DMG.js +1 -0
  59. package/public/chunk-L6DJE2P5.js +1 -0
  60. package/public/{chunk-IDT6WBAB.js → chunk-LI62SADN.js} +16 -16
  61. package/public/chunk-LQFBRDUD.js +1 -0
  62. package/public/chunk-N6Q2RMQ7.js +1 -0
  63. package/public/chunk-O3LCLRSP.js +1 -0
  64. package/public/chunk-OAD4RSYM.js +1 -0
  65. package/public/chunk-OHRQEPIS.js +1 -0
  66. package/public/chunk-PVFQOC3F.js +1 -0
  67. package/public/chunk-QDMK2MJE.js +1 -0
  68. package/public/{chunk-QDCKP2LU.js → chunk-QJQSHTGR.js} +1 -1
  69. package/public/chunk-R4BBLSJW.js +1 -0
  70. package/public/chunk-RUUJDWVI.js +6 -0
  71. package/public/{chunk-NGNQPAAK.js → chunk-S6UXXPGF.js} +1 -1
  72. package/public/{chunk-EGCUYKRH.js → chunk-SCRWY2OT.js} +1 -1
  73. package/public/chunk-SIOSSFRZ.js +1 -0
  74. package/public/chunk-SU4PKY3T.js +1 -0
  75. package/public/{chunk-63UHV4TV.js → chunk-T2SQRXHO.js} +1 -1
  76. package/public/{chunk-X2SHRXXY.js → chunk-TJJCM4OW.js} +1 -1
  77. package/public/chunk-TRFCJJT5.js +1 -0
  78. package/public/chunk-UCNZXJIA.js +1 -0
  79. package/public/chunk-UIJ3CQHS.js +1 -0
  80. package/public/{chunk-ASKYLUSK.js → chunk-VDNJ2BAQ.js} +1 -1
  81. package/public/chunk-VMWCXYYP.js +1 -0
  82. package/public/chunk-VOKKSTFQ.js +1 -0
  83. package/public/chunk-VW2NPXWC.js +1 -0
  84. package/public/chunk-VWD3E2JM.js +1 -0
  85. package/public/chunk-W6X46MTW.js +7 -0
  86. package/public/chunk-WKRMSSHT.js +1 -0
  87. package/public/chunk-WQOAGLYX.js +5 -0
  88. package/public/{chunk-GDFV4BMO.js → chunk-WTTWP6KF.js} +1 -1
  89. package/public/chunk-WUXDJZ6X.js +1 -0
  90. package/public/chunk-WWDJOBYD.js +1 -0
  91. package/public/chunk-WWEKL7GG.js +1 -0
  92. package/public/chunk-YTYNMEGN.js +1 -0
  93. package/public/chunk-YZN3LLKS.js +1 -0
  94. package/public/chunk-Z6SZ6XRK.js +1 -0
  95. package/public/chunk-Z7NIAJEB.js +1 -0
  96. package/public/chunk-ZONQU4DG.js +1 -0
  97. package/public/chunk-ZYOPRTVN.js +1 -0
  98. package/public/chunk-ZYRAX5SQ.js +1 -0
  99. package/public/index.html +2 -2
  100. package/public/main-WI46VD3S.js +1 -0
  101. package/public/{styles-YDIK2EDN.css → styles-RGK5JOII.css} +1 -1
  102. package/public/chunk-22QTGFTJ.js +0 -1
  103. package/public/chunk-3JARG26K.js +0 -3
  104. package/public/chunk-3LKZCKCF.js +0 -1
  105. package/public/chunk-45AWUQUI.js +0 -1
  106. package/public/chunk-4T2GN6EO.js +0 -1
  107. package/public/chunk-4YRWQX3W.js +0 -1
  108. package/public/chunk-5SZ5GQYS.js +0 -2
  109. package/public/chunk-7ATQ5EBC.js +0 -1
  110. package/public/chunk-C5RHCAUK.js +0 -1
  111. package/public/chunk-EITS7TXC.js +0 -1
  112. package/public/chunk-EV45AMNT.js +0 -1
  113. package/public/chunk-F3ERQJVG.js +0 -1
  114. package/public/chunk-FHY3NHWQ.js +0 -1
  115. package/public/chunk-FR5YDBCN.js +0 -1
  116. package/public/chunk-GW2DVJRQ.js +0 -1
  117. package/public/chunk-HELQ6C4L.js +0 -1
  118. package/public/chunk-HSWLFIAJ.js +0 -1
  119. package/public/chunk-HYGTZ767.js +0 -1
  120. package/public/chunk-HZUGXGIE.js +0 -1
  121. package/public/chunk-IN7NZAFJ.js +0 -1
  122. package/public/chunk-J6YDFLQQ.js +0 -1
  123. package/public/chunk-JFXQKHPO.js +0 -1
  124. package/public/chunk-KBSONIC6.js +0 -23
  125. package/public/chunk-KC3UX7RJ.js +0 -1
  126. package/public/chunk-KUQKJUX5.js +0 -1
  127. package/public/chunk-LVSOME36.js +0 -1
  128. package/public/chunk-LZTR2JMZ.js +0 -1
  129. package/public/chunk-N4XOTXZL.js +0 -12
  130. package/public/chunk-O3KBZXCW.js +0 -1
  131. package/public/chunk-OWY3J4XU.js +0 -1
  132. package/public/chunk-P2OFHVSW.js +0 -1
  133. package/public/chunk-PSCHGWYB.js +0 -1
  134. package/public/chunk-PVP6IVZQ.js +0 -5
  135. package/public/chunk-PY6XYKE2.js +0 -1
  136. package/public/chunk-Q3UFAHWJ.js +0 -1
  137. package/public/chunk-QH4OYVQX.js +0 -4
  138. package/public/chunk-QTPIIYXJ.js +0 -4
  139. package/public/chunk-RN7GNGXO.js +0 -1
  140. package/public/chunk-SKZUTSHE.js +0 -7
  141. package/public/chunk-SNKJBIOP.js +0 -1
  142. package/public/chunk-TKQG3CQ6.js +0 -1
  143. package/public/chunk-TQNKRJOX.js +0 -1
  144. package/public/chunk-UJZFMBAF.js +0 -1
  145. package/public/chunk-V7XUKJMZ.js +0 -1
  146. package/public/chunk-VV5VPBPJ.js +0 -1
  147. package/public/chunk-Z565CB6Q.js +0 -1
  148. package/public/chunk-Z73Q5KI4.js +0 -20
  149. package/public/main-PSKITXQI.js +0 -1
  150. /package/public/assets/hap-icons/{air-quality-sensor.svg → airquality.svg} +0 -0
  151. /package/public/assets/hap-icons/{carbon-monoxide-sensor.svg → co-sensor.svg} +0 -0
  152. /package/public/assets/hap-icons/{carbon-dioxide-sensor.svg → co2-sensor.svg} +0 -0
  153. /package/public/assets/hap-icons/{contact-sensor-closed.svg → contactsensor-closed.svg} +0 -0
  154. /package/public/assets/hap-icons/{contact-sensor-open.svg → contactsensor-open.svg} +0 -0
  155. /package/public/assets/hap-icons/{garage-door.svg → garagedoor.svg} +0 -0
  156. /package/public/assets/hap-icons/{humidity-sensor.svg → humidity.svg} +0 -0
  157. /package/public/assets/hap-icons/{leak-sensor.svg → leaksensor.svg} +0 -0
  158. /package/public/assets/hap-icons/{light-sensor.svg → light.svg} +0 -0
  159. /package/public/assets/hap-icons/{light-bulb.svg → lightbulb.svg} +0 -0
  160. /package/public/assets/hap-icons/{motion-sensor.svg → motionsensor.svg} +0 -0
  161. /package/public/assets/hap-icons/{occupancy-sensor.svg → occupancysensor.svg} +0 -0
  162. /package/public/assets/hap-icons/{security-system-active.svg → securitysystem-active.svg} +0 -0
  163. /package/public/assets/hap-icons/{security-system-off.svg → securitysystem-off.svg} +0 -0
  164. /package/public/assets/hap-icons/{security-system-triggered.svg → securitysystem-triggered.svg} +0 -0
  165. /package/public/assets/hap-icons/{stateless-programmable-switch.svg → statelessprogrammableswitch.svg} +0 -0
  166. /package/public/assets/hap-icons/{valve-shower-head.svg → valve-showerhead.svg} +0 -0
  167. /package/public/assets/hap-icons/{valve-faucet.svg → valve-waterfaucet.svg} +0 -0
  168. /package/public/assets/hap-icons/{window-covering-closed.svg → windowcovering-closed.svg} +0 -0
  169. /package/public/assets/hap-icons/{window-covering-open.svg → windowcovering-open.svg} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as vn}from"./chunk-T252YJXA.js";import{$ as oi,$b as ct,Ca as ze,Da as ai,E as X,Ea as li,Ec as gn,F as tn,Fa as W,Gb as ui,H as Fe,Hb as pe,I as ni,Ib as kt,J as It,Jb as Bt,Kb as hi,Lb as dn,Mb as Pt,Nb as At,O as nt,Ob as Xe,Oc as _e,P as nn,Pb as Be,Q as on,Qb as Pe,R as sn,Rb as pi,Sb as un,Sc as Ht,Tb as hn,Ub as pn,Vb as fi,Wb as ee,Yb as ce,Z as rn,Zb as de,_ as an,_b as lt,a as Mt,aa as B,ab as ke,ac as fe,b as ii,ba as ot,bc as Gt,ca as Rt,cb as rt,cc as q,dc as Y,fa as si,ga as K,gc as fn,gd as vi,ha as I,ib as ci,ic as P,ja as ln,jc as Oe,k as Ct,kc as _i,la as d,lc as mi,mb as me,n as L,nb as R,o as Zi,ob as T,p as Tt,pa as ri,qb as di,r as it,ra as St,rb as cn,sa as Nt,sb as xt,ua as re,ub as O,va as ae,vb as le,vc as gi,wa as st,wb as Ft,x as xe,xb as at,xc as _n,z as en,zc as mn}from"./chunk-SKZUTSHE.js";function dt(t){t||(t=d(st));let e=new Ct(s=>{if(t.destroyed){s.next();return}return t.onDestroy(s.next.bind(s))});return s=>s.pipe(B(e))}var S="top",V="bottom",A="right",x="left",Ut="auto",De=[S,V,A,x],ge="start",Ae="end",yn="clippingParents",Vt="viewport",Ke="popper",bn="reference",yi=De.reduce(function(t,e){return t.concat([e+"-"+ge,e+"-"+Ae])},[]),$t=[].concat(De,[Ut]).reduce(function(t,e){return t.concat([e,e+"-"+ge,e+"-"+Ae])},[]),Do="beforeRead",Eo="read",Mo="afterRead",Co="beforeMain",To="main",Io="afterMain",Ro="beforeWrite",So="write",No="afterWrite",wn=[Do,Eo,Mo,Co,To,Io,Ro,So,No];function G(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function te(t){var e=D(t).Element;return t instanceof e||t instanceof Element}function F(t){var e=D(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Qe(t){if(typeof ShadowRoot>"u")return!1;var e=D(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function xo(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!F(o)||!G(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Fo(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!F(n)||!G(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var On={name:"applyStyles",enabled:!0,phase:"write",fn:xo,effect:Fo,requires:["computeStyles"]};function H(t){return t.split("-")[0]}var ue=Math.max,Ge=Math.min,ve=Math.round;function Je(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(Je())}function ie(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&F(t)&&(n=t.offsetWidth>0&&ve(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ve(i.height)/t.offsetHeight||1);var r=te(t)?D(t):window,a=r.visualViewport,l=!ut()&&s,u=(i.left+(l&&a?a.offsetLeft:0))/n,c=(i.top+(l&&a?a.offsetTop:0))/o,_=i.width/n,p=i.height/o;return{width:_,height:p,top:c,right:u+_,bottom:c+p,left:u,x:u,y:c}}function He(t){var e=ie(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function ht(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Qe(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(t){return D(t).getComputedStyle(t)}function bi(t){return["table","td","th"].indexOf(G(t))>=0}function $(t){return((te(t)?t.ownerDocument:t.document)||window.document).documentElement}function ye(t){return G(t)==="html"?t:t.assignedSlot||t.parentNode||(Qe(t)?t.host:null)||$(t)}function Dn(t){return!F(t)||Q(t).position==="fixed"?null:t.offsetParent}function ko(t){var e=/firefox/i.test(Je()),s=/Trident/i.test(Je());if(s&&F(t)){var i=Q(t);if(i.position==="fixed")return null}var n=ye(t);for(Qe(n)&&(n=n.host);F(n)&&["html","body"].indexOf(G(n))<0;){var o=Q(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function he(t){for(var e=D(t),s=Dn(t);s&&bi(s)&&Q(s).position==="static";)s=Dn(s);return s&&(G(s)==="html"||G(s)==="body"&&Q(s).position==="static")?e:s||ko(t)||e}function Ue(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ve(t,e,s){return ue(t,Ge(e,s))}function En(t,e,s){var i=Ve(t,e,s);return i>s?s:i}function pt(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},pt(),t)}function _t(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Bo=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ft(typeof e!="number"?e:_t(e,De))};function Po(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=H(s.placement),l=Ue(a),u=[x,A].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var _=Bo(n.padding,s),p=He(o),h=l==="y"?S:x,v=l==="y"?V:A,f=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=he(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=f/2-m/2,g=_[h],y=E-p[c]-_[v],b=E/2-p[c]/2+C,M=Ve(g,b,y),U=l;s.modifiersData[i]=(e={},e[U]=M,e.centerOffset=M-b,e)}}function Ao(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ht(e.elements.popper,n)&&(e.elements.arrow=n))}var wi={name:"arrow",enabled:!0,phase:"main",fn:Po,effect:Ao,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(t){return t.split("-")[1]}var Go={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ho(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:ve(s*n)/n||0,y:ve(i*n)/n||0}}function Mn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,_=t.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,f=v===void 0?0:v,m=typeof c=="function"?c({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,g=S,y=window;if(u){var b=he(s),M="clientHeight",U="clientWidth";if(b===D(s)&&(b=$(s),Q(b).position!=="static"&&a==="absolute"&&(M="scrollHeight",U="scrollWidth")),b=b,n===S||(n===x||n===A)&&o===Ae){g=V;var k=_&&b===y&&y.visualViewport?y.visualViewport.height:b[M];f-=k-i.height,f*=l?1:-1}if(n===x||(n===S||n===V)&&o===Ae){C=A;var N=_&&b===y&&y.visualViewport?y.visualViewport.width:b[U];h-=N-i.width,h*=l?1:-1}}var j=Object.assign({position:a},u&&Go),oe=c===!0?Ho({x:h,y:f},D(s)):{x:h,y:f};if(h=oe.x,f=oe.y,l){var z;return Object.assign({},j,(z={},z[g]=E?"0":"",z[C]=w?"0":"",z.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",z))}return Object.assign({},j,(e={},e[g]=E?f+"px":"",e[C]=w?h+"px":"",e.transform="",e))}function Uo(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:H(e.placement),variation:ne(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Mn(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Mn(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Cn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Uo,data:{}};var jt={passive:!0};function Vo(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=D(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,jt)}),a&&l.addEventListener("resize",s.update,jt),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,jt)}),a&&l.removeEventListener("resize",s.update,jt)}}var Tn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vo,data:{}};var $o={left:"right",right:"left",bottom:"top",top:"bottom"};function qe(t){return t.replace(/left|right|bottom|top/g,function(e){return $o[e]})}var jo={start:"end",end:"start"};function Lt(t){return t.replace(/start|end/g,function(e){return jo[e]})}function $e(t){var e=D(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function je(t){return ie($(t)).left+$e(t).scrollLeft}function Oi(t,e){var s=D(t),i=$(t),n=s.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;var u=ut();(u||!u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:r,x:a+je(t),y:l}}function Di(t){var e,s=$(t),i=$e(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=ue(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ue(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+je(t),l=-i.scrollTop;return Q(n||s).direction==="rtl"&&(a+=ue(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Le(t){var e=Q(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Wt(t){return["html","body","#document"].indexOf(G(t))>=0?t.ownerDocument.body:F(t)&&Le(t)?t:Wt(ye(t))}function Ee(t,e){var s;e===void 0&&(e=[]);var i=Wt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=D(i),r=n?[o].concat(o.visualViewport||[],Le(i)?i:[]):i,a=e.concat(r);return n?a:a.concat(Ee(ye(r)))}function Ye(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Lo(t,e){var s=ie(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function In(t,e,s){return e===Vt?Ye(Oi(t,s)):te(e)?Lo(e,s):Ye(Di($(t)))}function Wo(t){var e=Ee(ye(t)),s=["absolute","fixed"].indexOf(Q(t).position)>=0,i=s&&F(t)?he(t):t;return te(i)?e.filter(function(n){return te(n)&&ht(n,i)&&G(n)!=="body"}):[]}function Ei(t,e,s,i){var n=e==="clippingParents"?Wo(t):[].concat(e),o=[].concat(n,[s]),r=o[0],a=o.reduce(function(l,u){var c=In(t,u,i);return l.top=ue(c.top,l.top),l.right=Ge(c.right,l.right),l.bottom=Ge(c.bottom,l.bottom),l.left=ue(c.left,l.left),l},In(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,s=t.element,i=t.placement,n=i?H(i):null,o=i?ne(i):null,r=e.x+e.width/2-s.width/2,a=e.y+e.height/2-s.height/2,l;switch(n){case S:l={x:r,y:e.y-s.height};break;case V:l={x:r,y:e.y+e.height};break;case A:l={x:e.x+e.width,y:a};break;case x:l={x:e.x-s.width,y:a};break;default:l={x:e.x,y:e.y}}var u=n?Ue(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ge:l[u]=l[u]-(e[c]/2-s[c]/2);break;case Ae:l[u]=l[u]+(e[c]/2-s[c]/2);break;default:}}return l}function Me(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,r=o===void 0?t.strategy:o,a=s.boundary,l=a===void 0?yn:a,u=s.rootBoundary,c=u===void 0?Vt:u,_=s.elementContext,p=_===void 0?Ke:_,h=s.altBoundary,v=h===void 0?!1:h,f=s.padding,m=f===void 0?0:f,w=ft(typeof m!="number"?m:_t(m,De)),E=p===Ke?bn:Ke,C=t.rects.popper,g=t.elements[v?E:p],y=Ei(te(g)?g:g.contextElement||$(t.elements.popper),l,c,r),b=ie(t.elements.reference),M=mt({reference:b,element:C,strategy:"absolute",placement:n}),U=Ye(Object.assign({},C,M)),k=p===Ke?U:b,N={top:y.top-k.top+w.top,bottom:k.bottom-y.bottom+w.bottom,left:y.left-k.left+w.left,right:k.right-y.right+w.right},j=t.modifiersData.offset;if(p===Ke&&j){var oe=j[n];Object.keys(N).forEach(function(z){var Te=[A,V].indexOf(z)>=0?1:-1,Ie=[S,V].indexOf(z)>=0?"y":"x";N[z]+=oe[Ie]*Te})}return N}function Mi(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?$t:l,c=ne(i),_=c?a?yi:yi.filter(function(v){return ne(v)===c}):De,p=_.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=_);var h=p.reduce(function(v,f){return v[f]=Me(t,{placement:f,boundary:n,rootBoundary:o,padding:r})[H(f)],v},{});return Object.keys(h).sort(function(v,f){return h[v]-h[f]})}function zo(t){if(H(t)===Ut)return[];var e=qe(t);return[Lt(t),e,Lt(e)]}function Xo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,_=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,v=h===void 0?!0:h,f=s.allowedAutoPlacements,m=e.options.placement,w=H(m),E=w===m,C=l||(E||!v?[qe(m)]:zo(m)),g=[m].concat(C).reduce(function(We,we){return We.concat(H(we)===Ut?Mi(e,{placement:we,boundary:c,rootBoundary:_,padding:u,flipVariations:v,allowedAutoPlacements:f}):we)},[]),y=e.rects.reference,b=e.rects.popper,M=new Map,U=!0,k=g[0],N=0;N<g.length;N++){var j=g[N],oe=H(j),z=ne(j)===ge,Te=[S,V].indexOf(oe)>=0,Ie=Te?"width":"height",J=Me(e,{placement:j,boundary:c,rootBoundary:_,altBoundary:p,padding:u}),se=Te?z?A:x:z?V:S;y[Ie]>b[Ie]&&(se=qe(se));var bt=qe(se),Re=[];if(o&&Re.push(J[oe]<=0),a&&Re.push(J[se]<=0,J[bt]<=0),Re.every(function(We){return We})){k=j,U=!1;break}M.set(j,Re)}if(U)for(var wt=v?3:1,Yt=function(we){var tt=g.find(function(Dt){var Se=M.get(Dt);if(Se)return Se.slice(0,we).every(function(Zt){return Zt})});if(tt)return k=tt,"break"},et=wt;et>0;et--){var Ot=Yt(et);if(Ot==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}var Ci={name:"flip",enabled:!0,phase:"main",fn:Xo,requiresIfExists:["offset"],data:{_skip:!1}};function Ko(t,e,s){var i=H(t),n=[x,S].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[x,A].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Qo(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,r=$t.reduce(function(c,_){return c[_]=Ko(_,e.rects,o),c},{}),a=r[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=r}var Ti={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Qo};function Jo(t){var e=t.state,s=t.name;e.modifiersData[s]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Rn={name:"popperOffsets",enabled:!0,phase:"read",fn:Jo,data:{}};function Ii(t){return t==="x"?"y":"x"}function qo(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,_=s.padding,p=s.tether,h=p===void 0?!0:p,v=s.tetherOffset,f=v===void 0?0:v,m=Me(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:c}),w=H(e.placement),E=ne(e.placement),C=!E,g=Ue(w),y=Ii(g),b=e.modifiersData.popperOffsets,M=e.rects.reference,U=e.rects.popper,k=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(b){if(o){var z,Te=g==="y"?S:x,Ie=g==="y"?V:A,J=g==="y"?"height":"width",se=b[g],bt=se+m[Te],Re=se-m[Ie],wt=h?-U[J]/2:0,Yt=E===ge?M[J]:U[J],et=E===ge?-U[J]:-M[J],Ot=e.elements.arrow,We=h&&Ot?He(Ot):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pt(),tt=we[Te],Dt=we[Ie],Se=Ve(0,M[J],We[J]),Zt=C?M[J]/2-wt-Se-tt-N.mainAxis:Yt-Se-tt-N.mainAxis,go=C?-M[J]/2+wt+Se+Dt+N.mainAxis:et+Se+Dt+N.mainAxis,ei=e.elements.arrow&&he(e.elements.arrow),vo=ei?g==="y"?ei.clientTop||0:ei.clientLeft||0:0,Li=(z=j?.[g])!=null?z:0,yo=se+Zt-Li-vo,bo=se+go-Li,Wi=Ve(h?Ge(bt,yo):bt,se,h?ue(Re,bo):Re);b[g]=Wi,oe[g]=Wi-se}if(a){var zi,wo=g==="x"?S:x,Oo=g==="x"?V:A,Ne=b[y],Et=y==="y"?"height":"width",Xi=Ne+m[wo],Ki=Ne-m[Oo],ti=[S,x].indexOf(w)!==-1,Qi=(zi=j?.[y])!=null?zi:0,Ji=ti?Xi:Ne-M[Et]-U[Et]-Qi+N.altAxis,qi=ti?Ne+M[Et]+U[Et]-Qi-N.altAxis:Ki,Yi=h&&ti?En(Ji,Ne,qi):Ve(h?Ji:Xi,Ne,h?qi:Ki);b[y]=Yi,oe[y]=Yi-Ne}e.modifiersData[i]=oe}}var Ri={name:"preventOverflow",enabled:!0,phase:"main",fn:qo,requiresIfExists:["offset"]};function Si(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Ni(t){return t===D(t)||!F(t)?$e(t):Si(t)}function Yo(t){var e=t.getBoundingClientRect(),s=ve(e.width)/t.offsetWidth||1,i=ve(e.height)/t.offsetHeight||1;return s!==1||i!==1}function xi(t,e,s){s===void 0&&(s=!1);var i=F(e),n=F(e)&&Yo(e),o=$(e),r=ie(t,n,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((G(e)!=="body"||Le(o))&&(a=Ni(e)),F(e)?(l=ie(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=je(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Zo(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=e.get(a);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function Fi(t){var e=Zo(t);return wn.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function ki(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Bi(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var Sn={placement:"bottom",modifiers:[],strategy:"absolute"};function Nn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function xn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?Sn:n;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sn,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=Fi(Bi([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(g){return g.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,C=w.popper;if(Nn(E,C)){c.rects={reference:xi(E,he(C),c.options.strategy==="fixed"),popper:He(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var y=c.orderedModifiers[g],b=y.fn,M=y.options,U=M===void 0?{}:M,k=y.name;typeof b=="function"&&(c=b({state:c,options:U,name:k,instance:h})||c)}}}},update:ki(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){f(),p=!0}};if(!Nn(a,l))return h;h.setOptions(u).then(function(m){!p&&u.onFirstUpdate&&u.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var w=m.name,E=m.options,C=E===void 0?{}:E,g=m.effect;if(typeof g=="function"){var y=g({state:c,name:w,instance:h,options:C}),b=function(){};_.push(y||b)}})}function f(){_.forEach(function(m){return m()}),_=[]}return h}}var es=[Tn,Rn,Cn,On],Pi=xn({defaultModifiers:es});var ts=["container"],is=["ngbAccordionBody",""],Qt=["*"];function ns(t,e){if(t&1){let s=fi();Be(0,"button",1),ce("click",function(){St(s);let n=de();return Nt(n.close())}),Pe()}}var os=t=>({$implicit:t});var ss=["dialog"],rs=["ngbNavOutlet",""];function as(t,e){}function ls(t,e){if(t&1&&(Be(0,"div",0),xt(1,as,0,0,"ng-template",1),Pe()),t&2){let s=de().$implicit,i=de();Xe("item",s)("nav",i.nav)("role",i.paneRole),ke(),Xe("ngTemplateOutlet",(s.contentTpl==null?null:s.contentTpl.templateRef)||null)("ngTemplateOutletContext",_n(5,os,s.active||i.isPanelTransitioning(s)))}}function cs(t,e){if(t&1&&kt(0,ls,2,7,"div",0),t&2){let s=e.$implicit,i=de();Bt(s.isPanelInDom()||i.isPanelTransitioning(s)?0:-1)}}function ds(t,e){if(t&1&&(Be(0,"span"),_i(1),Pe()),t&2){let s=de().$implicit,i=de();Oe(i.highlightClass),ke(),mi(s)}}function us(t,e){if(t&1&&(un(0),_i(1),hn()),t&2){let s=de().$implicit;ke(),mi(s)}}function hs(t,e){if(t&1&&kt(0,ds,2,3,"span",0)(1,us,2,1,"ng-container"),t&2){let s=e.$index;Bt(s%2!==0?0:1)}}var ps=(t,e,s)=>({result:t,term:e,formatter:s});function fs(t,e){if(t&1&&pi(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;Xe("result",n(s))("term",i)}}function _s(t,e){}function ms(t,e){if(t&1){let s=fi();Be(0,"button",3),ce("mouseenter",function(){let n=St(s).$index,o=de();return Nt(o.markActive(n))})("click",function(){let n=St(s).$implicit,o=de();return Nt(o.select(n))}),xt(1,_s,0,0,"ng-template",4),Pe()}if(t&2){let s=e.$implicit,i=e.$index,n=de(),o=fn(1);P("active",i===n.activeIdx),Xe("id",n.id+"-"+i),ke(),Xe("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",mn(5,ps,s,n.term,n.formatter))}}var Vn={animation:!0,transitionTimerDelayMs:5},Ze=(()=>{let e=class e{constructor(){this.animation=Vn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gs=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function vs(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function vt(t){return t!=null?`${t}`:""}function Jt(t){return typeof t=="string"}function Ce(t){return t!=null}function ys(t){return t&&t.then}function bs(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function ws(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function qt(t){return(t||document.body).getBoundingClientRect()}function Os(t){return e=>new Ct(s=>{let i=r=>t.run(()=>s.next(r)),n=r=>t.run(()=>s.error(r)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function Fn(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function $n(t=document){let e=t?.activeElement;return e?e.shadowRoot?$n(e.shadowRoot):e:null}var Ds=()=>{},{transitionTimerDelayMs:Es}=Vn,gt=new Map,Z=(t,e,s,i)=>{let n=i.context||{},o=gt.get(e);if(o)switch(i.runningTransition){case"continue":return Tt;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),gt.delete(e)}let r=s(e,i.animation,n)||Ds;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>r()),it(void 0).pipe(Os(t));let a=new L,l=new L,u=a.pipe(sn(!0));gt.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let c=vs(e);return t.runOutsideAngular(()=>{let _=X(e,"transitionend").pipe(B(u),Fe(({target:h})=>h===e)),p=tn(c+Es).pipe(B(u));ni(p,_,l).pipe(B(u)).subscribe(()=>{gt.delete(e),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},kn=t=>{gt.get(t)?.complete()};function Ms(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var Cs=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!e){a();return}return n||(n=Ms(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),qt(t),r.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[o]=""}},Ts=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bn=(()=>{let e=class e{constructor(){this._config=d(Ts),this._element=d(W),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new O,this.horizontal=this._config.horizontal,this.shown=new O,this.hidden=new O}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return Z(this._zone,this._element.nativeElement,Cs,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&P("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),Is=0,lu=(()=>{let e=class e{constructor(){this._item=d(yt),this._viewRef=null,this.elementRef=d(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,rt,7),n&2){let a;q(a=Y())&&(o._bodyTpl=a.first)}},viewQuery:function(n,o){if(n&1&&Gt(ts,7,ci),n&2){let r;q(r=Y())&&(o._vcr=r.first)}},hostAttrs:[1,"accordion-body"],attrs:is,ngContentSelectors:Qt,decls:3,vars:0,consts:[["container",""]],template:function(n,o){n&1&&(lt(),pn(0,null,0),ct(2))},encapsulation:2});let t=e;return t})(),Rs=(()=>{let e=class e{constructor(){this.item=d(yt),this.ngbCollapse=d(Bn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ee("id",o.item.collapseId),pe("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[cn([Bn])]});let t=e;return t})(),cu=(()=>{let e=class e{constructor(){this.item=d(yt),this.accordion=d(jn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&ce("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ee("id",o.item.toggleId),pe("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),P("collapsed",o.item.collapsed))}});let t=e;return t})();var du=(()=>{let e=class e{constructor(){this.item=d(yt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&P("collapsed",o.item.collapsed)}});let t=e;return t})(),yt=(()=>{let e=class e{constructor(){this._accordion=d(jn),this._cd=d(_e),this._destroyRef=d(st),this._collapsed=!0,this._id=`ngb-accordion-item-${Is++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}set id(i){Jt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(dt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),i.shown.pipe(dt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,Rs,7),n&2){let a;q(a=Y())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ee("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),jn=(()=>{let e=class e{constructor(){this._config=d(gs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}toggle(i){this._getItem(i)?.toggle()}expand(i){this._getItem(i)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){this._getItem(i)?.collapse()}collapseAll(){this._items?.forEach(i=>i.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&i!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){return this._items?.find(n=>n.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,yt,4),n&2){let a;q(a=Y())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Ln=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Ss=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ns=({classList:t})=>{t.remove("show")},uu=(()=>{let e=class e{constructor(){this._config=d(Ss),this._elementRef=d(W),this._zone=d(le),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new O}close(){let i=Z(this._zone,this._elementRef.nativeElement,Ns,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("alert show"+(o.type?" alert-"+o.type:"")),P("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Qt,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(lt(),ct(0),kt(1,ns,1,0,"button",0)),n&2&&(ke(),Bt(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
1
+ import{a as vn}from"./chunk-5NG7YGKN.js";import{$ as oi,$a as ke,$b as fe,Ca as ze,Da as ai,Dc as gn,E as X,Ea as li,F as tn,Fa as W,Fb as ui,Gb as pe,H as Fe,Hb as kt,I as ni,Ib as Bt,J as It,Jb as hi,Kb as dn,Lb as Pt,Mb as At,Nb as Xe,Nc as _e,O as nt,Ob as Be,P as nn,Pb as Pe,Q as on,Qb as pi,R as sn,Rb as un,Rc as Ht,Sb as hn,Tb as pn,Ub as fi,Vb as ee,Xb as ce,Yb as de,Z as rn,Zb as lt,_ as an,_b as ct,a as Mt,aa as B,ac as Gt,b as ii,ba as ot,bb as rt,bc as q,ca as Rt,cc as Y,fa as si,fc as fn,fd as vi,ga as K,ha as I,hb as ci,hc as P,ic as Oe,ja as ln,jc as _i,k as Ct,kc as mi,la as d,lb as me,mb as R,n as L,nb as T,o as Zi,p as Tt,pa as ri,pb as di,qb as cn,r as it,ra as St,rb as xt,sa as Nt,tb as O,ua as re,ub as le,uc as gi,va as ae,vb as Ft,wa as st,wb as at,wc as _n,x as xe,yc as mn,z as en}from"./chunk-W6X46MTW.js";function dt(t){t||(t=d(st));let e=new Ct(s=>{if(t.destroyed){s.next();return}return t.onDestroy(s.next.bind(s))});return s=>s.pipe(B(e))}var S="top",V="bottom",A="right",x="left",Ut="auto",De=[S,V,A,x],ge="start",Ae="end",yn="clippingParents",Vt="viewport",Ke="popper",bn="reference",yi=De.reduce(function(t,e){return t.concat([e+"-"+ge,e+"-"+Ae])},[]),$t=[].concat(De,[Ut]).reduce(function(t,e){return t.concat([e,e+"-"+ge,e+"-"+Ae])},[]),Do="beforeRead",Eo="read",Mo="afterRead",Co="beforeMain",To="main",Io="afterMain",Ro="beforeWrite",So="write",No="afterWrite",wn=[Do,Eo,Mo,Co,To,Io,Ro,So,No];function G(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function te(t){var e=D(t).Element;return t instanceof e||t instanceof Element}function F(t){var e=D(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Qe(t){if(typeof ShadowRoot>"u")return!1;var e=D(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function xo(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!F(o)||!G(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Fo(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!F(n)||!G(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var On={name:"applyStyles",enabled:!0,phase:"write",fn:xo,effect:Fo,requires:["computeStyles"]};function H(t){return t.split("-")[0]}var ue=Math.max,Ge=Math.min,ve=Math.round;function Je(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(Je())}function ie(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&F(t)&&(n=t.offsetWidth>0&&ve(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ve(i.height)/t.offsetHeight||1);var r=te(t)?D(t):window,a=r.visualViewport,l=!ut()&&s,u=(i.left+(l&&a?a.offsetLeft:0))/n,c=(i.top+(l&&a?a.offsetTop:0))/o,_=i.width/n,p=i.height/o;return{width:_,height:p,top:c,right:u+_,bottom:c+p,left:u,x:u,y:c}}function He(t){var e=ie(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function ht(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Qe(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(t){return D(t).getComputedStyle(t)}function bi(t){return["table","td","th"].indexOf(G(t))>=0}function $(t){return((te(t)?t.ownerDocument:t.document)||window.document).documentElement}function ye(t){return G(t)==="html"?t:t.assignedSlot||t.parentNode||(Qe(t)?t.host:null)||$(t)}function Dn(t){return!F(t)||Q(t).position==="fixed"?null:t.offsetParent}function ko(t){var e=/firefox/i.test(Je()),s=/Trident/i.test(Je());if(s&&F(t)){var i=Q(t);if(i.position==="fixed")return null}var n=ye(t);for(Qe(n)&&(n=n.host);F(n)&&["html","body"].indexOf(G(n))<0;){var o=Q(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function he(t){for(var e=D(t),s=Dn(t);s&&bi(s)&&Q(s).position==="static";)s=Dn(s);return s&&(G(s)==="html"||G(s)==="body"&&Q(s).position==="static")?e:s||ko(t)||e}function Ue(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ve(t,e,s){return ue(t,Ge(e,s))}function En(t,e,s){var i=Ve(t,e,s);return i>s?s:i}function pt(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},pt(),t)}function _t(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Bo=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ft(typeof e!="number"?e:_t(e,De))};function Po(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=H(s.placement),l=Ue(a),u=[x,A].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var _=Bo(n.padding,s),p=He(o),h=l==="y"?S:x,v=l==="y"?V:A,f=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=he(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=f/2-m/2,g=_[h],y=E-p[c]-_[v],b=E/2-p[c]/2+C,M=Ve(g,b,y),U=l;s.modifiersData[i]=(e={},e[U]=M,e.centerOffset=M-b,e)}}function Ao(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ht(e.elements.popper,n)&&(e.elements.arrow=n))}var wi={name:"arrow",enabled:!0,phase:"main",fn:Po,effect:Ao,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(t){return t.split("-")[1]}var Go={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ho(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:ve(s*n)/n||0,y:ve(i*n)/n||0}}function Mn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,_=t.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,f=v===void 0?0:v,m=typeof c=="function"?c({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,g=S,y=window;if(u){var b=he(s),M="clientHeight",U="clientWidth";if(b===D(s)&&(b=$(s),Q(b).position!=="static"&&a==="absolute"&&(M="scrollHeight",U="scrollWidth")),b=b,n===S||(n===x||n===A)&&o===Ae){g=V;var k=_&&b===y&&y.visualViewport?y.visualViewport.height:b[M];f-=k-i.height,f*=l?1:-1}if(n===x||(n===S||n===V)&&o===Ae){C=A;var N=_&&b===y&&y.visualViewport?y.visualViewport.width:b[U];h-=N-i.width,h*=l?1:-1}}var j=Object.assign({position:a},u&&Go),oe=c===!0?Ho({x:h,y:f},D(s)):{x:h,y:f};if(h=oe.x,f=oe.y,l){var z;return Object.assign({},j,(z={},z[g]=E?"0":"",z[C]=w?"0":"",z.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",z))}return Object.assign({},j,(e={},e[g]=E?f+"px":"",e[C]=w?h+"px":"",e.transform="",e))}function Uo(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:H(e.placement),variation:ne(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Mn(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Mn(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Cn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Uo,data:{}};var jt={passive:!0};function Vo(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=D(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,jt)}),a&&l.addEventListener("resize",s.update,jt),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,jt)}),a&&l.removeEventListener("resize",s.update,jt)}}var Tn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vo,data:{}};var $o={left:"right",right:"left",bottom:"top",top:"bottom"};function qe(t){return t.replace(/left|right|bottom|top/g,function(e){return $o[e]})}var jo={start:"end",end:"start"};function Lt(t){return t.replace(/start|end/g,function(e){return jo[e]})}function $e(t){var e=D(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function je(t){return ie($(t)).left+$e(t).scrollLeft}function Oi(t,e){var s=D(t),i=$(t),n=s.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){o=n.width,r=n.height;var u=ut();(u||!u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:r,x:a+je(t),y:l}}function Di(t){var e,s=$(t),i=$e(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=ue(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ue(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+je(t),l=-i.scrollTop;return Q(n||s).direction==="rtl"&&(a+=ue(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Le(t){var e=Q(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Wt(t){return["html","body","#document"].indexOf(G(t))>=0?t.ownerDocument.body:F(t)&&Le(t)?t:Wt(ye(t))}function Ee(t,e){var s;e===void 0&&(e=[]);var i=Wt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=D(i),r=n?[o].concat(o.visualViewport||[],Le(i)?i:[]):i,a=e.concat(r);return n?a:a.concat(Ee(ye(r)))}function Ye(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Lo(t,e){var s=ie(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function In(t,e,s){return e===Vt?Ye(Oi(t,s)):te(e)?Lo(e,s):Ye(Di($(t)))}function Wo(t){var e=Ee(ye(t)),s=["absolute","fixed"].indexOf(Q(t).position)>=0,i=s&&F(t)?he(t):t;return te(i)?e.filter(function(n){return te(n)&&ht(n,i)&&G(n)!=="body"}):[]}function Ei(t,e,s,i){var n=e==="clippingParents"?Wo(t):[].concat(e),o=[].concat(n,[s]),r=o[0],a=o.reduce(function(l,u){var c=In(t,u,i);return l.top=ue(c.top,l.top),l.right=Ge(c.right,l.right),l.bottom=Ge(c.bottom,l.bottom),l.left=ue(c.left,l.left),l},In(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,s=t.element,i=t.placement,n=i?H(i):null,o=i?ne(i):null,r=e.x+e.width/2-s.width/2,a=e.y+e.height/2-s.height/2,l;switch(n){case S:l={x:r,y:e.y-s.height};break;case V:l={x:r,y:e.y+e.height};break;case A:l={x:e.x+e.width,y:a};break;case x:l={x:e.x-s.width,y:a};break;default:l={x:e.x,y:e.y}}var u=n?Ue(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ge:l[u]=l[u]-(e[c]/2-s[c]/2);break;case Ae:l[u]=l[u]+(e[c]/2-s[c]/2);break;default:}}return l}function Me(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,r=o===void 0?t.strategy:o,a=s.boundary,l=a===void 0?yn:a,u=s.rootBoundary,c=u===void 0?Vt:u,_=s.elementContext,p=_===void 0?Ke:_,h=s.altBoundary,v=h===void 0?!1:h,f=s.padding,m=f===void 0?0:f,w=ft(typeof m!="number"?m:_t(m,De)),E=p===Ke?bn:Ke,C=t.rects.popper,g=t.elements[v?E:p],y=Ei(te(g)?g:g.contextElement||$(t.elements.popper),l,c,r),b=ie(t.elements.reference),M=mt({reference:b,element:C,strategy:"absolute",placement:n}),U=Ye(Object.assign({},C,M)),k=p===Ke?U:b,N={top:y.top-k.top+w.top,bottom:k.bottom-y.bottom+w.bottom,left:y.left-k.left+w.left,right:k.right-y.right+w.right},j=t.modifiersData.offset;if(p===Ke&&j){var oe=j[n];Object.keys(N).forEach(function(z){var Te=[A,V].indexOf(z)>=0?1:-1,Ie=[S,V].indexOf(z)>=0?"y":"x";N[z]+=oe[Ie]*Te})}return N}function Mi(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?$t:l,c=ne(i),_=c?a?yi:yi.filter(function(v){return ne(v)===c}):De,p=_.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=_);var h=p.reduce(function(v,f){return v[f]=Me(t,{placement:f,boundary:n,rootBoundary:o,padding:r})[H(f)],v},{});return Object.keys(h).sort(function(v,f){return h[v]-h[f]})}function zo(t){if(H(t)===Ut)return[];var e=qe(t);return[Lt(t),e,Lt(e)]}function Xo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,_=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,v=h===void 0?!0:h,f=s.allowedAutoPlacements,m=e.options.placement,w=H(m),E=w===m,C=l||(E||!v?[qe(m)]:zo(m)),g=[m].concat(C).reduce(function(We,we){return We.concat(H(we)===Ut?Mi(e,{placement:we,boundary:c,rootBoundary:_,padding:u,flipVariations:v,allowedAutoPlacements:f}):we)},[]),y=e.rects.reference,b=e.rects.popper,M=new Map,U=!0,k=g[0],N=0;N<g.length;N++){var j=g[N],oe=H(j),z=ne(j)===ge,Te=[S,V].indexOf(oe)>=0,Ie=Te?"width":"height",J=Me(e,{placement:j,boundary:c,rootBoundary:_,altBoundary:p,padding:u}),se=Te?z?A:x:z?V:S;y[Ie]>b[Ie]&&(se=qe(se));var bt=qe(se),Re=[];if(o&&Re.push(J[oe]<=0),a&&Re.push(J[se]<=0,J[bt]<=0),Re.every(function(We){return We})){k=j,U=!1;break}M.set(j,Re)}if(U)for(var wt=v?3:1,Yt=function(we){var tt=g.find(function(Dt){var Se=M.get(Dt);if(Se)return Se.slice(0,we).every(function(Zt){return Zt})});if(tt)return k=tt,"break"},et=wt;et>0;et--){var Ot=Yt(et);if(Ot==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}var Ci={name:"flip",enabled:!0,phase:"main",fn:Xo,requiresIfExists:["offset"],data:{_skip:!1}};function Ko(t,e,s){var i=H(t),n=[x,S].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[x,A].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Qo(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,r=$t.reduce(function(c,_){return c[_]=Ko(_,e.rects,o),c},{}),a=r[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=r}var Ti={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Qo};function Jo(t){var e=t.state,s=t.name;e.modifiersData[s]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Rn={name:"popperOffsets",enabled:!0,phase:"read",fn:Jo,data:{}};function Ii(t){return t==="x"?"y":"x"}function qo(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,_=s.padding,p=s.tether,h=p===void 0?!0:p,v=s.tetherOffset,f=v===void 0?0:v,m=Me(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:c}),w=H(e.placement),E=ne(e.placement),C=!E,g=Ue(w),y=Ii(g),b=e.modifiersData.popperOffsets,M=e.rects.reference,U=e.rects.popper,k=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(b){if(o){var z,Te=g==="y"?S:x,Ie=g==="y"?V:A,J=g==="y"?"height":"width",se=b[g],bt=se+m[Te],Re=se-m[Ie],wt=h?-U[J]/2:0,Yt=E===ge?M[J]:U[J],et=E===ge?-U[J]:-M[J],Ot=e.elements.arrow,We=h&&Ot?He(Ot):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pt(),tt=we[Te],Dt=we[Ie],Se=Ve(0,M[J],We[J]),Zt=C?M[J]/2-wt-Se-tt-N.mainAxis:Yt-Se-tt-N.mainAxis,go=C?-M[J]/2+wt+Se+Dt+N.mainAxis:et+Se+Dt+N.mainAxis,ei=e.elements.arrow&&he(e.elements.arrow),vo=ei?g==="y"?ei.clientTop||0:ei.clientLeft||0:0,Li=(z=j?.[g])!=null?z:0,yo=se+Zt-Li-vo,bo=se+go-Li,Wi=Ve(h?Ge(bt,yo):bt,se,h?ue(Re,bo):Re);b[g]=Wi,oe[g]=Wi-se}if(a){var zi,wo=g==="x"?S:x,Oo=g==="x"?V:A,Ne=b[y],Et=y==="y"?"height":"width",Xi=Ne+m[wo],Ki=Ne-m[Oo],ti=[S,x].indexOf(w)!==-1,Qi=(zi=j?.[y])!=null?zi:0,Ji=ti?Xi:Ne-M[Et]-U[Et]-Qi+N.altAxis,qi=ti?Ne+M[Et]+U[Et]-Qi-N.altAxis:Ki,Yi=h&&ti?En(Ji,Ne,qi):Ve(h?Ji:Xi,Ne,h?qi:Ki);b[y]=Yi,oe[y]=Yi-Ne}e.modifiersData[i]=oe}}var Ri={name:"preventOverflow",enabled:!0,phase:"main",fn:qo,requiresIfExists:["offset"]};function Si(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Ni(t){return t===D(t)||!F(t)?$e(t):Si(t)}function Yo(t){var e=t.getBoundingClientRect(),s=ve(e.width)/t.offsetWidth||1,i=ve(e.height)/t.offsetHeight||1;return s!==1||i!==1}function xi(t,e,s){s===void 0&&(s=!1);var i=F(e),n=F(e)&&Yo(e),o=$(e),r=ie(t,n,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((G(e)!=="body"||Le(o))&&(a=Ni(e)),F(e)?(l=ie(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=je(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Zo(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=e.get(a);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function Fi(t){var e=Zo(t);return wn.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function ki(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Bi(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var Sn={placement:"bottom",modifiers:[],strategy:"absolute"};function Nn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function xn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?Sn:n;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sn,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;f(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=Fi(Bi([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(g){return g.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,C=w.popper;if(Nn(E,C)){c.rects={reference:xi(E,he(C),c.options.strategy==="fixed"),popper:He(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var y=c.orderedModifiers[g],b=y.fn,M=y.options,U=M===void 0?{}:M,k=y.name;typeof b=="function"&&(c=b({state:c,options:U,name:k,instance:h})||c)}}}},update:ki(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){f(),p=!0}};if(!Nn(a,l))return h;h.setOptions(u).then(function(m){!p&&u.onFirstUpdate&&u.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var w=m.name,E=m.options,C=E===void 0?{}:E,g=m.effect;if(typeof g=="function"){var y=g({state:c,name:w,instance:h,options:C}),b=function(){};_.push(y||b)}})}function f(){_.forEach(function(m){return m()}),_=[]}return h}}var es=[Tn,Rn,Cn,On],Pi=xn({defaultModifiers:es});var ts=["container"],is=["ngbAccordionBody",""],Qt=["*"];function ns(t,e){if(t&1){let s=fi();Be(0,"button",1),ce("click",function(){St(s);let n=de();return Nt(n.close())}),Pe()}}var os=t=>({$implicit:t});var ss=["dialog"],rs=["ngbNavOutlet",""];function as(t,e){}function ls(t,e){if(t&1&&(Be(0,"div",0),xt(1,as,0,0,"ng-template",1),Pe()),t&2){let s=de().$implicit,i=de();Xe("item",s)("nav",i.nav)("role",i.paneRole),ke(),Xe("ngTemplateOutlet",(s.contentTpl==null?null:s.contentTpl.templateRef)||null)("ngTemplateOutletContext",_n(5,os,s.active||i.isPanelTransitioning(s)))}}function cs(t,e){if(t&1&&kt(0,ls,2,7,"div",0),t&2){let s=e.$implicit,i=de();Bt(s.isPanelInDom()||i.isPanelTransitioning(s)?0:-1)}}function ds(t,e){if(t&1&&(Be(0,"span"),_i(1),Pe()),t&2){let s=de().$implicit,i=de();Oe(i.highlightClass),ke(),mi(s)}}function us(t,e){if(t&1&&(un(0),_i(1),hn()),t&2){let s=de().$implicit;ke(),mi(s)}}function hs(t,e){if(t&1&&kt(0,ds,2,3,"span",0)(1,us,2,1,"ng-container"),t&2){let s=e.$index;Bt(s%2!==0?0:1)}}var ps=(t,e,s)=>({result:t,term:e,formatter:s});function fs(t,e){if(t&1&&pi(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;Xe("result",n(s))("term",i)}}function _s(t,e){}function ms(t,e){if(t&1){let s=fi();Be(0,"button",3),ce("mouseenter",function(){let n=St(s).$index,o=de();return Nt(o.markActive(n))})("click",function(){let n=St(s).$implicit,o=de();return Nt(o.select(n))}),xt(1,_s,0,0,"ng-template",4),Pe()}if(t&2){let s=e.$implicit,i=e.$index,n=de(),o=fn(1);P("active",i===n.activeIdx),Xe("id",n.id+"-"+i),ke(),Xe("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",mn(5,ps,s,n.term,n.formatter))}}var Vn={animation:!0,transitionTimerDelayMs:5},Ze=(()=>{let e=class e{constructor(){this.animation=Vn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gs=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function vs(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function vt(t){return t!=null?`${t}`:""}function Jt(t){return typeof t=="string"}function Ce(t){return t!=null}function ys(t){return t&&t.then}function bs(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function ws(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function qt(t){return(t||document.body).getBoundingClientRect()}function Os(t){return e=>new Ct(s=>{let i=r=>t.run(()=>s.next(r)),n=r=>t.run(()=>s.error(r)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function Fn(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function $n(t=document){let e=t?.activeElement;return e?e.shadowRoot?$n(e.shadowRoot):e:null}var Ds=()=>{},{transitionTimerDelayMs:Es}=Vn,gt=new Map,Z=(t,e,s,i)=>{let n=i.context||{},o=gt.get(e);if(o)switch(i.runningTransition){case"continue":return Tt;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),gt.delete(e)}let r=s(e,i.animation,n)||Ds;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>r()),it(void 0).pipe(Os(t));let a=new L,l=new L,u=a.pipe(sn(!0));gt.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let c=vs(e);return t.runOutsideAngular(()=>{let _=X(e,"transitionend").pipe(B(u),Fe(({target:h})=>h===e)),p=tn(c+Es).pipe(B(u));ni(p,_,l).pipe(B(u)).subscribe(()=>{gt.delete(e),t.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},kn=t=>{gt.get(t)?.complete()};function Ms(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var Cs=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:r}=t;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!e){a();return}return n||(n=Ms(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),qt(t),r.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),t.style[o]=""}},Ts=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bn=(()=>{let e=class e{constructor(){this._config=d(Ts),this._element=d(W),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new O,this.horizontal=this._config.horizontal,this.shown=new O,this.hidden=new O}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return Z(this._zone,this._element.nativeElement,Cs,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&P("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),Is=0,lu=(()=>{let e=class e{constructor(){this._item=d(yt),this._viewRef=null,this.elementRef=d(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,rt,7),n&2){let a;q(a=Y())&&(o._bodyTpl=a.first)}},viewQuery:function(n,o){if(n&1&&Gt(ts,7,ci),n&2){let r;q(r=Y())&&(o._vcr=r.first)}},hostAttrs:[1,"accordion-body"],attrs:is,ngContentSelectors:Qt,decls:3,vars:0,consts:[["container",""]],template:function(n,o){n&1&&(lt(),pn(0,null,0),ct(2))},encapsulation:2});let t=e;return t})(),Rs=(()=>{let e=class e{constructor(){this.item=d(yt),this.ngbCollapse=d(Bn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ee("id",o.item.collapseId),pe("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[cn([Bn])]});let t=e;return t})(),cu=(()=>{let e=class e{constructor(){this.item=d(yt),this.accordion=d(jn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&ce("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ee("id",o.item.toggleId),pe("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),P("collapsed",o.item.collapsed))}});let t=e;return t})();var du=(()=>{let e=class e{constructor(){this.item=d(yt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&P("collapsed",o.item.collapsed)}});let t=e;return t})(),yt=(()=>{let e=class e{constructor(){this._accordion=d(jn),this._cd=d(_e),this._destroyRef=d(st),this._collapsed=!0,this._id=`ngb-accordion-item-${Is++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}set id(i){Jt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(dt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),i.shown.pipe(dt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,Rs,7),n&2){let a;q(a=Y())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ee("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),jn=(()=>{let e=class e{constructor(){this._config=d(gs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new O,this.shown=new O,this.hide=new O,this.hidden=new O}toggle(i){this._getItem(i)?.toggle()}expand(i){this._getItem(i)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){this._getItem(i)?.collapse()}collapseAll(){this._items?.forEach(i=>i.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){return this.closeOthers?this._items?(this._items.find(n=>!n.collapsed&&i!==n)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){return this._items?.find(n=>n.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,yt,4),n&2){let a;q(a=Y())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Ln=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Ss=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ns=({classList:t})=>{t.remove("show")},uu=(()=>{let e=class e{constructor(){this._config=d(Ss),this._elementRef=d(W),this._zone=d(le),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new O}close(){let i=Z(this._zone,this._elementRef.nativeElement,Ns,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("alert show"+(o.type?" alert-"+o.type:"")),P("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Qt,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(lt(),ct(0),kt(1,ns,1,0,"button",0)),n&2&&(ke(),Bt(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
2
2
  `],encapsulation:2,changeDetection:0});let t=e;return t})(),Wn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var zn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Xn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var zt=(t,e)=>e?e.some(s=>s.contains(t)):!1,Pn=(t,e)=>!e||ws(t,e)!=null,xs=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),Fs=t=>xs?()=>setTimeout(()=>t(),100):t;function Ui(t,e,s,i,n,o,r,a){s&&t.runOutsideAngular(Fs(()=>{let l=p=>{let h=p.target;return p.button===2||zt(h,r)?!1:s==="inside"?zt(h,o)&&Pn(h,a):s==="outside"?!zt(h,o):Pn(h,a)||!zt(h,o)},u=X(e,"keydown").pipe(B(n),Fe(p=>p.key==="Escape"),ot(p=>p.preventDefault())),c=X(e,"mousedown").pipe(xe(l),B(n)),_=X(e,"mouseup").pipe(Rt(c),Fe(([p,h])=>h),nn(0),B(n));ni([u.pipe(xe(p=>0)),_.pipe(xe(p=>1))]).subscribe(p=>t.run(()=>i(p)))}))}var Kn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Qn(t){let e=Array.from(t.querySelectorAll(Kn)).filter(s=>s.tabIndex!==-1);return[e[0],e[e.length-1]]}var ks=(t,e,s,i=!1)=>{t.runOutsideAngular(()=>{let n=X(e,"focusin").pipe(B(s),xe(o=>o.target));X(e,"keydown").pipe(B(s),Fe(o=>o.key==="Tab"),Rt(n)).subscribe(([o,r])=>{let[a,l]=Qn(e);(r===a||r===e)&&o.shiftKey&&(l.focus(),o.preventDefault()),r===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&X(e,"click").pipe(B(s),Rt(n),xe(o=>o[1])).subscribe(o=>o.focus())})},Bs=(()=>{let e=class e{constructor(){this._element=d(ae).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ps=/\s+/,As=/ +/gi,Gs={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function Hs(t,e){let[s,i]=Gs[t];return e&&i||s}var Us=/^left/,Vs=/^right/,$s=/^start/,js=/^end/;function Ls(t,e){let[s,i]=e.split("-"),n=s.replace(Us,"start").replace(Vs,"end"),o=[n];if(i){let r=i;(s==="left"||s==="right")&&(r=r.replace($s,"top").replace(js,"bottom")),o.push(`${n}-${r}`)}return t&&(o=o.map(r=>`${t}-${r}`)),o.join(" ")}function An({placement:t,baseClass:e},s){let i=Array.isArray(t)?t:t.split(Ps),n=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],o=i.findIndex(u=>u==="auto");o>=0&&n.forEach(function(u){i.find(c=>c.search("^"+u)!==-1)==null&&i.splice(o++,1,u)});let r=i.map(u=>Hs(u,s.isRTL()));return{placement:r.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:u}){let c=new RegExp(e+"(-[a-z]+)*","gi"),_=u.elements.popper,p=u.placement,h=_.className;h=h.replace(c,""),h+=` ${Ls(e,p)}`,h=h.trim().replace(As," "),_.className=h}},Ci,Ri,wi,{enabled:!0,name:"flip",options:{fallbackPlacements:r}}]}}function Gn(t){return t}function Vi(){let t=d(Bs),e=null;return{createPopper(s){if(!e){let n=(s.updatePopperOptions||Gn)(An(s,t));e=Pi(s.hostElement,s.targetElement,n)}},update(){e&&e.update()},setOptions(s){if(e){let n=(s.updatePopperOptions||Gn)(An(s,t));e.setOptions(n)}},destroy(){e&&(e.destroy(),e=null)}}}function $i(t){return e=>(e.modifiers.push(Ti,{name:"offset",options:{offset:()=>t}}),e)}var hu=new Date(1882,10,12),pu=new Date(2174,10,25);var fu=1e3*60*60*24;var ji=1080,Ws=24*ji,zs=12*ji+793,_u=29*Ws+zs,mu=11*ji+204;var Jn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Xs=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i,this.container=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qn=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=d(W).nativeElement,this.tabindex=0}set disabled(i){this._disabled=i===""||i===!0}get disabled(){return this._disabled}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(n,o){n&2&&(ee("tabIndex",o.disabled?-1:o.tabindex),P("disabled",o.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"}});let t=e;return t})(),gu=(()=>{let e=class e{constructor(){this.item=d(qn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(n,o){n&2&&ee("disabled",o.item.disabled)}});let t=e;return t})(),Ks=(()=>{let e=class e{constructor(){this.dropdown=d(Yn),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,qn,4),n&2){let a;q(a=Y())&&(o.menuItems=a)}},hostAttrs:[1,"dropdown-menu"],hostVars:2,hostBindings:function(n,o){n&1&&ce("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Enter",function(a){return o.dropdown.onKeyDown(a)})("keydown.Space",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&P("show",o.dropdown.isOpen())}});let t=e;return t})(),Ai=(()=>{let e=class e{constructor(){this.dropdown=d(Yn),this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&2&&(pe("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))}});let t=e;return t})(),vu=(()=>{let e=class e extends Ai{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&1&&ce("click",function(){return o.dropdown.toggle()})("keydown.ArrowUp",function(a){return o.dropdown.onKeyDown(a)})("keydown.ArrowDown",function(a){return o.dropdown.onKeyDown(a)})("keydown.Home",function(a){return o.dropdown.onKeyDown(a)})("keydown.End",function(a){return o.dropdown.onKeyDown(a)})("keydown.Tab",function(a){return o.dropdown.onKeyDown(a)})("keydown.Shift.Tab",function(a){return o.dropdown.onKeyDown(a)}),n&2&&(pe("aria-expanded",o.dropdown.isOpen()),P("show",o.dropdown.isOpen()))},features:[gi([{provide:Ai,useExisting:si(()=>e)}]),di]});let t=e;return t})(),Yn=(()=>{let e=class e{constructor(){this._changeDetector=d(_e),this._config=d(Xs),this._document=d(ae),this._injector=d(re),this._ngZone=d(le),this._nativeElement=d(W).nativeElement,this._destroyCloseHandlers$=new L,this._bodyContainer=null,this._positioning=Vi(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new O}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){at({write:()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()}},{injector:this._injector})}ngOnChanges(i){if(i.container&&this._open&&this._applyContainer(this.container),i.placement&&!i.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),i.dropdownClass){let{currentValue:n,previousValue:o}=i.dropdownClass;this._applyCustomDropdownClass(n,o)}i.autoClose&&this._open&&(this.autoClose=i.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:i=>this.popperOptions($i([0,2])(i))}),this._applyPlacementClasses(),this._afterRenderRef=Ft({write:()=>{this._positionMenu()}},{injector:this._injector})})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Ui(this._ngZone,this._document,this.autoClose,i=>{this.close(),i===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(i){let{key:n}=i,o=this._getMenuElements(),r=-1,a=null,l=this._isEventFromToggle(i);if(!l&&o.length&&o.forEach((u,c)=>{u.contains(i.target)&&(a=u),u===$n(this._document)&&(r=c)}),n===" "||n==="Enter"){a&&(this.autoClose===!0||this.autoClose==="inside")&&X(a,"click").pipe(nt(1)).subscribe(()=>this.close());return}if(n==="Tab"){if(i.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===i.target){this.container==="body"&&!i.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):i.shiftKey&&this.close();return}else if(this.container==="body"){let u=this._menu.nativeElement.querySelectorAll(Kn);i.shiftKey&&i.target===u[0]?(this._anchor.nativeElement.focus(),i.preventDefault()):!i.shiftKey&&i.target===u[u.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else X(i.target,"focusout").pipe(nt(1)).subscribe(({relatedTarget:u})=>{this._nativeElement.contains(u)||this.close()});return}if(l||a){if(this.open(),o.length){switch(n){case"ArrowDown":r=Math.min(r+1,o.length-1);break;case"ArrowUp":if(this._isDropup()&&r===-1){r=o.length-1;break}r=Math.max(r-1,0);break;case"Home":r=0;break;case"End":r=o.length-1;break}o[r].focus()}i.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(i){return this._anchor.nativeElement.contains(i.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:i})=>!i).map(({nativeElement:i})=>i):[]}_positionMenu(){let i=this._menu;this.isOpen()&&i&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(i){return Array.isArray(i)?i[0]:i.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(i=null){if(this._resetContainer(),i==="body"){let n=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||this._document.createElement("div");o.style.position="absolute",n.style.position="static",o.style.zIndex="1055",o.appendChild(n),this._document.body.appendChild(o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(i,n){let o=this.container==="body"?this._bodyContainer:this._nativeElement;o&&(n&&o.classList.remove(n),i&&o.classList.add(i))}_applyPlacementClasses(i){if(this._menu){i||(i=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let n=i.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(n))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,Ks,5),fe(r,Ai,5)),n&2){let a;q(a=Y())&&(o._menu=a.first),q(a=Y())&&(o._anchor=a.first)}},hostVars:2,hostBindings:function(n,o){n&2&&P("show",o.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[ze]});let t=e;return t})();var Zn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),Qs=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0,this.role="dialog"}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),be=class{constructor(e,s,i){this.nodes=e,this.viewRef=s,this.componentRef=i}},Xt=class{constructor(e){this._componentType=e,this._windowRef=null,this._contentRef=null,this._document=d(ae),this._applicationRef=d(ui),this._injector=d(re),this._viewContainerRef=d(ci),this._ngZone=d(le)}open(e,s,i=!1){this._windowRef||(this._contentRef=this._getContentRef(e,s),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));let{nativeElement:n}=this._windowRef.location,o=new L;at({mixedReadWrite:()=>{o.next(),o.complete()}},{injector:this._injector});let r=o.pipe(en(()=>Z(this._ngZone,n,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:r}}close(e=!1){return this._windowRef?Z(this._ngZone,this._windowRef.location.nativeElement,({classList:s})=>s.remove("show"),{animation:e,runningTransition:"stop"}).pipe(ot(()=>{this._windowRef?.destroy(),this._contentRef?.viewRef?.destroy(),this._windowRef=null,this._contentRef=null})):it(void 0)}_getContentRef(e,s){if(e)if(e instanceof rt){let i=e.createEmbeddedView(s);return this._applicationRef.attachView(i),new be([i.rootNodes],i)}else return new be([[this._document.createTextNode(`${e}`)]]);else return new be([])}},Js=(()=>{let e=class e{constructor(){this._document=d(ae)}hide(){let i=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),n=this._document.body,o=n.style,{overflow:r,paddingRight:a}=o;if(i>0){let l=parseFloat(window.getComputedStyle(n).paddingRight);o.paddingRight=`${l+i}px`}return o.overflow="hidden",()=>{i>0&&(o.paddingRight=a),o.overflow=r}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qs=["animation","backdropClass"],Ys=(()=>{let e=class e{constructor(){this._nativeElement=d(W).nativeElement,this._zone=d(le),this._injector=d(re),this._cdRef=d(_e)}ngOnInit(){at({mixedReadWrite:()=>Z(this._zone,this._nativeElement,(i,n)=>{n&&qt(i),i.classList.add("show")},{animation:this.animation,runningTransition:"continue"})},{injector:this._injector})}hide(){return Z(this._zone,this._nativeElement,({classList:i})=>i.remove("show"),{animation:this.animation,runningTransition:"stop"})}updateOptions(i){qs.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(n,o){n&2&&(Oe("modal-backdrop"+(o.backdropClass?" "+o.backdropClass:"")),P("show",!o.animation)("fade",o.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(n,o){},encapsulation:2});let t=e;return t})(),Kt=class{update(e){}close(e){}dismiss(e){}},Gi=class{update(e){this._windowCmptRef.instance.updateOptions(e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._backdropCmptRef.instance.updateOptions(e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(B(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(B(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,s,i,n){this._windowCmptRef=e,this._contentRef=s,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new L,this._dismissed=new L,this._hidden=new L,e.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,r)=>{this._resolve=o,this._reject=r}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let s=this._beforeDismiss();ys(s)?s.then(i=>{i!==!1&&this._dismiss(e)},()=>{}):s!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),s=this._backdropCmptRef?this._backdropCmptRef.instance.hide():it(void 0);e.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),s.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),It(e,s).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Hi=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(Hi||{}),Zs=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","role","scrollable","size","windowClass","modalDialogClass"],er=(()=>{let e=class e{constructor(){this._document=d(ae),this._elRef=d(W),this._zone=d(le),this._injector=d(re),this._cdRef=d(_e),this._closed$=new L,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.role="dialog",this.dismissEvent=new O,this.shown=new L,this.hidden=new L}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Jt(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(i){this.dismissEvent.emit(i)}ngOnInit(){this._elWithFocus=this._document.activeElement,at({mixedReadWrite:()=>this._show()},{injector:this._injector})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:i}=this._elRef,n={animation:this.animation,runningTransition:"stop"},o=Z(this._zone,i,()=>i.classList.remove("show"),n),r=Z(this._zone,this._dialogEl.nativeElement,()=>{},n),a=It(o,r);return a.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),a}updateOptions(i){Zs.forEach(n=>{Ce(i[n])&&(this[n]=i[n])}),this._cdRef.markForCheck()}_show(){let i={animation:this.animation,runningTransition:"continue"},n=Z(this._zone,this._elRef.nativeElement,(r,a)=>{a&&qt(r),r.classList.add("show")},i),o=Z(this._zone,this._dialogEl.nativeElement,()=>{},i);It(n,o).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:i}=this._elRef;this._zone.runOutsideAngular(()=>{X(i,"keydown").pipe(B(this._closed$),Fe(o=>o.key==="Escape")).subscribe(o=>{this.keyboard?requestAnimationFrame(()=>{o.defaultPrevented||this._zone.run(()=>this.dismiss(Hi.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let n=!1;X(this._dialogEl.nativeElement,"mousedown").pipe(B(this._closed$),ot(()=>n=!1),oi(()=>X(i,"mouseup").pipe(B(this._closed$),nt(1))),Fe(({target:o})=>i===o)).subscribe(()=>{n=!0}),X(i,"click").pipe(B(this._closed$)).subscribe(({target:o})=>{i===o&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!n&&this._zone.run(()=>this.dismiss(Hi.BACKDROP_CLICK))),n=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:i}=this._elRef;if(!i.contains(document.activeElement)){let n=i.querySelector("[ngbAutofocus]"),o=Qn(i)[0];(n||o||i).focus()}}_restoreFocus(){let i=this._document.body,n=this._elWithFocus,o;n&&n.focus&&i.contains(n)?o=n:o=i,this._zone.runOutsideAngular(()=>{setTimeout(()=>o.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Z(this._zone,this._elRef.nativeElement,({classList:i})=>(i.add("modal-static"),()=>i.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(n,o){if(n&1&&Gt(ss,7),n&2){let r;q(r=Y())&&(o._dialogEl=r.first)}},hostAttrs:["tabindex","-1"],hostVars:8,hostBindings:function(n,o){n&2&&(pe("aria-modal",!0)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy)("role",o.role),Oe("modal d-block"+(o.windowClass?" "+o.windowClass:"")),P("fade",o.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",role:"role",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:Qt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(n,o){n&1&&(lt(),Be(0,"div",1,0)(2,"div",2),ct(3),Pe()()),n&2&&Oe("modal-dialog"+(o.size?" modal-"+o.size:"")+(o.centered?" modal-dialog-centered":"")+o.fullscreenClass+(o.scrollable?" modal-dialog-scrollable":"")+(o.modalDialogClass?" "+o.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
3
3
  `],encapsulation:2});let t=e;return t})(),tr=(()=>{let e=class e{constructor(){this._applicationRef=d(ui),this._injector=d(re),this._environmentInjector=d(ri),this._document=d(ae),this._scrollBar=d(Js),this._activeWindowCmptHasChanged=new L,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new O;let i=d(le);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let n=this._windowCmpts[this._windowCmpts.length-1];ks(i,n.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(n.location.nativeElement)}})}_restoreScrollBar(){let i=this._scrollBarRestoreFn;i&&(this._scrollBarRestoreFn=null,i())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(i,n,o){let r=o.container instanceof HTMLElement?o.container:Ce(o.container)?this._document.querySelector(o.container):this._document.body;if(!r)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let a=new Kt;i=o.injector||i;let l=i.get(ri,null)||this._environmentInjector,u=this._getContentRef(i,l,n,a,o),c=o.backdrop!==!1?this._attachBackdrop(r):void 0,_=this._attachWindowComponent(r,u.nodes),p=new Gi(_,u,c,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(_),p.hidden.pipe(nt(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=h=>{p.close(h)},a.dismiss=h=>{p.dismiss(h)},a.update=h=>{p.update(h)},p.update(o),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),_.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(i){this._modalRefs.forEach(n=>n.dismiss(i))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(i){let n=Ht(Ys,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(n.hostView),i.appendChild(n.location.nativeElement),n}_attachWindowComponent(i,n){let o=Ht(er,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:n});return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_getContentRef(i,n,o,r,a){return o?o instanceof rt?this._createFromTemplateRef(o,r):Jt(o)?this._createFromString(o):this._createFromComponent(i,n,o,r,a):new be([])}_createFromTemplateRef(i,n){let o={$implicit:n,close(a){n.close(a)},dismiss(a){n.dismiss(a)}},r=i.createEmbeddedView(o);return this._applicationRef.attachView(r),new be([r.rootNodes],r)}_createFromString(i){let n=this._document.createTextNode(`${i}`);return new be([[n]])}_createFromComponent(i,n,o,r,a){let l=re.create({providers:[{provide:Kt,useValue:r}],parent:i}),u=Ht(o,{environmentInjector:n,elementInjector:l}),c=u.location.nativeElement;return a.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(u.hostView),new be([[c]],u.hostView,u)}_setAriaHidden(i){let n=i.parentElement;n&&i!==this._document.body&&(Array.from(n.children).forEach(o=>{o!==i&&o.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}),this._setAriaHidden(n))}_revertAriaHidden(){this._ariaHiddenValues.forEach((i,n)=>{i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(i){let n=()=>{let o=this._modalRefs.indexOf(i);o>-1&&(this._modalRefs.splice(o,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(i),this._activeInstances.emit(this._modalRefs),i.result.then(n,n)}_registerWindowCmpt(i){this._windowCmpts.push(i),this._activeWindowCmptHasChanged.next(),i.onDestroy(()=>{let n=this._windowCmpts.indexOf(i);n>-1&&(this._windowCmpts.splice(n,1),this._activeWindowCmptHasChanged.next())})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ir=(()=>{let e=class e{constructor(){this._injector=d(re),this._modalStack=d(tr),this._config=d(Qs)}open(i,n={}){let o=Mt(ii(Mt({},this._config),{animation:this._config.animation}),n);return this._modalStack.open(this._injector,i,o)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(i){this._modalStack.dismissAll(i)}hasOpenModals(){return this._modalStack.hasOpenModals()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),eo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({providers:[ir]});let t=e;return t})(),nr=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),to=t=>Ce(t)&&t!=="",or=0,sr=(()=>{let e=class e{constructor(){this.templateRef=d(rt)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["ng-template","ngbNavContent",""]]});let t=e;return t})();var io=(()=>{let e=class e{constructor(){this._nav=d(no),this._nativeElement=d(W).nativeElement,this.disabled=!1,this.shown=new O,this.hidden=new O}ngOnInit(){Ce(this.domId)||(this.domId=`ngb-nav-${or++}`)}get active(){return this._nav.activeId===this.id}get id(){return to(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ce(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}isNgContainer(){return this._nativeElement.nodeType===Node.COMMENT_NODE}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(n,o,r){if(n&1&&fe(r,sr,4),n&2){let a;q(a=Y())&&(o.contentTpl=a.first)}},hostAttrs:[1,"nav-item"],inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:[0,"ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]});let t=e;return t})(),no=(()=>{let e=class e{constructor(i){this.role=i,this._config=d(nr),this._cd=d(_e),this._document=d(ae),this._nativeElement=d(W).nativeElement,this.destroyRef=d(st),this._navigatingWithKeyboard=!1,this.activeIdChange=new O,this.animation=this._config.animation,this.destroyOnHide=this._config.destroyOnHide,this.orientation=this._config.orientation,this.roles=this._config.roles,this.keyboard=this._config.keyboard,this.shown=new O,this.hidden=new O,this.navItemChange$=new L,this.navChange=new O}click(i){i.disabled||this._updateActiveId(i.id)}onFocusout({relatedTarget:i}){this._nativeElement.contains(i)||(this._navigatingWithKeyboard=!1)}onKeyDown(i){if(this.roles!=="tablist"||!this.keyboard)return;let n=this.links.filter(a=>!a.navItem.disabled),{length:o}=n,r=-1;if(n.forEach((a,l)=>{a.nativeElement===this._document.activeElement&&(r=l)}),o){switch(i.key){case"ArrowUp":case"ArrowLeft":r=(r-1+o)%o;break;case"ArrowRight":case"ArrowDown":r=(r+1)%o;break;case"Home":r=0;break;case"End":r=o-1;break}this.keyboard==="changeWithArrows"&&this.select(n[r].navItem.id),n[r].nativeElement.focus(),this._navigatingWithKeyboard=!0,i.preventDefault()}}select(i){this._updateActiveId(i,!1)}ngAfterContentInit(){if(!Ce(this.activeId)){let i=this.items.first?this.items.first.id:null;to(i)&&(this._updateActiveId(i,!1),this._cd.detectChanges())}this.items.changes.pipe(dt(this.destroyRef)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:i}){i&&!i.firstChange&&this._notifyItemChanged(i.currentValue)}_updateActiveId(i,n=!0){if(this.activeId!==i){let o=!1;n&&this.navChange.emit({activeId:this.activeId,nextId:i,preventDefault:()=>{o=!0}}),o||(this.activeId=i,this.activeIdChange.emit(i),this._notifyItemChanged(i))}}_notifyItemChanged(i){this.navItemChange$.next(this._getItemById(i))}_getItemById(i){return this.items&&this.items.find(n=>n.id===i)||null}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNav",""]],contentQueries:function(n,o,r){if(n&1&&(fe(r,io,4),fe(r,oo,5)),n&2){let a;q(a=Y())&&(o.items=a),q(a=Y())&&(o.links=a)}},hostAttrs:[1,"nav"],hostVars:4,hostBindings:function(n,o){n&1&&ce("keydown.arrowLeft",function(a){return o.onKeyDown(a)})("keydown.arrowRight",function(a){return o.onKeyDown(a)})("keydown.arrowDown",function(a){return o.onKeyDown(a)})("keydown.arrowUp",function(a){return o.onKeyDown(a)})("keydown.Home",function(a){return o.onKeyDown(a)})("keydown.End",function(a){return o.onKeyDown(a)})("focusout",function(a){return o.onFocusout(a)}),n&2&&(pe("aria-orientation",o.orientation==="vertical"&&o.roles==="tablist"?"vertical":void 0)("role",o.role?o.role:o.roles?"tablist":void 0),P("flex-column",o.orientation==="vertical"))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[ze]});let t=e;return t})(),oo=(()=>{let e=class e{constructor(i){this.role=i,this.navItem=d(io),this.nav=d(no),this.nativeElement=d(W).nativeElement}get tabindex(){return this.nav.keyboard===!1?this.navItem.disabled?-1:void 0:this.nav._navigatingWithKeyboard||this.navItem.disabled||!this.navItem.active?-1:void 0}};e.\u0275fac=function(n){return new(n||e)(li("role"))},e.\u0275dir=T({type:e,selectors:[["","ngbNavLink",""]],hostAttrs:[1,"nav-link"],hostVars:12,hostBindings:function(n,o){n&2&&(ee("id",o.navItem.domId),pe("role",o.role?o.role:o.nav.roles?"tab":void 0)("tabindex",o.tabindex)("aria-controls",o.navItem.isPanelInDom()?o.navItem.panelDomId:null)("aria-selected",o.navItem.active)("aria-disabled",o.navItem.disabled),P("nav-item",o.navItem.isNgContainer())("active",o.navItem.active)("disabled",o.navItem.disabled))}});let t=e;return t})(),yu=(()=>{let e=class e extends oo{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=ai(e)))(o||e)}})(),e.\u0275dir=T({type:e,selectors:[["button","ngbNavLink",""]],hostAttrs:["type","button"],hostVars:1,hostBindings:function(n,o){n&1&&ce("click",function(){return o.nav.click(o.navItem)}),n&2&&ee("disabled",o.navItem.disabled)},features:[di]});let t=e;return t})();var rr=({classList:t})=>(t.remove("show"),()=>t.remove("active")),ar=(t,e)=>{e&&qt(t),t.classList.add("show")},Hn=(()=>{let e=class e{constructor(){this.nativeElement=d(W).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(n,o){n&2&&(ee("id",o.item.panelDomId),pe("role",o.role?o.role:o.nav.roles?"tabpanel":void 0)("aria-labelledby",o.item.domId),P("fade",o.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}});let t=e;return t})(),bu=(()=>{let e=class e{constructor(){this._cd=d(_e),this._ngZone=d(le),this._activePane=null}isPanelTransitioning(i){return this._activePane?.item===i}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(dt(this.nav.destroyRef),an(this._activePane?.item||null),on(),rn(1)).subscribe(i=>{let n={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Z(this._ngZone,this._activePane.nativeElement,rr,n).subscribe(()=>{let o=this._activePane?.item;this._activePane=this._getPaneForItem(i),this._cd.markForCheck(),this._activePane&&(this._activePane.nativeElement.classList.add("active"),Z(this._ngZone,this._activePane.nativeElement,ar,n).subscribe(()=>{i&&(i.shown.emit(),this.nav.shown.emit(i.id))})),o&&(o.hidden.emit(),this.nav.hidden.emit(o.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.nativeElement.classList.add("show","active")}_getPaneForItem(i){return this._panes&&this._panes.find(n=>n.item===i)||null}_getActivePane(){return this._panes&&this._panes.find(i=>i.item.active)||null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["","ngbNavOutlet",""]],viewQuery:function(n,o){if(n&1&&Gt(Hn,5),n&2){let r;q(r=Y())&&(o._panes=r)}},hostAttrs:[1,"tab-content"],inputs:{paneRole:"paneRole",nav:[0,"ngbNavOutlet","nav"]},attrs:rs,decls:2,vars:0,consts:[["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&Pt(0,cs,1,1,null,null,dn),n&2&&At(o.nav.items)},dependencies:[Hn,vi],encapsulation:2,changeDetection:0});let t=e;return t})();var so=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var ro=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),lr={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]};function cr(t){let e=(t||"").trim();if(e.length===0)return[];let s=e.split(/\s+/).map(n=>n.split(":")).map(n=>lr[n[0]]||n),i=s.filter(n=>n.includes("manual"));if(i.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(i.length===1&&s.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i.length?[]:s}function dr(t,e,s,i,n,o=0,r=0,a=Tt,l=Tt){let u=cr(e);if(u.length===0)return()=>{};let c=new Set,_=[],p;function h(f,m){t.addEventListener(f,m),_.push(()=>t.removeEventListener(f,m))}function v(f,m){clearTimeout(p),m>0?p=setTimeout(f,m):f()}for(let[f,m]of u)if(m?(h(f,()=>{c.add(f),v(()=>c.size>0&&i(),o)}),h(m,()=>{c.delete(f),v(()=>c.size===0&&n(),r)})):h(f,()=>s()?v(n,r):v(i,o)),f==="mouseenter"&&m==="mouseleave"&&r>0){let w=a.subscribe(()=>{c.delete(f),clearTimeout(p)}),E=l.subscribe(()=>{c.delete(f),v(()=>c.size===0&&n(),r)});_.push(()=>w.unsubscribe(),()=>E.unsubscribe())}return _.push(()=>clearTimeout(p)),()=>_.forEach(f=>f())}var ao=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var lo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var co=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var uo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var ho=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})();var po=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),ur=(()=>{let e=class e{constructor(){this._ngbConfig=d(Ze),this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),hr=0,pr=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(n,o){n&1&&ce("mouseenter",function(){return o.onMouseEnter()})("mouseleave",function(){return o.onMouseLeave()}),n&2&&(ee("id",o.id),Oe("tooltip"+(o.tooltipClass?" "+o.tooltipClass:"")),P("fade",o.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave"},ngContentSelectors:Qt,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(n,o){n&1&&(lt(),pi(0,"div",0),Be(1,"div",1),ct(2),Pe())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
4
4
  `],encapsulation:2,changeDetection:0});let t=e;return t})(),wu=(()=>{let e=class e{constructor(){this._config=d(ur),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new O,this.hidden=new O,this._nativeElement=d(W).nativeElement,this._ngZone=d(le),this._document=d(ae),this._changeDetector=d(_e),this._injector=d(re),this._ngbTooltipWindowId=`ngb-tooltip-${hr++}`,this._popupService=new Xt(pr),this._windowRef=null,this._positioning=Vi(),this._mouseEnterTooltip=new L,this._mouseLeaveTooltip=new L,this._opening=!0,this._transitioning=!1}set ngbTooltip(i){this._ngbTooltip=i,!i&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(i){if(!this._opening&&this._transitioning&&(this._transitioning=!1,kn(this._windowRef.location.nativeElement)),!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:n,transition$:o}=this._popupService.open(this._ngbTooltip,i??this.tooltipContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=n,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._windowRef.setInput("onMouseEnter",()=>this._mouseEnterTooltip.next()),this._windowRef.setInput("onMouseLeave",()=>this._mouseLeaveTooltip.next()),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:r=>this.popperOptions($i([0,6])(r))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=Ft({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),Ui(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),o.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(i=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,kn(this._windowRef.location.nativeElement)),this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._opening=!1,this._transitioning=!0,this._popupService.close(i).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=dr(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterTooltip,this._mouseLeaveTooltip)}ngOnChanges({tooltipClass:i}){i&&this.isOpen()&&this._windowRef.setInput("tooltipClass",i.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Jt(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=T({type:e,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[ze]});let t=e;return t})(),fo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=R({type:e}),e.\u0275inj=I({});let t=e;return t})(),fr=(()=>{let e=class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(i){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let n=vt(this.result),o=Array.isArray(this.term)?this.term:[this.term],r=c=>this.accentSensitive?c:Fn(c),a=o.map(c=>bs(r(vt(c)))).filter(c=>c),l=this.accentSensitive?n:Fn(n),u=a.length?l.split(new RegExp(`(${a.join("|")})`,"gmi")):[n];if(this.accentSensitive)this.parts=u;else{let c=0;this.parts=u.map(_=>n.substring(c,c+=_.length))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=me({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[ze],decls:2,vars:0,consts:[[3,"class"]],template:function(n,o){n&1&&Pt(0,hs,2,1,null,null,hi),n&2&&At(o.parts)},styles:[`.ngb-highlight{font-weight:700}
@@ -0,0 +1 @@
1
+ import{A as j,c as T,d as b,e as $,f as N,g as q,j as w,m as z,p as H,q as D,w as G,x as Q,z as A}from"./chunk-5NG7YGKN.js";import{d as W}from"./chunk-JBQX4JBH.js";import{b as X}from"./chunk-VDNJ2BAQ.js";import{b as K}from"./chunk-5LN3J3YW.js";import{m as J}from"./chunk-N6Q2RMQ7.js";import{b as U}from"./chunk-555LSHXI.js";import{$a as n,Ac as l,Bc as d,Hb as p,Ib as u,Lc as C,M as I,Nb as m,Nc as P,Ob as r,Pb as a,Qb as s,Xa as x,Xb as F,Yb as M,bd as B,dc as v,ec as L,ed as R,fb as k,h as y,jc as c,kc as h,la as f,lb as E,lc as V,sd as O,w as S,wc as g}from"./chunk-W6X46MTW.js";var Z=["password"],ee=["username"],te=["otp"],ie=e=>({background:e}),ne=e=>({anim:e}),Y=e=>({"is-invalid":e});function oe(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let i=M();n(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",g(8,Y,i.form.controls.username.dirty&&i.form.controls.username.errors)),n(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",g(10,Y,i.form.controls.password.dirty&&i.form.controls.password.errors))}}function ae(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(n(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_credentials")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function se(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_code")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var ye=(()=>{class e{cdr;$auth=f(X);$router=f(W);$settings=f(K);passwordInput=C("password");usernameInput=C("username");otpInput=C("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(i){this.cdr=i}ngOnInit(){this.form=new q({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(i=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==i.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.cdr.detectChanges()}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let i=`${J.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${i}') center/cover`}})}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let i=this.passwordInput()?.nativeElement.value;i&&i!==this.form.get("password").value&&this.form.controls.password.setValue(i);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[b.required,b.minLength(6),b.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}static \u0275fac=function(o){return new(o||e)(k(P))};static \u0275cmp=E({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Z,5),v(t.usernameInput,ee,5),v(t.otpInput,te,5)),o&2&&L(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),F("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),c(5),l(6,"translate"),a(),p(7,oe,12,12),p(8,ae,6,3,"div",8),p(9,re,9,6,"div",9),p(10,se,9,6,"div",9),r(11,"div",10)(12,"button",11),c(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",g(14,ie,t.backgroundStyle))("ngClass",g(16,ne,!t.backgroundStyle)),n(3),m("formGroup",t.form),n(2),h(d(6,10,"setup.welcome_to_homebridge")),n(2),u(t.twoFactorCodeRequired?-1:7),n(),u(t.twoFactorCodeRequired?8:-1),n(),u(t.invalidCredentials?9:-1),n(),u(t.invalid2faCode?10:-1),n(2),m("disabled",t.form.invalid),n(),V(" ",d(14,12,"form.label_continue")," "))},dependencies:[R,A,z,T,$,N,G,Q,j,H,D,B,U,O],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{ye as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-3WKKT3UG.js";import"./chunk-TJJCM4OW.js";import"./chunk-6XANA56B.js";import"./chunk-WTTWP6KF.js";import"./chunk-S6UXXPGF.js";import"./chunk-2NQ5FYSH.js";import"./chunk-5NG7YGKN.js";import"./chunk-JBQX4JBH.js";import"./chunk-5LN3J3YW.js";import"./chunk-N6Q2RMQ7.js";import"./chunk-EM4PY2IW.js";import"./chunk-555LSHXI.js";import"./chunk-W6X46MTW.js";export{a as ConfigEditorComponent};
@@ -0,0 +1 @@
1
+ import{a as f,b as u}from"./chunk-Z6SZ6XRK.js";import{a as d}from"./chunk-WWEKL7GG.js";import{c as p}from"./chunk-DFDF3KH6.js";import"./chunk-C62M6LGL.js";import"./chunk-QJQSHTGR.js";import"./chunk-S6UXXPGF.js";import{v as n}from"./chunk-2NQ5FYSH.js";import{z as s}from"./chunk-5NG7YGKN.js";import{g as i}from"./chunk-JBQX4JBH.js";import"./chunk-G5J5T7GW.js";import"./chunk-VDNJ2BAQ.js";import"./chunk-5LN3J3YW.js";import"./chunk-N6Q2RMQ7.js";import"./chunk-EM4PY2IW.js";import{c}from"./chunk-555LSHXI.js";import{ha as r,kd as m,mb as e}from"./chunk-W6X46MTW.js";var C=[{path:"",loadComponent:()=>import("./chunk-5NJ2HA6I.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
@@ -0,0 +1,20 @@
1
+ import{a as ee}from"./chunk-TJJCM4OW.js";import{a as Z,b as ne}from"./chunk-6XANA56B.js";import{a as W,b as Y}from"./chunk-WTTWP6KF.js";import{a as X}from"./chunk-S6UXXPGF.js";import{m as J,n as K,t as U}from"./chunk-2NQ5FYSH.js";import{c as N,e as F,l as q,z}from"./chunk-5NG7YGKN.js";import{b as G}from"./chunk-JBQX4JBH.js";import{b as Q}from"./chunk-5LN3J3YW.js";import{k as M,n as V}from"./chunk-N6Q2RMQ7.js";import{a as k,b as T}from"./chunk-555LSHXI.js";import{$a as n,Ac as s,Bc as d,Cc as O,Gb as C,Hb as m,Ib as p,Kb as I,Lb as j,Mb as H,Nb as v,Ob as r,Pb as a,Qb as w,Ub as b,Xb as _,Yb as l,eb as D,g as oe,h as S,id as L,jc as y,kc as x,la as h,lb as $,lc as E,qc as R,ra as g,rc as P,sa as u,sc as B,w as A}from"./chunk-W6X46MTW.js";var ie=oe(ne(),1);function ae(o,f){o&1&&(r(0,"div",5),w(1,"i",12),a())}function se(o,f){if(o&1){let e=b();r(0,"li",17),y(1),s(2,"date"),r(3,"button",18),s(4,"translate"),_("click",function(){let t=g(e).$implicit,c=l(3);return u(c.restore(t.id))}),w(5,"i",19),a()()}if(o&2){let e=f.$implicit;n(),E(" ",O(2,2,e.timestamp,"medium")," "),n(2),C("aria-label",d(4,5,"config.restore.copy_to_editor"))}}function le(o,f){if(o&1&&(r(0,"ul",15),j(1,se,6,7,"li",17,I),a()),o&2){let e=l(2);n(),H(e.backupList)}}function de(o,f){o&1&&(r(0,"p",16),y(1),s(2,"translate"),a()),o&2&&(n(),x(d(2,1,"config.restore.no_backups")))}function ce(o,f){if(o&1&&(r(0,"div",13),w(1,"i",14),a(),r(2,"p",13),y(3),s(4,"translate"),a(),m(5,le,3,0,"ul",15),m(6,de,3,3,"p",16)),o&2){let e=l();n(3),x(d(4,3,"config.restore.title_restore_homebridge_backup")),n(2),p(e.backupList&&e.backupList.length?5:-1),n(),p(!e.backupList||!e.backupList.length?6:-1)}}function me(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function pe(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function fe(o,f){if(o&1){let e=b();r(0,"button",21),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.deleteAllBackups())}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_remove")),n(2),E(" ",d(3,4,"form.button_remove")," "))}var te=(()=>{class o{$activeModal=h(J);$api=h(V);$toastr=h(M);$translate=h(k);loading=!0;backupList=[];constructor(){}ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:17,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),y(3),s(4,"translate"),a(),r(5,"button",3),s(6,"translate"),_("click",function(){return t.$activeModal.dismiss("Dismiss")}),a()(),r(7,"div",4),m(8,ae,2,0,"div",5),m(9,ce,7,5),a(),r(10,"div",6)(11,"div",7),m(12,me,4,6,"button",8),a(),r(13,"div",9),m(14,pe,4,6,"button",8),a(),r(15,"div",10),m(16,fe,4,6,"button",11),a()()()),i&2&&(n(3),x(d(4,7,"form.button_restore")),n(2),C("aria-label",d(6,9,"form.button_close")),n(3),p(t.loading?8:-1),n(),p(t.loading?-1:9),n(3),p(!t.loading&&t.backupList.length?12:-1),n(2),p(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),p(!t.loading&&t.backupList.length?16:-1))},dependencies:[L,T],encapsulation:2})}return o})();function ge(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onExportConfig())}),w(3,"i",14),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_download")),C("aria-label",d(2,4,"form.button_download")))}function ue(o,f){if(o&1){let e=b();r(0,"button",15),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onCancelRestore())}),w(3,"i",16),a()}if(o&2){let e=l();v("disabled",e.saveInProgress)("ngbTooltip",d(1,3,"form.button_cancel")),C("aria-label",d(2,5,"form.button_cancel"))}}function he(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onRestore())}),w(3,"i",17),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_restore")),C("aria-label",d(2,4,"form.button_restore")))}function _e(o,f){o&1&&w(0,"i",8)}function be(o,f){o&1&&w(0,"i",9)}function Ce(o,f){if(o&1){let e=b();r(0,"ngx-monaco-editor",18),_("onInit",function(t){g(e);let c=l();return u(c.onEditorInit(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function ye(o,f){if(o&1){let e=b();r(0,"ngx-monaco-diff-editor",19),_("onInit",function(t){g(e);let c=l();return u(c.onInitDiffEditor(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function we(o,f){if(o&1){let e=b();r(0,"textarea",20),B("ngModelChange",function(t){g(e);let c=l();return P(c.homebridgeConfig,t)||(c.homebridgeConfig=t),u(t)}),y(1," "),a()}if(o&2){let e=l();R("ngModel",e.homebridgeConfig)}}var Ke=(()=>{class o{$api=h(V);$md=h(X);$modal=h(K);$monacoEditor=h(ee);$route=h(G);$renderer=h(D);$settings=h(Q);$toastr=h(M);$translate=h(k);homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;editorDecorations=[];lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return S(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let i=ie.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),i}}saveConfig(e){return S(this,null,function*(){try{let i=yield A(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(i,null,4),this.$modal.open(Z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}onRestore(){this.$modal.open(te,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
2
+ `).map(i=>` ${i}`).join(`
3
+ `),setTimeout(()=>{let i=this.monacoEditor.getModel().findMatches(e);if(i.length){let t=i[0].range,c=new monaco.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:c,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
4
+ This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
5
+ You should change this pin if you need to re-pair your instance with HomeKit.
6
+ Example: 0E:89:49:64:91:86`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",description:`The port Homebridge listens on.
7
+ If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
8
+ This is used when pairing Homebridge to HomeKit.
9
+ Example: 630-27-655`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",description:"The bridge manufacturer to be displayed in HomeKit"},firmwareRevision:{type:"string",description:"The bridge firmware version to be displayed in HomeKit"},model:{type:"string",description:"The bridge model to be displayed in HomeKit"},bind:{description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
10
+
11
+ Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:"Network Interface name that Homebridge should bind to."}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",description:`The interface or IP address of the interface you want Homebridge to listen on. This is useful if your server has multiple interfaces.
12
+
13
+ Deprecated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",description:"Set to `false` to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},plugins:{type:"array",description:"An array of plugins that should be selectively enabled. Remove this array to enable all plugins.",items:{type:"string",description:`The full plugin npm package name.
14
+ Example: homebridge-dummy`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
15
+
16
+ Requires Homebridge v1.3 or later.`,items:{type:"string",description:`The full plugin npm package name.
17
+ Example: homebridge-dummy`},default:[]},ports:{type:"object",description:"The range of ports that should be used for certain accessories like cameras and TVs",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534},end:{type:"number",default:52150,minimum:1025,maximum:65534}},default:{start:52100,end:52150}},platforms:{type:"array",description:`Any plugin that exposes a platform should have its config entered in this array.
18
+ Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],properties:{platform:{type:"string",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",description:"The name of the platform."}}},{type:"object",properties:{platform:{type:"string",description:`Homebridge UI platform name must be set to "config".
19
+ Do Not Change!`,oneOf:[{enum:"config"}]},name:{type:"string",description:"The name used in the Homebridge log."}}}]}},accessories:{type:"array",description:`Any plugin that exposes an accessory should have its config entered in this array.
20
+ Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],properties:{accessory:{type:"string",description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",description:"The name of the accessory."}}}}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:18,vars:18,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"disabled","ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-times"],[1,"fas","fa-fw","fa-history"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),y(4),s(5,"translate"),a()(),r(6,"div",4),m(7,ge,4,6,"button",5),m(8,ue,4,7,"button",6),m(9,he,4,6,"button",5),r(10,"button",7),s(11,"translate"),s(12,"translate"),_("click",function(){return t.onSave()}),m(13,_e,1,0,"i",8),m(14,be,1,0,"i",9),a()()(),m(15,Ce,1,2,"ngx-monaco-editor",10),m(16,ye,1,3,"ngx-monaco-diff-editor",11),m(17,we,2,1,"textarea",12),a()),i&2&&(n(4),x(d(5,12,"menu.config_json_editor")),n(3),p(t.originalConfig?-1:7),n(),p(t.originalConfig?8:-1),n(),p(t.originalConfig?-1:9),n(),v("disabled",t.saveInProgress)("ngbTooltip",d(11,14,"form.button_save")),C("aria-label",d(12,16,"form.button_save")),n(3),p(t.saveInProgress?-1:13),n(),p(t.saveInProgress?14:-1),n(),p(!t.isMobile&&!t.originalConfig?15:-1),n(),p(!t.isMobile&&t.originalConfig?16:-1),n(),p(t.isMobile?17:-1))},dependencies:[U,W,Y,z,N,F,q,T],encapsulation:2})}return o})();export{Ke as a};
@@ -1 +1 @@
1
- import{$ as M,B as F,C as P,D as q,Da as w,L as J,O as L,Oc as Z,Y as R,a as I,ga as h,gb as N,ha as X,ja as v,ka as o,nb as z,pb as W,r as p,t as f,ub as S,x as V}from"./chunk-SKZUTSHE.js";var c=class{},Q=(()=>{class n extends c{getTranslation(e){return p({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),b=class{},Y=(()=>{class n{handle(e){return e.key}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();function j(n,r){if(n===r)return!0;if(n===null||r===null)return!1;if(n!==n&&r!==r)return!0;let e=typeof n,t=typeof r,s,i,a;if(e==t&&e=="object")if(Array.isArray(n)){if(!Array.isArray(r))return!1;if((s=n.length)==r.length){for(i=0;i<s;i++)if(!j(n[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;a=Object.create(null);for(i in n){if(!j(n[i],r[i]))return!1;a[i]=!0}for(i in r)if(!(i in a)&&typeof r[i]<"u")return!1;return!0}return!1}function u(n){return typeof n<"u"&&n!==null}function D(n){return E(n)&&!H(n)&&n!==null}function E(n){return typeof n=="object"}function H(n){return Array.isArray(n)}function $(n){return typeof n=="string"}function ne(n){return typeof n=="function"}function K(n,r){let e=Object.assign({},n);return E(n)?(E(n)&&E(r)&&Object.keys(r).forEach(t=>{D(r[t])?t in n?e[t]=K(n[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e):K({},r)}function x(n,r){let e=r.split(".");r="";do r+=e.shift(),u(n)&&u(n[r])&&(D(n[r])||H(n[r])||!e.length)?(n=n[r],r=""):e.length?r+=".":n=void 0;while(e.length);return n}function se(n,r,e){let t=r.split("."),s=n;for(let i=0;i<t.length;i++){let a=t[i];i===t.length-1?s[a]=e:((!s[a]||!D(s[a]))&&(s[a]={}),s=s[a])}}var d=class{},k=(()=>{class n extends d{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){if($(e))return this.interpolateString(e,t);if(ne(e))return this.interpolateFunction(e,t)}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let a=x(t,i);return u(a)?a:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),g=class{},ee=(()=>{class n extends g{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),m=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new S;onLangChange=new S;onDefaultLangChange=new S},O=new v("ISOLATE_TRANSLATE_SERVICE"),U=new v("USE_DEFAULT_LANG"),_=new v("DEFAULT_LANGUAGE"),B=new v("USE_EXTEND"),C=n=>f(n)?n:p(n),G=(()=>{class n{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,t,s,i,a,A=!0,l=!1,T=!1,y){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=A,this.extend=T,l&&(this.store=new m),y&&this.setDefaultLang(y)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(L(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return p(this.translations[e]);this.currentLang||(this.currentLang=e);let t=this.retrieveTranslations(e);return f(t)?(t.pipe(L(1)).subscribe(()=>{this.changeLang(e)}),t):(this.changeLang(e),p(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(R(1),L(1));return this.loadingTranslations=t.pipe(V(s=>this.compiler.compileTranslations(s,e)),R(1),L(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?I(I({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){let i=this.compiler.compileTranslations(t,e);(s||this.extend)&&this.translations[e]?this.translations[e]=K(this.translations[e],i):this.translations[e]=i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let t=e.filter(s=>!this.langs.includes(s));t.length>0&&(this.langs=[...this.langs,...t])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,t,s){let i;if(e&&(i=this.runInterpolation(x(e,t),s)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(x(this.translations[this.defaultLang],t),s)),i===void 0){let a={key:t,translateService:this};typeof s<"u"&&(a.interpolateParams=s),i=this.missingTranslationHandler.handle(a)}return i!==void 0?i:t}runInterpolation(e,t){if(H(e))return e.map(s=>this.runInterpolation(s,t));if(D(e)){let s={};for(let i in e){let a=this.runInterpolation(e[i],t);a!==void 0&&(s[i]=a)}return s}else return this.parser.interpolate(e,t)}getParsedResult(e,t,s){if(t instanceof Array){let i={},a=!1;for(let l of t)i[l]=this.getParsedResultForKey(e,l,s),a=a||f(i[l]);if(!a)return i;let A=t.map(l=>C(i[l]));return q(A).pipe(V(l=>{let T={};return l.forEach((y,te)=>{T[t[te]]=y}),T}))}return this.getParsedResultForKey(e,t,s)}get(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(J(s=>C(this.getParsedResult(s,e,t)))):C(this.getParsedResult(this.translations[this.currentLang],e,t))}getStreamOnTranslationChange(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return F(P(()=>this.get(e,t)),this.onTranslationChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}stream(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" required');return F(P(()=>this.get(e,t)),this.onLangChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}instant(e,t){if(!u(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(this.translations[this.currentLang],e,t);return f(s)?Array.isArray(e)?e.reduce((i,a)=>(i[a]=a,i),{}):e:s}set(e,t,s=this.currentLang){se(this.translations[s],e,$(t)?this.compiler.compile(t,s):this.compiler.compileTranslations(t,s)),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(t){return new(t||n)(o(m),o(c),o(g),o(d),o(b),o(U),o(O),o(B),o(_))};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ve=(()=>{class n{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(s){let a=this.translate.getParsedResult(s,e,t);f(a)?a.subscribe(i):i(a)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(j(e,this.lastKey)&&j(t,this.lastParams))return this.value;let s;if(u(t[0])&&t.length)if($(t[0])&&t[0].length){let i=t[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(i)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else D(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||n)(N(G,16),N(Z,16))};static \u0275pipe=W({name:"translate",type:n,pure:!1});static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();var Ce=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},m,{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=z({type:n});static \u0275inj=X({})}return n})();export{G as a,ve as b,Ce as c};
1
+ import{$ as M,B as F,C as P,D as q,Da as w,L as J,Nc as Z,O as L,Y as R,a as I,fb as N,ga as h,ha as X,ja as v,ka as o,mb as z,ob as W,r as p,t as f,tb as S,x as V}from"./chunk-W6X46MTW.js";var c=class{},Q=(()=>{class n extends c{getTranslation(e){return p({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),b=class{},Y=(()=>{class n{handle(e){return e.key}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();function j(n,r){if(n===r)return!0;if(n===null||r===null)return!1;if(n!==n&&r!==r)return!0;let e=typeof n,t=typeof r,s,i,a;if(e==t&&e=="object")if(Array.isArray(n)){if(!Array.isArray(r))return!1;if((s=n.length)==r.length){for(i=0;i<s;i++)if(!j(n[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;a=Object.create(null);for(i in n){if(!j(n[i],r[i]))return!1;a[i]=!0}for(i in r)if(!(i in a)&&typeof r[i]<"u")return!1;return!0}return!1}function u(n){return typeof n<"u"&&n!==null}function D(n){return E(n)&&!H(n)&&n!==null}function E(n){return typeof n=="object"}function H(n){return Array.isArray(n)}function $(n){return typeof n=="string"}function ne(n){return typeof n=="function"}function K(n,r){let e=Object.assign({},n);return E(n)?(E(n)&&E(r)&&Object.keys(r).forEach(t=>{D(r[t])?t in n?e[t]=K(n[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e):K({},r)}function x(n,r){let e=r.split(".");r="";do r+=e.shift(),u(n)&&u(n[r])&&(D(n[r])||H(n[r])||!e.length)?(n=n[r],r=""):e.length?r+=".":n=void 0;while(e.length);return n}function se(n,r,e){let t=r.split("."),s=n;for(let i=0;i<t.length;i++){let a=t[i];i===t.length-1?s[a]=e:((!s[a]||!D(s[a]))&&(s[a]={}),s=s[a])}}var d=class{},k=(()=>{class n extends d{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){if($(e))return this.interpolateString(e,t);if(ne(e))return this.interpolateFunction(e,t)}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let a=x(t,i);return u(a)?a:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),g=class{},ee=(()=>{class n extends g{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),m=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new S;onLangChange=new S;onDefaultLangChange=new S},O=new v("ISOLATE_TRANSLATE_SERVICE"),U=new v("USE_DEFAULT_LANG"),_=new v("DEFAULT_LANGUAGE"),B=new v("USE_EXTEND"),C=n=>f(n)?n:p(n),G=(()=>{class n{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,t,s,i,a,A=!0,l=!1,T=!1,y){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=A,this.extend=T,l&&(this.store=new m),y&&this.setDefaultLang(y)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(L(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return p(this.translations[e]);this.currentLang||(this.currentLang=e);let t=this.retrieveTranslations(e);return f(t)?(t.pipe(L(1)).subscribe(()=>{this.changeLang(e)}),t):(this.changeLang(e),p(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(R(1),L(1));return this.loadingTranslations=t.pipe(V(s=>this.compiler.compileTranslations(s,e)),R(1),L(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?I(I({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){let i=this.compiler.compileTranslations(t,e);(s||this.extend)&&this.translations[e]?this.translations[e]=K(this.translations[e],i):this.translations[e]=i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let t=e.filter(s=>!this.langs.includes(s));t.length>0&&(this.langs=[...this.langs,...t])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,t,s){let i;if(e&&(i=this.runInterpolation(x(e,t),s)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(x(this.translations[this.defaultLang],t),s)),i===void 0){let a={key:t,translateService:this};typeof s<"u"&&(a.interpolateParams=s),i=this.missingTranslationHandler.handle(a)}return i!==void 0?i:t}runInterpolation(e,t){if(H(e))return e.map(s=>this.runInterpolation(s,t));if(D(e)){let s={};for(let i in e){let a=this.runInterpolation(e[i],t);a!==void 0&&(s[i]=a)}return s}else return this.parser.interpolate(e,t)}getParsedResult(e,t,s){if(t instanceof Array){let i={},a=!1;for(let l of t)i[l]=this.getParsedResultForKey(e,l,s),a=a||f(i[l]);if(!a)return i;let A=t.map(l=>C(i[l]));return q(A).pipe(V(l=>{let T={};return l.forEach((y,te)=>{T[t[te]]=y}),T}))}return this.getParsedResultForKey(e,t,s)}get(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(J(s=>C(this.getParsedResult(s,e,t)))):C(this.getParsedResult(this.translations[this.currentLang],e,t))}getStreamOnTranslationChange(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return F(P(()=>this.get(e,t)),this.onTranslationChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}stream(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" required');return F(P(()=>this.get(e,t)),this.onLangChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}instant(e,t){if(!u(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(this.translations[this.currentLang],e,t);return f(s)?Array.isArray(e)?e.reduce((i,a)=>(i[a]=a,i),{}):e:s}set(e,t,s=this.currentLang){se(this.translations[s],e,$(t)?this.compiler.compile(t,s):this.compiler.compileTranslations(t,s)),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(t){return new(t||n)(o(m),o(c),o(g),o(d),o(b),o(U),o(O),o(B),o(_))};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ve=(()=>{class n{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(s){let a=this.translate.getParsedResult(s,e,t);f(a)?a.subscribe(i):i(a)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(j(e,this.lastKey)&&j(t,this.lastParams))return this.value;let s;if(u(t[0])&&t.length)if($(t[0])&&t[0].length){let i=t[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(i)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else D(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||n)(N(G,16),N(Z,16))};static \u0275pipe=W({name:"translate",type:n,pure:!1});static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();var Ce=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},m,{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=z({type:n});static \u0275inj=X({})}return n})();export{G as a,ve as b,Ce as c};
@@ -1 +1 @@
1
- import{k as et,n as it}from"./chunk-HZUGXGIE.js";import{a as tt}from"./chunk-LXXELGX4.js";import{l as X}from"./chunk-SRP6QX5M.js";import{T as G,e as ut,g as ct,ga as R,h as P,la as Y,n as Q,w as N}from"./chunk-SKZUTSHE.js";var nt=ut((J,Z)=>{(function(y,D){typeof J=="object"&&typeof Z<"u"?Z.exports=D():typeof define=="function"&&define.amd?define(D):(y=typeof globalThis<"u"?globalThis:y||self).dayjs=D()})(J,function(){"use strict";var y=1e3,D=6e4,s=36e5,h="millisecond",d="second",p="minute",M="hour",S="day",I="week",w="month",z="quarter",b="year",_="date",K="Invalid Date",st=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,w),a=t-e<0,o=i.clone().add(n+(a?-1:1),w);return+(-(n+(t-e)/(a?e-o:o-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:w,y:b,w:I,d:S,D:_,h:M,m:p,s:d,ms:h,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",T={};T[x]=at;var B="$isDayjsObject",U=function(r){return r instanceof W||!(!r||!r[B])},V=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var a=i.toLowerCase();T[a]&&(e=a),t&&(T[a]=t,e=a);var o=i.split("-");if(!e&&o.length>1)return r(o[0])}else{var c=i.name;T[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},l=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new W(t)},u=ot;u.l=V,u.i=U,u.w=function(r,i){return l(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var W=function(){function r(t){this.$L=V(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[B]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,a=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(st);if(o){var c=o[2]-1||0,f=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==K},i.isSame=function(t,n){var e=l(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return l(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<l(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,a=!!u.u(n)||n,o=u.p(t),c=function(O,$){var L=u.w(e.$u?Date.UTC(e.$y,$,O):new Date(e.$y,$,O),e);return a?L:L.endOf(S)},f=function(O,$){return u.w(e.toDate()[O].apply(e.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice($)),e)},m=this.$W,g=this.$M,v=this.$D,j="set"+(this.$u?"UTC":"");switch(o){case b:return a?c(1,0):c(31,11);case w:return a?c(1,g):c(0,g+1);case I:var k=this.$locale().weekStart||0,A=(m<k?m+7:m)-k;return c(a?v-A:v+(6-A),g);case S:case _:return f(j+"Hours",0);case M:return f(j+"Minutes",1);case p:return f(j+"Seconds",2);case d:return f(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,a=u.p(t),o="set"+(this.$u?"UTC":""),c=(e={},e[S]=o+"Date",e[_]=o+"Date",e[w]=o+"Month",e[b]=o+"FullYear",e[M]=o+"Hours",e[p]=o+"Minutes",e[d]=o+"Seconds",e[h]=o+"Milliseconds",e)[a],f=a===S?this.$D+(n-this.$W):n;if(a===w||a===b){var m=this.clone().set(_,1);m.$d[c](f),m.init(),this.$d=m.set(_,Math.min(this.$D,m.daysInMonth())).$d}else c&&this.$d[c](f);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,a=this;t=Number(t);var o=u.p(n),c=function(g){var v=l(a);return u.w(v.date(v.date()+Math.round(g*t)),a)};if(o===w)return this.set(w,this.$M+t);if(o===b)return this.set(b,this.$y+t);if(o===S)return c(1);if(o===I)return c(7);var f=(e={},e[p]=D,e[M]=s,e[d]=y,e)[o]||1,m=this.$d.getTime()+t*f;return u.w(m,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||K;var a=t||"YYYY-MM-DDTHH:mm:ssZ",o=u.z(this),c=this.$H,f=this.$m,m=this.$M,g=e.weekdays,v=e.months,j=e.meridiem,k=function($,L,H,C){return $&&($[L]||$(n,a))||H[L].slice(0,C)},A=function($){return u.s(c%12||12,$,"0")},O=j||function($,L,H){var C=$<12?"AM":"PM";return H?C.toLowerCase():C};return a.replace(rt,function($,L){return L||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return m+1;case"MM":return u.s(m+1,2,"0");case"MMM":return k(e.monthsShort,m,v,3);case"MMMM":return k(v,m);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return k(e.weekdaysMin,n.$W,g,2);case"ddd":return k(e.weekdaysShort,n.$W,g,3);case"dddd":return g[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return O(c,f,!0);case"A":return O(c,f,!1);case"m":return String(f);case"mm":return u.s(f,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return o}return null}($)||o.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var a,o=this,c=u.p(n),f=l(t),m=(f.utcOffset()-this.utcOffset())*D,g=this-f,v=function(){return u.m(o,f)};switch(c){case b:a=v()/12;break;case w:a=v();break;case z:a=v()/3;break;case I:a=(g-m)/6048e5;break;case S:a=(g-m)/864e5;break;case M:a=g/s;break;case p:a=g/D;break;case d:a=g/y;break;default:a=g}return e?a:u.a(a)},i.daysInMonth=function(){return this.endOf(w).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),a=V(t,n,!0);return a&&(e.$L=a),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),E=W.prototype;return l.prototype=E,[["$ms",h],["$s",d],["$m",p],["$H",M],["$W",S],["$M",w],["$y",b],["$D",_]].forEach(function(r){E[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),l.extend=function(r,i){return r.$i||(r(i,W,l),r.$i=!0),l},l.locale=V,l.isDayjs=U,l.unix=function(r){return l(1e3*r)},l.en=T[x],l.Ls=T,l.p={},l})});var q=ct(nt(),1);var vt=(()=>{class y{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];env={};formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;wallpaper;serverTimeOffset=0;rtl=!1;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let s=yield N(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.env=s.env,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:s})).catch(d=>console.error(d)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=s,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode"))}setMenuMode(s){this.menuMode=s}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),p=this.env;for(let M=0;M<d.length-1;M++){if(this.forbiddenKeys.includes(d[M]))return;p[d[M]]||(p[d[M]]={}),p=p[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(p[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,q.default)(s).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(s){this.uiVersion||(this.uiVersion=s)}setTitle(s){this.$title.setTitle(s||"Homebridge")}static \u0275fac=function(h){return new(h||y)};static \u0275prov=R({token:y,factory:y.\u0275fac,providedIn:"root"})}return y})();export{nt as a,vt as b};
1
+ import{k as et,n as it}from"./chunk-N6Q2RMQ7.js";import{l as X}from"./chunk-EM4PY2IW.js";import{a as tt}from"./chunk-555LSHXI.js";import{T as G,e as ut,g as ct,ga as R,h as P,la as Y,n as Q,w as N}from"./chunk-W6X46MTW.js";var nt=ut((J,Z)=>{(function(y,D){typeof J=="object"&&typeof Z<"u"?Z.exports=D():typeof define=="function"&&define.amd?define(D):(y=typeof globalThis<"u"?globalThis:y||self).dayjs=D()})(J,function(){"use strict";var y=1e3,D=6e4,s=36e5,h="millisecond",d="second",p="minute",M="hour",S="day",I="week",w="month",z="quarter",b="year",_="date",K="Invalid Date",st=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,w),a=t-e<0,o=i.clone().add(n+(a?-1:1),w);return+(-(n+(t-e)/(a?e-o:o-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:w,y:b,w:I,d:S,D:_,h:M,m:p,s:d,ms:h,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",T={};T[x]=at;var B="$isDayjsObject",U=function(r){return r instanceof W||!(!r||!r[B])},V=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var a=i.toLowerCase();T[a]&&(e=a),t&&(T[a]=t,e=a);var o=i.split("-");if(!e&&o.length>1)return r(o[0])}else{var c=i.name;T[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},l=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new W(t)},u=ot;u.l=V,u.i=U,u.w=function(r,i){return l(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var W=function(){function r(t){this.$L=V(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[B]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,a=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(st);if(o){var c=o[2]-1||0,f=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,f)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==K},i.isSame=function(t,n){var e=l(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return l(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<l(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,a=!!u.u(n)||n,o=u.p(t),c=function(O,$){var L=u.w(e.$u?Date.UTC(e.$y,$,O):new Date(e.$y,$,O),e);return a?L:L.endOf(S)},f=function(O,$){return u.w(e.toDate()[O].apply(e.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice($)),e)},m=this.$W,g=this.$M,v=this.$D,j="set"+(this.$u?"UTC":"");switch(o){case b:return a?c(1,0):c(31,11);case w:return a?c(1,g):c(0,g+1);case I:var k=this.$locale().weekStart||0,A=(m<k?m+7:m)-k;return c(a?v-A:v+(6-A),g);case S:case _:return f(j+"Hours",0);case M:return f(j+"Minutes",1);case p:return f(j+"Seconds",2);case d:return f(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,a=u.p(t),o="set"+(this.$u?"UTC":""),c=(e={},e[S]=o+"Date",e[_]=o+"Date",e[w]=o+"Month",e[b]=o+"FullYear",e[M]=o+"Hours",e[p]=o+"Minutes",e[d]=o+"Seconds",e[h]=o+"Milliseconds",e)[a],f=a===S?this.$D+(n-this.$W):n;if(a===w||a===b){var m=this.clone().set(_,1);m.$d[c](f),m.init(),this.$d=m.set(_,Math.min(this.$D,m.daysInMonth())).$d}else c&&this.$d[c](f);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,a=this;t=Number(t);var o=u.p(n),c=function(g){var v=l(a);return u.w(v.date(v.date()+Math.round(g*t)),a)};if(o===w)return this.set(w,this.$M+t);if(o===b)return this.set(b,this.$y+t);if(o===S)return c(1);if(o===I)return c(7);var f=(e={},e[p]=D,e[M]=s,e[d]=y,e)[o]||1,m=this.$d.getTime()+t*f;return u.w(m,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||K;var a=t||"YYYY-MM-DDTHH:mm:ssZ",o=u.z(this),c=this.$H,f=this.$m,m=this.$M,g=e.weekdays,v=e.months,j=e.meridiem,k=function($,L,H,C){return $&&($[L]||$(n,a))||H[L].slice(0,C)},A=function($){return u.s(c%12||12,$,"0")},O=j||function($,L,H){var C=$<12?"AM":"PM";return H?C.toLowerCase():C};return a.replace(rt,function($,L){return L||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return m+1;case"MM":return u.s(m+1,2,"0");case"MMM":return k(e.monthsShort,m,v,3);case"MMMM":return k(v,m);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return k(e.weekdaysMin,n.$W,g,2);case"ddd":return k(e.weekdaysShort,n.$W,g,3);case"dddd":return g[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return O(c,f,!0);case"A":return O(c,f,!1);case"m":return String(f);case"mm":return u.s(f,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return o}return null}($)||o.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var a,o=this,c=u.p(n),f=l(t),m=(f.utcOffset()-this.utcOffset())*D,g=this-f,v=function(){return u.m(o,f)};switch(c){case b:a=v()/12;break;case w:a=v();break;case z:a=v()/3;break;case I:a=(g-m)/6048e5;break;case S:a=(g-m)/864e5;break;case M:a=g/s;break;case p:a=g/D;break;case d:a=g/y;break;default:a=g}return e?a:u.a(a)},i.daysInMonth=function(){return this.endOf(w).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),a=V(t,n,!0);return a&&(e.$L=a),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),E=W.prototype;return l.prototype=E,[["$ms",h],["$s",d],["$m",p],["$H",M],["$W",S],["$M",w],["$y",b],["$D",_]].forEach(function(r){E[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),l.extend=function(r,i){return r.$i||(r(i,W,l),r.$i=!0),l},l.locale=V,l.isDayjs=U,l.unix=function(r){return l(1e3*r)},l.en=T[x],l.Ls=T,l.p={},l})});var q=ct(nt(),1);var vt=(()=>{class y{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;wallpaper;serverTimeOffset=0;defaultTheme="deep-purple";themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];rtl=!1;settingsLoadedSubject=new Q;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;forbiddenKeys=["__proto__","constructor","prototype"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let s=yield N(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.env=s.env,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:s})).catch(d=>console.error(d)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=s,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode"))}setMenuMode(s){this.menuMode=s}setTitle(s){this.$title.setTitle(s||"Homebridge")}setUiVersion(s){this.uiVersion||(this.uiVersion=s)}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),p=this.env;for(let M=0;M<d.length-1;M++){if(this.forbiddenKeys.includes(d[M]))return;p[d[M]]||(p[d[M]]={}),p=p[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(p[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,q.default)(s).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}static \u0275fac=function(h){return new(h||y)};static \u0275prov=R({token:y,factory:y.\u0275fac,providedIn:"root"})}return y})();export{nt as a,vt as b};