homebridge-config-ui-x 5.11.2-beta.9 → 5.11.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/modules/plugins/plugins.service.js +1 -1
  3. package/package.json +6 -6
  4. package/public/chunk-46MS4ES2.js +1 -0
  5. package/public/{chunk-LO72RI4S.js → chunk-4MCJPZP7.js} +1 -1
  6. package/public/{chunk-LZTSIWKP.js → chunk-5OJY44K7.js} +1 -1
  7. package/public/{chunk-HBUIXUR3.js → chunk-5T4R2TG7.js} +1 -1
  8. package/public/{chunk-LI37IF2Z.js → chunk-5ZKKHQVJ.js} +1 -1
  9. package/public/{chunk-OS475ZQO.js → chunk-6TQHJYRY.js} +1 -1
  10. package/public/{chunk-IDVQIBZN.js → chunk-7XZWXKAH.js} +1 -1
  11. package/public/{chunk-HYHFIPBC.js → chunk-ADR4S74F.js} +1 -1
  12. package/public/{chunk-SPC2DLZR.js → chunk-AKPNXV2T.js} +1 -1
  13. package/public/chunk-ARENCESQ.js +1 -0
  14. package/public/chunk-BHFVACUP.js +2 -0
  15. package/public/{chunk-A2MXGFJ6.js → chunk-BZ2QQEKA.js} +1 -1
  16. package/public/{chunk-JWGWPSC6.js → chunk-CLZZPSYM.js} +1 -1
  17. package/public/{chunk-DFG4HJK5.js → chunk-CMILM3GM.js} +1 -1
  18. package/public/chunk-EA7AESPK.js +1 -0
  19. package/public/{chunk-GVFAT25G.js → chunk-EEKKVIA4.js} +1 -1
  20. package/public/chunk-GTENKZFZ.js +1 -0
  21. package/public/{chunk-MDHWQ5V2.js → chunk-H2Z7V5LU.js} +2 -2
  22. package/public/{chunk-CKURAGOR.js → chunk-H4W6QAC2.js} +1 -1
  23. package/public/{chunk-TCJMUYCJ.js → chunk-IB2WEG65.js} +1 -1
  24. package/public/{chunk-OVQGZ4C6.js → chunk-IHRICEJT.js} +1 -1
  25. package/public/chunk-IRKGD364.js +1 -0
  26. package/public/{chunk-F635TFLI.js → chunk-KCTJMMYS.js} +1 -1
  27. package/public/{chunk-BQRKHSGH.js → chunk-KTJDR6WA.js} +1 -1
  28. package/public/{chunk-X6RWNTC7.js → chunk-L4GVG4WS.js} +1 -1
  29. package/public/{chunk-DPITSP7F.js → chunk-LKFXBTGS.js} +1 -1
  30. package/public/chunk-LL6AFVK2.js +1 -0
  31. package/public/chunk-LUCN3LNQ.js +4 -0
  32. package/public/{chunk-PRGOUVRO.js → chunk-MIE7YXOK.js} +1 -1
  33. package/public/chunk-MIFZP2ZO.js +1 -0
  34. package/public/{chunk-NAICVRJH.js → chunk-NMDAPSGJ.js} +1 -1
  35. package/public/{chunk-5R6AJZGA.js → chunk-OG2B4MZN.js} +1 -1
  36. package/public/{chunk-RT25QBCQ.js → chunk-OQMG62H7.js} +1 -1
  37. package/public/chunk-P6DSGS6M.js +1 -0
  38. package/public/chunk-PHJW3U7W.js +1 -0
  39. package/public/{chunk-TJXF3MRO.js → chunk-PY5Y7RE5.js} +1 -1
  40. package/public/chunk-QIJUUUXH.js +1 -0
  41. package/public/chunk-R7G2HUC4.js +35 -0
  42. package/public/{chunk-HN6QQBDC.js → chunk-RGBORGOJ.js} +1 -1
  43. package/public/{chunk-6CBJSM3U.js → chunk-RJZU6B73.js} +1 -1
  44. package/public/{chunk-2OWZ4XP5.js → chunk-TJCUOGC4.js} +1 -1
  45. package/public/{chunk-6QWPGE2L.js → chunk-TLHI6ZOI.js} +1 -1
  46. package/public/chunk-TS66MDDS.js +1 -0
  47. package/public/chunk-UBRNIXM3.js +1 -0
  48. package/public/chunk-VQUWQONZ.js +1 -0
  49. package/public/chunk-VX4RXOTH.js +4 -0
  50. package/public/chunk-VXOUYKAC.js +1 -0
  51. package/public/chunk-WPYUSARH.js +1 -0
  52. package/public/chunk-WTG5NVOU.js +1 -0
  53. package/public/chunk-X7VB3AHW.js +68 -0
  54. package/public/{chunk-PYPOWROR.js → chunk-XJL5IKA2.js} +1 -1
  55. package/public/chunk-YUYO5SVM.js +1 -0
  56. package/public/chunk-Z5SOQKPW.js +19 -0
  57. package/public/{chunk-Z5PUNNUZ.js → chunk-ZGIZ2UDW.js} +1 -1
  58. package/public/index.html +1 -1
  59. package/public/{main-EZDP2TWN.js → main-KBV6ZN6L.js} +1 -1
  60. package/public/chunk-3N7C33O4.js +0 -1
  61. package/public/chunk-4XUH7NXA.js +0 -1
  62. package/public/chunk-7JIIKSDG.js +0 -1
  63. package/public/chunk-AWTSOXJ2.js +0 -2
  64. package/public/chunk-BBBDRQZR.js +0 -1
  65. package/public/chunk-DSSLC7R5.js +0 -1
  66. package/public/chunk-HUTYOGRH.js +0 -4
  67. package/public/chunk-IDJSTIFL.js +0 -1
  68. package/public/chunk-K7PJFUH4.js +0 -1
  69. package/public/chunk-KV4RQA3A.js +0 -1
  70. package/public/chunk-LAVT57X4.js +0 -1
  71. package/public/chunk-LLNAB3NM.js +0 -35
  72. package/public/chunk-N3SESV2P.js +0 -1
  73. package/public/chunk-PD3Q2PZE.js +0 -1
  74. package/public/chunk-R2CO54AK.js +0 -19
  75. package/public/chunk-UFVCK77E.js +0 -68
  76. package/public/chunk-V2TVR4X3.js +0 -1
  77. package/public/chunk-VKR3GG6K.js +0 -1
  78. package/public/chunk-W4WAFNIS.js +0 -1
  79. package/public/chunk-WU7URLRW.js +0 -1
  80. package/public/chunk-YHBVXMFX.js +0 -1
  81. package/public/chunk-ZAWMHW3P.js +0 -1
  82. package/public/chunk-ZSFO6PRU.js +0 -4
@@ -1 +1 @@
1
- import{U as E,X as Tt,Yc as S,Zc as z,ad as vt,bd as Fe,ed as Y,fd as me,gd as ne}from"./chunk-HUTYOGRH.js";import{a as fe,d as Et}from"./chunk-B4AJQJMI.js";function bt(n){return new E(3e3,!1)}function bs(){return new E(3100,!1)}function ws(){return new E(3101,!1)}function As(n){return new E(3001,!1)}function Ps(n){return new E(3003,!1)}function Ns(n){return new E(3004,!1)}function At(n,e){return new E(3005,!1)}function Pt(){return new E(3006,!1)}function Nt(){return new E(3007,!1)}function Mt(n,e){return new E(3008,!1)}function Ct(n){return new E(3002,!1)}function kt(n,e,t,s,i){return new E(3010,!1)}function Dt(){return new E(3011,!1)}function Rt(){return new E(3012,!1)}function Ot(){return new E(3200,!1)}function Lt(){return new E(3202,!1)}function Ft(){return new E(3013,!1)}function It(n){return new E(3014,!1)}function zt(n){return new E(3015,!1)}function Kt(n){return new E(3016,!1)}function qt(n){return new E(3500,!1)}function Bt(n){return new E(3501,!1)}function Qt(n,e){return new E(3404,!1)}function Ms(n){return new E(3502,!1)}function Vt(n){return new E(3503,!1)}function $t(){return new E(3300,!1)}function Ut(n){return new E(3504,!1)}function Gt(n){return new E(3301,!1)}function jt(n,e){return new E(3302,!1)}function Wt(n){return new E(3303,!1)}function Ht(n,e){return new E(3400,!1)}function Yt(n){return new E(3401,!1)}function Xt(n){return new E(3402,!1)}function Jt(n,e){return new E(3505,!1)}var Cs=new Set(["-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-ms-grid-columns","-ms-grid-rows","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","accent-color","all","backdrop-filter","background","background-color","background-position","background-size","block-size","border","border-block-end","border-block-end-color","border-block-end-width","border-block-start","border-block-start-color","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width","border-color","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-slice","border-image-width","border-inline-end","border-inline-end-color","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-width","border-left","border-left-color","border-left-width","border-radius","border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width","border-width","bottom","box-shadow","caret-color","clip","clip-path","color","column-count","column-gap","column-rule","column-rule-color","column-rule-width","column-width","columns","filter","flex","flex-basis","flex-grow","flex-shrink","font","font-size","font-size-adjust","font-stretch","font-variation-settings","font-weight","gap","grid-column-gap","grid-gap","grid-row-gap","grid-template-columns","grid-template-rows","height","inline-size","input-security","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","outline","outline-color","outline-offset","outline-width","padding","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","perspective","perspective-origin","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-coordinate","scroll-snap-destination","scrollbar-color","shape-image-threshold","shape-margin","shape-outside","tab-size","text-decoration","text-decoration-color","text-decoration-thickness","text-emphasis","text-emphasis-color","text-indent","text-shadow","text-underline-offset","top","transform","transform-origin","translate","vertical-align","visibility","width","word-spacing","z-index","zoom"]);function $(n){switch(n.length){case 0:return new Y;case 1:return n[0];default:return new me(n)}}function qe(n,e,t=new Map,s=new Map){let i=[],r=[],a=-1,o=null;if(e.forEach(l=>{let u=l.get("offset"),h=u==a,c=h&&o||new Map;l.forEach((_,y)=>{let f=y,g=_;if(y!=="offset")switch(f=n.normalizePropertyName(f,i),g){case ne:g=t.get(y);break;case z:g=s.get(y);break;default:g=n.normalizeStyleValue(y,f,g,i);break}c.set(f,g)}),h||r.push(c),o=c,a=u}),i.length)throw Ms(i);return r}function pe(n,e,t,s){switch(e){case"start":n.onStart(()=>s(t&&Ie(t,"start",n)));break;case"done":n.onDone(()=>s(t&&Ie(t,"done",n)));break;case"destroy":n.onDestroy(()=>s(t&&Ie(t,"destroy",n)));break}}function Ie(n,e,t){let s=t.totalTime,i=!!t.disabled,r=ge(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),a=n._data;return a!=null&&(r._data=a),r}function ge(n,e,t,s,i="",r=0,a){return{element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!a}}function R(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Be(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return[t,s]}var ks=typeof document>"u"?null:document.documentElement;function ye(n){let e=n.parentNode||n.host||null;return e===ks?null:e}function Ds(n){return n.substring(1,6)=="ebkit"}var X=null,wt=!1;function Zt(n){X||(X=Os()||{},wt=X.style?"WebkitAppearance"in X.style:!1);let e=!0;return X.style&&!Ds(n)&&(e=n in X.style,!e&&wt&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in X.style)),e}function Rs(n){return Cs.has(n)}function Os(){return typeof document<"u"?document.body:null}function Qe(n,e){for(;e;){if(e===n)return!0;e=ye(e)}return!1}function Ve(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var Ls=1e3,$e="{{",Fs="}}",_e="ng-enter",re="ng-leave",ae="ng-trigger",oe=".ng-trigger",Ue="ng-animating",Se=".ng-animating";function V(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ze(parseFloat(e[1]),e[2])}function ze(n,e){switch(e){case"s":return n*Ls;default:return n}}function le(n,e,t){return n.hasOwnProperty("duration")?n:zs(n,e,t)}var Is=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function zs(n,e,t){let s,i=0,r="";if(typeof n=="string"){let a=n.match(Is);if(a===null)return e.push(bt(n)),{duration:0,delay:0,easing:""};s=ze(parseFloat(a[1]),a[2]);let o=a[3];o!=null&&(i=ze(parseFloat(o),a[4]));let l=a[5];l&&(r=l)}else s=n;if(!t){let a=!1,o=e.length;s<0&&(e.push(bs()),a=!0),i<0&&(e.push(ws()),a=!0),a&&e.splice(o,0,bt(n))}return{duration:s,delay:i,easing:r}}function xt(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function Ge(n){return Array.isArray(n)?new Map(...n):new Map(n)}function K(n,e,t){e.forEach((s,i)=>{let r=Ee(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s})}function G(n,e){e.forEach((t,s)=>{let i=Ee(s);n.style[i]=""})}function ee(n){return Array.isArray(n)?n.length==1?n[0]:vt(n):n}function es(n,e,t){let s=e.params||{},i=je(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(As(r))})}var Ke=new RegExp(`${$e}\\s*(.+?)\\s*${Fs}`,"g");function je(n){let e=[];if(typeof n=="string"){let t;for(;t=Ke.exec(n);)e.push(t[1]);Ke.lastIndex=0}return e}function te(n,e,t){let s=`${n}`,i=s.replace(Ke,(r,a)=>{let o=e[a];return o==null&&(t.push(Ps(a)),o=""),o.toString()});return i==s?n:i}var Ks=/-+([a-z0-9])/g;function Ee(n){return n.replace(Ks,(...e)=>e[1].toUpperCase())}function qs(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ts(n,e){return n===0||e===0}function ss(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,a)=>{s.has(a)||i.push(a),s.set(a,r)}),i.length)for(let r=1;r<e.length;r++){let a=e[r];i.forEach(o=>a.set(o,Te(n,o)))}}return e}function O(n,e,t){switch(e.type){case S.Trigger:return n.visitTrigger(e,t);case S.State:return n.visitState(e,t);case S.Transition:return n.visitTransition(e,t);case S.Sequence:return n.visitSequence(e,t);case S.Group:return n.visitGroup(e,t);case S.Animate:return n.visitAnimate(e,t);case S.Keyframes:return n.visitKeyframes(e,t);case S.Style:return n.visitStyle(e,t);case S.Reference:return n.visitReference(e,t);case S.AnimateChild:return n.visitAnimateChild(e,t);case S.AnimateRef:return n.visitAnimateRef(e,t);case S.Query:return n.visitQuery(e,t);case S.Stagger:return n.visitStagger(e,t);default:throw Ns(e.type)}}function Te(n,e){return window.getComputedStyle(n)[e]}var gs=(()=>{class n{validateStyleProperty(t){return Zt(t)}containsElement(t,s){return Qe(t,s)}getParentElement(t){return ye(t)}query(t,s,i){return Ve(t,s,i)}computeStyle(t,s,i){return i||""}animate(t,s,i,r,a,o=[],l){return new Y(i,r)}static \u0275fac=function(s){return new(s||n)};static \u0275prov=Tt({token:n,factory:n.\u0275fac})}return n})(),is=class{static NOOP=new gs},Ze=class{},xe=class{normalizePropertyName(e,t){return e}normalizeStyleValue(e,t,s,i){return s}},Bs=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),et=class extends Ze{normalizePropertyName(e,t){return Ee(e)}normalizeStyleValue(e,t,s,i){let r="",a=s.toString().trim();if(Bs.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else{let o=s.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&i.push(At(e,s))}return a+r}};var Pe="*";function Qs(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>Vs(s,t,e)):t.push(n),t}function Vs(n,e,t){if(n[0]==":"){let l=$s(n,t);if(typeof l=="function"){e.push(l);return}n=l}let s=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(zt(n)),e;let i=s[1],r=s[2],a=s[3];e.push(ns(i,a));let o=i==Pe&&a==Pe;r[0]=="<"&&!o&&e.push(ns(a,i))}function $s(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s)<parseFloat(t);default:return e.push(Kt(n)),"* => *"}}var ve=new Set(["true","1"]),be=new Set(["false","0"]);function ns(n,e){let t=ve.has(n)||be.has(n),s=ve.has(e)||be.has(e);return(i,r)=>{let a=n==Pe||n==i,o=e==Pe||e==r;return!a&&t&&typeof i=="boolean"&&(a=i?ve.has(n):be.has(n)),!o&&s&&typeof r=="boolean"&&(o=r?ve.has(e):be.has(e)),a&&o}}var ys=":self",Us=new RegExp(`s*${ys}s*,?`,"g");function ft(n,e,t,s){return new tt(n).build(e,t,s)}var rs="",tt=class{_driver;constructor(e){this._driver=e}build(e,t,s){let i=new st(t);return this._resetContextStyleTimingState(i),O(this,ee(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=rs,e.collectedStyles=new Map,e.collectedStyles.set(rs,new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],a=[];return e.name.charAt(0)=="@"&&t.errors.push(Pt()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==S.State){let l=o,u=l.name;u.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=u}else if(o.type==S.Transition){let l=this.visitTransition(o,t);s+=l.queryCount,i+=l.depCount,a.push(l)}else t.errors.push(Nt())}),{type:S.Trigger,name:e.name,states:r,transitions:a,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,a=i||{};s.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{je(l).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&t.errors.push(Mt(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=O(this,ee(e.animation),t),i=Qs(e.expr,t.errors);return{type:S.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:J(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(s=>O(this,s,t)),options:J(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(a=>{t.currentTime=s;let o=O(this,a,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:S.Group,steps:r,options:J(e.options)}}visitAnimate(e,t){let s=Hs(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:Fe({});if(r.type==S.Keyframes)i=this.visitKeyframes(r,t);else{let a=e.styles,o=!1;if(!a){o=!0;let u={};s.easing&&(u.easing=s.easing),a=Fe(u)}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(a,t);l.isEmptyStep=o,i=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of i)typeof o=="string"?o===z?s.push(o):t.errors.push(Ct(o)):s.push(new Map(Object.entries(o)));let r=!1,a=null;return s.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!r)){for(let l of o.values())if(l.toString().indexOf($e)>=0){r=!0;break}}}),{type:S.Style,styles:s,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((o,l)=>{let u=t.collectedStyles.get(t.currentQuerySelector),h=u.get(l),c=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(kt(l,h.startTime,h.endTime,r,i)),c=!1),r=h.startTime),c&&u.set(l,{startTime:r,endTime:i}),t.options&&es(o,t.options,t.errors)})})}visitKeyframes(e,t){let s={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Dt()),s;let i=1,r=0,a=[],o=!1,l=!1,u=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),C=A.offset!=null?A.offset:Ws(A.styles),N=0;return C!=null&&(r++,N=A.offset=C),l=l||N<0||N>1,o=o||N<u,u=N,a.push(N),A});l&&t.errors.push(Rt()),o&&t.errors.push(Ot());let c=e.steps.length,_=0;r>0&&r<c?t.errors.push(Lt()):r==0&&(_=i/(c-1));let y=c-1,f=t.currentTime,g=t.currentAnimateTimings,v=g.duration;return h.forEach((w,A)=>{let C=_>0?A==y?1:_*A:a[A],N=C*v;t.currentTime=f+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,s.styles.push(w)}),s}visitReference(e,t){return{type:S.Reference,animation:O(this,ee(e.animation),t),options:J(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:J(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:J(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,a]=Gs(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,R(t.collectedStyles,t.currentQuerySelector,new Map);let o=O(this,ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:S.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:J(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ft());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:le(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,ee(e.animation),t),timings:s,options:null}}};function Gs(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ys);return e&&(n=n.replace(Us,"")),n=n.replace(/@\*/g,oe).replace(/@\w+/g,t=>oe+"-"+t.slice(1)).replace(/:animating/g,Se),[n,e]}function js(n){return n?fe({},n):null}var st=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Ws(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Hs(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=le(n,e).duration;return We(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=We(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=le(t,e);return We(i.duration,i.delay,i.easing)}function J(n){return n?(n=fe({},n),n.params&&(n.params=js(n.params))):n={},n}function We(n,e,t){return{duration:n,delay:e,easing:t}}function mt(n,e,t,s,i,r,a=null,o=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:a,subTimeline:o}}var ie=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ys=1,Xs=":enter",Js=new RegExp(Xs,"g"),Zs=":leave",xs=new RegExp(Zs,"g");function pt(n,e,t,s,i,r=new Map,a=new Map,o,l,u=[]){return new it().buildKeyframes(n,e,t,s,i,r,a,o,l,u)}var it=class{buildKeyframes(e,t,s,i,r,a,o,l,u,h=[]){u=u||new ie;let c=new nt(e,t,u,i,r,h,[]);c.options=l;let _=l.delay?V(l.delay):0;c.currentTimeline.delayNextStep(_),c.currentTimeline.setStyles([a],null,c.errors,l),O(this,s,c);let y=c.timelines.filter(f=>f.containsAnimation());if(y.length&&o.size){let f;for(let g=y.length-1;g>=0;g--){let v=y[g];if(v.element===t){f=v;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([o],null,c.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[mt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(s,i,i.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let a=typeof r=="number"?r:V(te(r,i?.params??{},t.errors));s.delayNextStep(a)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,a=s.duration!=null?V(s.duration):null,o=s.delay!=null?V(s.delay):null;return a!==0&&e.forEach(l=>{let u=t.appendInstructionToTimeline(l,a,o);r=Math.max(r,u.duration+u.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==S.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ne);let a=V(r.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>O(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(a=>{let o=t.createSubContext(e.options);r&&o.delayNextStep(r),O(this,a,o),i=Math.max(i,o.currentTimeline.currentTime),s.push(o.currentTimeline)}),s.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?te(s,t.params,t.errors):s;return le(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,o=t.createSubContext().currentTimeline;o.easing=s.easing,e.styles.forEach(l=>{let u=l.offset||0;o.forwardTime(u*r),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?V(i.delay):0;r&&(t.previousNode.type===S.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ne);let a=s,o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((u,h)=>{t.currentQueryIndex=h;let c=t.createSubContext(e.options,u);r&&c.delayNextStep(r),u===t.element&&(l=c.currentTimeline),O(this,e.animation,c),c.currentTimeline.applyStylesToKeyframe();let _=c.currentTimeline.currentTime;a=Math.max(a,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),l=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=o-l;break;case"full":l=s.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let c=h.currentTime;O(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-c+(i.startTime-s.currentTimeline.startTime)}},Ne={},nt=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ne;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,s,i,r,a,o,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=a,this.timelines=o,this.currentTimeline=l||new Me(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=V(s.duration)),s.delay!=null&&(i.delay=V(s.delay));let r=s.params;if(r){let a=i.params;a||(a=this.options.params={}),Object.keys(r).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=te(r[o],a,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i]})}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ne,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new rt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,i,r,a){let o=[];if(i&&o.push(this.element),e.length>0){e=e.replace(Js,"."+this._enterClassName),e=e.replace(xs,"."+this._leaveClassName);let l=s!=1,u=this._driver.query(this.element,e,l);s!==0&&(u=s<0?u.slice(u.length+s,u.length):u.slice(0,s)),o.push(...u)}return!r&&o.length==0&&a.push(It(t)),o}},Me=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ys,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||z),this._currentKeyframe.set(t,z);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},a=ei(e,this._globalTimelineStyles);for(let[o,l]of a){let u=te(l,r,s);this._pendingStyles.set(o,u),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??z),this._updateStyle(o,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((o,l)=>{let u=new Map([...this._backFill,...o]);u.forEach((h,c)=>{h===ne?e.add(c):h===z&&t.add(c)}),s||u.set("offset",l/this.duration),i.push(u)});let r=[...e.values()],a=[...t.values()];if(s){let o=i[0],l=new Map(o);o.set("offset",0),l.set("offset",1),i=[o,l]}return mt(this.element,i,r,a,this.duration,this.startTime,this.easing,!1)}},rt=class extends Me{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,s,i,r,a,o=!1){super(e,t,a.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],a=s+t,o=t/a,l=new Map(e[0]);l.set("offset",0),r.push(l);let u=new Map(e[0]);u.set("offset",as(o)),r.push(u);let h=e.length-1;for(let c=1;c<=h;c++){let _=new Map(e[c]),y=_.get("offset"),f=t+y*s;_.set("offset",as(f/a)),r.push(_)}s=a,t=0,i="",e=r}return mt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,!0)}};function as(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function ei(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,z)}else for(let[r,a]of i)t.set(r,a)}),t}function os(n,e,t,s,i,r,a,o,l,u,h,c,_){return{type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:a,timelines:o,queriedElements:l,preStyleProps:u,postStyleProps:h,totalTime:c,errors:_}}var He={},Ce=class{_triggerName;ast;_stateStyles;constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,i){return ti(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,a,o,l,u,h){let c=[],_=this.ast.options&&this.ast.options.params||He,y=o&&o.params||He,f=this.buildStyles(s,y,c),g=l&&l.params||He,v=this.buildStyles(i,g,c),w=new Set,A=new Map,C=new Map,N=i==="void",Z={params:_s(g,_),delay:this.ast.options?.delay},B=h?[]:pt(e,t,this.ast.animation,r,a,f,v,Z,u,c),k=0;return B.forEach(D=>{k=Math.max(D.duration+D.delay,k)}),c.length?os(t,this._triggerName,s,i,N,f,v,[],[],A,C,k,c):(B.forEach(D=>{let j=D.element,x=R(A,j,new Set);D.preStyleProps.forEach(W=>x.add(W));let gt=R(C,j,new Set);D.postStyleProps.forEach(W=>gt.add(W)),j!==t&&w.add(j)}),os(t,this._triggerName,s,i,N,f,v,B,[...w.values()],A,C,k))}};function ti(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function _s(n,e){let t=fe({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i)}),t}var at=class{styles;defaultParams;normalizer;constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){let s=new Map,i=_s(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,o)=>{a&&(a=te(a,i,t));let l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),s.set(o,a)})}),s}};function si(n,e,t){return new ot(n,e,t)}var ot=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new at(i.style,r,s))}),ls(this.states,"true","1"),ls(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ce(e,i,this.states))}),this.fallbackTransition=ii(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(a=>a.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function ii(n,e,t){let s=[(a,o)=>!0],i={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new Ce(n,r,e)}function ls(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var ni=new ie,lt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s}register(e,t){let s=[],i=[],r=ft(this._driver,t,s,i);if(s.length)throw Vt(s);this._animations.set(e,r)}_buildPlayer(e,t,s){let i=e.element,r=qe(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){let i=[],r=this._animations.get(e),a,o=new Map;if(r?(a=pt(this._driver,t,r,_e,re,new Map,new Map,s,ni,i),a.forEach(h=>{let c=R(o,h.element,new Map);h.postStyleProps.forEach(_=>c.set(_,null))})):(i.push($t()),a=[]),i.length)throw Ut(i);o.forEach((h,c)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(c,y,z))})});let l=a.map(h=>{let c=o.get(h.element);return this._buildPlayer(h,new Map,c)}),u=$(l);return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Gt(e);return t}listen(e,t,s,i){let r=ge(t,"","","");return pe(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let a=i[0]||{};this.create(e,t,a);return}let r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},us="ng-animate-queued",ri=".ng-animate-queued",Ye="ng-animate-disabled",ai=".ng-animate-disabled",oi="ng-star-inserted",li=".ng-star-inserted",ui=[],Ss={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ci={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},q="__ng_removed",ce=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=di(i),s){let r=e,{value:a}=r,o=Et(r,["value"]);this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i])})}}},ue="void",Xe=new ce(ue),ut=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this._hostClassName="ng-tns-"+e,I(t,this._hostClassName)}listen(e,t,s,i){if(!this._triggers.has(t))throw jt(s,t);if(s==null||s.length==0)throw Wt(t);if(!fi(s))throw Ht(s,t);let r=R(this._elementListeners,e,[]),a={name:t,phase:s,callback:i};r.push(a);let o=R(this._engine.statesByElement,e,new Map);return o.has(t)||(I(e,ae),I(e,ae+"-"+t),o.set(t,Xe)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(t)||o.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Yt(e);return t}trigger(e,t,s,i=!0){let r=this._getTrigger(t),a=new he(this.id,t,e),o=this._engine.statesByElement.get(e);o||(I(e,ae),I(e,ae+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t),u=new ce(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),o.set(t,u),l||(l=Xe),!(u.value===ue)&&l.value===u.value){if(!gi(l.params,u.params)){let g=[],v=r.matchStyles(l.value,l.params,g),w=r.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{G(e,v),K(e,w)})}return}let _=R(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,u.value,e,u.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:u,player:a,isFallbackTransition:f}),f||(I(e,us),a.onStart(()=>{se(e,us)})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(a);w>=0&&v.splice(w,1)}}),this.players.push(a),_.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,oe,!0);s.forEach(i=>{if(i[q])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(a=>a.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),a=new Map;if(r){let o=[];if(r.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){let h=this.trigger(e,u,ue,i);h&&o.push(h)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,a),s&&$(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let a=r.name;if(i.has(a))return;i.add(a);let l=this._triggers.get(a).fallbackTransition,u=s.get(a)||Xe,h=new ce(ue),c=new he(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:u,toState:h,player:c,isFallbackTransition:!0})})}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let a=e;for(;a=a.parentNode;)if(s.statesByElement.get(a)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,!1,t);else{let r=e[q];(!r||r===Ss)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){I(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,a=this._elementListeners.get(r);a&&a.forEach(o=>{if(o.name==s.triggerName){let l=ge(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,pe(s.player,o.phase,l,o.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(s)}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,a=i.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ct=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){let s=new ut(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let a=!1,o=this.driver.getParentElement(t);for(;o;){let l=i.get(o);if(l){let u=s.indexOf(l);s.splice(u+1,0,e),a=!0;break}o=this.driver.getParentElement(o)}a||s.unshift(e)}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,s,i){if(we(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),!0}return!1}insertNode(e,t,s,i){if(!we(t))return;let r=t[q];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(t,s)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),I(e,Ye)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),se(e,Ye))}removeNode(e,t,s){if(we(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[q]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,i,r){return we(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,oe,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Se,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return $(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[q];if(t&&t.setForRemoval){if(e[q]=Ss,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Ye)&&this.markElementAsDisabled(e,!1),this.driver.query(e,ai,!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;s<this.collectedEnterElements.length;s++){let i=this.collectedEnterElements[s];I(i,oi)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let s=[];try{t=this._flushAnimations(s,e)}finally{for(let i=0;i<s.length;i++)s[i]()}}else for(let s=0;s<this.collectedLeaveElements.length;s++){let i=this.collectedLeaveElements[s];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(s=>s()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?$(t).onDone(()=>{s.forEach(i=>i())}):s.forEach(i=>i())}}reportError(e){throw Xt(e)}_flushAnimations(e,t){let s=new ie,i=[],r=new Map,a=[],o=new Map,l=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let m=this.driver.query(d,ri,!0);for(let p=0;p<m.length;p++)h.add(m[p])});let c=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=ds(_,this.collectedEnterElements),f=new Map,g=0;y.forEach((d,m)=>{let p=_e+g++;f.set(m,p),d.forEach(T=>I(T,p))});let v=[],w=new Set,A=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let m=this.collectedLeaveElements[d],p=m[q];p&&p.setForRemoval&&(v.push(m),w.add(m),p.hasAnimation?this.driver.query(m,li,!0).forEach(T=>w.add(T)):A.add(m))}let C=new Map,N=ds(_,Array.from(w));N.forEach((d,m)=>{let p=re+g++;C.set(m,p),d.forEach(T=>I(T,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(T=>se(T,p))}),N.forEach((d,m)=>{let p=C.get(m);d.forEach(T=>se(T,p))}),v.forEach(d=>{this.processLeaveNode(d)})});let Z=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let T=p.player,P=p.element;if(Z.push(T),this.collectedEnterElements.length){let M=P[q];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let H=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let de=F.get(p.triggerName);de.value=H,F.set(p.triggerName,de)}}T.destroy();return}}let Q=!c||!this.driver.containsElement(c,P),L=C.get(P),U=f.get(P),b=this._buildInstruction(p,s,U,L,Q);if(b.errors&&b.errors.length){B.push(b);return}if(Q){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}if(p.isFallbackTransition){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}let St=[];b.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||St.push(M)}),b.timelines=St,s.append(P,b.timelines);let vs={instruction:b,player:T,element:P};a.push(vs),b.queriedElements.forEach(M=>R(o,M,[]).push(T)),b.preStyleProps.forEach((M,H)=>{if(M.size){let F=l.get(H);F||l.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))}}),b.postStyleProps.forEach((M,H)=>{let F=u.get(H);F||u.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))})});if(B.length){let d=[];B.forEach(m=>{d.push(Jt(m.triggerName,m.errors))}),Z.forEach(m=>m.destroy()),this.reportError(d)}let k=new Map,D=new Map;a.forEach(d=>{let m=d.element;s.has(m)&&(D.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,k))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(T=>{R(k,m,[]).push(T),T.destroy()})});let j=v.filter(d=>fs(d,l,u)),x=new Map;hs(x,this.driver,A,u,z).forEach(d=>{fs(d,l,u)&&j.push(d)});let W=new Map;y.forEach((d,m)=>{hs(W,this.driver,new Set(d),l,ne)}),j.forEach(d=>{let m=x.get(d),p=W.get(d);x.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let Oe=[],yt=[],_t={};a.forEach(d=>{let{element:m,player:p,instruction:T}=d;if(s.has(m)){if(h.has(m)){p.onDestroy(()=>K(m,T.toStyles)),p.disabled=!0,p.overrideTotalTime(T.totalTime),i.push(p);return}let P=_t;if(D.size>1){let L=m,U=[];for(;L=L.parentNode;){let b=D.get(L);if(b){P=b;break}U.push(L)}U.forEach(b=>D.set(b,P))}let Q=this._buildAnimation(p.namespaceId,T,k,r,W,x);if(p.setRealPlayer(Q),P===_t)Oe.push(p);else{let L=this.playersByElement.get(P);L&&L.length&&(p.parentPlayer=$(L)),i.push(p)}}else G(m,T.fromStyles),p.onDestroy(()=>K(m,T.toStyles)),yt.push(p),h.has(m)&&i.push(p)}),yt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=$(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<v.length;d++){let m=v[d],p=m[q];if(se(m,re),p&&p.hasAnimation)continue;let T=[];if(o.size){let Q=o.get(m);Q&&Q.length&&T.push(...Q);let L=this.driver.query(m,Se,!0);for(let U=0;U<L.length;U++){let b=o.get(L[U]);b&&b.length&&T.push(...b)}}let P=T.filter(Q=>!Q.destroyed);P.length?mi(this,m,P):this.processLeaveNode(m)}return v.length=0,Oe.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),Oe}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,i,r){let a=[];if(t){let o=this.playersByQueriedElement.get(e);o&&(a=o)}else{let o=this.playersByElement.get(e);if(o){let l=!r||r==ue;o.forEach(u=>{u.queued||!l&&u.triggerName!=i||a.push(u)})}}return(s||i)&&(a=a.filter(o=>!(s&&s!=o.namespaceId||i&&i!=o.triggerName))),a}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let u=l.element,h=u!==r,c=R(s,u,[]);this._getPreviousPlayers(u,h,a,o,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),c.push(y)})}G(r,t.fromStyles)}_buildAnimation(e,t,s,i,r,a){let o=t.triggerName,l=t.element,u=[],h=new Set,c=new Set,_=t.timelines.map(f=>{let g=f.element;h.add(g);let v=g[q];if(v&&v.removedBeforeQueried)return new Y(f.duration,f.delay);let w=g!==l,A=pi((s.get(g)||ui).map(k=>k.getRealPlayer())).filter(k=>{let D=k;return D.element?D.element===g:!1}),C=r.get(g),N=a.get(g),Z=qe(this._normalizer,f.keyframes,C,N),B=this._buildPlayer(f,Z,A);if(f.subTimeline&&i&&c.add(g),w){let k=new he(e,o,g);k.setRealPlayer(B),u.push(k)}return B});u.forEach(f=>{R(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>hi(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>I(f,Ue));let y=$(_);return y.onDestroy(()=>{h.forEach(f=>se(f,Ue)),K(l,t.toStyles)}),c.forEach(f=>{R(i,f,[]).push(y)}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new Y(e.duration,e.delay)}},he=class{namespaceId;triggerName;element;_player=new Y;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>pe(e,s,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){R(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function hi(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1)}s.length==0&&n.delete(e)}return s}function di(n){return n??null}function we(n){return n&&n.nodeType===1}function fi(n){return n=="start"||n=="done"}function cs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function hs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(cs(l)));let a=[];s.forEach((l,u)=>{let h=new Map;l.forEach(c=>{let _=e.computeStyle(u,c,i);h.set(c,_),(!_||_.length==0)&&(u[q]=ci,a.push(u))}),n.set(u,h)});let o=0;return t.forEach(l=>cs(l,r[o++])),a}function ds(n,e){let t=new Map;if(n.forEach(o=>t.set(o,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function a(o){if(!o)return s;let l=r.get(o);if(l)return l;let u=o.parentNode;return t.has(u)?l=u:i.has(u)?l=s:l=a(u),r.set(o,l),l}return e.forEach(o=>{let l=a(o);l!==s&&t.get(l).push(o)}),t}function I(n,e){n.classList?.add(e)}function se(n,e){n.classList?.remove(e)}function mi(n,e,t){$(t).onDone(()=>n.processLeaveNode(e))}function pi(n){let e=[];return Es(n,e),e}function Es(n,e){for(let t=0;t<n.length;t++){let s=n[t];s instanceof me?Es(s.players,e):e.push(s)}}function gi(n,e){let t=Object.keys(n),s=Object.keys(e);if(t.length!=s.length)return!1;for(let i=0;i<t.length;i++){let r=t[i];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}function fs(n,e,t){let s=t.get(n);if(!s)return!1;let i=e.get(n);return i?s.forEach(r=>i.add(r)):e.set(n,s),t.delete(n),!0}var ke=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,s){this._driver=t,this._normalizer=s,this._transitionEngine=new ct(e.body,t,s),this._timelineEngine=new lt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,s,i,r){let a=e+"-"+i,o=this._triggerCache[a];if(!o){let l=[],u=[],h=ft(this._driver,r,l,u);if(l.length)throw Qt(i,l);o=si(i,h,this._normalizer),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,i,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,a]=Be(s),o=i;this._timelineEngine.command(r,t,a,o)}else this._transitionEngine.trigger(e,t,s,i)}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[a,o]=Be(s);return this._timelineEngine.listen(a,t,o,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function yi(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=Je(e[0]),e.length>1&&(s=Je(e[e.length-1]))):e instanceof Map&&(t=Je(e)),t||s?new _i(n,t,s):null}var _i=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,s,i){this._element=t,this._startStyles=s,this._endStyles=i;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&K(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(K(this._element,this._initialStyles),this._endStyles&&(K(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(G(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(G(this._element,this._endStyles),this._endStyles=null),K(this._element,this._initialStyles),this._state=3)}}return n})();function Je(n){let e=null;return n.forEach((t,s)=>{Si(s)&&(e=e||new Map,e.set(s,t))}),e}function Si(n){return n==="display"||n==="position"}var De=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let s=()=>this._onFinish();return t.addEventListener("finish",s),this.onDestroy(()=>{t.removeEventListener("finish",s)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){let i=this._convertKeyframesToObject(t);try{return e.animate(i,s)}catch{return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:Te(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},ht=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Qe(e,t)}getParentElement(e){return ye(e)}query(e,t,s){return Ve(e,t,s)}computeStyle(e,t,s){return Te(e,t)}animate(e,t,s,i,r,a=[]){let o=i==0?"both":"forwards",l={duration:s,delay:i,fill:o};r&&(l.easing=r);let u=new Map,h=a.filter(y=>y instanceof De);ts(s,i)&&h.forEach(y=>{y.currentSnapshot.forEach((f,g)=>u.set(g,f))});let c=xt(t).map(y=>new Map(y));c=ss(e,c,u);let _=yi(e,c);return new De(e,c,l,_)}};function Mi(n,e){return n==="noop"?new ke(e,new gs,new xe):new ke(e,new ht,new et)}var ms=class{_driver;_animationAst;constructor(e,t){this._driver=e;let s=[],r=ft(e,t,s,[]);if(s.length)throw qt(s);this._animationAst=r}buildTimelines(e,t,s,i,r){let a=Array.isArray(t)?Ge(t):t,o=Array.isArray(s)?Ge(s):s,l=[];r=r||new ie;let u=pt(this._driver,e,this._animationAst,_e,re,a,o,i,r,l);if(l.length)throw Bt(l);return u}},Ae="@",Ts="@.disabled",Re=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,s,i=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,s,i){if(i){this.delegate.removeChild(e,t,s,i);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){t.charAt(0)==Ae&&t==Ts?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s,i){return this.delegate.listen(e,t,s,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},dt=class extends Re{factory;constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){t.charAt(0)==Ae?t.charAt(1)=="."&&t==Ts?(s=s===void 0?!0:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s,i){if(t.charAt(0)==Ae){let r=Ei(e),a=t.slice(1),o="";return a.charAt(0)!=Ae&&([a,o]=Ti(a)),this.engine.listen(this.namespaceId,r,a,o,l=>{let u=l._data||-1;this.factory.scheduleListenerCallback(u,s,l)})}return this.delegate.listen(e,t,s,i)}};function Ei(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function Ti(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return[t,s]}var ps=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let u=this._rendererCache,h=u.get(i);if(!h){let c=()=>u.delete(i);h=new Re("",i,this.engine,c),u.set(i,h)}return h}let r=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let o=u=>{Array.isArray(u)?u.forEach(o):this.engine.registerTrigger(r,a,e,u.name,u)};return t.data.animation.forEach(o),new dt(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[a,o]=r;a(o)}),this._animationCallbacksBuffer=[]})}),i.push([t,s])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};export{is as AnimationDriver,gs as NoopAnimationDriver,ms as \u0275Animation,ke as \u0275AnimationEngine,dt as \u0275AnimationRenderer,ps as \u0275AnimationRendererFactory,Ze as \u0275AnimationStyleNormalizer,Re as \u0275BaseAnimationRenderer,_e as \u0275ENTER_CLASSNAME,re as \u0275LEAVE_CLASSNAME,xe as \u0275NoopAnimationStyleNormalizer,he as \u0275TransitionAnimationPlayer,ht as \u0275WebAnimationsDriver,De as \u0275WebAnimationsPlayer,et as \u0275WebAnimationsStyleNormalizer,ts as \u0275allowPreviousPlayerStylesMerge,qs as \u0275camelCaseToDashCase,Qe as \u0275containsElement,Mi as \u0275createEngine,ye as \u0275getParentElement,Ve as \u0275invokeQuery,xt as \u0275normalizeKeyframes,Zt as \u0275validateStyleProperty,Rs as \u0275validateWebAnimatableStyleProperty};
1
+ import{$c as vt,U as E,X as Tt,Xc as S,Yc as z,ad as Fe,dd as Y,ed as me,fd as ne}from"./chunk-VX4RXOTH.js";import{a as fe,d as Et}from"./chunk-B4AJQJMI.js";function bt(n){return new E(3e3,!1)}function bs(){return new E(3100,!1)}function ws(){return new E(3101,!1)}function As(n){return new E(3001,!1)}function Ps(n){return new E(3003,!1)}function Ns(n){return new E(3004,!1)}function At(n,e){return new E(3005,!1)}function Pt(){return new E(3006,!1)}function Nt(){return new E(3007,!1)}function Mt(n,e){return new E(3008,!1)}function Ct(n){return new E(3002,!1)}function kt(n,e,t,s,i){return new E(3010,!1)}function Dt(){return new E(3011,!1)}function Rt(){return new E(3012,!1)}function Ot(){return new E(3200,!1)}function Lt(){return new E(3202,!1)}function Ft(){return new E(3013,!1)}function It(n){return new E(3014,!1)}function zt(n){return new E(3015,!1)}function Kt(n){return new E(3016,!1)}function qt(n){return new E(3500,!1)}function Bt(n){return new E(3501,!1)}function Qt(n,e){return new E(3404,!1)}function Ms(n){return new E(3502,!1)}function Vt(n){return new E(3503,!1)}function $t(){return new E(3300,!1)}function Ut(n){return new E(3504,!1)}function Gt(n){return new E(3301,!1)}function jt(n,e){return new E(3302,!1)}function Wt(n){return new E(3303,!1)}function Ht(n,e){return new E(3400,!1)}function Yt(n){return new E(3401,!1)}function Xt(n){return new E(3402,!1)}function Jt(n,e){return new E(3505,!1)}var Cs=new Set(["-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-ms-grid-columns","-ms-grid-rows","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","accent-color","all","backdrop-filter","background","background-color","background-position","background-size","block-size","border","border-block-end","border-block-end-color","border-block-end-width","border-block-start","border-block-start-color","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width","border-color","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-slice","border-image-width","border-inline-end","border-inline-end-color","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-width","border-left","border-left-color","border-left-width","border-radius","border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width","border-width","bottom","box-shadow","caret-color","clip","clip-path","color","column-count","column-gap","column-rule","column-rule-color","column-rule-width","column-width","columns","filter","flex","flex-basis","flex-grow","flex-shrink","font","font-size","font-size-adjust","font-stretch","font-variation-settings","font-weight","gap","grid-column-gap","grid-gap","grid-row-gap","grid-template-columns","grid-template-rows","height","inline-size","input-security","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","outline","outline-color","outline-offset","outline-width","padding","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","perspective","perspective-origin","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-coordinate","scroll-snap-destination","scrollbar-color","shape-image-threshold","shape-margin","shape-outside","tab-size","text-decoration","text-decoration-color","text-decoration-thickness","text-emphasis","text-emphasis-color","text-indent","text-shadow","text-underline-offset","top","transform","transform-origin","translate","vertical-align","visibility","width","word-spacing","z-index","zoom"]);function $(n){switch(n.length){case 0:return new Y;case 1:return n[0];default:return new me(n)}}function qe(n,e,t=new Map,s=new Map){let i=[],r=[],a=-1,o=null;if(e.forEach(l=>{let u=l.get("offset"),h=u==a,c=h&&o||new Map;l.forEach((_,y)=>{let f=y,g=_;if(y!=="offset")switch(f=n.normalizePropertyName(f,i),g){case ne:g=t.get(y);break;case z:g=s.get(y);break;default:g=n.normalizeStyleValue(y,f,g,i);break}c.set(f,g)}),h||r.push(c),o=c,a=u}),i.length)throw Ms(i);return r}function pe(n,e,t,s){switch(e){case"start":n.onStart(()=>s(t&&Ie(t,"start",n)));break;case"done":n.onDone(()=>s(t&&Ie(t,"done",n)));break;case"destroy":n.onDestroy(()=>s(t&&Ie(t,"destroy",n)));break}}function Ie(n,e,t){let s=t.totalTime,i=!!t.disabled,r=ge(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),a=n._data;return a!=null&&(r._data=a),r}function ge(n,e,t,s,i="",r=0,a){return{element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!a}}function R(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Be(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return[t,s]}var ks=typeof document>"u"?null:document.documentElement;function ye(n){let e=n.parentNode||n.host||null;return e===ks?null:e}function Ds(n){return n.substring(1,6)=="ebkit"}var X=null,wt=!1;function Zt(n){X||(X=Os()||{},wt=X.style?"WebkitAppearance"in X.style:!1);let e=!0;return X.style&&!Ds(n)&&(e=n in X.style,!e&&wt&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in X.style)),e}function Rs(n){return Cs.has(n)}function Os(){return typeof document<"u"?document.body:null}function Qe(n,e){for(;e;){if(e===n)return!0;e=ye(e)}return!1}function Ve(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var Ls=1e3,$e="{{",Fs="}}",_e="ng-enter",re="ng-leave",ae="ng-trigger",oe=".ng-trigger",Ue="ng-animating",Se=".ng-animating";function V(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ze(parseFloat(e[1]),e[2])}function ze(n,e){switch(e){case"s":return n*Ls;default:return n}}function le(n,e,t){return n.hasOwnProperty("duration")?n:zs(n,e,t)}var Is=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function zs(n,e,t){let s,i=0,r="";if(typeof n=="string"){let a=n.match(Is);if(a===null)return e.push(bt(n)),{duration:0,delay:0,easing:""};s=ze(parseFloat(a[1]),a[2]);let o=a[3];o!=null&&(i=ze(parseFloat(o),a[4]));let l=a[5];l&&(r=l)}else s=n;if(!t){let a=!1,o=e.length;s<0&&(e.push(bs()),a=!0),i<0&&(e.push(ws()),a=!0),a&&e.splice(o,0,bt(n))}return{duration:s,delay:i,easing:r}}function xt(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function Ge(n){return Array.isArray(n)?new Map(...n):new Map(n)}function K(n,e,t){e.forEach((s,i)=>{let r=Ee(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s})}function G(n,e){e.forEach((t,s)=>{let i=Ee(s);n.style[i]=""})}function ee(n){return Array.isArray(n)?n.length==1?n[0]:vt(n):n}function es(n,e,t){let s=e.params||{},i=je(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(As(r))})}var Ke=new RegExp(`${$e}\\s*(.+?)\\s*${Fs}`,"g");function je(n){let e=[];if(typeof n=="string"){let t;for(;t=Ke.exec(n);)e.push(t[1]);Ke.lastIndex=0}return e}function te(n,e,t){let s=`${n}`,i=s.replace(Ke,(r,a)=>{let o=e[a];return o==null&&(t.push(Ps(a)),o=""),o.toString()});return i==s?n:i}var Ks=/-+([a-z0-9])/g;function Ee(n){return n.replace(Ks,(...e)=>e[1].toUpperCase())}function qs(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ts(n,e){return n===0||e===0}function ss(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,a)=>{s.has(a)||i.push(a),s.set(a,r)}),i.length)for(let r=1;r<e.length;r++){let a=e[r];i.forEach(o=>a.set(o,Te(n,o)))}}return e}function O(n,e,t){switch(e.type){case S.Trigger:return n.visitTrigger(e,t);case S.State:return n.visitState(e,t);case S.Transition:return n.visitTransition(e,t);case S.Sequence:return n.visitSequence(e,t);case S.Group:return n.visitGroup(e,t);case S.Animate:return n.visitAnimate(e,t);case S.Keyframes:return n.visitKeyframes(e,t);case S.Style:return n.visitStyle(e,t);case S.Reference:return n.visitReference(e,t);case S.AnimateChild:return n.visitAnimateChild(e,t);case S.AnimateRef:return n.visitAnimateRef(e,t);case S.Query:return n.visitQuery(e,t);case S.Stagger:return n.visitStagger(e,t);default:throw Ns(e.type)}}function Te(n,e){return window.getComputedStyle(n)[e]}var gs=(()=>{class n{validateStyleProperty(t){return Zt(t)}containsElement(t,s){return Qe(t,s)}getParentElement(t){return ye(t)}query(t,s,i){return Ve(t,s,i)}computeStyle(t,s,i){return i||""}animate(t,s,i,r,a,o=[],l){return new Y(i,r)}static \u0275fac=function(s){return new(s||n)};static \u0275prov=Tt({token:n,factory:n.\u0275fac})}return n})(),is=class{static NOOP=new gs},Ze=class{},xe=class{normalizePropertyName(e,t){return e}normalizeStyleValue(e,t,s,i){return s}},Bs=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),et=class extends Ze{normalizePropertyName(e,t){return Ee(e)}normalizeStyleValue(e,t,s,i){let r="",a=s.toString().trim();if(Bs.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else{let o=s.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&i.push(At(e,s))}return a+r}};var Pe="*";function Qs(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>Vs(s,t,e)):t.push(n),t}function Vs(n,e,t){if(n[0]==":"){let l=$s(n,t);if(typeof l=="function"){e.push(l);return}n=l}let s=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(zt(n)),e;let i=s[1],r=s[2],a=s[3];e.push(ns(i,a));let o=i==Pe&&a==Pe;r[0]=="<"&&!o&&e.push(ns(a,i))}function $s(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s)<parseFloat(t);default:return e.push(Kt(n)),"* => *"}}var ve=new Set(["true","1"]),be=new Set(["false","0"]);function ns(n,e){let t=ve.has(n)||be.has(n),s=ve.has(e)||be.has(e);return(i,r)=>{let a=n==Pe||n==i,o=e==Pe||e==r;return!a&&t&&typeof i=="boolean"&&(a=i?ve.has(n):be.has(n)),!o&&s&&typeof r=="boolean"&&(o=r?ve.has(e):be.has(e)),a&&o}}var ys=":self",Us=new RegExp(`s*${ys}s*,?`,"g");function ft(n,e,t,s){return new tt(n).build(e,t,s)}var rs="",tt=class{_driver;constructor(e){this._driver=e}build(e,t,s){let i=new st(t);return this._resetContextStyleTimingState(i),O(this,ee(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=rs,e.collectedStyles=new Map,e.collectedStyles.set(rs,new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],a=[];return e.name.charAt(0)=="@"&&t.errors.push(Pt()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==S.State){let l=o,u=l.name;u.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=u}else if(o.type==S.Transition){let l=this.visitTransition(o,t);s+=l.queryCount,i+=l.depCount,a.push(l)}else t.errors.push(Nt())}),{type:S.Trigger,name:e.name,states:r,transitions:a,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,a=i||{};s.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{je(l).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&t.errors.push(Mt(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=O(this,ee(e.animation),t),i=Qs(e.expr,t.errors);return{type:S.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:J(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(s=>O(this,s,t)),options:J(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(a=>{t.currentTime=s;let o=O(this,a,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:S.Group,steps:r,options:J(e.options)}}visitAnimate(e,t){let s=Hs(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:Fe({});if(r.type==S.Keyframes)i=this.visitKeyframes(r,t);else{let a=e.styles,o=!1;if(!a){o=!0;let u={};s.easing&&(u.easing=s.easing),a=Fe(u)}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(a,t);l.isEmptyStep=o,i=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of i)typeof o=="string"?o===z?s.push(o):t.errors.push(Ct(o)):s.push(new Map(Object.entries(o)));let r=!1,a=null;return s.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!r)){for(let l of o.values())if(l.toString().indexOf($e)>=0){r=!0;break}}}),{type:S.Style,styles:s,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((o,l)=>{let u=t.collectedStyles.get(t.currentQuerySelector),h=u.get(l),c=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(kt(l,h.startTime,h.endTime,r,i)),c=!1),r=h.startTime),c&&u.set(l,{startTime:r,endTime:i}),t.options&&es(o,t.options,t.errors)})})}visitKeyframes(e,t){let s={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Dt()),s;let i=1,r=0,a=[],o=!1,l=!1,u=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),C=A.offset!=null?A.offset:Ws(A.styles),N=0;return C!=null&&(r++,N=A.offset=C),l=l||N<0||N>1,o=o||N<u,u=N,a.push(N),A});l&&t.errors.push(Rt()),o&&t.errors.push(Ot());let c=e.steps.length,_=0;r>0&&r<c?t.errors.push(Lt()):r==0&&(_=i/(c-1));let y=c-1,f=t.currentTime,g=t.currentAnimateTimings,v=g.duration;return h.forEach((w,A)=>{let C=_>0?A==y?1:_*A:a[A],N=C*v;t.currentTime=f+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,s.styles.push(w)}),s}visitReference(e,t){return{type:S.Reference,animation:O(this,ee(e.animation),t),options:J(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:J(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:J(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,a]=Gs(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,R(t.collectedStyles,t.currentQuerySelector,new Map);let o=O(this,ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:S.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:J(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ft());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:le(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,ee(e.animation),t),timings:s,options:null}}};function Gs(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ys);return e&&(n=n.replace(Us,"")),n=n.replace(/@\*/g,oe).replace(/@\w+/g,t=>oe+"-"+t.slice(1)).replace(/:animating/g,Se),[n,e]}function js(n){return n?fe({},n):null}var st=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Ws(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Hs(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=le(n,e).duration;return We(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=We(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=le(t,e);return We(i.duration,i.delay,i.easing)}function J(n){return n?(n=fe({},n),n.params&&(n.params=js(n.params))):n={},n}function We(n,e,t){return{duration:n,delay:e,easing:t}}function mt(n,e,t,s,i,r,a=null,o=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:a,subTimeline:o}}var ie=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ys=1,Xs=":enter",Js=new RegExp(Xs,"g"),Zs=":leave",xs=new RegExp(Zs,"g");function pt(n,e,t,s,i,r=new Map,a=new Map,o,l,u=[]){return new it().buildKeyframes(n,e,t,s,i,r,a,o,l,u)}var it=class{buildKeyframes(e,t,s,i,r,a,o,l,u,h=[]){u=u||new ie;let c=new nt(e,t,u,i,r,h,[]);c.options=l;let _=l.delay?V(l.delay):0;c.currentTimeline.delayNextStep(_),c.currentTimeline.setStyles([a],null,c.errors,l),O(this,s,c);let y=c.timelines.filter(f=>f.containsAnimation());if(y.length&&o.size){let f;for(let g=y.length-1;g>=0;g--){let v=y[g];if(v.element===t){f=v;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([o],null,c.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[mt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(s,i,i.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let a=typeof r=="number"?r:V(te(r,i?.params??{},t.errors));s.delayNextStep(a)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,a=s.duration!=null?V(s.duration):null,o=s.delay!=null?V(s.delay):null;return a!==0&&e.forEach(l=>{let u=t.appendInstructionToTimeline(l,a,o);r=Math.max(r,u.duration+u.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==S.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ne);let a=V(r.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>O(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(a=>{let o=t.createSubContext(e.options);r&&o.delayNextStep(r),O(this,a,o),i=Math.max(i,o.currentTimeline.currentTime),s.push(o.currentTimeline)}),s.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?te(s,t.params,t.errors):s;return le(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,o=t.createSubContext().currentTimeline;o.easing=s.easing,e.styles.forEach(l=>{let u=l.offset||0;o.forwardTime(u*r),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?V(i.delay):0;r&&(t.previousNode.type===S.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ne);let a=s,o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((u,h)=>{t.currentQueryIndex=h;let c=t.createSubContext(e.options,u);r&&c.delayNextStep(r),u===t.element&&(l=c.currentTimeline),O(this,e.animation,c),c.currentTimeline.applyStylesToKeyframe();let _=c.currentTimeline.currentTime;a=Math.max(a,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),l=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=o-l;break;case"full":l=s.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let c=h.currentTime;O(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-c+(i.startTime-s.currentTimeline.startTime)}},Ne={},nt=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ne;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,s,i,r,a,o,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=a,this.timelines=o,this.currentTimeline=l||new Me(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=V(s.duration)),s.delay!=null&&(i.delay=V(s.delay));let r=s.params;if(r){let a=i.params;a||(a=this.options.params={}),Object.keys(r).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=te(r[o],a,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i]})}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ne,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new rt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,i,r,a){let o=[];if(i&&o.push(this.element),e.length>0){e=e.replace(Js,"."+this._enterClassName),e=e.replace(xs,"."+this._leaveClassName);let l=s!=1,u=this._driver.query(this.element,e,l);s!==0&&(u=s<0?u.slice(u.length+s,u.length):u.slice(0,s)),o.push(...u)}return!r&&o.length==0&&a.push(It(t)),o}},Me=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ys,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||z),this._currentKeyframe.set(t,z);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},a=ei(e,this._globalTimelineStyles);for(let[o,l]of a){let u=te(l,r,s);this._pendingStyles.set(o,u),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??z),this._updateStyle(o,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((o,l)=>{let u=new Map([...this._backFill,...o]);u.forEach((h,c)=>{h===ne?e.add(c):h===z&&t.add(c)}),s||u.set("offset",l/this.duration),i.push(u)});let r=[...e.values()],a=[...t.values()];if(s){let o=i[0],l=new Map(o);o.set("offset",0),l.set("offset",1),i=[o,l]}return mt(this.element,i,r,a,this.duration,this.startTime,this.easing,!1)}},rt=class extends Me{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,s,i,r,a,o=!1){super(e,t,a.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],a=s+t,o=t/a,l=new Map(e[0]);l.set("offset",0),r.push(l);let u=new Map(e[0]);u.set("offset",as(o)),r.push(u);let h=e.length-1;for(let c=1;c<=h;c++){let _=new Map(e[c]),y=_.get("offset"),f=t+y*s;_.set("offset",as(f/a)),r.push(_)}s=a,t=0,i="",e=r}return mt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,!0)}};function as(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function ei(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,z)}else for(let[r,a]of i)t.set(r,a)}),t}function os(n,e,t,s,i,r,a,o,l,u,h,c,_){return{type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:a,timelines:o,queriedElements:l,preStyleProps:u,postStyleProps:h,totalTime:c,errors:_}}var He={},Ce=class{_triggerName;ast;_stateStyles;constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,i){return ti(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,a,o,l,u,h){let c=[],_=this.ast.options&&this.ast.options.params||He,y=o&&o.params||He,f=this.buildStyles(s,y,c),g=l&&l.params||He,v=this.buildStyles(i,g,c),w=new Set,A=new Map,C=new Map,N=i==="void",Z={params:_s(g,_),delay:this.ast.options?.delay},B=h?[]:pt(e,t,this.ast.animation,r,a,f,v,Z,u,c),k=0;return B.forEach(D=>{k=Math.max(D.duration+D.delay,k)}),c.length?os(t,this._triggerName,s,i,N,f,v,[],[],A,C,k,c):(B.forEach(D=>{let j=D.element,x=R(A,j,new Set);D.preStyleProps.forEach(W=>x.add(W));let gt=R(C,j,new Set);D.postStyleProps.forEach(W=>gt.add(W)),j!==t&&w.add(j)}),os(t,this._triggerName,s,i,N,f,v,B,[...w.values()],A,C,k))}};function ti(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function _s(n,e){let t=fe({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i)}),t}var at=class{styles;defaultParams;normalizer;constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){let s=new Map,i=_s(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,o)=>{a&&(a=te(a,i,t));let l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),s.set(o,a)})}),s}};function si(n,e,t){return new ot(n,e,t)}var ot=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new at(i.style,r,s))}),ls(this.states,"true","1"),ls(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ce(e,i,this.states))}),this.fallbackTransition=ii(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(a=>a.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function ii(n,e,t){let s=[(a,o)=>!0],i={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new Ce(n,r,e)}function ls(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var ni=new ie,lt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s}register(e,t){let s=[],i=[],r=ft(this._driver,t,s,i);if(s.length)throw Vt(s);this._animations.set(e,r)}_buildPlayer(e,t,s){let i=e.element,r=qe(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){let i=[],r=this._animations.get(e),a,o=new Map;if(r?(a=pt(this._driver,t,r,_e,re,new Map,new Map,s,ni,i),a.forEach(h=>{let c=R(o,h.element,new Map);h.postStyleProps.forEach(_=>c.set(_,null))})):(i.push($t()),a=[]),i.length)throw Ut(i);o.forEach((h,c)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(c,y,z))})});let l=a.map(h=>{let c=o.get(h.element);return this._buildPlayer(h,new Map,c)}),u=$(l);return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Gt(e);return t}listen(e,t,s,i){let r=ge(t,"","","");return pe(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let a=i[0]||{};this.create(e,t,a);return}let r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},us="ng-animate-queued",ri=".ng-animate-queued",Ye="ng-animate-disabled",ai=".ng-animate-disabled",oi="ng-star-inserted",li=".ng-star-inserted",ui=[],Ss={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ci={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},q="__ng_removed",ce=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=di(i),s){let r=e,{value:a}=r,o=Et(r,["value"]);this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i])})}}},ue="void",Xe=new ce(ue),ut=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this._hostClassName="ng-tns-"+e,I(t,this._hostClassName)}listen(e,t,s,i){if(!this._triggers.has(t))throw jt(s,t);if(s==null||s.length==0)throw Wt(t);if(!fi(s))throw Ht(s,t);let r=R(this._elementListeners,e,[]),a={name:t,phase:s,callback:i};r.push(a);let o=R(this._engine.statesByElement,e,new Map);return o.has(t)||(I(e,ae),I(e,ae+"-"+t),o.set(t,Xe)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(t)||o.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Yt(e);return t}trigger(e,t,s,i=!0){let r=this._getTrigger(t),a=new he(this.id,t,e),o=this._engine.statesByElement.get(e);o||(I(e,ae),I(e,ae+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t),u=new ce(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),o.set(t,u),l||(l=Xe),!(u.value===ue)&&l.value===u.value){if(!gi(l.params,u.params)){let g=[],v=r.matchStyles(l.value,l.params,g),w=r.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{G(e,v),K(e,w)})}return}let _=R(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,u.value,e,u.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:u,player:a,isFallbackTransition:f}),f||(I(e,us),a.onStart(()=>{se(e,us)})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(a);w>=0&&v.splice(w,1)}}),this.players.push(a),_.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,oe,!0);s.forEach(i=>{if(i[q])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(a=>a.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),a=new Map;if(r){let o=[];if(r.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){let h=this.trigger(e,u,ue,i);h&&o.push(h)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,a),s&&$(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let a=r.name;if(i.has(a))return;i.add(a);let l=this._triggers.get(a).fallbackTransition,u=s.get(a)||Xe,h=new ce(ue),c=new he(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:u,toState:h,player:c,isFallbackTransition:!0})})}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let a=e;for(;a=a.parentNode;)if(s.statesByElement.get(a)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,!1,t);else{let r=e[q];(!r||r===Ss)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){I(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,a=this._elementListeners.get(r);a&&a.forEach(o=>{if(o.name==s.triggerName){let l=ge(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,pe(s.player,o.phase,l,o.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(s)}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,a=i.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ct=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){let s=new ut(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let a=!1,o=this.driver.getParentElement(t);for(;o;){let l=i.get(o);if(l){let u=s.indexOf(l);s.splice(u+1,0,e),a=!0;break}o=this.driver.getParentElement(o)}a||s.unshift(e)}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,s,i){if(we(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),!0}return!1}insertNode(e,t,s,i){if(!we(t))return;let r=t[q];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(t,s)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),I(e,Ye)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),se(e,Ye))}removeNode(e,t,s){if(we(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[q]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,i,r){return we(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,oe,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Se,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return $(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[q];if(t&&t.setForRemoval){if(e[q]=Ss,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Ye)&&this.markElementAsDisabled(e,!1),this.driver.query(e,ai,!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;s<this.collectedEnterElements.length;s++){let i=this.collectedEnterElements[s];I(i,oi)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let s=[];try{t=this._flushAnimations(s,e)}finally{for(let i=0;i<s.length;i++)s[i]()}}else for(let s=0;s<this.collectedLeaveElements.length;s++){let i=this.collectedLeaveElements[s];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(s=>s()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?$(t).onDone(()=>{s.forEach(i=>i())}):s.forEach(i=>i())}}reportError(e){throw Xt(e)}_flushAnimations(e,t){let s=new ie,i=[],r=new Map,a=[],o=new Map,l=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let m=this.driver.query(d,ri,!0);for(let p=0;p<m.length;p++)h.add(m[p])});let c=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=ds(_,this.collectedEnterElements),f=new Map,g=0;y.forEach((d,m)=>{let p=_e+g++;f.set(m,p),d.forEach(T=>I(T,p))});let v=[],w=new Set,A=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let m=this.collectedLeaveElements[d],p=m[q];p&&p.setForRemoval&&(v.push(m),w.add(m),p.hasAnimation?this.driver.query(m,li,!0).forEach(T=>w.add(T)):A.add(m))}let C=new Map,N=ds(_,Array.from(w));N.forEach((d,m)=>{let p=re+g++;C.set(m,p),d.forEach(T=>I(T,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(T=>se(T,p))}),N.forEach((d,m)=>{let p=C.get(m);d.forEach(T=>se(T,p))}),v.forEach(d=>{this.processLeaveNode(d)})});let Z=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let T=p.player,P=p.element;if(Z.push(T),this.collectedEnterElements.length){let M=P[q];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let H=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let de=F.get(p.triggerName);de.value=H,F.set(p.triggerName,de)}}T.destroy();return}}let Q=!c||!this.driver.containsElement(c,P),L=C.get(P),U=f.get(P),b=this._buildInstruction(p,s,U,L,Q);if(b.errors&&b.errors.length){B.push(b);return}if(Q){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}if(p.isFallbackTransition){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}let St=[];b.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||St.push(M)}),b.timelines=St,s.append(P,b.timelines);let vs={instruction:b,player:T,element:P};a.push(vs),b.queriedElements.forEach(M=>R(o,M,[]).push(T)),b.preStyleProps.forEach((M,H)=>{if(M.size){let F=l.get(H);F||l.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))}}),b.postStyleProps.forEach((M,H)=>{let F=u.get(H);F||u.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))})});if(B.length){let d=[];B.forEach(m=>{d.push(Jt(m.triggerName,m.errors))}),Z.forEach(m=>m.destroy()),this.reportError(d)}let k=new Map,D=new Map;a.forEach(d=>{let m=d.element;s.has(m)&&(D.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,k))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(T=>{R(k,m,[]).push(T),T.destroy()})});let j=v.filter(d=>fs(d,l,u)),x=new Map;hs(x,this.driver,A,u,z).forEach(d=>{fs(d,l,u)&&j.push(d)});let W=new Map;y.forEach((d,m)=>{hs(W,this.driver,new Set(d),l,ne)}),j.forEach(d=>{let m=x.get(d),p=W.get(d);x.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let Oe=[],yt=[],_t={};a.forEach(d=>{let{element:m,player:p,instruction:T}=d;if(s.has(m)){if(h.has(m)){p.onDestroy(()=>K(m,T.toStyles)),p.disabled=!0,p.overrideTotalTime(T.totalTime),i.push(p);return}let P=_t;if(D.size>1){let L=m,U=[];for(;L=L.parentNode;){let b=D.get(L);if(b){P=b;break}U.push(L)}U.forEach(b=>D.set(b,P))}let Q=this._buildAnimation(p.namespaceId,T,k,r,W,x);if(p.setRealPlayer(Q),P===_t)Oe.push(p);else{let L=this.playersByElement.get(P);L&&L.length&&(p.parentPlayer=$(L)),i.push(p)}}else G(m,T.fromStyles),p.onDestroy(()=>K(m,T.toStyles)),yt.push(p),h.has(m)&&i.push(p)}),yt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=$(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<v.length;d++){let m=v[d],p=m[q];if(se(m,re),p&&p.hasAnimation)continue;let T=[];if(o.size){let Q=o.get(m);Q&&Q.length&&T.push(...Q);let L=this.driver.query(m,Se,!0);for(let U=0;U<L.length;U++){let b=o.get(L[U]);b&&b.length&&T.push(...b)}}let P=T.filter(Q=>!Q.destroyed);P.length?mi(this,m,P):this.processLeaveNode(m)}return v.length=0,Oe.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),Oe}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,i,r){let a=[];if(t){let o=this.playersByQueriedElement.get(e);o&&(a=o)}else{let o=this.playersByElement.get(e);if(o){let l=!r||r==ue;o.forEach(u=>{u.queued||!l&&u.triggerName!=i||a.push(u)})}}return(s||i)&&(a=a.filter(o=>!(s&&s!=o.namespaceId||i&&i!=o.triggerName))),a}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let u=l.element,h=u!==r,c=R(s,u,[]);this._getPreviousPlayers(u,h,a,o,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),c.push(y)})}G(r,t.fromStyles)}_buildAnimation(e,t,s,i,r,a){let o=t.triggerName,l=t.element,u=[],h=new Set,c=new Set,_=t.timelines.map(f=>{let g=f.element;h.add(g);let v=g[q];if(v&&v.removedBeforeQueried)return new Y(f.duration,f.delay);let w=g!==l,A=pi((s.get(g)||ui).map(k=>k.getRealPlayer())).filter(k=>{let D=k;return D.element?D.element===g:!1}),C=r.get(g),N=a.get(g),Z=qe(this._normalizer,f.keyframes,C,N),B=this._buildPlayer(f,Z,A);if(f.subTimeline&&i&&c.add(g),w){let k=new he(e,o,g);k.setRealPlayer(B),u.push(k)}return B});u.forEach(f=>{R(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>hi(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>I(f,Ue));let y=$(_);return y.onDestroy(()=>{h.forEach(f=>se(f,Ue)),K(l,t.toStyles)}),c.forEach(f=>{R(i,f,[]).push(y)}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new Y(e.duration,e.delay)}},he=class{namespaceId;triggerName;element;_player=new Y;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>pe(e,s,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){R(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function hi(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1)}s.length==0&&n.delete(e)}return s}function di(n){return n??null}function we(n){return n&&n.nodeType===1}function fi(n){return n=="start"||n=="done"}function cs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function hs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(cs(l)));let a=[];s.forEach((l,u)=>{let h=new Map;l.forEach(c=>{let _=e.computeStyle(u,c,i);h.set(c,_),(!_||_.length==0)&&(u[q]=ci,a.push(u))}),n.set(u,h)});let o=0;return t.forEach(l=>cs(l,r[o++])),a}function ds(n,e){let t=new Map;if(n.forEach(o=>t.set(o,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function a(o){if(!o)return s;let l=r.get(o);if(l)return l;let u=o.parentNode;return t.has(u)?l=u:i.has(u)?l=s:l=a(u),r.set(o,l),l}return e.forEach(o=>{let l=a(o);l!==s&&t.get(l).push(o)}),t}function I(n,e){n.classList?.add(e)}function se(n,e){n.classList?.remove(e)}function mi(n,e,t){$(t).onDone(()=>n.processLeaveNode(e))}function pi(n){let e=[];return Es(n,e),e}function Es(n,e){for(let t=0;t<n.length;t++){let s=n[t];s instanceof me?Es(s.players,e):e.push(s)}}function gi(n,e){let t=Object.keys(n),s=Object.keys(e);if(t.length!=s.length)return!1;for(let i=0;i<t.length;i++){let r=t[i];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}function fs(n,e,t){let s=t.get(n);if(!s)return!1;let i=e.get(n);return i?s.forEach(r=>i.add(r)):e.set(n,s),t.delete(n),!0}var ke=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,s){this._driver=t,this._normalizer=s,this._transitionEngine=new ct(e.body,t,s),this._timelineEngine=new lt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,s,i,r){let a=e+"-"+i,o=this._triggerCache[a];if(!o){let l=[],u=[],h=ft(this._driver,r,l,u);if(l.length)throw Qt(i,l);o=si(i,h,this._normalizer),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,i,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,a]=Be(s),o=i;this._timelineEngine.command(r,t,a,o)}else this._transitionEngine.trigger(e,t,s,i)}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[a,o]=Be(s);return this._timelineEngine.listen(a,t,o,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function yi(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=Je(e[0]),e.length>1&&(s=Je(e[e.length-1]))):e instanceof Map&&(t=Je(e)),t||s?new _i(n,t,s):null}var _i=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,s,i){this._element=t,this._startStyles=s,this._endStyles=i;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&K(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(K(this._element,this._initialStyles),this._endStyles&&(K(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(G(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(G(this._element,this._endStyles),this._endStyles=null),K(this._element,this._initialStyles),this._state=3)}}return n})();function Je(n){let e=null;return n.forEach((t,s)=>{Si(s)&&(e=e||new Map,e.set(s,t))}),e}function Si(n){return n==="display"||n==="position"}var De=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let s=()=>this._onFinish();return t.addEventListener("finish",s),this.onDestroy(()=>{t.removeEventListener("finish",s)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){let i=this._convertKeyframesToObject(t);try{return e.animate(i,s)}catch{return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:Te(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},ht=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Qe(e,t)}getParentElement(e){return ye(e)}query(e,t,s){return Ve(e,t,s)}computeStyle(e,t,s){return Te(e,t)}animate(e,t,s,i,r,a=[]){let o=i==0?"both":"forwards",l={duration:s,delay:i,fill:o};r&&(l.easing=r);let u=new Map,h=a.filter(y=>y instanceof De);ts(s,i)&&h.forEach(y=>{y.currentSnapshot.forEach((f,g)=>u.set(g,f))});let c=xt(t).map(y=>new Map(y));c=ss(e,c,u);let _=yi(e,c);return new De(e,c,l,_)}};function Mi(n,e){return n==="noop"?new ke(e,new gs,new xe):new ke(e,new ht,new et)}var ms=class{_driver;_animationAst;constructor(e,t){this._driver=e;let s=[],r=ft(e,t,s,[]);if(s.length)throw qt(s);this._animationAst=r}buildTimelines(e,t,s,i,r){let a=Array.isArray(t)?Ge(t):t,o=Array.isArray(s)?Ge(s):s,l=[];r=r||new ie;let u=pt(this._driver,e,this._animationAst,_e,re,a,o,i,r,l);if(l.length)throw Bt(l);return u}},Ae="@",Ts="@.disabled",Re=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,s,i=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,s,i){if(i){this.delegate.removeChild(e,t,s,i);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){t.charAt(0)==Ae&&t==Ts?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s,i){return this.delegate.listen(e,t,s,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},dt=class extends Re{factory;constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){t.charAt(0)==Ae?t.charAt(1)=="."&&t==Ts?(s=s===void 0?!0:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s,i){if(t.charAt(0)==Ae){let r=Ei(e),a=t.slice(1),o="";return a.charAt(0)!=Ae&&([a,o]=Ti(a)),this.engine.listen(this.namespaceId,r,a,o,l=>{let u=l._data||-1;this.factory.scheduleListenerCallback(u,s,l)})}return this.delegate.listen(e,t,s,i)}};function Ei(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function Ti(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return[t,s]}var ps=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let u=this._rendererCache,h=u.get(i);if(!h){let c=()=>u.delete(i);h=new Re("",i,this.engine,c),u.set(i,h)}return h}let r=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let o=u=>{Array.isArray(u)?u.forEach(o):this.engine.registerTrigger(r,a,e,u.name,u)};return t.data.animation.forEach(o),new dt(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[a,o]=r;a(o)}),this._animationCallbacksBuffer=[]})}),i.push([t,s])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};export{is as AnimationDriver,gs as NoopAnimationDriver,ms as \u0275Animation,ke as \u0275AnimationEngine,dt as \u0275AnimationRenderer,ps as \u0275AnimationRendererFactory,Ze as \u0275AnimationStyleNormalizer,Re as \u0275BaseAnimationRenderer,_e as \u0275ENTER_CLASSNAME,re as \u0275LEAVE_CLASSNAME,xe as \u0275NoopAnimationStyleNormalizer,he as \u0275TransitionAnimationPlayer,ht as \u0275WebAnimationsDriver,De as \u0275WebAnimationsPlayer,et as \u0275WebAnimationsStyleNormalizer,ts as \u0275allowPreviousPlayerStylesMerge,qs as \u0275camelCaseToDashCase,Qe as \u0275containsElement,Mi as \u0275createEngine,ye as \u0275getParentElement,Ve as \u0275invokeQuery,xt as \u0275normalizeKeyframes,Zt as \u0275validateStyleProperty,Rs as \u0275validateWebAnimatableStyleProperty};
@@ -1 +1 @@
1
- import{Jb as t,Kb as i,Lb as a,ia as r,nb as o}from"./chunk-HUTYOGRH.js";var m=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=o({type:n,selectors:[["app-spinner"]],decls:5,vars:0,consts:[[1,"app-spinner-container"],[1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid",2,"margin","auto","display","block"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round",1,"spinner_outer"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round",1,"spinner_inner"]],template:function(e,p){e&1&&(t(0,"div",0)(1,"div",1),r(),t(2,"svg",2),a(3,"circle",3)(4,"circle",4),i()()())},styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media(max-width:767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}@keyframes _ngcontent-%COMP%_spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spinner-rotate-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.spinner_outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate 2.5s linear infinite;transform-origin:50px 50px}.spinner_inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate-reverse 2.5s linear infinite;transform-origin:50px 50px}"]})}return n})();export{m as a};
1
+ import{Jb as t,Kb as i,Lb as a,ia as r,nb as o}from"./chunk-VX4RXOTH.js";var m=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=o({type:n,selectors:[["app-spinner"]],decls:5,vars:0,consts:[[1,"app-spinner-container"],[1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid",2,"margin","auto","display","block"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round",1,"spinner_outer"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round",1,"spinner_inner"]],template:function(e,p){e&1&&(t(0,"div",0)(1,"div",1),r(),t(2,"svg",2),a(3,"circle",3)(4,"circle",4),i()()())},styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media(max-width:767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}@keyframes _ngcontent-%COMP%_spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spinner-rotate-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.spinner_outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate 2.5s linear infinite;transform-origin:50px 50px}.spinner_inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate-reverse 2.5s linear infinite;transform-origin:50px 50px}"]})}return n})();export{m as a};
@@ -1 +1 @@
1
- import{X as o,d as e}from"./chunk-HUTYOGRH.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
1
+ import{X as o,d as e}from"./chunk-VX4RXOTH.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
@@ -0,0 +1 @@
1
+ import{a as ie}from"./chunk-TUN7H57E.js";import{a as re}from"./chunk-5ZKKHQVJ.js";import{a as ne}from"./chunk-TLHI6ZOI.js";import{a as de}from"./chunk-7XZWXKAH.js";import{a as te}from"./chunk-KCTJMMYS.js";import{a as Z,b as ee}from"./chunk-MIE7YXOK.js";import{a as Y}from"./chunk-6TQHJYRY.js";import{a as Q}from"./chunk-CMILM3GM.js";import{n as D}from"./chunk-TJCUOGC4.js";import{a as R,b as W,d as H,e as T,f as X,g as G}from"./chunk-LL6AFVK2.js";import{a as $}from"./chunk-ZGIZ2UDW.js";import{b as z}from"./chunk-H4W6QAC2.js";import"./chunk-GTENKZFZ.js";import{b as B}from"./chunk-ADR4S74F.js";import{C as A,D as J,H as I,o as q}from"./chunk-BHFVACUP.js";import{Ab as S,Dc as d,Ec as l,Fb as g,Gb as i,Hb as a,Ib as p,Nc as K,Rb as k,Xb as u,Za as n,Zb as C,aa as c,ea as O,ga as b,ha as x,hb as j,ic as P,kc as _,lc as h,ma as U,mb as E,n as N,nb as V,sa as w,wc as f,yb as m,zb as y}from"./chunk-VX4RXOTH.js";import{g as se,h as L}from"./chunk-B4AJQJMI.js";var ae=se(de(),1);var F=()=>["/"],pe=()=>({exact:!0}),ce=()=>["/plugins"],me=()=>["/accessories"],ue=()=>["/logs"],_e=()=>["/support"],ge=()=>["/platform-tools/terminal"],ve=()=>["/config"],he=()=>["/settings"],fe=()=>["/power-options"];function be(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),u("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),a(),i(6,"div",14),_(7),d(8,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),h(l(8,6,"rpi.throttled.undervoltage_title")))}function xe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ge))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function Ce(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ve))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function we(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,he))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ye(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,fe))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function Se(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.reloadPage())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function ke(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.logout())})("keydown",function(t){b(e);let o=C();return x(o.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var oe=(()=>{class s{destroyRef=c(U);injector=c(O);$auth=c(z);$authHelper=c(Q);$settings=c(B);$modal=c(D);$notification=c(ne);$renderer=c(j);$router=c(T);$translate=c(A);initialIsExpanded=K(!1);isExpanded=w(!1);formAuth=w(this.$settings.formAuth);isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=w(!1);rPiWasUnderVoltage=w(!1);isMobile=!1;freezeMenu=w(!1);isPwa=ie();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();touchstartListener;clickListener;constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.pipe($()).subscribe(r=>L(this,null,function*(){if(r instanceof R&&this.$settings.formAuth&&r.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",r.url),yield this.$router.navigate(["/login"]);return}r instanceof W&&queueMicrotask(()=>{this.closeSidebar(),this.freezeMenu.set(!0),setTimeout(()=>{this.freezeMenu.set(!1)},750)})}))}ngOnInit(){this.isExpanded.set(this.initialIsExpanded()),this.$notification.raspberryPiThrottled.pipe($(this.destroyRef)).subscribe(o=>{o["Under Voltage"]&&this.rPiCurrentlyUnderVoltage.set(!0),o["Under-voltage has occurred"]&&this.rPiWasUnderVoltage.set(!0)}),this.$notification.formAuthEnabled.pipe($(this.destroyRef)).subscribe(o=>{this.formAuth.set(o)});let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?(this.touchstartListener=o=>{if(t.contains(o.target)&&this.isExpanded()){o.preventDefault(),this.toggleSidebar();return}!e.contains(o.target)&&!r.contains(o.target)&&this.isExpanded()&&(o.preventDefault(),this.closeSidebar())},document.addEventListener("touchstart",this.touchstartListener,{passive:!1})):(this.updateListeners(),r.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),r.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),this.clickListener=o=>{e.contains(o.target)&&o.clientX>60&&this.closeSidebar()},document.addEventListener("click",this.clickListener,{passive:!1}))}toggleSidebar(){this.freezeMenu()||(this.isExpanded.set(!this.isExpanded()),this.updateContentStyles())}openUnderVoltageModal(){let e=E([{provide:ee,useValue:{title:this.$translate.instant("rpi.throttled.undervoltage_title"),message:this.$translate.instant(this.rPiCurrentlyUnderVoltage()?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),ctaButtonLabel:this.$translate.instant("form.button_more_info"),faIconClass:"fas fa-bolt yellow-text",ctaButtonLink:"https://pimylifeup.com/raspberry-pi-low-voltage-warning"}}],this.injector);this.$modal.open(re,{size:"lg",backdrop:"static",injector:e})}handleKeydown(e){if(e.key==="Enter"){let r=e.target;["menuitem","button"].includes(r.getAttribute("role"))&&r.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){this.touchstartListener&&document.removeEventListener("touchstart",this.touchstartListener),this.clickListener&&document.removeEventListener("click",this.clickListener);let e=document.querySelector(".sidebar"),r=document.querySelector(".m-header");e&&(e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener)),r&&(r.removeEventListener("mouseenter",this.sidebarMouseEnterListener),r.removeEventListener("mouseleave",this.sidebarMouseLeaveListener))}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu()||(this.isExpanded.set(!0),this.updateContentStyles())}closeSidebar(){this.freezeMenu()||(this.isExpanded.set(!1),this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded()?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),e.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}))}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-sidebar"]],inputs:{initialIsExpanded:[1,"initialIsExpanded"]},decls:68,vars:73,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon"],["role","navigation","id","sidebar",1,"sidebar"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(r,t){r&1&&(i(0,"div",0),d(1,"translate"),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),_(7,"Homebridge"),a()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),i(13,"div",6)(14,"div",7),u("click",function(){return t.toggleSidebar()})("keydown",function(v){return t.handleKeydown(v)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),_(19,"Homebridge"),a()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(24,"div",12),p(25,"i",13),a(),i(26,"div",14),_(27),d(28,"translate"),a()()(),y(29,be,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(33,"div",12),p(34,"i",16),a(),i(35,"div",14),_(36),d(37,"translate"),a()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(41,"div",12),p(42,"i",17),a(),i(43,"div",14),_(44),d(45,"translate"),a()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(49,"div",12),p(50,"i",18),a(),i(51,"div",14),_(52),d(53,"translate"),a()()(),y(54,xe,8,9,"div",10),y(55,Ce,8,9,"div",10),y(56,we,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),u("keydown",function(v){return t.handleKeydown(v)}),i(60,"div",12),p(61,"i",19),a(),i(62,"div",14),_(63),d(64,"translate"),a()()(),y(65,ye,8,9,"div",10),y(66,Se,8,6,"div",10),y(67,ke,8,6,"div",10),a()()),r&2&&(m("aria-expanded",t.isExpanded()?"true":"false")("aria-controls","sidebar")("aria-label",l(1,39,"menu.sidebar.aria_menu")),n(3),g("routerLink",f(65,F)),m("aria-label",l(4,41,"menu.label_status")),n(5),P("hamburger-icon-cross",t.isExpanded()),n(5),P("expanded",t.isExpanded()),n(2),g("routerLink",f(66,F)),m("aria-label",l(16,43,"menu.label_status")),n(7),g("routerLink",f(67,F))("routerLinkActive","active")("routerLinkActiveOptions",f(68,pe)),m("aria-label",l(23,45,"menu.label_status")),n(5),h(l(28,47,"menu.label_status")),n(2),S(t.rPiWasUnderVoltage()||t.rPiCurrentlyUnderVoltage()?29:-1),n(2),g("routerLink",f(69,ce))("routerLinkActive","active"),m("aria-label",l(32,49,"menu.label_plugins")),n(5),h(l(37,51,"menu.label_plugins")),n(3),g("routerLink",f(70,me))("routerLinkActive","active"),m("aria-label",l(40,53,"menu.label_accessories")),n(5),h(l(45,55,"menu.label_accessories")),n(3),g("routerLink",f(71,ue))("routerLinkActive","active"),m("aria-label",l(48,57,"menu.linux.label_logs")),n(5),h(l(53,59,"menu.linux.label_logs")),n(2),S(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),S(t.isAdmin?55:-1),n(),S(t.isAdmin?56:-1),n(2),g("routerLink",f(72,_e))("routerLinkActive","active"),m("aria-label",l(59,61,"support.title")),n(5),h(l(64,63,"support.title")),n(2),S(t.isAdmin?65:-1),n(),S(t.isPwa?66:-1),n(),S(t.formAuth()?67:-1))},dependencies:[X,q,G,J],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media(min-width:768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media(max-width:767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media(max-width:767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media(max-width:767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media(min-width:768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media(max-width:767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return s})();var tt=(()=>{class s{injector=c(O);$auth=c(z);$modal=c(D);$router=c(T);$settings=c(B);$translate=c(A);$ws=c(Y);io;sidebarExpanded=w(!1);ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return L(this,null,function*(){if(this.$settings.settingsLoaded||(yield N(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,ae.lt)(this.$settings.uiVersion,I.serverTarget)){console.log(`Server restart required. UI Version: ${I.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=E([{provide:Z,useValue:{title:this.$translate.instant("platform.version.service_restart_required"),message:this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:I.serverTarget}),confirmButtonLabel:this.$translate.instant("menu.tooltip_restart"),faIconClass:"fas fa-power-off orange-text"}}],this.injector),r=this.$modal.open(te,{size:"lg",backdrop:"static",injector:e});try{yield r.result,this.$router.navigate(["/restart"])}catch{}}})}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=V({type:s,selectors:[["app-layout"]],decls:3,vars:3,consts:[[3,"initialIsExpanded"],[1,"content","px-3","p-md-4"]],template:function(r,t){r&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),a()),r&2&&(g("initialIsExpanded",t.sidebarExpanded()),n(),P("sidebarExpanded",t.sidebarExpanded()))},dependencies:[oe,H],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media(max-width:767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media(min-width:768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return s})();export{tt as LayoutComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-WPYUSARH.js";import"./chunk-B4AJQJMI.js";export default a();
@@ -1 +1 @@
1
- import{g as c}from"./chunk-2OWZ4XP5.js";import{F as l}from"./chunk-AWTSOXJ2.js";import{Dc as a,Fb as o,Fc as m,Ib as p,Ua as i,nb as r,yc as s}from"./chunk-HUTYOGRH.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[c,l],encapsulation:2})}return e})();export{k as a};
1
+ import{g as c}from"./chunk-TJCUOGC4.js";import{D as l}from"./chunk-BHFVACUP.js";import{Dc as a,Fb as o,Fc as m,Ib as p,Ua as i,nb as r,yc as s}from"./chunk-VX4RXOTH.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[c,l],encapsulation:2})}return e})();export{k as a};
@@ -0,0 +1 @@
1
+ import{a as qe,c as le}from"./chunk-Z5SOQKPW.js";import"./chunk-L4GVG4WS.js";import"./chunk-7XZWXKAH.js";import{a as R}from"./chunk-IB2WEG65.js";import{a as Ue}from"./chunk-OG2B4MZN.js";import{a as Fe}from"./chunk-CLZZPSYM.js";import"./chunk-5T4R2TG7.js";import"./chunk-BMOLDRJ3.js";import{a as ze}from"./chunk-KCTJMMYS.js";import"./chunk-H7F7H5MW.js";import"./chunk-H2Z7V5LU.js";import{a as Re}from"./chunk-PY5Y7RE5.js";import{a as je,c as z,f as Le,j as ae}from"./chunk-MIE7YXOK.js";import"./chunk-GU5F3H4I.js";import"./chunk-WPYUSARH.js";import"./chunk-4UVYLGCZ.js";import"./chunk-BXRCPOIK.js";import"./chunk-U24HWDVU.js";import"./chunk-RI4GLH22.js";import{a as te}from"./chunk-6TQHJYRY.js";import"./chunk-QE7VI3JB.js";import"./chunk-77S5CL3V.js";import"./chunk-6DLZEENG.js";import"./chunk-LZ7S7WKH.js";import"./chunk-LVQWSVHA.js";import"./chunk-Y3PXWRYQ.js";import"./chunk-Y5WP66WK.js";import"./chunk-RP5JPYDI.js";import"./chunk-7WKZ7EMI.js";import"./chunk-BZ3XB6O4.js";import"./chunk-U2NM4L2D.js";import"./chunk-LKJRMUOE.js";import"./chunk-W55SP3LJ.js";import"./chunk-KFPYUDGJ.js";import"./chunk-QES44GQE.js";import"./chunk-JWUEJV6S.js";import"./chunk-R7G2HUC4.js";import"./chunk-ZCGZM7LU.js";import"./chunk-IHRICEJT.js";import{g as De,h as $e,i as Ae,j as Ne,k as He,l as Oe,m as j,n as ne,t as oe}from"./chunk-TJCUOGC4.js";import{b as xe,e as Pe}from"./chunk-LL6AFVK2.js";import{a as de}from"./chunk-ZGIZ2UDW.js";import{b as ie}from"./chunk-H4W6QAC2.js";import{C as Me,D as Ve,c as ye,e as we,f as Se,g as Be,j as Ee,m as ke,r as Te,s as Ie}from"./chunk-GTENKZFZ.js";import{b as ee}from"./chunk-ADR4S74F.js";import{C as q,D as M,F as Y,I as Z,h as ve}from"./chunk-BHFVACUP.js";import{Ab as g,Cb as Q,Db as W,Dc as a,Eb as J,Ec as l,Fb as S,Fc as N,Gb as r,Hb as s,Ib as c,Jb as P,Kb as y,Kc as Ce,Lb as A,Nc as se,Oc as be,Rb as w,Sb as F,Ua as $,Va as H,Wa as ge,Xb as f,Yb as O,Za as o,Zb as m,aa as h,ea as ce,ec as _e,fc as fe,ga as v,ha as x,hc as K,jc as k,kc as p,lc as C,ma as me,mb as U,mc as b,n as pe,nb as I,sa as E,uc as re,va as ue,xc as X,yb as B,yc as V,zb as u,zc as he}from"./chunk-VX4RXOTH.js";import"./chunk-PAZUAFSZ.js";import"./chunk-ETWBSGPI.js";import"./chunk-IBUR2RIO.js";import"./chunk-JUQRWAIR.js";import"./chunk-H4WASUXW.js";import"./chunk-TCUQZ3QO.js";import{h as D}from"./chunk-B4AJQJMI.js";var Ye=t=>({pluginName:t}),Ze=(t,d)=>({setting:t,value:d});function ei(t,d){t&1&&(r(0,"li"),p(1),a(2,"translate"),s(),r(3,"li"),p(4),a(5,"translate"),s()),t&2&&(o(),C(l(2,2,"plugins.manage.confirm_disable_platform_1")),o(3),C(l(5,4,"plugins.manage.confirm_disable_platform_2")))}function ii(t,d){t&1&&(r(0,"li"),p(1),a(2,"translate"),s(),r(3,"li"),p(4),a(5,"translate"),s()),t&2&&(o(),C(l(2,2,"plugins.manage.confirm_disable_accessory_1")),o(3),C(l(5,4,"plugins.manage.confirm_disable_accessory_2")))}function ti(t,d){if(t&1&&(r(0,"ul",15),c(1,"li",16),a(2,"translate"),r(3,"ul",17),u(4,ei,6,6)(5,ii,6,6),s()()),t&2){let e=m(2);o(),S("innerHtml",N(2,2,"plugins.manage.confirm_disable_setting",V(5,Ze,e.keepOrphansName,e.keepOrphansValue)),$),o(3),g(e.keepOrphans?4:5)}}function ni(t,d){t&1&&(r(0,"ul",15)(1,"li"),p(2),a(3,"translate"),s(),r(4,"li"),p(5),a(6,"translate"),s()()),t&2&&(o(2),C(l(3,2,"plugins.manage.confirm_disable_accessory_1")),o(3),C(l(6,4,"plugins.manage.confirm_disable_accessory_2")))}function oi(t,d){if(t&1&&u(0,ti,6,8,"ul",15)(1,ni,7,6,"ul",15),t&2){let e=m();g(e.isConfiguredDynamicPlatform?0:1)}}var Ge=(()=>{class t{$activeModal=h(j);$translate=h(q);modalData=h(ae);pluginName=this.modalData.pluginName;isConfigured=this.modalData.isConfigured??!1;isConfiguredDynamicPlatform=this.modalData.isConfiguredDynamicPlatform??!1;keepOrphans=this.modalData.keepOrphans??!1;keepOrphansName=`<code>${this.$translate.instant("settings.startup.keep_accessories")}</code>`;get keepOrphansValue(){return`<code>${this.keepOrphans}</code>`}dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["ng-component"]],decls:25,vars:21,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,"mb-3","text-center"],[1,"fas","fa-circle-pause","primary-text",2,"font-size","75px"],["type","warning",1,"mb-0",3,"dismissible"],[1,"w-100","text-center","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click"],[1,"mb-3"],[3,"innerHtml"],[1,"mb-1"]],template:function(n,i){n&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),p(3),s(),r(4,"button",3),a(5,"translate"),f("click",function(){return i.dismissModal()}),s()(),r(6,"div",4)(7,"div",5),c(8,"i",6),s(),u(9,oi,2,1),r(10,"ngb-alert",7)(11,"p",8),p(12),a(13,"translate"),s()()(),r(14,"div",9)(15,"div",10)(16,"button",11),a(17,"translate"),f("click",function(){return i.dismissModal()}),p(18),a(19,"translate"),s()(),c(20,"div",12),r(21,"div",13)(22,"button",14),f("click",function(){return i.closeModal()}),p(23),a(24,"translate"),s()()()()),n&2&&(o(3),C(i.pluginName),o(),B("aria-label",l(5,8,"form.button_close")),o(5),g(i.isConfigured?9:-1),o(),S("dismissible",!1),o(2),b(" ",N(13,10,"plugins.manage.confirm_disable",X(19,Ye,i.pluginName))," "),o(4),B("aria-label",l(17,13,"form.button_close")),o(2),b(" ",l(19,15,"form.button_close")," "),o(5),b(" ",l(24,17,"plugins.manage.disable")," "))},dependencies:[De,M],encapsulation:2})}return t})();var ai=t=>({author:t});function li(t,d){if(t&1&&(P(0,"li",9),A(1,"i",15),P(2,"a",16),p(3),y()()),t&2){let e=d.$implicit,n=m();o(),k(n.getIconClass(e.type)),o(),F("href",e.url,H),o(),C(e.url)}}var Qe=(()=>{class t{$activeModal=h(j);modalData=h(z);plugin=this.modalData.plugin;fundingOptions=E([]);authorName=E("");ngOnInit(){this.initialize()}initialize(){if(!this.plugin||!this.plugin.funding){this.$activeModal.close();return}this.authorName.set(this.plugin.name==="homebridge-config-ui-x"?"oznu":this.plugin.author);let e=this.plugin.funding;if(Array.isArray(e)){let n=e.map(i=>{if(typeof i=="string")return{type:"other",url:i};if(typeof i=="object")return{type:i.type||"other",url:i.url}}).filter(Boolean);this.fundingOptions.set(n)}else typeof e=="string"?this.fundingOptions.set([{type:"other",url:e}]):typeof e=="object"&&e!==null&&this.fundingOptions.set([{type:e.type||"other",url:e.url}])}getIconClass(e){switch(e.toLowerCase()){case"paypal":return"fab fa-paypal";case"github":return"fab fa-github";case"patreon":return"fab fa-patreon";case"kofi":case"ko-fi":return"fas fa-coffee";default:return"fas fa-link"}}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["ng-component"]],decls:28,vars:21,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","pink-text","mb-3"],[1,"fas","fa-heart",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"me-2","primary-text","fa-xl"],["target","_blank","rel","noopener noreferrer",1,"text-break-all",3,"href"]],template:function(n,i){n&1&&(P(0,"div",0)(1,"div",1)(2,"h5",2),p(3),a(4,"translate"),y(),P(5,"button",3),a(6,"translate"),O("click",function(){return i.dismissModal()}),y()(),P(7,"div",4)(8,"div",5),A(9,"i",6),y(),P(10,"ul",7)(11,"li"),p(12),a(13,"translate"),y(),P(14,"li"),p(15),a(16,"translate"),y()(),P(17,"ul",8),W(18,li,4,4,"li",9,Q),y()(),P(20,"div",10),A(21,"div",11),P(22,"div",12)(23,"button",13),a(24,"translate"),O("click",function(){return i.dismissModal()}),p(25),a(26,"translate"),y()(),A(27,"div",14),y()()),n&2&&(o(3),C(N(4,6,"plugins.donate.tile_donate_to",X(19,ai,"@"+i.authorName()))),o(2),B("aria-label",l(6,9,"form.button_close")),o(7),C(l(13,11,"plugins.donate.message_1")),o(3),C(l(16,13,"plugins.donate.message_2")),o(3),J(i.fundingOptions()),o(5),B("aria-label",l(24,15,"form.button_close")),o(2),b(" ",l(26,17,"form.button_close")," "))},dependencies:[M],styles:[".text-break-all[_ngcontent-%COMP%]{word-break:break-all}"]})}return t})();var ri=(t,d)=>({"orange-text":t,"grey-text":d}),si=(t,d)=>({"green-text":t,"grey-text":d}),di=(t,d)=>({"purple-text":t,"grey-text":d}),pi=(t,d)=>({scopedLink:t,verifiedLink:d});function ci(t,d){t&1&&(P(0,"h6",18),p(1),a(2,"translate"),y(),P(3,"p",19),p(4),a(5,"translate"),y(),P(6,"p",19),p(7),a(8,"translate"),y()),t&2&&(o(),C(l(2,3,"plugins.manage.scoped_subtitle")),o(3),C(l(5,5,"plugins.manage.scoped_message")),o(3),C(l(8,7,"plugins.manage.verified_message")))}function mi(t,d){t&1&&(P(0,"h6",18),p(1),a(2,"translate"),y(),P(3,"p",19),p(4),a(5,"translate"),y()),t&2&&(o(),C(l(2,2,"plugins.manage.verified_subtitle")),o(3),C(l(5,4,"plugins.manage.verified_message")))}function ui(t,d){t&1&&(P(0,"h6",18),p(1),a(2,"translate"),y(),P(3,"p",19),p(4),a(5,"translate"),y()),t&2&&(o(),C(l(2,2,"plugins.manage.unverified_subtitle")),o(3),C(l(5,4,"plugins.manage.unverified_message")))}function gi(t,d){if(t&1){let e=w();P(0,"button",20),O("click",function(){v(e);let i=m();return x(i.dismissModal())}),p(1),a(2,"translate"),y()}t&2&&(o(),b(" ",l(2,1,"form.button_close")," "))}function _i(t,d){if(t&1){let e=w();P(0,"button",20),O("click",function(){v(e);let i=m();return x(i.dismissModal())}),p(1),a(2,"translate"),y()}t&2&&(o(),b(" ",l(2,1,"form.button_close")," "))}function fi(t,d){if(t&1&&(P(0,"a",17),p(1),a(2,"translate"),A(3,"i",21),y()),t&2){let e=m();F("href",e.plugin.links.homepage||e.plugin.links.npm,H),o(),b(" ",l(2,2,"plugins.button_homepage")," ")}}var We=(()=>{class t{$activeModal=h(j);modalData=h(z);plugin=this.modalData.plugin;iconError=E(!1);pluginIcon=Ce(()=>this.plugin?.icon&&!this.iconError()?this.plugin.icon:this.defaultIcon);defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-external-link-alt primary-text"></i></a>';handleIconError(){this.iconError.set(!0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["ng-component"]],decls:32,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-shield-alt","mb-3",2,"font-size","48px"],[1,"mb-0","grey-text",3,"innerHTML"],[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"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(n,i){n&1&&(P(0,"div",0)(1,"div",1)(2,"h5",2),p(3),a(4,"translate"),y(),P(5,"button",3),a(6,"translate"),O("click",function(){return i.dismissModal()}),y()(),P(7,"div",4)(8,"img",5),O("error",function(){return i.handleIconError()}),y(),P(9,"h4",6),p(10),y(),P(11,"p",7),p(12),y(),P(13,"p",8),p(14),y(),P(15,"p",9),p(16),y(),A(17,"i",10)(18,"i",10)(19,"i",10),u(20,ci,9,9),u(21,mi,6,6),u(22,ui,6,6),A(23,"p",11),a(24,"translate"),y(),P(25,"div",12)(26,"div",13),u(27,gi,3,3,"button",14),y(),P(28,"div",15),u(29,_i,3,3,"button",14),y(),P(30,"div",16),u(31,fi,4,4,"a",17),y()()()),n&2&&(o(3),C(l(4,26,"plugins.manage.information")),o(2),B("aria-label",l(6,28,"form.button_close")),o(3),F("src",i.pluginIcon(),H),o(2),C(i.plugin.displayName),o(2),C(i.plugin.name),o(2),b("@",i.plugin.author),o(2),C(i.plugin.description),o(),k(V(33,ri,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin,i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)),K("opacity",!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?1:.25),o(),k(V(36,si,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),i.plugin.isHbScoped||!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin)),K("opacity",!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?1:.25),o(),k(V(39,di,i.plugin.isHbScoped,!i.plugin.isHbScoped)),K("opacity",i.plugin.isHbScoped?1:.25),o(),g(i.plugin.isHbScoped?20:-1),o(),g(!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?21:-1),o(),g(!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?22:-1),o(),F("innerHTML",N(24,30,"plugins.manage.more_info",V(42,pi,i.linkScoped,i.linkVerified)),$),o(4),g(i.plugin.links.homepage||i.plugin.links.npm?27:-1),o(2),g(!i.plugin.links.homepage&&!i.plugin.links.npm?29:-1),o(2),g(i.plugin.links.homepage||i.plugin.links.npm?31:-1))},dependencies:[M],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return t})();var hi=(t,d,e)=>({"purple-text":t,"green-text":d,"orange-text":e}),Ci=(t,d)=>({"fa-bridge-circle-exclamation orange-text":t,"fa-bridge-circle-xmark red-text":d});function bi(t,d){if(t&1){let e=w();r(0,"a",21),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m(2);return x(i.checkAndUpdatePlugin())}),c(3,"i",22),s()}t&2&&(S("openDelay",150)("ngbTooltip",l(1,3,"plugins.button_update")),B("aria-label",l(2,5,"plugins.button_update")))}function vi(t,d){if(t&1){let e=w();r(0,"a",21),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m(2);return x(i.switchToScoped())}),c(3,"i",23),s()}t&2&&(S("openDelay",150)("ngbTooltip",l(1,3,"plugins.manage.scoped.switch")),B("aria-label",l(2,5,"plugins.manage.scoped.switch")))}function xi(t,d){if(t&1){let e=w();r(0,"a",24),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m(2);return x(i.openSettings())}),c(3,"i",25),s()}t&2&&(S("ngbTooltip",l(1,3,"plugins.button_set_up"))("openDelay",150),B("aria-label",l(2,5,"plugins.button_set_up")))}function Pi(t,d){if(t&1){let e=w();r(0,"a",24),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m(2);return x(i.openBridgeSettings())}),c(3,"i",26),s()}t&2&&(S("ngbTooltip",l(1,3,"child_bridge.setup"))("openDelay",150),B("aria-label",l(2,5,"child_bridge.setup")))}function yi(t,d){if(t&1){let e=w();r(0,"a",24),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m(2);return x(i.openBridgeSettings())}),c(3,"i",27),s()}t&2&&(S("ngbTooltip",l(1,3,"child_bridge.bridge_connect"))("openDelay",150),B("aria-label",l(2,5,"child_bridge.bridge_connect")))}function wi(t,d){if(t&1&&c(0,"i",28),t&2){let e=m(2);k(V(2,Ci,e.childBridgeStatus()==="pending",e.childBridgeStatus()==="down"))}}function Si(t,d){if(t&1&&(r(0,"div",9),u(1,bi,4,7,"a",17),u(2,vi,4,7,"a",17),u(3,xi,4,7,"a",18),u(4,Pi,4,7,"a",18),u(5,yi,4,7,"a",18),c(6,"i",19),u(7,wi,1,5,"i",20),s()),t&2){let e,n=m();o(),g(n.plugin().installedVersion&&n.plugin().updateAvailable&&!n.childBridgeRestartInProgress()?1:-1),o(),g(n.plugin().installedVersion&&((e=n.plugin().newHbScope)==null?null:e.switch)===n.plugin().installedVersion&&!n.childBridgeRestartInProgress()?2:-1),o(),g(n.plugin().installedVersion&&(!n.plugin().newHbScope||n.plugin().newHbScope.switch!==n.plugin().installedVersion)&&!n.plugin().updateAvailable&&!n.plugin().isConfigured&&!n.childBridgeRestartInProgress()&&!n.plugin().disabled?3:-1),o(),g(n.plugin().installedVersion&&(!n.plugin().newHbScope||n.plugin().newHbScope.switch!==n.plugin().installedVersion)&&!n.plugin().updateAvailable&&n.plugin().isConfigured&&!n.plugin().hasChildBridges&&!n.plugin().disabled&&n.plugin().recommendChildBridge&&!n.childBridgeRestartInProgress()?4:-1),o(),g(n.plugin().installedVersion&&(!n.plugin().newHbScope||n.plugin().newHbScope.switch!==n.plugin().installedVersion)&&!n.plugin().updateAvailable&&n.plugin().isConfigured&&n.plugin().hasChildBridges&&!n.childBridgeRestartInProgress()&&n.plugin().hasChildBridgesUnpaired&&n.childBridgeStatus()==="ok"&&!n.plugin().disabled?5:-1),o(),S("hidden",!n.childBridgeRestartInProgress()),o(),g(n.plugin().installedVersion&&(!n.plugin().newHbScope||n.plugin().newHbScope.switch!==n.plugin().installedVersion)&&!n.plugin().updateAvailable&&n.plugin().isConfigured&&n.plugin().hasChildBridges&&!n.childBridgeRestartInProgress()&&!n.plugin().hasChildBridgesUnpaired&&n.childBridgeStatus()!=="ok"&&!n.plugin().disabled?7:-1)}}function Bi(t,d){if(t&1){let e=w();r(0,"a",11),f("click",function(){v(e);let i=m();return x(i.openFundingModal(i.plugin()))}),c(1,"i",29),r(2,"span",13),p(3),s()()}if(t&2){let e=m();o(3),b("@",e.plugin().author)}}function Ei(t,d){if(t&1&&(r(0,"span",13),c(1,"i",30),p(2),s()),t&2){let e=m();o(2),b("@",e.plugin().author," ")}}function ki(t,d){if(t&1&&(r(0,"span"),p(1),a(2,"date"),s()),t&2){let e=m(2);o(),b("(",N(2,1,e.plugin().lastUpdated,"yyyy-MM-dd"),")")}}function Ti(t,d){if(t&1&&(r(0,"span"),c(1,"i",31),r(2,"span",13),p(3),u(4,ki,3,4,"span"),s()()),t&2){let e=m();o(3),b("v",e.plugin().latestVersion," "),o(),g(e.plugin().lastUpdated?4:-1)}}function Ii(t,d){if(t&1&&(c(0,"i",32),p(1)),t&2){let e=m();o(),b("v",e.plugin().installedVersion," ")}}function Mi(t,d){if(t&1){let e=w();r(0,"a",21),a(1,"translate"),f("click",function(){v(e);let i=m(2);return x(i.doChildBridgeAction("restart"))}),c(2,"i",36),s()}if(t&2){let e=m(2);S("openDelay",150)("ngbTooltip",l(1,2,e.setChildBridges().length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function Vi(t,d){if(t&1){let e=w();r(0,"a",37),f("click",function(){v(e);let i=m(2);return x(i.enablePlugin(i.plugin()))}),c(1,"i",38),a(2,"translate"),s()}t&2&&(o(),S("ngbTooltip",l(2,2,"common.labels.disabled"))("openDelay",150))}function Di(t,d){if(t&1){let e=w();r(0,"a",39),f("click",function(){v(e);let i=m(2);return x(i.installAlternateVersion())}),c(1,"i",40),s()}}function $i(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.viewPluginLog())}),c(1,"i",49),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.manage.plugin_logs")," "))}function Ai(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.installAlternateVersion())}),c(1,"i",50),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.manage.manage_version")," "))}function Ni(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.openJsonEditor())}),c(1,"i",51),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.manage.json_config")," "))}function Hi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.disablePlugin(i.plugin()))}),c(1,"i",52),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.manage.disable")," "))}function Oi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.enablePlugin(i.plugin()))}),c(1,"i",53),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.manage.enable")," "))}function ji(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.uninstallPlugin())}),c(1,"i",54),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"plugins.button_uninstall")," "))}function Li(t,d){t&1&&c(0,"div",47)}function zi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(4);return x(i.doChildBridgeAction("restart"))}),c(1,"i",57),p(2),a(3,"translate"),s()}if(t&2){let e=m(4);o(2),b(" ",l(3,1,e.setChildBridges().length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function Ui(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(4);return x(i.doChildBridgeAction("stop"))}),c(1,"i",58),p(2),a(3,"translate"),s()}if(t&2){let e=m(4);o(2),b(" ",l(3,1,e.setChildBridges().length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function Fi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(4);return x(i.doChildBridgeAction("start"))}),c(1,"i",59),p(2),a(3,"translate"),s()}if(t&2){let e=m(4);o(2),b(" ",l(3,1,e.setChildBridges().length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function qi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.openBridgeSettings())}),c(1,"i",55),p(2),a(3,"translate"),s(),u(4,zi,4,3,"button",46),u(5,Ui,4,3,"button",46),u(6,Fi,4,3,"button",46),r(7,"button",44),f("click",function(){v(e);let i=m(3);return x(i.resetChildBridges())}),c(8,"i",56),p(9),a(10,"translate"),s()}if(t&2){let e=m(3);o(2),b(" ",l(3,5,"child_bridge.bridge_settings")," "),o(2),g(e.childBridgeRestartInProgress()?-1:4),o(),g(e.allChildBridgesStopped()?-1:5),o(),g(e.allChildBridgesStopped()?6:-1),o(3),b(" ",l(10,7,"child_bridge.reset_accessories")," ")}}function Ri(t,d){t&1&&c(0,"div",47)}function Gi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.openBridgeSettings())}),c(1,"i",60),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"child_bridge.setup")," "))}function Qi(t,d){t&1&&c(0,"div",47)}function Wi(t,d){if(t&1){let e=w();r(0,"button",44),f("click",function(){v(e);let i=m(3);return x(i.openBridgeSettings())}),c(1,"i",60),p(2),a(3,"translate"),s()}t&2&&(o(2),b(" ",l(3,1,"child_bridge.setup")," "))}function Ji(t,d){t&1&&c(0,"div",47)}function Ki(t,d){if(t&1&&(r(0,"a",48),c(1,"i",61),p(2),a(3,"translate"),s()),t&2){let e=m(3);S("href",e.plugin().links.bugs,H),o(2),b(" ",l(3,2,"support.links.issue")," ")}}function Xi(t,d){if(t&1){let e=w();r(0,"span",35)(1,"a",41),c(2,"i",42),s(),r(3,"div",43)(4,"button",44),f("click",function(){v(e);let i=m(2);return x(i.openSettings())}),c(5,"i",45),p(6),a(7,"translate"),s(),u(8,$i,4,3,"button",46),u(9,Ai,4,3,"button",46),u(10,Ni,4,3,"button",46),u(11,Hi,4,3,"button",46),u(12,Oi,4,3,"button",46),u(13,ji,4,3,"button",46),u(14,Li,1,0,"div",47),u(15,qi,11,9),u(16,Ri,1,0,"div",47),u(17,Gi,4,3,"button",46),u(18,Qi,1,0,"div",47),u(19,Wi,4,3,"button",46),u(20,Ji,1,0,"div",47),u(21,Ki,4,4,"a",48),s()()}if(t&2){let e,n,i=m(2);o(),B("aria-label","Plugin Actions Dropdown"),o(5),b(" ",l(7,16,"plugins.button_settings")," "),o(2),g(i.plugin().isConfigured&&!i.plugin().disabled?8:-1),o(),g(i.plugin().publicPackage?9:-1),o(),g(!i.isMobile()&&i.plugin().name!=="homebridge-config-ui-x"?10:-1),o(),g(i.plugin().name!=="homebridge-config-ui-x"&&!i.plugin().disabled?11:-1),o(),g(i.plugin().name!=="homebridge-config-ui-x"&&i.plugin().disabled?12:-1),o(),g(i.plugin().name!=="homebridge-config-ui-x"?13:-1),o(),g(!i.plugin().disabled&&i.plugin().isConfigured&&i.plugin().hasChildBridges&&i.plugin().installedVersion&&i.plugin().name!=="homebridge-config-ui-x"?14:-1),o(),g(i.plugin().hasChildBridges&&!i.plugin().disabled?15:-1),o(),g(i.plugin().isConfigured&&!i.plugin().hasChildBridges&&!i.plugin().disabled&&!i.plugin().recommendChildBridge?16:-1),o(),g(i.plugin().isConfigured&&!i.plugin().hasChildBridges&&!i.plugin().disabled&&!i.plugin().recommendChildBridge?17:-1),o(),g(i.plugin().isConfigured&&!i.plugin().hasChildBridges&&!i.plugin().disabled&&i.plugin().recommendChildBridge&&i.plugin().updateAvailable?18:-1),o(),g(i.plugin().isConfigured&&!i.plugin().hasChildBridges&&!i.plugin().disabled&&i.plugin().recommendChildBridge&&i.plugin().updateAvailable?19:-1),o(),g((e=i.plugin().links)!=null&&e.bugs?20:-1),o(),g((n=i.plugin().links)!=null&&n.bugs?21:-1)}}function Yi(t,d){if(t&1&&(r(0,"div",9),u(1,Mi,3,4,"a",17),u(2,Vi,3,4,"a",33),u(3,Di,2,0,"a",34),u(4,Xi,22,18,"span",35),s()),t&2){let e=m();o(),g(!e.plugin().disabled&&e.plugin().hasChildBridges&&e.childBridgeStatus()==="ok"?1:-1),o(),g(e.plugin().installedVersion&&e.plugin().disabled?2:-1),o(),g(e.plugin().publicPackage&&!e.plugin().installedVersion?3:-1),o(),g(e.plugin().installedVersion?4:-1)}}var Je=(()=>{class t{injector=h(ce);$api=h(Z);$auth=h(ie);$md=h(Fe);$modal=h(ne);$plugin=h(le);$settings=h(ee);$toastr=h(Y);$translate=h(q);$ws=h(te);plugin=se.required();childBridges=se.required();io;defaultIcon="assets/hb-icon.png";isAdmin=this.$auth.user.admin;hasChildBridges=E(!1);allChildBridgesStopped=E(!1);childBridgeStatus=E("pending");childBridgeRestartInProgress=E(!1);isMobile=E("");setChildBridges=E([]);constructor(){ue(()=>{let e=this.childBridges();this.hasChildBridges.set(e.length>0),this.allChildBridgesStopped.set(e.every(n=>n.manuallyStopped===!0)),this.hasChildBridges()&&(e.some(n=>n.status==="down")?this.childBridgeStatus.set("down"):e.some(n=>n.status==="pending")?this.childBridgeStatus.set("pending"):e.some(n=>n.status==="ok")&&this.childBridgeStatus.set("ok")),this.setChildBridges.set(e)})}ngOnInit(){this.isMobile.set(this.$md.detect.mobile()),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile()&&this.plugin().displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin().displayName=this.plugin().displayName.replace(/^homebridge /i,"")),this.plugin().icon||(this.plugin().icon=this.defaultIcon)}openFundingModal(e){let n=U([{provide:z,useValue:{plugin:e}}],this.injector);this.$modal.open(Qe,{size:"lg",backdrop:"static",injector:n})}pluginInfoModal(e){let n=U([{provide:z,useValue:{plugin:e}}],this.injector);this.$modal.open(We,{size:"lg",backdrop:"static",injector:n})}disablePlugin(e){return D(this,null,function*(){let n=U([{provide:ae,useValue:{pluginName:e.displayName||e.name,isConfigured:e.isConfigured,isConfiguredDynamicPlatform:e.isConfiguredDynamicPlatform,keepOrphans:this.$settings.keepOrphans}}],this.injector),i=this.$modal.open(Ge,{size:"lg",backdrop:"static",injector:n});try{yield i.result;try{yield this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/disable`,{}),e.disabled=!0,this.hasChildBridges()&&this.doChildBridgeAction("stop"),this.$modal.open(R,{size:"lg",backdrop:"static"})}catch(_){console.error(_),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}catch{}})}enablePlugin(e){return D(this,null,function*(){let n=U([{provide:je,useValue:{title:e.name,message:this.$translate.instant("plugins.manage.confirm_enable",{pluginName:e.displayName}),confirmButtonLabel:this.$translate.instant("plugins.manage.enable"),faIconClass:"fa-circle-play primary-text"}}],this.injector),i=this.$modal.open(ze,{size:"lg",backdrop:"static",injector:n});try{yield i.result;try{yield this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/enable`,{}),e.disabled=!1,this.hasChildBridges()&&(yield this.doChildBridgeAction("start")),this.$modal.open(R,{size:"lg",backdrop:"static"})}catch(_){console.error(_),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}catch{}})}viewPluginLog(){let e=U([{provide:Le,useValue:{plugin:this.plugin(),childBridges:this.setChildBridges()}}],this.injector);this.$modal.open(qe,{size:"xl",backdrop:"static",injector:e})}doChildBridgeAction(e){return D(this,null,function*(){this.childBridgeRestartInProgress.set(!0);try{for(let n of this.setChildBridges())yield pe(this.io.request(`${e}-child-bridge`,n.username))}catch(n){console.error(n),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:e}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress.set(!1)}finally{setTimeout(()=>{this.childBridgeRestartInProgress.set(!1)},e==="restart"?12e3:e==="stop"?6e3:1e3)}})}handleIconError(){this.plugin().icon=this.defaultIcon}checkAndUpdatePlugin(){this.$plugin.checkAndUpdatePlugin(this.plugin(),this.plugin().latestVersion)}openSettings(){this.$plugin.settings(this.plugin())}openBridgeSettings(){this.$plugin.bridgeSettings(this.plugin())}switchToScoped(){this.$plugin.switchToScoped(this.plugin())}installAlternateVersion(){this.$plugin.installAlternateVersion(this.plugin())}openJsonEditor(){this.$plugin.jsonEditor(this.plugin())}uninstallPlugin(){this.$plugin.uninstallPlugin(this.plugin(),this.setChildBridges())}resetChildBridges(){this.$plugin.resetChildBridges(this.setChildBridges())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["app-plugin-card"]],inputs:{plugin:[1,"plugin"],childBridges:[1,"childBridges"]},decls:24,vars:15,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-shield-alt","fa-lg","me-1"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"openDelay","ngbTooltip"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"ngbTooltip","openDelay"],[1,"fas","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-lg","ms-3",3,"class"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"click","openDelay","ngbTooltip"],[1,"far","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"click","ngbTooltip","openDelay"],[1,"fas","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-lg","ms-3"],[1,"fas","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-circle-check","fa-lg","me-1"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],[1,"fas","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","triggers","hover",1,"far","fa-pause-circle","fa-lg",3,"ngbTooltip","openDelay"],["href","javascript:void(0)",3,"click"],[1,"far","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-wave-square"],[1,"fas","fa-code-compare"],[1,"fas","fa-code"],[1,"far","fa-circle-pause"],[1,"far","fa-circle-play"],[1,"fas","fa-trash"],[1,"fas","fa-bridge"],[1,"fas","fa-broom"],[1,"icon-button","fas","fa-power-off"],[1,"fas","fa-stop"],[1,"fas","fa-play"],[1,"icon-button","fas","fa-bridge"],[1,"icon-button","fa","fa-question-circle-o"]],template:function(n,i){n&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),f("error",function(){return i.handleIconError()}),s()(),r(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5",8),p(9),s(),u(10,Si,8,7,"div",9),s(),r(11,"p",10)(12,"a",11),f("click",function(){return i.pluginInfoModal(i.plugin())}),c(13,"i",12),r(14,"span",13),p(15),s()()(),r(16,"p",14),u(17,Bi,4,1,"a",15),u(18,Ei,3,1,"span",13),s(),r(19,"div",7)(20,"p",16),u(21,Ti,5,2,"span"),u(22,Ii,2,1),s(),u(23,Yi,5,4,"div",9),s()()()()()()),n&2&&(o(3),S("src",i.plugin().icon,H),o(6),C(i.plugin().displayName),o(),g(i.isAdmin?10:-1),o(3),k(he(11,hi,i.plugin().isHbScoped,!i.plugin().isHbScoped&&(i.plugin().verifiedPlugin||i.plugin().verifiedPlusPlugin),!i.plugin().isHbScoped&&!i.plugin().verifiedPlugin&&!i.plugin().verifiedPlusPlugin)),o(2),C(i.plugin().name),o(2),g((i.plugin().verifiedPlugin||i.plugin().verifiedPlusPlugin)&&i.plugin().funding?17:-1),o(),g((i.plugin().verifiedPlugin||i.plugin().verifiedPlusPlugin)&&i.plugin().funding?-1:18),o(3),g(i.plugin().publicPackage&&!i.plugin().installedVersion?21:-1),o(),g(i.plugin().installedVersion?22:-1),o(),g(i.isAdmin?23:-1))},dependencies:[oe,Oe,He,Ne,Ae,$e,ve,M],encapsulation:2})}return t})();var Ke=(()=>{class t{$activeModal=h(j);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["ng-component"]],decls:28,vars:22,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","plugin-support-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(n,i){n&1&&(r(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),p(4),a(5,"translate"),s(),r(6,"button",3),a(7,"translate"),f("click",function(){return i.dismissModal()}),s()(),r(8,"div",4)(9,"div",5),c(10,"i",6),s(),r(11,"ul",7),c(12,"li",8),a(13,"translate"),c(14,"li",8),a(15,"translate"),c(16,"li",8),a(17,"translate"),c(18,"li",8),a(19,"translate"),s(),c(20,"app-support-banner"),s(),r(21,"div",9),c(22,"div",10),r(23,"div",11)(24,"button",12),f("click",function(){return i.dismissModal()}),p(25),a(26,"translate"),s()(),c(27,"div",13),s()()()),n&2&&(B("aria-labelledby","plugin-support-modal-title"),o(4),C(l(5,8,"support.title")),o(2),B("aria-label",l(7,10,"form.button_close")),o(6),S("innerHTML",l(13,12,"plugins.support.list_1"),$),o(2),S("innerHTML",l(15,14,"plugins.support.list_2"),$),o(2),S("innerHTML",l(17,16,"plugins.support.list_3"),$),o(2),S("innerHTML",l(19,18,"plugins.support.list_4"),$),o(7),b(" ",l(26,20,"form.button_close")," "))},dependencies:[Re,M],encapsulation:2})}return t})();var Zi=["searchInput"],et=(t,d)=>({"fa-magnifying-glass":t,"fa-exclamation-circle":d});function it(t,d){t&1&&c(0,"app-spinner")}function tt(t,d){if(t&1){let e=w();r(0,"button",7),a(1,"translate"),a(2,"translate"),f("click",function(){v(e);let i=m();return x(i.showSearch())}),c(3,"i"),s(),r(4,"button",8),a(5,"translate"),a(6,"translate"),f("click",function(){v(e);let i=m();return x(i.showStats())}),c(7,"i"),s()}if(t&2){let e=m();S("openDelay",150)("ngbTooltip",l(1,13,"form.search"))("hidden",!e.installedPlugins().length&&!e.showSearchBar()),B("aria-label",l(2,15,"form.search")),o(3),k(re("fas",e.showSearchBar()?" primary-text":""," fa-search")),o(),S("openDelay",150)("ngbTooltip",l(5,17,"plugins.stats")),B("aria-label",l(6,19,"plugins.stats")),o(3),k(re("fas",e.tab()==="stats"?" primary-text":""," fa-sliders"))}}function nt(t,d){if(t&1){let e=w();r(0,"button",15),a(1,"translate"),f("click",function(){v(e);let i=m(3);return x(i.onClearSearch())}),c(2,"i",16),s()}t&2&&B("aria-label",l(1,1,"form.button_clear"))}function ot(t,d){if(t&1){let e=w();r(0,"div",9)(1,"div",11)(2,"form",12),f("ngSubmit",function(){v(e);let i=m(2);return x(i.onSubmit(i.form))}),c(3,"input",13,0),a(5,"translate"),u(6,nt,3,3,"button",14),s()()()}if(t&2){let e,n=m(2);o(2),S("formGroup",n.form),o(),S("placeholder",l(5,3,"plugins.placeholder_search_plugin")),o(3),g((e=n.form.get("query"))!=null&&e.value?6:-1)}}function at(t,d){if(t&1&&(r(0,"div",17),c(1,"app-plugin-card",19),s()),t&2){let e=d.$implicit,n=m(3);o(),S("plugin",e)("childBridges",n.getPluginChildBridges(e))}}function lt(t,d){if(t&1&&(r(0,"div",18),c(1,"i",20),r(2,"p"),p(3),a(4,"translate"),s()()),t&2){let e=m(3);o(),k(V(5,et,!e.showExitButton(),e.showExitButton())),o(2),C(l(4,3,e.showExitButton()?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function rt(t,d){if(t&1&&(r(0,"div",10),W(1,at,2,2,"div",17,Q),u(3,lt,5,8,"div",18),s()),t&2){let e=m(2);o(),J(e.installedPlugins()),o(2),g(e.installedPlugins().length===0&&!e.loading()&&!e.mainError()?3:-1)}}function st(t,d){if(t&1&&(u(0,ot,7,5,"div",9),u(1,rt,4,1,"div",10)),t&2){let e=m();g(e.showSearchBar()?0:-1),o(),g(e.loading()?-1:1)}}function dt(t,d){t&1&&(r(0,"div",21)(1,"div",22)(2,"code"),p(3,"https://developers.homebridge.io/analytics "),r(4,"a",23),c(5,"i",24),s()()(),r(6,"div",25),p(7),a(8,"translate"),s()(),c(9,"iframe",26)),t&2&&(o(7),C(l(8,1,"plugins.stats_note")))}var xn=(()=>{class t{destroyRef=h(me);$api=h(Z);$auth=h(ie);$modal=h(ne);$plugin=h(le);$router=h(Pe);$settings=h(ee);$toastr=h(Y);$translate=h(q);$ws=h(te);searchInput=be("searchInput");mainError=E(!1);loading=E(!0);tab=E("main");installedPlugins=E([]);childBridges=E([]);showSearchBar=E(!1);showExitButton=E(!1);isSearchMode=E(!1);io;isAdmin=this.$auth.user.admin;form=new Be({query:new Ee("")});ngOnInit(){let e=this.$translate.instant("menu.label_plugins");this.$settings.setPageTitle(e),this.$plugin.onPluginListRefresh.pipe(de(this.destroyRef)).subscribe(()=>{this.loadInstalledPlugins(),this.getChildBridgeMetadata()}),this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>{this.initialize()}),this.io.socket.connected&&this.initialize(),this.io.socket.on("child-bridge-status-update",n=>{let i=this.childBridges().find(_=>_.username===n.username);i?(Object.assign(i,n),this.childBridges.set([...this.childBridges()])):this.childBridges.update(_=>[..._,n])}),this.$router.events.pipe(de(this.destroyRef)).subscribe(n=>{n instanceof xe&&this.loadInstalledPlugins()})}search(){return D(this,null,function*(){this.installedPlugins.set([]),this.loading.set(!0),this.showExitButton.set(!0);try{let e=yield this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`),n=new Set,i=new Map(e.map(_=>[_.name,_]));this.installedPlugins.set(e.reduce((_,T)=>{if(T.name==="homebridge-config-ui-x"||n.has(T.name))return _;if(T.newHbScope){let L=T.newHbScope.to,Xe=i.has(L);(T.installedVersion||!Xe)&&(n.add(L),_.push(T))}else _.push(T);return _},[])),yield this.appendMetaInfo()}catch(e){this.isSearchMode.set(!1),console.error(e);let n=e instanceof Error?e.message:this.$translate.instant("plugins.toast_failed_to_search_plugins");this.$toastr.error(n,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}finally{this.loading.set(!1)}})}onClearSearch(){this.form.setValue({query:""}),this.showExitButton.set(!1),this.isSearchMode()&&(this.isSearchMode.set(!1),this.loadInstalledPlugins())}onSubmit({value:e}){e.query.length?(this.isSearchMode.set(!0),this.search()):(this.isSearchMode()&&(this.isSearchMode.set(!1),this.loadInstalledPlugins()),this.showSearchBar.set(!1))}showSearch(){if(this.showSearchBar())this.showSearchBar.set(!1),this.isSearchMode()&&(this.isSearchMode.set(!1),this.form.setValue({query:""}),this.loadInstalledPlugins());else{window.document.querySelector("body")?.classList.remove("bg-black"),this.tab.set("main"),this.showSearchBar.set(!0);let e=this.searchInput();e&&setTimeout(()=>e.nativeElement.focus(),0)}}showStats(){this.tab()==="stats"?(window.document.querySelector("body")?.classList.remove("bg-black"),this.tab.set("main")):(window.document.querySelector("body")?.classList.add("bg-black"),this.tab.set("stats"),this.showSearchBar.set(!1))}openSupport(){this.$modal.open(Ke,{size:"lg",backdrop:"static"})}ngOnDestroy(){window.document.querySelector("body")?.classList.remove("bg-black"),this.io.end()}getPluginChildBridges(e){return this.childBridges().filter(n=>n.plugin===e.name)}initialize(){return D(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),yield this.loadInstalledPlugins(),this.installedPlugins().length||this.showSearch();let{action:e,plugin:n}=this.$router.parseUrl(this.$router.url).queryParams;if(e){let i=this.installedPlugins().find(_=>_.name===n);switch(e){case"just-installed":{i&&(i.isConfigured?this.$modal.open(R,{size:"lg",backdrop:"static"}):this.$plugin.settings(i));break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}})}loadInstalledPlugins(){return D(this,null,function*(){this.form.setValue({query:""}),this.showExitButton.set(!1),this.installedPlugins.set([]),this.loading.set(!0),this.mainError.set(!1);try{let e=yield this.$api.get("/plugins");this.installedPlugins.set(e.filter(i=>i.name!=="homebridge-config-ui-x")),yield this.appendMetaInfo();let n=this.installedPlugins().sort((i,_)=>{let T=(i.updateAvailable?1e3:0)+(i.newHbScope?100:0)+(i.disabled?-10:0)+(i.isConfigured?-20:0)+(i.hasChildBridgesUnpaired?5:0)+(i.hasChildBridges&&this.$settings.env.recommendChildBridges?-1:0),L=(_.updateAvailable?1e3:0)+(_.newHbScope?100:0)+(_.disabled?-10:0)+(_.isConfigured?-20:0)+(_.hasChildBridgesUnpaired?5:0)+(_.hasChildBridges&&this.$settings.env.recommendChildBridges?-1:0);return T!==L?L-T:i.name.localeCompare(_.name)});return this.installedPlugins.set(n),n}catch(e){console.error(e);let n=e instanceof Error?e.message:this.$translate.instant("plugins.toast_failed_to_load_plugins");this.$toastr.error(n,this.$translate.instant("toast.title_error")),this.mainError.set(!0)}finally{this.loading.set(!1)}})}appendMetaInfo(){return D(this,null,function*(){this.isAdmin&&(yield Promise.all(this.installedPlugins().filter(e=>e.installedVersion).map(e=>D(this,null,function*(){try{let n=yield this.$api.get(`/config-editor/plugin/${encodeURIComponent(e.name)}`);e.isConfigured=n.length>0,e.isConfiguredDynamicPlatform=e.isConfigured&&Object.prototype.hasOwnProperty.call(n[0],"platform"),e.recommendChildBridge=e.isConfigured&&this.$settings.env.recommendChildBridges&&!["homebridge","homebridge-config-ui-x"].includes(e.name),e.hasChildBridges=e.isConfigured&&n.some(_=>_._bridge&&_._bridge.username);let i=this.getPluginChildBridges(e);e.hasChildBridgesUnpaired=i.some(_=>{let T=_.paired===!1&&!this.isBridgeAlertHidden(_.username,"hap"),L=_.matterConfig&&_.matterCommissioned===!1&&!this.isBridgeAlertHidden(_.username,"matter");return T||L}),this.$settings.env.plugins?.hideUpdatesFor?.includes(e.name)&&(e.updateAvailable=!1)}catch(n){console.error(`Failed to load config for ${e.name}:`,n),e.isConfigured=!0,e.hasChildBridges=!0}}))))})}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(e=>{this.childBridges.set(e)})}isBridgeAlertHidden(e,n){let i=this.$settings.env.bridges?.find(_=>_.username.toUpperCase()===e.toUpperCase());return i?n==="hap"?!!i.hideHapAlert:!!i.hideMatterAlert:!1}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=I({type:t,selectors:[["ng-component"]],viewQuery:function(n,i){n&1&&_e(i.searchInput,Zi,5),n&2&&fe()},decls:13,vars:9,consts:[["searchInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","openDelay","ngbTooltip","hidden"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2","d-none","d-md-inline-block",3,"click","openDelay","ngbTooltip"],[1,"row"],[1,"d-flex","flex-wrap","justify-content-between"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"search-bar",3,"placeholder"],["type","button",1,"search-bar-clear"],["type","button",1,"search-bar-clear",3,"click"],["aria-hidden","true",1,"fas","fa-square-xmark"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","primary-text","my-3",2,"font-size","75px"],[1,"w-100","py-3","hb-stats-header","text-white","text-center"],[1,"mb-2"],["href","https://developers.homebridge.io/analytics","target","_blank"],[1,"fa","fa-external-link"],[1,"small","grey-text"],["src",ge`https://developers.homebridge.io/analytics/`,"sandbox","allow-scripts allow-same-origin allow-popups","referrerpolicy","no-referrer",1,"hb-stats"]],template:function(n,i){n&1&&(u(0,it,1,0,"app-spinner"),r(1,"div",1)(2,"div",2)(3,"h3",3),p(4),a(5,"translate"),s()(),r(6,"div",4),u(7,tt,8,21),r(8,"button",5),a(9,"translate"),f("click",function(){return i.openSupport()}),c(10,"i",6),s()()(),u(11,st,2,2)(12,dt,10,3)),n&2&&(g(i.loading()?0:-1),o(4),C(l(5,5,"menu.label_plugins")),o(3),g(i.isAdmin?7:-1),o(),B("aria-label",l(9,7,"support.title")),o(3),g(i.tab()==="main"?11:i.tab()==="stats"?12:-1))},dependencies:[Ue,Me,ke,ye,we,Se,Ve,Ie,Te,Je,oe,M],styles:["form[_ngcontent-%COMP%]{position:relative}.search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px 45px 10px 10px;margin-bottom:15px}@media(hover:hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:8px;top:25px;height:50px;background:transparent;border:none;font-size:20px;color:#d0d0d0;cursor:pointer;padding:0 8px;display:flex;align-items:center}.search-bar-clear[_ngcontent-%COMP%]:hover{color:#a0a0a0}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width:991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}.hb-stats-header[_ngcontent-%COMP%]{background:#242424;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.hb-stats-header[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{border:1px solid grey;border-radius:5px;padding:5px;font-size:.8rem;color:#d3d3d3}.hb-stats[_ngcontent-%COMP%]{height:calc(100% - 121px);width:100%;overflow:hidden;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}@media(max-width:767px){.hb-stats[_ngcontent-%COMP%]{height:calc(100% - 60px)}}"]})}return t})();export{xn as PluginsComponent};