diff --git a/mythtv/html/apps/backend/main.js b/mythtv/html/apps/backend/main.js index 954223146ea..cb5206e68b7 100644 --- a/mythtv/html/apps/backend/main.js +++ b/mythtv/html/apps/backend/main.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbackend=self.webpackChunkbackend||[]).push([[179],{681:()=>{function Ms(t){return"function"==typeof t}let Qo=!1;const di={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const i=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+i.stack)}else Qo&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Qo=t},get useDeprecatedSynchronousErrorHandling(){return Qo}};function ks(t){setTimeout(()=>{throw t},0)}const Pl={closed:!0,next(t){},error(t){if(di.useDeprecatedSynchronousErrorHandling)throw t;ks(t)},complete(){}},Nr=Array.isArray||(t=>t&&"number"==typeof t.length);function Ld(t){return null!==t&&"object"==typeof t}const Fl=(()=>{function t(i){return Error.call(this),this.message=i?`${i.length} errors occurred during unsubscription:\n${i.map((e,n)=>`${n+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=i,this}return t.prototype=Object.create(Error.prototype),t})();class Et{constructor(i){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,i&&(this._ctorUnsubscribe=!0,this._unsubscribe=i)}unsubscribe(){let i;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:n,_unsubscribe:s,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof Et)e.remove(this);else if(null!==e)for(let o=0;oi.concat(e instanceof Fl?e.errors:e),[])}Et.EMPTY=((t=new Et).closed=!0,t);const Nl="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class yt extends Et{constructor(i,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Pl;break;case 1:if(!i){this.destination=Pl;break}if("object"==typeof i){i instanceof yt?(this.syncErrorThrowable=i.syncErrorThrowable,this.destination=i,i.add(this)):(this.syncErrorThrowable=!0,this.destination=new Mg(this,i));break}default:this.syncErrorThrowable=!0,this.destination=new Mg(this,i,e,n)}}[Nl](){return this}static create(i,e,n){const s=new yt(i,e,n);return s.syncErrorThrowable=!1,s}next(i){this.isStopped||this._next(i)}error(i){this.isStopped||(this.isStopped=!0,this._error(i))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(i){this.destination.next(i)}_error(i){this.destination.error(i),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:i}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=i,this}}class Mg extends yt{constructor(i,e,n,s){super(),this._parentSubscriber=i;let r,o=this;Ms(e)?r=e:e&&(r=e.next,n=e.error,s=e.complete,e!==Pl&&(o=Object.create(e),Ms(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=n,this._complete=s}next(i){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;di.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,i)&&this.unsubscribe():this.__tryOrUnsub(this._next,i)}}error(i){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=di;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,i),this.unsubscribe()):(this.__tryOrUnsub(this._error,i),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=i,e.syncErrorThrown=!0):ks(i),this.unsubscribe();else{if(this.unsubscribe(),n)throw i;ks(i)}}}complete(){if(!this.isStopped){const{_parentSubscriber:i}=this;if(this._complete){const e=()=>this._complete.call(this._context);di.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable?(this.__tryOrSetError(i,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(i,e){try{i.call(this._context,e)}catch(n){if(this.unsubscribe(),di.useDeprecatedSynchronousErrorHandling)throw n;ks(n)}}__tryOrSetError(i,e,n){if(!di.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(s){return di.useDeprecatedSynchronousErrorHandling?(i.syncErrorValue=s,i.syncErrorThrown=!0,!0):(ks(s),!0)}return!1}_unsubscribe(){const{_parentSubscriber:i}=this;this._context=null,this._parentSubscriber=null,i.unsubscribe()}}const Jo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Vl(t){return t}let Je=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,s){const{operator:r}=this,o=function LS(t,i,e){if(t){if(t instanceof yt)return t;if(t[Nl])return t[Nl]()}return t||i||e?new yt(t,i,e):new yt(Pl)}(e,n,s);if(o.add(r?r.call(o,this.source):this.source||di.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),di.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o}_trySubscribe(e){try{return this._subscribe(e)}catch(n){di.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function RS(t){for(;t;){const{closed:i,destination:e,isStopped:n}=t;if(i||n)return!1;t=e&&e instanceof yt?e:null}return!0}(e)?e.error(n):console.warn(n)}}forEach(e,n){return new(n=Ig(n))((s,r)=>{let o;o=this.subscribe(u=>{try{e(u)}catch(h){r(h),o&&o.unsubscribe()}},r,s)})}_subscribe(e){const{source:n}=this;return n&&n.subscribe(e)}[Jo](){return this}pipe(...e){return 0===e.length?this:function kg(t){return 0===t.length?Vl:1===t.length?t[0]:function(e){return t.reduce((n,s)=>s(n),e)}}(e)(this)}toPromise(e){return new(e=Ig(e))((n,s)=>{let r;this.subscribe(o=>r=o,o=>s(o),()=>n(r))})}}return t.create=i=>new t(i),t})();function Ig(t){if(t||(t=di.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const nr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class Eg extends Et{constructor(i,e){super(),this.subject=i,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const i=this.subject,e=i.observers;if(this.subject=null,!e||0===e.length||i.isStopped||i.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class Rg extends yt{constructor(i){super(i),this.destination=i}}let ct=(()=>{class t extends Je{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Nl](){return new Rg(this)}lift(e){const n=new Lg(this,this);return n.operator=e,n}next(e){if(this.closed)throw new nr;if(!this.isStopped){const{observers:n}=this,s=n.length,r=n.slice();for(let o=0;onew Lg(i,e),t})();class Lg extends ct{constructor(i,e){super(),this.destination=i,this.source=e}next(i){const{destination:e}=this;e&&e.next&&e.next(i)}error(i){const{destination:e}=this;e&&e.error&&this.destination.error(i)}complete(){const{destination:i}=this;i&&i.complete&&this.destination.complete()}_subscribe(i){const{source:e}=this;return e?this.source.subscribe(i):Et.EMPTY}}function Vr(t){return t&&"function"==typeof t.schedule}function et(t,i){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new OS(t,i))}}class OS{constructor(i,e){this.project=i,this.thisArg=e}call(i,e){return e.subscribe(new AS(i,this.project,this.thisArg))}}class AS extends yt{constructor(i,e,n){super(i),this.project=e,this.count=0,this.thisArg=n||this}_next(i){let e;try{e=this.project.call(this.thisArg,i,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const Og=t=>i=>{for(let e=0,n=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function Pg(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Od=t=>{if(t&&"function"==typeof t[Jo])return(t=>i=>{const e=t[Jo]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(i)})(t);if(Ag(t))return Og(t);if(Pg(t))return(t=>i=>(t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,ks),i))(t);if(t&&"function"==typeof t[Bl])return(t=>i=>{const e=t[Bl]();for(;;){let n;try{n=e.next()}catch(s){return i.error(s),i}if(n.done){i.complete();break}if(i.next(n.value),i.closed)break}return"function"==typeof e.return&&i.add(()=>{e.return&&e.return()}),i})(t);{const e=`You provided ${Ld(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Ad(t,i){return new Je(e=>{const n=new Et;let s=0;return n.add(i.schedule(function(){s!==t.length?(e.next(t[s++]),e.closed||n.add(this.schedule())):e.complete()})),n})}function Dn(t,i){return i?function zS(t,i){if(null!=t){if(function US(t){return t&&"function"==typeof t[Jo]}(t))return function BS(t,i){return new Je(e=>{const n=new Et;return n.add(i.schedule(()=>{const s=t[Jo]();n.add(s.subscribe({next(r){n.add(i.schedule(()=>e.next(r)))},error(r){n.add(i.schedule(()=>e.error(r)))},complete(){n.add(i.schedule(()=>e.complete()))}}))})),n})}(t,i);if(Pg(t))return function HS(t,i){return new Je(e=>{const n=new Et;return n.add(i.schedule(()=>t.then(s=>{n.add(i.schedule(()=>{e.next(s),n.add(i.schedule(()=>e.complete()))}))},s=>{n.add(i.schedule(()=>e.error(s)))}))),n})}(t,i);if(Ag(t))return Ad(t,i);if(function GS(t){return t&&"function"==typeof t[Bl]}(t)||"string"==typeof t)return function qS(t,i){if(!t)throw new Error("Iterable cannot be null");return new Je(e=>{const n=new Et;let s;return n.add(()=>{s&&"function"==typeof s.return&&s.return()}),n.add(i.schedule(()=>{s=t[Bl](),n.add(i.schedule(function(){if(e.closed)return;let r,o;try{const u=s.next();r=u.value,o=u.done}catch(u){return void e.error(u)}o?e.complete():(e.next(r),this.schedule())}))})),n})}(t,i)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,i):t instanceof Je?t:new Je(Od(t))}class Yo extends yt{constructor(i){super(),this.parent=i}_next(i){this.parent.notifyNext(i)}_error(i){this.parent.notifyError(i),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Zo extends yt{notifyNext(i){this.destination.next(i)}notifyError(i){this.destination.error(i)}notifyComplete(){this.destination.complete()}}function Xo(t,i){if(i.closed)return;if(t instanceof Je)return t.subscribe(i);let e;try{e=Od(t)(i)}catch(n){i.error(n)}return e}function bn(t,i,e=Number.POSITIVE_INFINITY){return"function"==typeof i?n=>n.pipe(bn((s,r)=>Dn(t(s,r)).pipe(et((o,u)=>i(s,o,r,u))),e)):("number"==typeof i&&(e=i),n=>n.lift(new jS(t,e)))}class jS{constructor(i,e=Number.POSITIVE_INFINITY){this.project=i,this.concurrent=e}call(i,e){return e.subscribe(new $S(i,this.project,this.concurrent))}}class $S extends Zo{constructor(i,e,n=Number.POSITIVE_INFINITY){super(i),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(i){this.active0?this._next(i.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function ea(t=Number.POSITIVE_INFINITY){return bn(Vl,t)}function Pd(t,i){return i?Ad(t,i):new Je(Og(t))}function Fd(){return function(i){return i.lift(new KS(i))}}class KS{constructor(i){this.connectable=i}call(i,e){const{connectable:n}=this;n._refCount++;const s=new QS(i,n),r=e.subscribe(s);return s.closed||(s.connection=n.connect()),r}}class QS extends yt{constructor(i,e){super(i),this.connectable=e}_unsubscribe(){const{connectable:i}=this;if(!i)return void(this.connection=null);this.connectable=null;const e=i._refCount;if(e<=0)return void(this.connection=null);if(i._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,s=i._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()}}class Fg extends Je{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){const i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let i=this._connection;return i||(this._isComplete=!1,i=this._connection=new Et,i.add(this.source.subscribe(new YS(this.getSubject(),this))),i.closed&&(this._connection=null,i=Et.EMPTY)),i}refCount(){return Fd()(this)}}const JS=(()=>{const t=Fg.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class YS extends Rg{constructor(i,e){super(i),this.connectable=e}_error(i){this._unsubscribe(),super._error(i)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const i=this.connectable;if(i){this.connectable=null;const e=i._connection;i._refCount=0,i._subject=null,i._connection=null,e&&e.unsubscribe()}}}class ex{constructor(i,e){this.subjectFactory=i,this.selector=e}call(i,e){const{selector:n}=this,s=this.subjectFactory(),r=n(s).subscribe(i);return r.add(e.subscribe(s)),r}}function tx(){return new ct}function wt(t){for(let i in t)if(t[i]===wt)return i;throw Error("Could not find renamed property on target object.")}function Nd(t,i){for(const e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function mt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(mt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const i=t.toString();if(null==i)return""+i;const e=i.indexOf("\n");return-1===e?i:i.substring(0,e)}function Vd(t,i){return null==t||""===t?null===i?"":i:null==i||""===i?t:t+" "+i}const ix=wt({__forward_ref__:wt});function Ue(t){return t.__forward_ref__=Ue,t.toString=function(){return mt(this())},t}function Fe(t){return Ng(t)?t():t}function Ng(t){return"function"==typeof t&&t.hasOwnProperty(ix)&&t.__forward_ref__===Ue}class re extends Error{constructor(i,e){super(function Bd(t,i){return`NG0${Math.abs(t)}${i?": "+i:""}`}(i,e)),this.code=i}}function ke(t){return"string"==typeof t?t:null==t?"":String(t)}function vn(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ke(t)}function Hl(t,i){const e=i?` in ${i}`:"";throw new re(-201,`No provider for ${vn(t)} found${e}`)}function Qn(t,i){null==t&&function ft(t,i,e,n){throw new Error(`ASSERTION ERROR: ${t}`+(null==n?"":` [Expected=> ${e} ${n} ${i} <=Actual]`))}(i,t,null,"!=")}function X(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function pe(t){return{providers:t.providers||[],imports:t.imports||[]}}function Hd(t){return Vg(t,ql)||Vg(t,Hg)}function Vg(t,i){return t.hasOwnProperty(i)?t[i]:null}function Bg(t){return t&&(t.hasOwnProperty(qd)||t.hasOwnProperty(ux))?t[qd]:null}const ql=wt({\u0275prov:wt}),qd=wt({\u0275inj:wt}),Hg=wt({ngInjectableDef:wt}),ux=wt({ngInjectorDef:wt});var xe=(()=>((xe=xe||{})[xe.Default=0]="Default",xe[xe.Host=1]="Host",xe[xe.Self=2]="Self",xe[xe.SkipSelf=4]="SkipSelf",xe[xe.Optional=8]="Optional",xe))();let Ud;function Is(t){const i=Ud;return Ud=t,i}function qg(t,i,e){const n=Hd(t);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&xe.Optional?null:void 0!==i?i:void Hl(mt(t),"Injector")}function Es(t){return{toString:t}.toString()}var Mi=(()=>((Mi=Mi||{})[Mi.OnPush=0]="OnPush",Mi[Mi.Default=1]="Default",Mi))(),ki=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(ki||(ki={})),ki))();const px="undefined"!=typeof globalThis&&globalThis,hx="undefined"!=typeof window&&window,mx="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,bt=px||"undefined"!=typeof global&&global||hx||mx,Br={},Tt=[],Ul=wt({\u0275cmp:wt}),Gd=wt({\u0275dir:wt}),zd=wt({\u0275pipe:wt}),Ug=wt({\u0275mod:wt}),us=wt({\u0275fac:wt}),ta=wt({__NG_ELEMENT_ID__:wt});let fx=0;function G(t){return Es(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Mi.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Tt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ki.Emulated,id:"c",styles:t.styles||Tt,_:null,setInput:null,schemas:t.schemas||null,tView:null},s=t.directives,r=t.features,o=t.pipes;return n.id+=fx++,n.inputs=$g(t.inputs,e),n.outputs=$g(t.outputs),r&&r.forEach(u=>u(n)),n.directiveDefs=s?()=>("function"==typeof s?s():s).map(Gg):null,n.pipeDefs=o?()=>("function"==typeof o?o():o).map(zg):null,n})}function $i(t,i,e){const n=t.\u0275cmp;n.directiveDefs=()=>i.map(Gg),n.pipeDefs=()=>e.map(zg)}function Gg(t){return Cn(t)||function Rs(t){return t[Gd]||null}(t)}function zg(t){return function ir(t){return t[zd]||null}(t)}const jg={};function he(t){return Es(()=>{const i={type:t.type,bootstrap:t.bootstrap||Tt,declarations:t.declarations||Tt,imports:t.imports||Tt,exports:t.exports||Tt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(jg[t.id]=t.type),i})}function $g(t,i){if(null==t)return Br;const e={};for(const n in t)if(t.hasOwnProperty(n)){let s=t[n],r=s;Array.isArray(s)&&(r=s[1],s=s[0]),e[s]=n,i&&(i[s]=r)}return e}const le=G;function An(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Cn(t){return t[Ul]||null}function pi(t,i){const e=t[Ug]||null;if(!e&&!0===i)throw new Error(`Type ${mt(t)} does not have '\u0275mod' property.`);return e}function Wi(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ei(t){return Array.isArray(t)&&!0===t[1]}function Wd(t){return 0!=(8&t.flags)}function $l(t){return 2==(2&t.flags)}function Wl(t){return 1==(1&t.flags)}function Ri(t){return null!==t.template}function Cx(t){return 0!=(512&t[2])}function ar(t,i){return t.hasOwnProperty(us)?t[us]:null}class Tx{constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function mn(){return Kg}function Kg(t){return t.type.prototype.ngOnChanges&&(t.setInput=xx),Sx}function Sx(){const t=Jg(this),i=null==t?void 0:t.current;if(i){const e=t.previous;if(e===Br)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function xx(t,i,e,n){const s=Jg(t)||function Dx(t,i){return t[Qg]=i}(t,{previous:Br,current:null}),r=s.current||(s.current={}),o=s.previous,u=this.declaredInputs[e],h=o[u];r[u]=new Tx(h&&h.currentValue,i,o===Br),t[n]=i}mn.ngInherit=!0;const Qg="__ngSimpleChanges__";function Jg(t){return t[Qg]||null}let Zd;function Xd(){return void 0!==Zd?Zd:"undefined"!=typeof document?document:void 0}function Wt(t){return!!t.listen}const Yg={createRenderer:(t,i)=>Xd()};function Yt(t){for(;Array.isArray(t);)t=t[0];return t}function Kl(t,i){return Yt(i[t])}function Yn(t,i){return Yt(i[t.index])}function ep(t,i){return t.data[i]}function zr(t,i){return t[i]}function Zn(t,i){const e=i[t];return Wi(e)?e:e[0]}function Zg(t){return 4==(4&t[2])}function tp(t){return 128==(128&t[2])}function Ls(t,i){return null==i?null:t[i]}function Xg(t){t[18]=0}function np(t,i){t[5]+=i;let e=t,n=t[3];for(;null!==n&&(1===i&&1===e[5]||-1===i&&0===e[5]);)n[5]+=i,e=n,n=n[3]}const Ie={lFrame:l_(null),bindingsEnabled:!0};function t_(){return Ie.bindingsEnabled}function W(){return Ie.lFrame.lView}function tt(){return Ie.lFrame.tView}function v(t){return Ie.lFrame.contextLView=t,t[8]}function on(){let t=n_();for(;null!==t&&64===t.type;)t=t.parent;return t}function n_(){return Ie.lFrame.currentTNode}function Ki(t,i){const e=Ie.lFrame;e.currentTNode=t,e.isParent=i}function ip(){return Ie.lFrame.isParent}function sp(){Ie.lFrame.isParent=!1}function Fn(){const t=Ie.lFrame;let i=t.bindingRootIndex;return-1===i&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function ds(){return Ie.lFrame.bindingIndex}function jr(){return Ie.lFrame.bindingIndex++}function ps(t){const i=Ie.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function Gx(t,i){const e=Ie.lFrame;e.bindingIndex=e.bindingRootIndex=t,rp(i)}function rp(t){Ie.lFrame.currentDirectiveIndex=t}function r_(){return Ie.lFrame.currentQueryIndex}function ap(t){Ie.lFrame.currentQueryIndex=t}function jx(t){const i=t[1];return 2===i.type?i.declTNode:1===i.type?t[6]:null}function o_(t,i,e){if(e&xe.SkipSelf){let s=i,r=t;for(;!(s=s.parent,null!==s||e&xe.Host||(s=jx(r),null===s||(r=r[15],10&s.type))););if(null===s)return!1;i=s,t=r}const n=Ie.lFrame=a_();return n.currentTNode=i,n.lView=t,!0}function Jl(t){const i=a_(),e=t[1];Ie.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function a_(){const t=Ie.lFrame,i=null===t?null:t.child;return null===i?l_(t):i}function l_(t){const i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=i),i}function c_(){const t=Ie.lFrame;return Ie.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const u_=c_;function Yl(){const t=c_();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Nn(){return Ie.lFrame.selectedIndex}function Os(t){Ie.lFrame.selectedIndex=t}function Bt(){const t=Ie.lFrame;return ep(t.tView,t.selectedIndex)}function Zl(t,i){for(let e=i.directiveStart,n=i.directiveEnd;e=n)break}else i[h]<0&&(t[18]+=65536),(u>11>16&&(3&t[2])===i){t[2]+=2048;try{r.call(u)}finally{}}}else try{r.call(u)}finally{}}class oa{constructor(i,e,n){this.factory=i,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function tc(t,i,e){const n=Wt(t);let s=0;for(;si){o=r-1;break}}}for(;r>16}(t),n=i;for(;e>0;)n=n[15],e--;return n}let dp=!0;function ic(t){const i=dp;return dp=t,i}let rD=0;function la(t,i){const e=hp(t,i);if(-1!==e)return e;const n=i[1];n.firstCreatePass&&(t.injectorIndex=i.length,pp(n.data,t),pp(i,null),pp(n.blueprint,null));const s=sc(t,i),r=t.injectorIndex;if(f_(s)){const o=$r(s),u=Wr(s,i),h=u[1].data;for(let b=0;b<8;b++)i[r+b]=u[o+b]|h[o+b]}return i[r+8]=s,r}function pp(t,i){t.push(0,0,0,0,0,0,0,0,i)}function hp(t,i){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===i[t.injectorIndex+8]?-1:t.injectorIndex}function sc(t,i){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,n=null,s=i;for(;null!==s;){const r=s[1],o=r.type;if(n=2===o?r.declTNode:1===o?s[6]:null,null===n)return-1;if(e++,s=s[15],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return-1}function rc(t,i,e){!function oD(t,i,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(ta)&&(n=e[ta]),null==n&&(n=e[ta]=rD++);const s=255&n;i.data[t+(s>>5)]|=1<=0?255&i:lD:i}(e);if("function"==typeof r){if(!o_(i,t,n))return n&xe.Host?b_(s,e,n):v_(i,e,n,s);try{const o=r(n);if(null!=o||n&xe.Optional)return o;Hl(e)}finally{u_()}}else if("number"==typeof r){let o=null,u=hp(t,i),h=-1,b=n&xe.Host?i[16][6]:null;for((-1===u||n&xe.SkipSelf)&&(h=-1===u?sc(t,i):i[u+8],-1!==h&&T_(n,!1)?(o=i[1],u=$r(h),i=Wr(h,i)):u=-1);-1!==u;){const y=i[1];if(w_(r,u,y.data)){const w=cD(u,i,e,o,n,b);if(w!==y_)return w}h=i[u+8],-1!==h&&T_(n,i[1].data[u+8]===b)&&w_(r,u,i)?(o=y,u=$r(h),i=Wr(h,i)):u=-1}}}return v_(i,e,n,s)}const y_={};function lD(){return new Kr(on(),W())}function cD(t,i,e,n,s,r){const o=i[1],u=o.data[t+8],y=oc(u,o,e,null==n?$l(u)&&dp:n!=o&&0!=(3&u.type),s&xe.Host&&r===u);return null!==y?ca(i,o,y,u):y_}function oc(t,i,e,n,s){const r=t.providerIndexes,o=i.data,u=1048575&r,h=t.directiveStart,y=r>>20,M=s?u+y:t.directiveEnd;for(let E=n?u:u+y;E=h&&R.type===e)return E}if(s){const E=o[h];if(E&&Ri(E)&&E.type===e)return h}return null}function ca(t,i,e,n){let s=t[e];const r=i.data;if(function eD(t){return t instanceof oa}(s)){const o=s;o.resolving&&function sx(t,i){const e=i?`. Dependency path: ${i.join(" > ")} > ${t}`:"";throw new re(-200,`Circular dependency in DI detected for ${t}${e}`)}(vn(r[e]));const u=ic(o.canSeeViewProviders);o.resolving=!0;const h=o.injectImpl?Is(o.injectImpl):null;o_(t,n,xe.Default);try{s=t[e]=o.factory(void 0,r,t,n),i.firstCreatePass&&e>=n.directiveStart&&function Zx(t,i,e){const{ngOnChanges:n,ngOnInit:s,ngDoCheck:r}=i.type.prototype;if(n){const o=Kg(i);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o)}s&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,s),r&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,r),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,r))}(e,r[e],i)}finally{null!==h&&Is(h),ic(u),o.resolving=!1,u_()}}return s}function w_(t,i,e){return!!(e[i+(t>>5)]&1<{const i=t.prototype.constructor,e=i[us]||mp(i),n=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==n;){const r=s[us]||mp(s);if(r&&r!==e)return r;s=Object.getPrototypeOf(s)}return r=>new r})}function mp(t){return Ng(t)?()=>{const i=mp(Fe(t));return i&&i()}:ar(t)}function ua(t){return function aD(t,i){if("class"===i)return t.classes;if("style"===i)return t.styles;const e=t.attrs;if(e){const n=e.length;let s=0;for(;s{const n=function fp(t){return function(...e){if(t){const n=t(...e);for(const s in n)this[s]=n[s]}}}(i);function s(...r){if(this instanceof s)return n.apply(this,r),this;const o=new s(...r);return u.annotation=o,u;function u(h,b,y){const w=h.hasOwnProperty(Jr)?h[Jr]:Object.defineProperty(h,Jr,{value:[]})[Jr];for(;w.length<=y;)w.push(null);return(w[y]=w[y]||[]).push(o),h}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}class be{constructor(i,e){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=X({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const pD=new be("AnalyzeForEntryComponents");function fi(t,i){void 0===i&&(i=t);for(let e=0;eArray.isArray(e)?Qi(e,i):i(e))}function x_(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function ac(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function ha(t,i){const e=[];for(let n=0;n=0?t[1|n]=e:(n=~n,function fD(t,i,e,n){let s=t.length;if(s==i)t.push(e,n);else if(1===s)t.push(n,t[0]),t[0]=e;else{for(s--,t.push(t[s-1],t[s]);s>i;)t[s]=t[s-2],s--;t[i]=e,t[i+1]=n}}(t,n,i,e)),n}function _p(t,i){const e=Xr(t,i);if(e>=0)return t[1|e]}function Xr(t,i){return function k_(t,i,e){let n=0,s=t.length>>e;for(;s!==n;){const r=n+(s-n>>1),o=t[r<i?s=r:n=r+1}return~(s<({token:t})),-1),Ps=ga(Zr("Optional"),8),_a=ga(Zr("SkipSelf"),4);var ei=(()=>((ei=ei||{})[ei.Important=1]="Important",ei[ei.DashCase=2]="DashCase",ei))();const H_="__ngContext__";function kn(t,i){t[H_]=i}function Tp(t){const i=function va(t){return t[H_]||null}(t);return i?Array.isArray(i)?i:i.lView:null}function xp(t,i){return undefined(t,i)}function Ca(t){const i=t[3];return Ei(i)?i[3]:i}function Dp(t){return W_(t[13])}function Mp(t){return W_(t[4])}function W_(t){for(;null!==t&&!Ei(t);)t=t[4];return t}function to(t,i,e,n,s){if(null!=n){let r,o=!1;Ei(n)?r=n:Wi(n)&&(o=!0,n=n[0]);const u=Yt(n);0===t&&null!==e?null==s?X_(i,e,u):lr(i,e,u,s||null,!0):1===t&&null!==e?lr(i,e,u,s||null,!0):2===t?function Ap(t,i,e){const n=pc(t,i);n&&function iM(t,i,e,n){Wt(t)?t.removeChild(i,e,n):i.removeChild(e)}(t,n,i,e)}(i,u,o):3===t&&i.destroyNode(u),null!=r&&function oM(t,i,e,n,s){const r=e[7];r!==Yt(e)&&to(i,t,n,r,s);for(let u=10;u0&&(t[e-1][4]=n[4]);const r=ac(t,10+i);!function QD(t,i){ya(t,i,i[11],2,null,null),i[0]=null,i[6]=null}(n[1],n);const o=r[19];null!==o&&o.detachView(r[1]),n[3]=null,n[4]=null,n[2]&=-129}return n}function J_(t,i){if(!(256&i[2])){const e=i[11];Wt(e)&&e.destroyNode&&ya(t,i,e,3,null,null),function ZD(t){let i=t[13];if(!i)return Rp(t[1],t);for(;i;){let e=null;if(Wi(i))e=i[13];else{const n=i[10];n&&(e=n)}if(!e){for(;i&&!i[4]&&i!==t;)Wi(i)&&Rp(i[1],i),i=i[3];null===i&&(i=t),Wi(i)&&Rp(i[1],i),e=i&&i[4]}i=e}}(i)}}function Rp(t,i){if(!(256&i[2])){i[2]&=-129,i[2]|=256,function nM(t,i){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let n=0;n=0?n[s=b]():n[s=-b].unsubscribe(),r+=2}else{const o=n[s=e[r+1]];e[r].call(o)}if(null!==n){for(let r=s+1;rt,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return fc}())||void 0===i?void 0:i.createHTML(t))||t}function lb(t){var i;return(null===(i=function Vp(){if(void 0===gc&&(gc=null,bt.trustedTypes))try{gc=bt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return gc}())||void 0===i?void 0:i.createHTML(t))||t}class db{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function Fs(t){return t instanceof db?t.changingThisBreaksApplicationSecurity:t}function wa(t,i){const e=function gM(t){return t instanceof db&&t.getTypeName()||null}(t);if(null!=e&&e!==i){if("ResourceURL"===e&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===i}class _M{constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{const e=(new window.DOMParser).parseFromString(cr(i),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(i):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class bM{constructor(i){if(this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const n=this.inertDocument.createElement("body");e.appendChild(n)}}getInertBodyElement(i){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=cr(i),e;const n=this.inertDocument.createElement("body");return n.innerHTML=cr(i),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(i){const e=i.attributes;for(let s=e.length-1;0_c(i.trim())).join(", ")}function Ji(t){const i={};for(const e of t.split(","))i[e]=!0;return i}function Ta(...t){const i={};for(const e of t)for(const n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}const mb=Ji("area,br,col,hr,img,wbr"),fb=Ji("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),gb=Ji("rp,rt"),Bp=Ta(mb,Ta(fb,Ji("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ta(gb,Ji("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ta(gb,fb)),Hp=Ji("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qp=Ji("srcset"),_b=Ta(Hp,qp,Ji("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ji("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),wM=Ji("script,style,template");class TM{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(i){let e=i.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let s=this.checkClobberedElement(e,e.nextSibling);if(s){e=s;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(i){const e=i.nodeName.toLowerCase();if(!Bp.hasOwnProperty(e))return this.sanitizedSomething=!0,!wM.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=i.attributes;for(let s=0;s"),!0}endElement(i){const e=i.nodeName.toLowerCase();Bp.hasOwnProperty(e)&&!mb.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(bb(i))}checkClobberedElement(i,e){if(e&&(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`);return e}}const SM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xM=/([^\#-~ |!])/g;function bb(t){return t.replace(/&/g,"&").replace(SM,function(i){return"&#"+(1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320)+65536)+";"}).replace(xM,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}let bc;function Up(t){return"content"in t&&function MM(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Zt=(()=>((Zt=Zt||{})[Zt.NONE=0]="NONE",Zt[Zt.HTML=1]="HTML",Zt[Zt.STYLE=2]="STYLE",Zt[Zt.SCRIPT=3]="SCRIPT",Zt[Zt.URL=4]="URL",Zt[Zt.RESOURCE_URL=5]="RESOURCE_URL",Zt))();function Ht(t){const i=Sa();return i?lb(i.sanitize(Zt.HTML,t)||""):wa(t,"HTML")?lb(Fs(t)):function DM(t,i){let e=null;try{bc=bc||function pb(t){const i=new bM(t);return function vM(){try{return!!(new window.DOMParser).parseFromString(cr(""),"text/html")}catch(t){return!1}}()?new _M(i):i}(t);let n=i?String(i):"";e=bc.getInertBodyElement(n);let s=5,r=n;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,n=r,r=e.innerHTML,e=bc.getInertBodyElement(n)}while(n!==r);return cr((new TM).sanitizeChildren(Up(e)||e))}finally{if(e){const n=Up(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}(Xd(),ke(t))}function Xt(t){const i=Sa();return i?i.sanitize(Zt.URL,t)||"":wa(t,"URL")?Fs(t):_c(ke(t))}function Sa(){const t=W();return t&&t[12]}function zp(t){return t.ngOriginalError}function NM(t,...i){t.error(...i)}class xa{constructor(){this._console=console}handleError(i){const e=this._findOriginalError(i),n=function FM(t){return t&&t.ngErrorLogger||NM}(i);n(this._console,"ERROR",i),e&&n(this._console,"ORIGINAL ERROR",e)}_findOriginalError(i){let e=i&&zp(i);for(;e&&zp(e);)e=zp(e);return e||null}}const zM=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(bt))();function ti(t){return t.ownerDocument.defaultView}function Yi(t){return t instanceof Function?t():t}function yb(t,i,e){let n=t.length;for(;;){const s=t.indexOf(i,e);if(-1===s)return s;if(0===s||t.charCodeAt(s-1)<=32){const r=i.length;if(s+r===n||t.charCodeAt(s+r)<=32)return s}e=s+1}}const wb="ng-template";function WM(t,i,e){let n=0;for(;nr?"":s[w+1].toLowerCase();const E=8&n?M:null;if(E&&-1!==yb(E,b,0)||2&n&&b!==M){if(Li(n))return!1;o=!0}}}}else{if(!o&&!Li(n)&&!Li(h))return!1;if(o&&Li(h))continue;o=!1,n=h|1&n}}return Li(n)||o}function Li(t){return 0==(1&t)}function JM(t,i,e,n){if(null===i)return-1;let s=0;if(n||!e){let r=!1;for(;s-1)for(e++;e0?'="'+u+'"':"")+"]"}else 8&n?s+="."+o:4&n&&(s+=" "+o);else""!==s&&!Li(o)&&(i+=xb(r,s),s=""),n=o,r=r||!Li(n);e++}return""!==s&&(i+=xb(r,s)),i}const Ee={};function a(t){Db(tt(),W(),Nn()+t,!1)}function Db(t,i,e,n){if(!n)if(3==(3&i[2])){const r=t.preOrderCheckHooks;null!==r&&Xl(i,r,e)}else{const r=t.preOrderHooks;null!==r&&ec(i,r,0,e)}Os(e)}function vc(t,i){return t<<17|i<<2}function Oi(t){return t>>17&32767}function jp(t){return 2|t}function hs(t){return(131068&t)>>2}function $p(t,i){return-131069&t|i<<2}function Wp(t){return 1|t}function Nb(t,i){const e=t.contentQueries;if(null!==e)for(let n=0;n20&&Db(t,i,20,!1),e(n,s)}finally{Os(r)}}function Bb(t,i,e){if(Wd(i)){const s=i.directiveEnd;for(let r=i.directiveStart;r0;){const e=t[--i];if("number"==typeof e&&e<0)return e}return 0})(u)!=h&&u.push(h),u.push(n,s,o)}}function Wb(t,i){null!==t.hostBindings&&t.hostBindings(1,i)}function Kb(t,i){i.flags|=2,(t.components||(t.components=[])).push(i.index)}function Ek(t,i,e){if(e){if(i.exportAs)for(let n=0;n0&&ah(e)}}function ah(t){for(let n=Dp(t);null!==n;n=Mp(n))for(let s=10;s0&&ah(r)}const e=t[1].components;if(null!==e)for(let n=0;n0&&ah(s)}}function Nk(t,i){const e=Zn(i,t),n=e[1];(function Vk(t,i){for(let e=i.length;ePromise.resolve(null))();function Xb(t){return t[7]||(t[7]=[])}function ev(t){return t.cleanup||(t.cleanup=[])}function nv(t,i){const e=t[9],n=e?e.get(xa,null):null;n&&n.handleError(i)}function iv(t,i,e,n,s){for(let r=0;rthis.processProvider(u,i,e)),Qi([i],u=>this.processInjectorType(u,[],r)),this.records.set(ph,oo(void 0,this));const o=this.records.get(hh);this.scope=null!=o?o.value:null,this.source=s||("object"==typeof i?null:mt(i))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(i=>i.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(i,e=ma,n=xe.Default){this.assertNotDestroyed();const s=R_(this),r=Is(void 0);try{if(!(n&xe.SkipSelf)){let u=this.records.get(i);if(void 0===u){const h=function Zk(t){return"function"==typeof t||"object"==typeof t&&t instanceof be}(i)&&Hd(i);u=h&&this.injectableDefInScope(h)?oo(fh(i),ka):null,this.records.set(i,u)}if(null!=u)return this.hydrate(i,u)}return(n&xe.Self?rv():this.parent).get(i,e=n&xe.Optional&&e===ma?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[cc]=o[cc]||[]).unshift(mt(i)),s)throw o;return function MD(t,i,e,n){const s=t[cc];throw i[E_]&&s.unshift(i[E_]),t.message=function kD(t,i,e,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=mt(i);if(Array.isArray(i))s=i.map(mt).join(" -> ");else if("object"==typeof i){let r=[];for(let o in i)if(i.hasOwnProperty(o)){let u=i[o];r.push(o+":"+("string"==typeof u?JSON.stringify(u):mt(u)))}s=`{${r.join(", ")}}`}return`${e}${n?"("+n+")":""}[${s}]: ${t.replace(wD,"\n ")}`}("\n"+t.message,s,e,n),t.ngTokenPath=s,t[cc]=null,t}(o,i,"R3InjectorError",this.source)}throw o}finally{Is(r),R_(s)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(i=>this.get(i))}toString(){const i=[];return this.records.forEach((n,s)=>i.push(mt(s))),`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new re(205,!1)}processInjectorType(i,e,n){if(!(i=Fe(i)))return!1;let s=Bg(i);const r=null==s&&i.ngModule||void 0,o=void 0===r?i:r,u=-1!==n.indexOf(o);if(void 0!==r&&(s=Bg(r)),null==s)return!1;if(null!=s.imports&&!u){let y;n.push(o);try{Qi(s.imports,w=>{this.processInjectorType(w,e,n)&&(void 0===y&&(y=[]),y.push(w))})}finally{}if(void 0!==y)for(let w=0;wthis.processProvider(R,M,E||Tt))}}this.injectorDefTypes.add(o);const h=ar(o)||(()=>new o);this.records.set(o,oo(h,ka));const b=s.providers;if(null!=b&&!u){const y=i;Qi(b,w=>this.processProvider(w,y,b))}return void 0!==r&&void 0!==i.providers}processProvider(i,e,n){let s=ao(i=Fe(i))?i:Fe(i&&i.provide);const r=function $k(t,i,e){return cv(t)?oo(void 0,t.useValue):oo(lv(t),ka)}(i);if(ao(i)||!0!==i.multi)this.records.get(s);else{let o=this.records.get(s);o||(o=oo(void 0,ka,!0),o.factory=()=>Cp(o.multi),this.records.set(s,o)),s=i,o.multi.push(i)}this.records.set(s,r)}hydrate(i,e){return e.value===ka&&(e.value=Gk,e.value=e.factory()),"object"==typeof e.value&&e.value&&function Yk(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this.onDestroy.add(e.value),e.value}injectableDefInScope(i){if(!i.providedIn)return!1;const e=Fe(i.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function fh(t){const i=Hd(t),e=null!==i?i.factory:ar(t);if(null!==e)return e;if(t instanceof be)throw new re(204,!1);if(t instanceof Function)return function jk(t){const i=t.length;if(i>0)throw ha(i,"?"),new re(204,!1);const e=function lx(t){const i=t&&(t[ql]||t[Hg]);if(i){const e=function cx(t){if(t.hasOwnProperty("name"))return t.name;const i=(""+t).match(/^function\s*([^\s(]+)/);return null===i?"":i[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),i}return null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new re(204,!1)}function lv(t,i,e){let n;if(ao(t)){const s=Fe(t);return ar(s)||fh(s)}if(cv(t))n=()=>Fe(t.useValue);else if(function Kk(t){return!(!t||!t.useFactory)}(t))n=()=>t.useFactory(...Cp(t.deps||[]));else if(function Wk(t){return!(!t||!t.useExisting)}(t))n=()=>K(Fe(t.useExisting));else{const s=Fe(t&&(t.useClass||t.provide));if(!function Jk(t){return!!t.deps}(t))return ar(s)||fh(s);n=()=>new s(...Cp(t.deps))}return n}function oo(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function cv(t){return null!==t&&"object"==typeof t&&SD in t}function ao(t){return"function"==typeof t}let In=(()=>{class t{static create(e,n){var s;if(Array.isArray(e))return ov({name:""},n,e,"");{const r=null!==(s=e.name)&&void 0!==s?s:"";return ov({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=ma,t.NULL=new sv,t.\u0275prov=X({token:t,providedIn:"any",factory:()=>K(ph)}),t.__NG_ELEMENT_ID__=-1,t})();function oI(t,i){Zl(Tp(t)[1],on())}function ut(t){let i=function yv(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),e=!0;const n=[t];for(;i;){let s;if(Ri(t))s=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new re(903,"");s=i.\u0275dir}if(s){if(e){n.push(s);const o=t;o.inputs=bh(t.inputs),o.declaredInputs=bh(t.declaredInputs),o.outputs=bh(t.outputs);const u=s.hostBindings;u&&uI(t,u);const h=s.viewQuery,b=s.contentQueries;if(h&&lI(t,h),b&&cI(t,b),Nd(t.inputs,s.inputs),Nd(t.declaredInputs,s.declaredInputs),Nd(t.outputs,s.outputs),Ri(s)&&s.data.animation){const y=t.data;y.animation=(y.animation||[]).concat(s.data.animation)}}const r=s.features;if(r)for(let o=0;o=0;n--){const s=t[n];s.hostVars=i+=s.hostVars,s.hostAttrs=nc(s.hostAttrs,e=nc(e,s.hostAttrs))}}(n)}function bh(t){return t===Br?{}:t===Tt?[]:t}function lI(t,i){const e=t.viewQuery;t.viewQuery=e?(n,s)=>{i(n,s),e(n,s)}:i}function cI(t,i){const e=t.contentQueries;t.contentQueries=e?(n,s,r)=>{i(n,s,r),e(n,s,r)}:i}function uI(t,i){const e=t.hostBindings;t.hostBindings=e?(n,s)=>{i(n,s),e(n,s)}:i}let xc=null;function lo(){if(!xc){const t=bt.Symbol;if(t&&t.iterator)xc=t.iterator;else{const i=Object.getOwnPropertyNames(Map.prototype);for(let e=0;eu(Yt(se[n.index])):n.index;if(Wt(e)){let se=null;if(!u&&h&&(se=function HI(t,i,e,n){const s=t.cleanup;if(null!=s)for(let r=0;rh?u[h]:null}"string"==typeof o&&(r+=2)}return null}(t,i,s,n.index)),null!==se)(se.__ngLastListenerFn__||se).__ngNextListenerFn__=r,se.__ngLastListenerFn__=r,E=!1;else{r=Mh(n,i,w,r,!1);const Me=e.listen(U,s,r);M.push(r,Me),y&&y.push(s,J,P,P+1)}}else r=Mh(n,i,w,r,!0),U.addEventListener(s,r,o),M.push(r),y&&y.push(s,J,P,o)}else r=Mh(n,i,w,r,!1);const R=n.outputs;let O;if(E&&null!==R&&(O=R[s])){const N=O.length;if(N)for(let U=0;U0;)i=i[15],t--;return i}(t,Ie.lFrame.contextLView))[8]}(t)}function qI(t,i){let e=null;const n=function YM(t){const i=t.attrs;if(null!=i){const e=i.indexOf(5);if(0==(1&e))return i[e+1]}return null}(t);for(let s=0;s=0}const cn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Xv(t){return t.substring(cn.key,cn.keyEnd)}function jI(t){return t.substring(cn.value,cn.valueEnd)}function e1(t,i){const e=cn.textEnd;return e===i?-1:(i=cn.keyEnd=function KI(t,i,e){for(;i32;)i++;return i}(t,cn.key=i,e),Co(t,i,e))}function t1(t,i){const e=cn.textEnd;let n=cn.key=Co(t,i,e);return e===n?-1:(n=cn.keyEnd=function QI(t,i,e){let n;for(;i=65&&(-33&n)<=90||n>=48&&n<=57);)i++;return i}(t,n,e),n=s1(t,n,e),n=cn.value=Co(t,n,e),n=cn.valueEnd=function JI(t,i,e){let n=-1,s=-1,r=-1,o=i,u=o;for(;o32&&(u=o),r=s,s=n,n=-33&h}return u}(t,n,e),s1(t,n,e))}function n1(t){cn.key=0,cn.keyEnd=0,cn.value=0,cn.valueEnd=0,cn.textEnd=t.length}function Co(t,i,e){for(;i=0;e=t1(i,e))l1(t,Xv(i),jI(i))}function me(t){Fi(Xn,es,t,!0)}function es(t,i){for(let e=function $I(t){return n1(t),e1(t,Co(t,0,cn.textEnd))}(i);e>=0;e=e1(i,e))Xn(t,Xv(i),!0)}function Pi(t,i,e,n){const s=W(),r=tt(),o=ps(2);r.firstUpdatePass&&a1(r,t,o,n),i!==Ee&&En(s,o,i)&&c1(r,r.data[Nn()],s,s[11],t,s[o+1]=function r3(t,i){return null==t||("string"==typeof i?t+=i:"object"==typeof t&&(t=mt(Fs(t)))),t}(i,e),n,o)}function Fi(t,i,e,n){const s=tt(),r=ps(2);s.firstUpdatePass&&a1(s,null,r,n);const o=W();if(e!==Ee&&En(o,r,e)){const u=s.data[Nn()];if(d1(u,n)&&!o1(s,r)){let h=n?u.classesWithoutHost:u.stylesWithoutHost;null!==h&&(e=Vd(h,e||"")),xh(s,u,o,e,n)}else!function s3(t,i,e,n,s,r,o,u){s===Ee&&(s=Tt);let h=0,b=0,y=0=t.expandoStartIndex}function a1(t,i,e,n){const s=t.data;if(null===s[e+1]){const r=s[Nn()],o=o1(t,e);d1(r,n)&&null===i&&!o&&(i=!1),i=function ZI(t,i,e,n){const s=function op(t){const i=Ie.lFrame.currentDirectiveIndex;return-1===i?null:t[i]}(t);let r=n?i.residualClasses:i.residualStyles;if(null===s)0===(n?i.classBindings:i.styleBindings)&&(e=Oa(e=kh(null,t,i,e,n),i.attrs,n),r=null);else{const o=i.directiveStylingLast;if(-1===o||t[o]!==s)if(e=kh(s,t,i,e,n),null===r){let h=function XI(t,i,e){const n=e?i.classBindings:i.styleBindings;if(0!==hs(n))return t[Oi(n)]}(t,i,n);void 0!==h&&Array.isArray(h)&&(h=kh(null,t,i,h[1],n),h=Oa(h,i.attrs,n),function e3(t,i,e,n){t[Oi(e?i.classBindings:i.styleBindings)]=n}(t,i,n,h))}else r=function t3(t,i,e){let n;const s=i.directiveEnd;for(let r=1+i.directiveStylingLast;r0)&&(b=!0)}else y=e;if(s)if(0!==h){const M=Oi(t[u+1]);t[n+1]=vc(M,u),0!==M&&(t[M+1]=$p(t[M+1],n)),t[u+1]=function sk(t,i){return 131071&t|i<<17}(t[u+1],n)}else t[n+1]=vc(u,0),0!==u&&(t[u+1]=$p(t[u+1],n)),u=n;else t[n+1]=vc(h,0),0===u?u=n:t[h+1]=$p(t[h+1],n),h=n;b&&(t[n+1]=jp(t[n+1])),Zv(t,y,n,!0),Zv(t,y,n,!1),function GI(t,i,e,n,s){const r=s?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof i&&Xr(r,i)>=0&&(e[n+1]=Wp(e[n+1]))}(i,y,t,n,r),o=vc(u,h),r?i.classBindings=o:i.styleBindings=o}(s,r,i,e,o,n)}}function kh(t,i,e,n,s){let r=null;const o=e.directiveEnd;let u=e.directiveStylingLast;for(-1===u?u=e.directiveStart:u++;u0;){const h=t[s],b=Array.isArray(h),y=b?h[1]:h,w=null===y;let M=e[s+1];M===Ee&&(M=w?Tt:void 0);let E=w?_p(M,n):y===n?M:void 0;if(b&&!kc(E)&&(E=_p(h,n)),kc(E)&&(u=E,o))return u;const R=t[s+1];s=o?Oi(R):hs(R)}if(null!==i){let h=r?i.residualClasses:i.residualStyles;null!=h&&(u=_p(h,n))}return u}function kc(t){return void 0!==t}function d1(t,i){return 0!=(t.flags&(i?16:32))}function g(t,i=""){const e=W(),n=tt(),s=t+20,r=n.firstCreatePass?io(n,s,1,i,null):n.data[s],o=e[s]=function kp(t,i){return Wt(t)?t.createText(i):t.createTextNode(i)}(e[11],i);hc(n,e,o,r),Ki(r,!1)}function S(t){return T("",t,""),S}function T(t,i,e){const n=W(),s=uo(n,t,i,e);return s!==Ee&&ms(n,Nn(),s),T}function $e(t,i,e,n,s){const r=W(),o=po(r,t,i,e,n,s);return o!==Ee&&ms(r,Nn(),o),$e}function yo(t,i,e,n,s,r,o){const u=W(),h=function ho(t,i,e,n,s,r,o,u){const b=Dc(t,ds(),e,s,o);return ps(3),b?i+ke(e)+n+ke(s)+r+ke(o)+u:Ee}(u,t,i,e,n,s,r,o);return h!==Ee&&ms(u,Nn(),h),yo}function Ic(t,i,e,n,s,r,o,u,h){const b=W(),y=function mo(t,i,e,n,s,r,o,u,h,b){const w=gi(t,ds(),e,s,o,h);return ps(4),w?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b:Ee}(b,t,i,e,n,s,r,o,u,h);return y!==Ee&&ms(b,Nn(),y),Ic}function Ih(t,i,e,n,s,r,o,u,h,b,y){const w=W(),M=function fo(t,i,e,n,s,r,o,u,h,b,y,w){const M=ds();let E=gi(t,M,e,s,o,h);return E=En(t,M+4,y)||E,ps(5),E?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b+ke(y)+w:Ee}(w,t,i,e,n,s,r,o,u,h,b,y);return M!==Ee&&ms(w,Nn(),M),Ih}function Eh(t,i,e,n,s,r,o,u,h,b,y,w,M){const E=W(),R=function go(t,i,e,n,s,r,o,u,h,b,y,w,M,E){const R=ds();let O=gi(t,R,e,s,o,h);return O=ur(t,R+4,y,M)||O,ps(6),O?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b+ke(y)+w+ke(M)+E:Ee}(E,t,i,e,n,s,r,o,u,h,b,y,w,M);return R!==Ee&&ms(E,Nn(),R),Eh}const dr=void 0;var x3=["en",[["a","p"],["AM","PM"],dr],[["AM","PM"],dr,dr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],dr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],dr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",dr,"{1} 'at' {0}",dr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function S3(t){const e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let wo={};function qn(t){const i=function D3(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=M1(i);if(e)return e;const n=i.split("-")[0];if(e=M1(n),e)return e;if("en"===n)return x3;throw new Error(`Missing locale data for the locale "${t}".`)}function M1(t){return t in wo||(wo[t]=bt.ng&&bt.ng.common&&bt.ng.common.locales&&bt.ng.common.locales[t]),wo[t]}var te=(()=>((te=te||{})[te.LocaleId=0]="LocaleId",te[te.DayPeriodsFormat=1]="DayPeriodsFormat",te[te.DayPeriodsStandalone=2]="DayPeriodsStandalone",te[te.DaysFormat=3]="DaysFormat",te[te.DaysStandalone=4]="DaysStandalone",te[te.MonthsFormat=5]="MonthsFormat",te[te.MonthsStandalone=6]="MonthsStandalone",te[te.Eras=7]="Eras",te[te.FirstDayOfWeek=8]="FirstDayOfWeek",te[te.WeekendRange=9]="WeekendRange",te[te.DateFormat=10]="DateFormat",te[te.TimeFormat=11]="TimeFormat",te[te.DateTimeFormat=12]="DateTimeFormat",te[te.NumberSymbols=13]="NumberSymbols",te[te.NumberFormats=14]="NumberFormats",te[te.CurrencyCode=15]="CurrencyCode",te[te.CurrencySymbol=16]="CurrencySymbol",te[te.CurrencyName=17]="CurrencyName",te[te.Currencies=18]="Currencies",te[te.Directionality=19]="Directionality",te[te.PluralCase=20]="PluralCase",te[te.ExtraData=21]="ExtraData",te))();const Ec="en-US";let k1=Ec;function Oh(t,i,e,n,s){if(t=Fe(t),Array.isArray(t))for(let r=0;r>20;if(ao(t)||!t.multi){const E=new oa(h,s,x),R=Ph(u,i,s?y:y+M,w);-1===R?(rc(la(b,o),r,u),Ah(r,t,i.length),i.push(u),b.directiveStart++,b.directiveEnd++,s&&(b.providerIndexes+=1048576),e.push(E),o.push(E)):(e[R]=E,o[R]=E)}else{const E=Ph(u,i,y+M,w),R=Ph(u,i,y,y+M),O=E>=0&&e[E],N=R>=0&&e[R];if(s&&!N||!s&&!O){rc(la(b,o),r,u);const U=function SE(t,i,e,n,s){const r=new oa(t,e,x);return r.multi=[],r.index=i,r.componentProviders=0,Z1(r,s,n&&!e),r}(s?TE:wE,e.length,s,n,h);!s&&N&&(e[R].providerFactory=U),Ah(r,t,i.length,0),i.push(u),b.directiveStart++,b.directiveEnd++,s&&(b.providerIndexes+=1048576),e.push(U),o.push(U)}else Ah(r,t,E>-1?E:R,Z1(e[s?R:E],h,!s&&n));!s&&n&&N&&e[R].componentProviders++}}}function Ah(t,i,e,n){const s=ao(i),r=function Qk(t){return!!t.useClass}(i);if(s||r){const h=(r?Fe(i.useClass):i).prototype.ngOnDestroy;if(h){const b=t.destroyHooks||(t.destroyHooks=[]);if(!s&&i.multi){const y=b.indexOf(e);-1===y?b.push(e,[n,h]):b[y+1].push(n,h)}else b.push(e,h)}}}function Z1(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function Ph(t,i,e,n){for(let s=e;s{e.providersResolver=(n,s)=>function yE(t,i,e){const n=tt();if(n.firstCreatePass){const s=Ri(t);Oh(e,n.data,n.blueprint,s,!0),Oh(i,n.data,n.blueprint,s,!1)}}(n,s?s(t):t,i)}}class X1{}class ME{resolveComponentFactory(i){throw function DE(t){const i=Error(`No component factory found for ${mt(t)}. Did you add it to @NgModule.entryComponents?`);return i.ngComponent=t,i}(i)}}let Va=(()=>{class t{}return t.NULL=new ME,t})();function kE(){return So(on(),W())}function So(t,i){return new Re(Yn(t,i))}let Re=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=kE,t})();function IE(t){return t instanceof Re?t.nativeElement:t}class Ba{}let wn=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function RE(){const t=W(),e=Zn(on().index,t);return function EE(t){return t[11]}(Wi(e)?e:t)}(),t})(),LE=(()=>{class t{}return t.\u0275prov=X({token:t,providedIn:"root",factory:()=>null}),t})();class Ha{constructor(i){this.full=i,this.major=i.split(".")[0],this.minor=i.split(".")[1],this.patch=i.split(".").slice(2).join(".")}}const OE=new Ha("13.3.12"),Nh={};function Pc(t,i,e,n,s=!1){for(;null!==e;){const r=i[e.index];if(null!==r&&n.push(Yt(r)),Ei(r))for(let u=10;u-1&&(Ep(i,n),ac(e,n))}this._attachedToViewContainer=!1}J_(this._lView[1],this._lView)}onDestroy(i){Gb(this._lView[1],this._lView,null,i)}markForCheck(){lh(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){!function uh(t,i,e){const n=i[10];n.begin&&n.begin();try{ro(t,i,t.template,e)}catch(s){throw nv(i,s),s}finally{n.end&&n.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new re(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YD(t,i){ya(t,i,i[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new re(902,"");this._appRef=i}}class AE extends qa{constructor(i){super(i),this._view=i}detectChanges(){Zb(this._view)}checkNoChanges(){}get context(){return null}}class tC extends Va{constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){const e=Cn(i);return new Vh(e,this.ngModule)}}function nC(t){const i=[];for(let e in t)t.hasOwnProperty(e)&&i.push({propName:t[e],templateName:e});return i}class Vh extends X1{constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=function nk(t){return t.map(tk).join(",")}(i.selectors),this.ngContentSelectors=i.ngContentSelectors?i.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return nC(this.componentDef.inputs)}get outputs(){return nC(this.componentDef.outputs)}create(i,e,n,s){const r=(s=s||this.ngModule)?function FE(t,i){return{get:(e,n,s)=>{const r=t.get(e,Nh,s);return r!==Nh||n===Nh?r:i.get(e,n,s)}}}(i,s.injector):i,o=r.get(Ba,Yg),u=r.get(LE,null),h=o.createRenderer(null,this.componentDef),b=this.componentDef.selectors[0][0]||"div",y=n?function Ub(t,i,e){if(Wt(t))return t.selectRootElement(i,e===ki.ShadowDom);let n="string"==typeof i?t.querySelector(i):i;return n.textContent="",n}(h,n,this.componentDef.encapsulation):Ip(o.createRenderer(null,this.componentDef),b,function PE(t){const i=t.toLowerCase();return"svg"===i?"svg":"math"===i?"math":null}(b)),w=this.componentDef.onPush?576:528,M=function Cv(t,i){return{components:[],scheduler:t||zM,clean:Hk,playerHandler:i||null,flags:0}}(),E=wc(0,null,null,1,0,null,null,null,null,null),R=Da(null,E,M,w,null,null,o,h,u,r);let O,N;Jl(R);try{const U=function bv(t,i,e,n,s,r){const o=e[1];e[20]=t;const h=io(o,20,2,"#host",null),b=h.mergedAttrs=i.hostAttrs;null!==b&&(Sc(h,b,!0),null!==t&&(tc(s,t,b),null!==h.classes&&Fp(s,t,h.classes),null!==h.styles&&ab(s,t,h.styles)));const y=n.createRenderer(t,i),w=Da(e,Hb(i),null,i.onPush?64:16,e[20],h,n,y,r||null,null);return o.firstCreatePass&&(rc(la(h,e),o,i.type),Kb(o,h),Qb(h,e.length,1)),Tc(e,w),e[20]=w}(y,this.componentDef,R,o,h);if(y)if(n)tc(h,y,["ng-version",OE.full]);else{const{attrs:P,classes:J}=function ik(t){const i=[],e=[];let n=1,s=2;for(;n0&&Fp(h,y,J.join(" "))}if(N=ep(E,20),void 0!==e){const P=N.projection=[];for(let J=0;Jh(o,i)),i.contentQueries){const h=on();i.contentQueries(1,o,h.directiveStart)}const u=on();return!r.firstCreatePass||null===i.hostBindings&&null===i.hostAttrs||(Os(u.index),$b(e[1],u,0,u.directiveStart,u.directiveEnd,i),Wb(i,o)),o}(U,this.componentDef,R,M,[oI]),Ma(E,R,null)}finally{Yl()}return new VE(this.componentType,O,So(N,R),R,N)}}class VE extends class xE{}{constructor(i,e,n,s,r){super(),this.location=n,this._rootLView=s,this._tNode=r,this.instance=e,this.hostView=this.changeDetectorRef=new AE(s),this.componentType=i}get injector(){return new Kr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}}class fs{}class iC{}const xo=new Map;class oC extends fs{constructor(i,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new tC(this);const n=pi(i);this._bootstrapComponents=Yi(n.bootstrap),this._r3Injector=av(i,e,[{provide:fs,useValue:this},{provide:Va,useValue:this.componentFactoryResolver}],mt(i)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(i)}get(i,e=In.THROW_IF_NOT_FOUND,n=xe.Default){return i===In||i===fs||i===ph?this:this._r3Injector.get(i,e,n)}destroy(){const i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class Bh extends iC{constructor(i){super(),this.moduleType=i,null!==pi(i)&&function HE(t){const i=new Set;!function e(n){const s=pi(n,!0),r=s.id;null!==r&&(function sC(t,i,e){if(i&&i!==e)throw new Error(`Duplicate module registered for ${t} - ${mt(i)} vs ${mt(i.name)}`)}(r,xo.get(r),n),xo.set(r,n));const o=Yi(s.imports);for(const u of o)i.has(u)||(i.add(u),e(u))}(t)}(i)}create(i){return new oC(this.moduleType,i)}}function A(t,i,e){const n=Fn()+t,s=W();return s[n]===Ee?Xi(s,n,e?i.call(e):i()):Ea(s,n)}function z(t,i,e,n){return lC(W(),Fn(),t,i,e,n)}function We(t,i,e,n,s){return cC(W(),Fn(),t,i,e,n,s)}function Rt(t,i,e,n,s,r){return uC(W(),Fn(),t,i,e,n,s,r)}function _i(t,i,e,n,s,r,o){return function dC(t,i,e,n,s,r,o,u,h){const b=i+e;return gi(t,b,s,r,o,u)?Xi(t,b+4,h?n.call(h,s,r,o,u):n(s,r,o,u)):Ua(t,b+4)}(W(),Fn(),t,i,e,n,s,r,o)}function pr(t,i,e,n,s,r,o,u){const h=Fn()+t,b=W(),y=gi(b,h,e,n,s,r);return En(b,h+4,o)||y?Xi(b,h+5,u?i.call(u,e,n,s,r,o):i(e,n,s,r,o)):Ea(b,h+5)}function Do(t,i,e,n,s,r,o,u,h){const b=Fn()+t,y=W(),w=gi(y,b,e,n,s,r);return ur(y,b+4,o,u)||w?Xi(y,b+6,h?i.call(h,e,n,s,r,o,u):i(e,n,s,r,o,u)):Ea(y,b+6)}function Hh(t,i,e,n){return function pC(t,i,e,n,s,r){let o=i+e,u=!1;for(let h=0;h=0;e--){const n=i[e];if(t===n.name)return n}}(i,e.pipeRegistry),e.data[s]=n,n.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(s,n.onDestroy)):n=e.data[s];const r=n.factory||(n.factory=ar(n.type)),o=Is(x);try{const u=ic(!1),h=r();return ic(u),function bI(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}(e,W(),s,h),h}finally{Is(o)}}function f(t,i,e){const n=t+20,s=W(),r=zr(s,n);return Ga(s,n)?lC(s,Fn(),i,r.transform,e,r):r.transform(e)}function Dt(t,i,e,n){const s=t+20,r=W(),o=zr(r,s);return Ga(r,s)?cC(r,Fn(),i,o.transform,e,n,o):o.transform(e,n)}function Ga(t,i){return t[1].data[i].pure}function qh(t){return i=>{setTimeout(t,void 0,i)}}const H=class jE extends ct{constructor(i=!1){super(),this.__isAsync=i}emit(i){super.next(i)}subscribe(i,e,n){var s,r,o;let u=i,h=e||(()=>null),b=n;if(i&&"object"==typeof i){const w=i;u=null===(s=w.next)||void 0===s?void 0:s.bind(w),h=null===(r=w.error)||void 0===r?void 0:r.bind(w),b=null===(o=w.complete)||void 0===o?void 0:o.bind(w)}this.__isAsync&&(h=qh(h),u&&(u=qh(u)),b&&(b=qh(b)));const y=super.subscribe({next:u,error:h,complete:b});return i instanceof Et&&i.add(y),y}};function $E(){return this._results[lo()]()}class Uh{constructor(i=!1){this._emitDistinctChangesOnly=i,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=lo(),n=Uh.prototype;n[e]||(n[e]=$E)}get changes(){return this._changes||(this._changes=new H)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){const n=this;n.dirty=!1;const s=fi(i);(this._changesDetected=!function hD(t,i,e){if(t.length!==i.length)return!1;for(let n=0;n{class t{}return t.__NG_ELEMENT_ID__=QE,t})();const WE=bi,KE=class extends WE{constructor(i,e,n){super(),this._declarationLView=i,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(i){const e=this._declarationTContainer.tViews,n=Da(this._declarationLView,e,i,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),Ma(e,n,i),new qa(n)}};function QE(){return Fc(on(),W())}function Fc(t,i){return 4&t.type?new KE(i,t,So(t,i)):null}let vi=(()=>{class t{}return t.__NG_ELEMENT_ID__=JE,t})();function JE(){return gC(on(),W())}const YE=vi,mC=class extends YE{constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return So(this._hostTNode,this._hostLView)}get injector(){return new Kr(this._hostTNode,this._hostLView)}get parentInjector(){const i=sc(this._hostTNode,this._hostLView);if(f_(i)){const e=Wr(i,this._hostLView),n=$r(i);return new Kr(e[1].data[n+8],e)}return new Kr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const e=fC(this._lContainer);return null!==e&&e[i]||null}get length(){return this._lContainer.length-10}createEmbeddedView(i,e,n){const s=i.createEmbeddedView(e||{});return this.insert(s,n),s}createComponent(i,e,n,s,r){const o=i&&!function pa(t){return"function"==typeof t}(i);let u;if(o)u=e;else{const w=e||{};u=w.index,n=w.injector,s=w.projectableNodes,r=w.ngModuleRef}const h=o?i:new Vh(Cn(i)),b=n||this.parentInjector;if(!r&&null==h.ngModule){const M=(o?b:this.parentInjector).get(fs,null);M&&(r=M)}const y=h.create(b,s,void 0,r);return this.insert(y.hostView,u),y}insert(i,e){const n=i._lView,s=n[1];if(function Px(t){return Ei(t[3])}(n)){const y=this.indexOf(i);if(-1!==y)this.detach(y);else{const w=n[3],M=new mC(w,w[6],w[3]);M.detach(M.indexOf(i))}}const r=this._adjustIndex(e),o=this._lContainer;!function XD(t,i,e,n){const s=10+n,r=e.length;n>0&&(e[s-1][4]=i),n0)n.push(o[u/2]);else{const b=r[u+1],y=i[-h];for(let w=10;w{class t{constructor(e){this.appInits=e,this.resolve=Bc,this.reject=Bc,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,s)=>{this.resolve=n,this.reject=s})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s{r.subscribe({complete:u,error:h})});e.push(o)}}Promise.all(e).then(()=>{n()}).catch(s=>{this.reject(s)}),0===e.length&&n(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(K(em,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const ja=new be("AppId",{providedIn:"root",factory:function VC(){return`${nm()}${nm()}${nm()}`}});function nm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const BC=new be("Platform Initializer"),Hc=new be("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),HC=new be("appBootstrapListener");let wR=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Bs=new be("LocaleId",{providedIn:"root",factory:()=>O_(Bs,xe.Optional|xe.SkipSelf)||function TR(){return"undefined"!=typeof $localize&&$localize.locale||Ec}()});class xR{constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}}let qC=(()=>{class t{compileModuleSync(e){return new Bh(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),r=Yi(pi(e).declarations).reduce((o,u)=>{const h=Cn(u);return h&&o.push(new Vh(h)),o},[]);return new xR(n,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const MR=(()=>Promise.resolve(0))();function im(t){"undefined"==typeof Zone?MR.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class nt{constructor({enableLongStackTrace:i=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new H(!1),this.onMicrotaskEmpty=new H(!1),this.onStable=new H(!1),this.onError=new H(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!n&&e,s.shouldCoalesceRunChangeDetection=n,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function kR(){let t=bt.requestAnimationFrame,i=bt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&i){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const n=i[Zone.__symbol__("OriginalDelegate")];n&&(i=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:i}}().nativeRequestAnimationFrame,function RR(t){const i=()=>{!function ER(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(bt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,rm(t),t.isCheckStableRunning=!0,sm(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),rm(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,s,r,o,u)=>{try{return UC(t),e.invokeTask(s,r,o,u)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&i(),GC(t)}},onInvoke:(e,n,s,r,o,u,h)=>{try{return UC(t),e.invoke(s,r,o,u,h)}finally{t.shouldCoalesceRunChangeDetection&&i(),GC(t)}},onHasTask:(e,n,s,r)=>{e.hasTask(s,r),n===s&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,rm(t),sm(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,n,s,r)=>(e.handleError(s,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(s)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(nt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,s){const r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+s,i,IR,Bc,Bc);try{return r.runTask(o,e,n)}finally{r.cancelTask(o)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}}const IR={};function sm(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function rm(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function UC(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function GC(t){t._nesting--,sm(t)}class LR{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new H,this.onMicrotaskEmpty=new H,this.onStable=new H,this.onError=new H}run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,s){return i.apply(e,n)}}let om=(()=>{class t{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nt.assertNotInAngularZone(),im(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())im(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,s){let r=-1;n&&n>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==r),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:s})}whenStable(e,n,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,n,s){return[]}}return t.\u0275fac=function(e){return new(e||t)(K(nt))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),OR=(()=>{class t{constructor(){this._applications=new Map,am.addToWindow(this)}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return am.findTestabilityInTree(this,e,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();class AR{addToWindow(i){}findTestabilityInTree(i,e,n){return null}}let am=new AR,hr=null;const zC=new be("AllowMultipleToken"),jC=new be("PlatformOnDestroy");class $C{constructor(i,e){this.name=i,this.token=e}}function WC(t,i,e=[]){const n=`Platform: ${i}`,s=new be(n);return(r=[])=>{let o=lm();if(!o||o.injector.get(zC,!1)){const u=[...e,...r,{provide:s,useValue:!0}];t?t(u):function VR(t){if(hr&&!hr.get(zC,!1))throw new re(400,"");hr=t;const i=t.get(KC),e=t.get(BC,null);e&&e.forEach(n=>n())}(function HR(t=[],i){return In.create({name:i,providers:[{provide:hh,useValue:"platform"},{provide:jC,useValue:()=>hr=null},...t]})}(u,n))}return function BR(t){const i=lm();if(!i)throw new re(401,"");return i}()}}function lm(){var t;return null!==(t=null==hr?void 0:hr.get(KC))&&void 0!==t?t:null}let KC=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const u=function qR(t,i){let e;return e="noop"===t?new LR:("zone.js"===t?void 0:t)||new nt({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==i?void 0:i.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==i?void 0:i.ngZoneRunCoalescing)}),e}(n?n.ngZone:void 0,{ngZoneEventCoalescing:n&&n.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:n&&n.ngZoneRunCoalescing||!1}),h=[{provide:nt,useValue:u}];return u.run(()=>{const b=In.create({providers:h,parent:this.injector,name:e.moduleType.name}),y=e.create(b),w=y.injector.get(xa,null);if(!w)throw new re(402,"");return u.runOutsideAngular(()=>{const M=u.onError.subscribe({next:E=>{w.handleError(E)}});y.onDestroy(()=>{um(this._modules,y),M.unsubscribe()})}),function UR(t,i,e){try{const n=e();return Ra(n)?n.catch(s=>{throw i.runOutsideAngular(()=>t.handleError(s)),s}):n}catch(n){throw i.runOutsideAngular(()=>t.handleError(n)),n}}(w,u,()=>{const M=y.injector.get(tm);return M.runInitializers(),M.donePromise.then(()=>(function E3(t){Qn(t,"Expected localeId to be defined"),"string"==typeof t&&(k1=t.toLowerCase().replace(/_/g,"-"))}(y.injector.get(Bs,Ec)||Ec),this._moduleDoBootstrap(y),y))})})}bootstrapModule(e,n=[]){const s=QC({},n);return function FR(t,i,e){const n=new Bh(e);return Promise.resolve(n)}(0,0,e).then(r=>this.bootstrapModuleFactory(r,s))}_moduleDoBootstrap(e){const n=e.injector.get(cm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(s=>n.bootstrap(s));else{if(!e.instance.ngDoBootstrap)throw new re(403,"");e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new re(404,"");this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(jC,null);null==e||e(),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function QC(t,i){return Array.isArray(i)?i.reduce(QC,t):Object.assign(Object.assign({},t),i)}let cm=(()=>{class t{constructor(e,n,s,r){this._zone=e,this._injector=n,this._exceptionHandler=s,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Je(h=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{h.next(this._stable),h.complete()})}),u=new Je(h=>{let b;this._zone.runOutsideAngular(()=>{b=this._zone.onStable.subscribe(()=>{nt.assertNotInAngularZone(),im(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,h.next(!0))})})});const y=this._zone.onUnstable.subscribe(()=>{nt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{h.next(!1)}))});return()=>{b.unsubscribe(),y.unsubscribe()}});this.isStable=function WS(...t){let i=Number.POSITIVE_INFINITY,e=null,n=t[t.length-1];return Vr(n)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(i=t.pop())):"number"==typeof n&&(i=t.pop()),null===e&&1===t.length&&t[0]instanceof Je?t[0]:ea(i)(Pd(t,e))}(o,u.pipe(function nx(){return t=>Fd()(function XS(t,i){return function(n){let s;if(s="function"==typeof t?t:function(){return t},"function"==typeof i)return n.lift(new ex(s,i));const r=Object.create(n,JS);return r.source=n,r.subjectFactory=s,r}}(tx)(t))}()))}bootstrap(e,n){if(!this._initStatus.done)throw new re(405,"");let s;s=e instanceof X1?e:this._injector.get(Va).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const r=function NR(t){return t.isBoundToModule}(s)?void 0:this._injector.get(fs),u=s.create(In.NULL,[],n||s.selector,r),h=u.location.nativeElement,b=u.injector.get(om,null),y=b&&u.injector.get(OR);return b&&y&&y.registerApplication(h,b),u.onDestroy(()=>{this.detachView(u.hostView),um(this.components,u),y&&y.unregisterApplication(h)}),this._loadComponent(u),u}tick(){if(this._runningTick)throw new re(101,"");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;um(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(HC,[]).concat(this._bootstrapListeners).forEach(s=>s(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(K(nt),K(In),K(xa),K(tm))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function um(t,i){const e=t.indexOf(i);e>-1&&t.splice(e,1)}let YC=!0,ZC=!1,ot=(()=>{class t{}return t.__NG_ELEMENT_ID__=$R,t})();function $R(t){return function WR(t,i,e){if($l(t)&&!e){const n=Zn(t.index,i);return new qa(n,n)}return 47&t.type?new qa(i[16],i):null}(on(),W(),16==(16&t))}class ny{constructor(){}supports(i){return Ia(i)}create(i){return new XR(i)}}const ZR=(t,i)=>i;class XR{constructor(i){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=i||ZR}forEachItem(i){let e;for(e=this._itHead;null!==e;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,n=this._removalsHead,s=0,r=null;for(;e||n;){const o=!n||e&&e.currentIndex{o=this._trackByFn(s,u),null!==e&&Object.is(e.trackById,o)?(n&&(e=this._verifyReinsertion(e,u,o,s)),Object.is(e.item,u)||this._addIdentityChange(e,u)):(e=this._mismatch(e,u,o,s),n=!0),e=e._next,s++}),this.length=s;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,n,s){let r;return null===i?r=this._itTail:(r=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,r,s)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(n,s))?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,r,s)):i=this._addAfter(new eL(e,n),r,s),i}_verifyReinsertion(i,e,n,s){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?i=this._reinsertAfter(r,i._prev,s):i.currentIndex!=s&&(i.currentIndex=s,this._addToMoves(i,s)),i}_truncate(i){for(;null!==i;){const e=i._next;this._addToRemovals(this._unlink(i)),i=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const s=i._prevRemoved,r=i._nextRemoved;return null===s?this._removalsHead=r:s._nextRemoved=r,null===r?this._removalsTail=s:r._prevRemoved=s,this._insertAfter(i,e,n),this._addToMoves(i,n),i}_moveAfter(i,e,n){return this._unlink(i),this._insertAfter(i,e,n),this._addToMoves(i,n),i}_addAfter(i,e,n){return this._insertAfter(i,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,e,n){const s=null===e?this._itHead:e._next;return i._next=s,i._prev=e,null===s?this._itTail=i:s._prev=i,null===e?this._itHead=i:e._next=i,null===this._linkedRecords&&(this._linkedRecords=new iy),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const e=i._prev,n=i._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new iy),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class eL{constructor(i,e){this.item=i,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class tL{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){const e=i._prevDup,n=i._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class iy{constructor(){this.map=new Map}put(i){const e=i.trackById;let n=this.map.get(e);n||(n=new tL,this.map.set(e,n)),n.add(i)}get(i,e){const s=this.map.get(i);return s?s.get(i,e):null}remove(i){const e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function sy(t,i,e){const n=t.previousIndex;if(null===n)return n;let s=0;return e&&n{if(e&&e.key===s)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(s,n);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){const n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){const s=this._records.get(i);this._maybeAddToChanges(s,e);const r=s._prev,o=s._next;return r&&(r._next=o),o&&(o._prev=r),s._next=null,s._prev=null,s}const n=new iL(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(n=>e(i[n],n))}}class iL{constructor(i){this.key=i,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function oy(){return new $a([new ny])}let $a=(()=>{class t{constructor(e){this.factories=e}static create(e,n){if(null!=n){const s=n.factories.slice();e=e.concat(s)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||oy()),deps:[[t,new _a,new Ps]]}}find(e){const n=this.factories.find(s=>s.supports(e));if(null!=n)return n;throw new re(901,"")}}return t.\u0275prov=X({token:t,providedIn:"root",factory:oy}),t})();function ay(){return new Wa([new ry])}let Wa=(()=>{class t{constructor(e){this.factories=e}static create(e,n){if(n){const s=n.factories.slice();e=e.concat(s)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||ay()),deps:[[t,new _a,new Ps]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new re(901,"")}}return t.\u0275prov=X({token:t,providedIn:"root",factory:ay}),t})();const oL=WC(null,"core",[]);let aL=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(K(cm))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})(),Gc=null;function ts(){return Gc}const en=new be("DocumentToken");let fr=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:function(){return function dL(){return K(ly)}()},providedIn:"platform"}),t})();const pL=new be("Location Initialized");let ly=(()=>{class t extends fr{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ts().getBaseHref(this._doc)}onPopState(e){const n=ts().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=ts().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,n,s){cy()?this._history.pushState(e,n,s):this.location.hash=s}replaceState(e,n,s){cy()?this._history.replaceState(e,n,s):this.location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:function(){return function hL(){return new ly(K(en))}()},providedIn:"platform"}),t})();function cy(){return!!window.history.pushState}function fm(t,i){if(0==t.length)return i;if(0==i.length)return t;let e=0;return t.endsWith("/")&&e++,i.startsWith("/")&&e++,2==e?t+i.substring(1):1==e?t+i:t+"/"+i}function uy(t){const i=t.match(/#|\?|$/),e=i&&i.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function gs(t){return t&&"?"!==t[0]?"?"+t:t}let ko=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:function(){return function mL(t){const i=K(en).location;return new dy(K(fr),i&&i.origin||"")}()},providedIn:"root"}),t})();const gm=new be("appBaseHref");let dy=(()=>{class t extends ko{constructor(e,n){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==n&&(n=this._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=n}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return fm(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+gs(this._platformLocation.search),s=this._platformLocation.hash;return s&&e?`${n}${s}`:n}pushState(e,n,s,r){const o=this.prepareExternalUrl(s+gs(r));this._platformLocation.pushState(e,n,o)}replaceState(e,n,s,r){const o=this.prepareExternalUrl(s+gs(r));this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformLocation).historyGo)||void 0===s||s.call(n,e)}}return t.\u0275fac=function(e){return new(e||t)(K(fr),K(gm,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),fL=(()=>{class t extends ko{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=fm(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,s,r){let o=this.prepareExternalUrl(s+gs(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,s,r){let o=this.prepareExternalUrl(s+gs(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformLocation).historyGo)||void 0===s||s.call(n,e)}}return t.\u0275fac=function(e){return new(e||t)(K(fr),K(gm,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),_m=(()=>{class t{constructor(e,n){this._subject=new H,this._urlChangeListeners=[],this._platformStrategy=e;const s=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=uy(py(s)),this._platformStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+gs(n))}normalize(e){return t.stripTrailingSlash(function _L(t,i){return t&&i.startsWith(t)?i.substring(t.length):i}(this._baseHref,py(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,n="",s=null){this._platformStrategy.pushState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+gs(n)),s)}replaceState(e,n="",s=null){this._platformStrategy.replaceState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+gs(n)),s)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformStrategy).historyGo)||void 0===s||s.call(n,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}))}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(s=>s(e,n))}subscribe(e,n,s){return this._subject.subscribe({next:e,error:n,complete:s})}}return t.normalizeQueryParams=gs,t.joinWithSlash=fm,t.stripTrailingSlash=uy,t.\u0275fac=function(e){return new(e||t)(K(ko),K(fr))},t.\u0275prov=X({token:t,factory:function(){return function gL(){return new _m(K(ko),K(fr))}()},providedIn:"root"}),t})();function py(t){return t.replace(/\/index.html$/,"")}var $n=(()=>(($n=$n||{})[$n.Decimal=0]="Decimal",$n[$n.Percent=1]="Percent",$n[$n.Currency=2]="Currency",$n[$n.Scientific=3]="Scientific",$n))(),ge=(()=>((ge=ge||{})[ge.Decimal=0]="Decimal",ge[ge.Group=1]="Group",ge[ge.List=2]="List",ge[ge.PercentSign=3]="PercentSign",ge[ge.PlusSign=4]="PlusSign",ge[ge.MinusSign=5]="MinusSign",ge[ge.Exponential=6]="Exponential",ge[ge.SuperscriptingExponent=7]="SuperscriptingExponent",ge[ge.PerMille=8]="PerMille",ge[ge.Infinity=9]="Infinity",ge[ge.NaN=10]="NaN",ge[ge.TimeSeparator=11]="TimeSeparator",ge[ge.CurrencyDecimal=12]="CurrencyDecimal",ge[ge.CurrencyGroup=13]="CurrencyGroup",ge))();function Ci(t,i){const e=qn(t),n=e[te.NumberSymbols][i];if(void 0===n){if(i===ge.CurrencyDecimal)return e[te.NumberSymbols][ge.Decimal];if(i===ge.CurrencyGroup)return e[te.NumberSymbols][ge.Group]}return n}const GL=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function xm(t){const i=parseInt(t);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+t);return i}function yy(t,i){i=encodeURIComponent(i);for(const e of t.split(";")){const n=e.indexOf("="),[s,r]=-1==n?[e,""]:[e.slice(0,n),e.slice(n+1)];if(s.trim()===i)return decodeURIComponent(r)}return null}let Oe=(()=>{class t{constructor(e,n,s,r){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=s,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Ia(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(n=>this._toggleClass(n.key,n.currentValue)),e.forEachChangedItem(n=>this._toggleClass(n.key,n.currentValue)),e.forEachRemovedItem(n=>{n.previousValue&&this._toggleClass(n.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(n=>{if("string"!=typeof n.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${mt(n.item)}`);this._toggleClass(n.item,!0)}),e.forEachRemovedItem(n=>this._toggleClass(n.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(n=>this._toggleClass(n,!0)):Object.keys(e).forEach(n=>this._toggleClass(n,!!e[n])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(n=>this._toggleClass(n,!1)):Object.keys(e).forEach(n=>this._toggleClass(n,!1)))}_toggleClass(e,n){(e=e.trim())&&e.split(/\s+/g).forEach(s=>{n?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}}return t.\u0275fac=function(e){return new(e||t)(x($a),x(Wa),x(Re),x(wn))},t.\u0275dir=le({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class t4{constructor(i,e,n,s){this.$implicit=i,this.ngForOf=e,this.index=n,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let at=(()=>{class t{constructor(e,n,s){this._viewContainer=e,this._template=n,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((s,r,o)=>{if(null==s.previousIndex)n.createEmbeddedView(this._template,new t4(s.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===r?void 0:r);else if(null!==r){const u=n.get(r);n.move(u,o),wy(u,s)}});for(let s=0,r=n.length;s{wy(n.get(s.currentIndex),s)})}static ngTemplateContextGuard(e,n){return!0}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x($a))},t.\u0275dir=le({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();function wy(t,i){t.context.$implicit=i.item}let Q=(()=>{class t{constructor(e,n){this._viewContainer=e,this._context=new n4,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Ty("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Ty("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi))},t.\u0275dir=le({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class n4{constructor(){this.$implicit=null,this.ngIf=null}}function Ty(t,i){if(i&&!i.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${mt(i)}'.`)}class Mm{constructor(i,e){this._viewContainerRef=i,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(i){i&&!this._created?this.create():!i&&this._created&&this.destroy()}}let gr=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let n=0;n{class t{constructor(e,n,s){this.ngSwitch=s,s._addCase(),this._view=new Mm(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x(gr,9))},t.\u0275dir=le({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),km=(()=>{class t{constructor(e,n,s){s._addDefault(new Mm(e,n))}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x(gr,9))},t.\u0275dir=le({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),lt=(()=>{class t{constructor(e,n,s){this._ngEl=e,this._differs=n,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[s,r]=e.split(".");null!=(n=null!=n&&r?`${n}${r}`:n)?this._renderer.setStyle(this._ngEl.nativeElement,s,n):this._renderer.removeStyle(this._ngEl.nativeElement,s)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(Wa),x(wn))},t.\u0275dir=le({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Lt=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const n=this._viewContainerRef;this._viewRef&&n.remove(n.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?n.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(x(vi))},t.\u0275dir=le({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[mn]}),t})();function Vi(t,i){return new re(2100,"")}class r4{createSubscription(i,e){return i.subscribe({next:e,error:n=>{throw n}})}dispose(i){i.unsubscribe()}onDestroy(i){i.unsubscribe()}}class o4{createSubscription(i,e){return i.then(e,n=>{throw n})}dispose(i){}onDestroy(i){}}const a4=new o4,l4=new r4;let xy=(()=>{class t{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(Ra(e))return a4;if(qv(e))return l4;throw Vi()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(x(ot,16))},t.\u0275pipe=An({name:"async",type:t,pure:!1}),t})(),Xc=(()=>{class t{constructor(e){this._locale=e}transform(e,n,s){if(!function Im(t){return!(null==t||""===t||t!=t)}(e))return null;s=s||this._locale;try{return function QL(t,i,e){return function Tm(t,i,e,n,s,r,o=!1){let u="",h=!1;if(isFinite(t)){let b=function YL(t){let n,s,r,o,u,i=Math.abs(t)+"",e=0;for((s=i.indexOf("."))>-1&&(i=i.replace(".","")),(r=i.search(/e/i))>0?(s<0&&(s=r),s+=+i.slice(r+1),i=i.substring(0,r)):s<0&&(s=i.length),r=0;"0"===i.charAt(r);r++);if(r===(u=i.length))n=[0],s=1;else{for(u--;"0"===i.charAt(u);)u--;for(s-=r,n=[],o=0;r<=u;r++,o++)n[o]=Number(i.charAt(r))}return s>22&&(n=n.splice(0,21),e=s-1,s=1),{digits:n,exponent:e,integerLen:s}}(t);o&&(b=function JL(t){if(0===t.digits[0])return t;const i=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===i?t.digits.push(0,0):1===i&&t.digits.push(0),t.integerLen+=2),t}(b));let y=i.minInt,w=i.minFrac,M=i.maxFrac;if(r){const P=r.match(GL);if(null===P)throw new Error(`${r} is not a valid digit info`);const J=P[1],se=P[3],Me=P[5];null!=J&&(y=xm(J)),null!=se&&(w=xm(se)),null!=Me?M=xm(Me):null!=se&&w>M&&(M=w)}!function ZL(t,i,e){if(i>e)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${e}).`);let n=t.digits,s=n.length-t.integerLen;const r=Math.min(Math.max(i,s),e);let o=r+t.integerLen,u=n[o];if(o>0){n.splice(Math.max(t.integerLen,o));for(let w=o;w=5)if(o-1<0){for(let w=0;w>o;w--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[o-1]++;for(;s=b?R.pop():h=!1),M>=10?1:0},0);y&&(n.unshift(y),t.integerLen++)}(b,w,M);let E=b.digits,R=b.integerLen;const O=b.exponent;let N=[];for(h=E.every(P=>!P);R0?N=E.splice(R,E.length):(N=E,E=[0]);const U=[];for(E.length>=i.lgSize&&U.unshift(E.splice(-i.lgSize,E.length).join(""));E.length>i.gSize;)U.unshift(E.splice(-i.gSize,E.length).join(""));E.length&&U.unshift(E.join("")),u=U.join(Ci(e,n)),N.length&&(u+=Ci(e,s)+N.join("")),O&&(u+=Ci(e,ge.Exponential)+"+"+O)}else u=Ci(e,ge.Infinity);return u=t<0&&!h?i.negPre+u+i.negSuf:i.posPre+u+i.posSuf,u}(t,function Sm(t,i="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(";"),s=n[0],r=n[1],o=-1!==s.indexOf(".")?s.split("."):[s.substring(0,s.lastIndexOf("0")+1),s.substring(s.lastIndexOf("0")+1)],u=o[0],h=o[1]||"";e.posPre=u.substr(0,u.indexOf("#"));for(let y=0;y{class t{transform(e,n,s){if(null==e)return null;if(!this.supports(e))throw Vi();return e.slice(n,s)}supports(e){return"string"==typeof e||Array.isArray(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=An({name:"slice",type:t,pure:!1}),t})(),Be=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();const ky="browser";let M4=(()=>{class t{}return t.\u0275prov=X({token:t,providedIn:"root",factory:()=>new k4(K(en),window)}),t})();class k4{constructor(i,e){this.document=i,this.window=e,this.offset=()=>[0,0]}setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(i){this.supportsScrolling()&&this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){if(!this.supportsScrolling())return;const e=function I4(t,i){const e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){const r=s.shadowRoot;if(r){const o=r.getElementById(i)||r.querySelector(`[name="${i}"]`);if(o)return o}s=n.nextNode()}}return null}(this.document,i);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(i){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=i)}}scrollToElement(i){const e=i.getBoundingClientRect(),n=e.left+this.window.pageXOffset,s=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],s-r[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const i=Iy(this.window.history)||Iy(Object.getPrototypeOf(this.window.history));return!(!i||!i.writable&&!i.set)}catch(i){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(i){return!1}}}function Iy(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Ey{}class Rm extends class E4 extends class uL{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function cL(t){Gc||(Gc=t)}(new Rm)}onAndCancel(i,e,n){return i.addEventListener(e,n,!1),()=>{i.removeEventListener(e,n,!1)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.parentNode&&i.parentNode.removeChild(i)}createElement(i,e){return(e=e||this.getDefaultDocument()).createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return"window"===e?window:"document"===e?i:"body"===e?i.body:null}getBaseHref(i){const e=function R4(){return Ya=Ya||document.querySelector("base"),Ya?Ya.getAttribute("href"):null}();return null==e?null:function L4(t){eu=eu||document.createElement("a"),eu.setAttribute("href",t);const i=eu.pathname;return"/"===i.charAt(0)?i:`/${i}`}(e)}resetBaseElement(){Ya=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return yy(document.cookie,i)}}let eu,Ya=null;const Ry=new be("TRANSITION_ID"),A4=[{provide:em,useFactory:function O4(t,i,e){return()=>{e.get(tm).donePromise.then(()=>{const n=ts(),s=i.querySelectorAll(`style[ng-transition="${t}"]`);for(let r=0;r{const r=i.findTestabilityInTree(n,s);if(null==r)throw new Error("Could not find testability for element.");return r},bt.getAllAngularTestabilities=()=>i.getAllTestabilities(),bt.getAllAngularRootElements=()=>i.getAllRootElements(),bt.frameworkStabilizers||(bt.frameworkStabilizers=[]),bt.frameworkStabilizers.push(n=>{const s=bt.getAllAngularTestabilities();let r=s.length,o=!1;const u=function(h){o=o||h,r--,0==r&&n(o)};s.forEach(function(h){h.whenStable(u)})})}findTestabilityInTree(i,e,n){if(null==e)return null;const s=i.getTestability(e);return null!=s?s:n?ts().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null}}let P4=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const tu=new be("EventManagerPlugins");let nu=(()=>{class t{constructor(e,n){this._zone=n,this._eventNameToPlugin=new Map,e.forEach(s=>s.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,n,s){return this._findPluginFor(n).addEventListener(e,n,s)}addGlobalEventListener(e,n,s){return this._findPluginFor(n).addGlobalEventListener(e,n,s)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const s=this._plugins;for(let r=0;r{class t{constructor(){this._stylesSet=new Set}addStyles(e){const n=new Set;e.forEach(s=>{this._stylesSet.has(s)||(this._stylesSet.add(s),n.add(s))}),this.onStylesAdded(n)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),Za=(()=>{class t extends Oy{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,n,s){e.forEach(r=>{const o=this._doc.createElement("style");o.textContent=r,s.push(n.appendChild(o))})}addHost(e){const n=[];this._addStylesToHost(this._stylesSet,e,n),this._hostNodes.set(e,n)}removeHost(e){const n=this._hostNodes.get(e);n&&n.forEach(Ay),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((n,s)=>{this._addStylesToHost(e,s,n)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(Ay))}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function Ay(t){ts().remove(t)}const Om={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Am=/%COMP%/g;function iu(t,i,e){for(let n=0;n{if("__ngUnwrap__"===i)return t;!1===t(i)&&(i.preventDefault(),i.returnValue=!1)}}let su=(()=>{class t{constructor(e,n,s){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.rendererByCompId=new Map,this.defaultRenderer=new Pm(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;switch(n.encapsulation){case ki.Emulated:{let s=this.rendererByCompId.get(n.id);return s||(s=new q4(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,s)),s.applyToHost(e),s}case 1:case ki.ShadowDom:return new U4(this.eventManager,this.sharedStylesHost,e,n);default:if(!this.rendererByCompId.has(n.id)){const s=iu(n.id,n.styles,[]);this.sharedStylesHost.addStyles(s),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(K(nu),K(Za),K(ja))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Pm{constructor(i){this.eventManager=i,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(i,e){return e?document.createElementNS(Om[e]||e,i):document.createElement(i)}createComment(i){return document.createComment(i)}createText(i){return document.createTextNode(i)}appendChild(i,e){i.appendChild(e)}insertBefore(i,e,n){i&&i.insertBefore(e,n)}removeChild(i,e){i&&i.removeChild(e)}selectRootElement(i,e){let n="string"==typeof i?document.querySelector(i):i;if(!n)throw new Error(`The selector "${i}" did not match any elements`);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,s){if(s){e=s+":"+e;const r=Om[s];r?i.setAttributeNS(r,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){const s=Om[n];s?i.removeAttributeNS(s,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,s){s&(ei.DashCase|ei.Important)?i.style.setProperty(e,n,s&ei.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&ei.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i[e]=n}setValue(i,e){i.nodeValue=e}listen(i,e,n){return"string"==typeof i?this.eventManager.addGlobalEventListener(i,e,Ny(n)):this.eventManager.addEventListener(i,e,Ny(n))}}class q4 extends Pm{constructor(i,e,n,s){super(i),this.component=n;const r=iu(s+"-"+n.id,n.styles,[]);e.addStyles(r),this.contentAttr=function V4(t){return"_ngcontent-%COMP%".replace(Am,t)}(s+"-"+n.id),this.hostAttr=function B4(t){return"_nghost-%COMP%".replace(Am,t)}(s+"-"+n.id)}applyToHost(i){super.setAttribute(i,this.hostAttr,"")}createElement(i,e){const n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}}class U4 extends Pm{constructor(i,e,n,s){super(i),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=iu(s.id,s.styles,[]);for(let o=0;o{class t extends Ly{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s){return e.addEventListener(n,s,!1),()=>this.removeEventListener(e,n,s)}removeEventListener(e,n,s){return e.removeEventListener(n,s)}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const By=["alt","control","meta","shift"],j4={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Hy={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},$4={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let W4=(()=>{class t extends Ly{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,s){const r=t.parseEventName(n),o=t.eventCallback(r.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ts().onAndCancel(e,r.domEventName,o))}static parseEventName(e){const n=e.toLowerCase().split("."),s=n.shift();if(0===n.length||"keydown"!==s&&"keyup"!==s)return null;const r=t._normalizeKey(n.pop());let o="";if(By.forEach(h=>{const b=n.indexOf(h);b>-1&&(n.splice(b,1),o+=h+".")}),o+=r,0!=n.length||0===r.length)return null;const u={};return u.domEventName=s,u.fullKey=o,u}static getEventFullKey(e){let n="",s=function K4(t){let i=t.key;if(null==i){if(i=t.keyIdentifier,null==i)return"Unidentified";i.startsWith("U+")&&(i=String.fromCharCode(parseInt(i.substring(2),16)),3===t.location&&Hy.hasOwnProperty(i)&&(i=Hy[i]))}return j4[i]||i}(e);return s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),By.forEach(r=>{r!=s&&$4[r](e)&&(n+=r+".")}),n+=s,n}static eventCallback(e,n,s){return r=>{t.getEventFullKey(r)===e&&s.runGuarded(()=>n(r))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Z4=WC(oL,"browser",[{provide:Hc,useValue:ky},{provide:BC,useValue:function Q4(){Rm.makeCurrent(),Lm.init()},multi:!0},{provide:en,useFactory:function Y4(){return function Rx(t){Zd=t}(document),document},deps:[]}]),X4=[{provide:hh,useValue:"root"},{provide:xa,useFactory:function J4(){return new xa},deps:[]},{provide:tu,useClass:G4,multi:!0,deps:[en,nt,Hc]},{provide:tu,useClass:W4,multi:!0,deps:[en]},{provide:su,useClass:su,deps:[nu,Za,ja]},{provide:Ba,useExisting:su},{provide:Oy,useExisting:Za},{provide:Za,useClass:Za,deps:[en]},{provide:om,useClass:om,deps:[nt]},{provide:nu,useClass:nu,deps:[tu,nt]},{provide:Ey,useClass:P4,deps:[]}];let qy=(()=>{class t{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:ja,useValue:e.appId},{provide:Ry,useExisting:ja},A4]}}}return t.\u0275fac=function(e){return new(e||t)(K(t,12))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:X4,imports:[Be,aL]}),t})();function oe(...t){let i=t[t.length-1];return Vr(i)?(t.pop(),Ad(t,i)):Pd(t)}function _r(t,i){return bn(t,i,1)}function qs(t,i){return function(n){return n.lift(new uO(t,i))}}"undefined"!=typeof window&&window;class uO{constructor(i,e){this.predicate=i,this.thisArg=e}call(i,e){return e.subscribe(new dO(i,this.predicate,this.thisArg))}}class dO extends yt{constructor(i,e,n){super(i),this.predicate=e,this.thisArg=n,this.count=0}_next(i){let e;try{e=this.predicate.call(this.thisArg,i,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(i)}}class zy{}class jy{}class bs{constructor(i){this.normalizedNames=new Map,this.lazyUpdate=null,i?this.lazyInit="string"==typeof i?()=>{this.headers=new Map,i.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>0){const s=e.slice(0,n),r=s.toLowerCase(),o=e.slice(n+1).trim();this.maybeSetNormalizedName(s,r),this.headers.has(r)?this.headers.get(r).push(o):this.headers.set(r,[o])}})}:()=>{this.headers=new Map,Object.keys(i).forEach(e=>{let n=i[e];const s=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(s,n),this.maybeSetNormalizedName(e,s))})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();const e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof bs?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){const e=new bs;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof bs?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){const e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(i.name,e);const s=("a"===i.op?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":const r=i.value;if(r){let o=this.headers.get(e);if(!o)return;o=o.filter(u=>-1===r.indexOf(u)),0===o.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}}class pO{encodeKey(i){return $y(i)}encodeValue(i){return $y(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}}const mO=/%(\d[a-f0-9])/gi,fO={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function $y(t){return encodeURIComponent(t).replace(mO,(i,e)=>{var n;return null!==(n=fO[e])&&void 0!==n?n:i})}function Wy(t){return`${t}`}class ye{constructor(i={}){if(this.updates=null,this.cloneFrom=null,this.encoder=i.encoder||new pO,i.fromString){if(i.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function hO(t,i){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(s=>{const r=s.indexOf("="),[o,u]=-1==r?[i.decodeKey(s),""]:[i.decodeKey(s.slice(0,r)),i.decodeValue(s.slice(r+1))],h=e.get(o)||[];h.push(u),e.set(o,h)}),e}(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{const n=i.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();const e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){const e=[];return Object.keys(i).forEach(n=>{const s=i[n];Array.isArray(s)?s.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{const e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>""!==i).join("&")}clone(i){const e=new ye({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":const e=("a"===i.op?this.map.get(i.param):void 0)||[];e.push(Wy(i.value)),this.map.set(i.param,e);break;case"d":if(void 0===i.value){this.map.delete(i.param);break}{let n=this.map.get(i.param)||[];const s=n.indexOf(Wy(i.value));-1!==s&&n.splice(s,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}}}),this.cloneFrom=this.updates=null)}}class gO{constructor(){this.map=new Map}set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}}function Ky(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Qy(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Jy(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Xa{constructor(i,e,n,s){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=i.toUpperCase(),function _O(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==n?n:null,r=s):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params)),this.headers||(this.headers=new bs),this.context||(this.context=new gO),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{const u=e.indexOf("?");this.urlWithParams=e+(-1===u?"?":uM.set(E,i.setHeaders[E]),b)),i.setParams&&(y=Object.keys(i.setParams).reduce((M,E)=>M.set(E,i.setParams[E]),y)),new Xa(n,s,o,{params:y,headers:b,context:w,reportProgress:h,responseType:r,withCredentials:u})}}var sn=(()=>((sn=sn||{})[sn.Sent=0]="Sent",sn[sn.UploadProgress=1]="UploadProgress",sn[sn.ResponseHeader=2]="ResponseHeader",sn[sn.DownloadProgress=3]="DownloadProgress",sn[sn.Response=4]="Response",sn[sn.User=5]="User",sn))();class Nm{constructor(i,e=200,n="OK"){this.headers=i.headers||new bs,this.status=void 0!==i.status?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}}class Vm extends Nm{constructor(i={}){super(i),this.type=sn.ResponseHeader}clone(i={}){return new Vm({headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class ru extends Nm{constructor(i={}){super(i),this.type=sn.Response,this.body=void 0!==i.body?i.body:null}clone(i={}){return new ru({body:void 0!==i.body?i.body:this.body,headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Yy extends Nm{constructor(i){super(i,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${i.url||"(unknown url)"}`:`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}}function Bm(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Bi=(()=>{class t{constructor(e){this.handler=e}request(e,n,s={}){let r;if(e instanceof Xa)r=e;else{let h,b;h=s.headers instanceof bs?s.headers:new bs(s.headers),s.params&&(b=s.params instanceof ye?s.params:new ye({fromObject:s.params})),r=new Xa(e,n,void 0!==s.body?s.body:null,{headers:h,context:s.context,params:b,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials})}const o=oe(r).pipe(_r(h=>this.handler.handle(h)));if(e instanceof Xa||"events"===s.observe)return o;const u=o.pipe(qs(h=>h instanceof ru));switch(s.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return u.pipe(et(h=>{if(null!==h.body&&!(h.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return h.body}));case"blob":return u.pipe(et(h=>{if(null!==h.body&&!(h.body instanceof Blob))throw new Error("Response is not a Blob.");return h.body}));case"text":return u.pipe(et(h=>{if(null!==h.body&&"string"!=typeof h.body)throw new Error("Response is not a string.");return h.body}));default:return u.pipe(et(h=>h.body))}case"response":return u;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:(new ye).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Bm(s,n))}post(e,n,s={}){return this.request("POST",e,Bm(s,n))}put(e,n,s={}){return this.request("PUT",e,Bm(s,n))}}return t.\u0275fac=function(e){return new(e||t)(K(zy))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Zy{constructor(i,e){this.next=i,this.interceptor=e}handle(i){return this.interceptor.intercept(i,this.next)}}const Xy=new be("HTTP_INTERCEPTORS");let vO=(()=>{class t{intercept(e,n){return n.handle(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const CO=/^\)\]\}',?\n/;let e0=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Je(n=>{const s=this.xhrFactory.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((E,R)=>s.setRequestHeader(E,R.join(","))),e.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const E=e.detectContentTypeHeader();null!==E&&s.setRequestHeader("Content-Type",E)}if(e.responseType){const E=e.responseType.toLowerCase();s.responseType="json"!==E?E:"text"}const r=e.serializeBody();let o=null;const u=()=>{if(null!==o)return o;const E=s.statusText||"OK",R=new bs(s.getAllResponseHeaders()),O=function yO(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(s)||e.url;return o=new Vm({headers:R,status:s.status,statusText:E,url:O}),o},h=()=>{let{headers:E,status:R,statusText:O,url:N}=u(),U=null;204!==R&&(U=void 0===s.response?s.responseText:s.response),0===R&&(R=U?200:0);let P=R>=200&&R<300;if("json"===e.responseType&&"string"==typeof U){const J=U;U=U.replace(CO,"");try{U=""!==U?JSON.parse(U):null}catch(se){U=J,P&&(P=!1,U={error:se,text:U})}}P?(n.next(new ru({body:U,headers:E,status:R,statusText:O,url:N||void 0})),n.complete()):n.error(new Yy({error:U,headers:E,status:R,statusText:O,url:N||void 0}))},b=E=>{const{url:R}=u(),O=new Yy({error:E,status:s.status||0,statusText:s.statusText||"Unknown Error",url:R||void 0});n.error(O)};let y=!1;const w=E=>{y||(n.next(u()),y=!0);let R={type:sn.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(R.total=E.total),"text"===e.responseType&&!!s.responseText&&(R.partialText=s.responseText),n.next(R)},M=E=>{let R={type:sn.UploadProgress,loaded:E.loaded};E.lengthComputable&&(R.total=E.total),n.next(R)};return s.addEventListener("load",h),s.addEventListener("error",b),s.addEventListener("timeout",b),s.addEventListener("abort",b),e.reportProgress&&(s.addEventListener("progress",w),null!==r&&s.upload&&s.upload.addEventListener("progress",M)),s.send(r),n.next({type:sn.Sent}),()=>{s.removeEventListener("error",b),s.removeEventListener("abort",b),s.removeEventListener("load",h),s.removeEventListener("timeout",b),e.reportProgress&&(s.removeEventListener("progress",w),null!==r&&s.upload&&s.upload.removeEventListener("progress",M)),s.readyState!==s.DONE&&s.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(K(Ey))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Hm=new be("XSRF_COOKIE_NAME"),qm=new be("XSRF_HEADER_NAME");class t0{}let wO=(()=>{class t{constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=yy(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(K(en),K(Hc),K(Hm))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),Um=(()=>{class t{constructor(e,n){this.tokenService=e,this.headerName=n}intercept(e,n){const s=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||s.startsWith("http://")||s.startsWith("https://"))return n.handle(e);const r=this.tokenService.getToken();return null!==r&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,r)})),n.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(K(t0),K(qm))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),TO=(()=>{class t{constructor(e,n){this.backend=e,this.injector=n,this.chain=null}handle(e){if(null===this.chain){const n=this.injector.get(Xy,[]);this.chain=n.reduceRight((s,r)=>new Zy(s,r),this.backend)}return this.chain.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(K(jy),K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),SO=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Um,useClass:vO}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Hm,useValue:e.cookieName}:[],e.headerName?{provide:qm,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[Um,{provide:Xy,useExisting:Um,multi:!0},{provide:t0,useClass:wO},{provide:Hm,useValue:"XSRF-TOKEN"},{provide:qm,useValue:"X-XSRF-TOKEN"}]}),t})(),xO=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[Bi,{provide:zy,useClass:TO},e0,{provide:jy,useExisting:e0}],imports:[[SO.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function ns(t){return!!t&&(t instanceof Je||"function"==typeof t.lift&&"function"==typeof t.subscribe)}function n0(...t){if(1===t.length){const i=t[0];if(Nr(i))return ou(i,null);if(Ld(i)&&Object.getPrototypeOf(i)===Object.prototype){const e=Object.keys(i);return ou(e.map(n=>i[n]),e)}}if("function"==typeof t[t.length-1]){const i=t.pop();return ou(t=1===t.length&&Nr(t[0])?t[0]:t,null).pipe(et(e=>i(...e)))}return ou(t,null)}function ou(t,i){return new Je(e=>{const n=t.length;if(0===n)return void e.complete();const s=new Array(n);let r=0,o=0;for(let u=0;u{b||(b=!0,o++),s[u]=y},error:y=>e.error(y),complete:()=>{r++,(r===n||!b)&&(o===n&&e.next(i?i.reduce((y,w,M)=>(y[w]=s[M],y),{}):s),e.complete())}}))}})}function el(...t){return function DO(){return ea(1)}()(oe(...t))}const Io=new Je(t=>t.complete());function au(t){return t?function MO(t){return new Je(i=>t.schedule(()=>i.complete()))}(t):Io}function lu(t){return new Je(i=>{let e;try{e=t()}catch(s){return void i.error(s)}return(e?Dn(e):au()).subscribe(i)})}const s0=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function br(t){return i=>0===t?au():i.lift(new kO(t))}class kO{constructor(i){if(this.total=i,this.total<0)throw new s0}call(i,e){return e.subscribe(new IO(i,this.total))}}class IO extends yt{constructor(i,e){super(i),this.total=e,this.count=0}_next(i){const e=this.total,n=++this.count;n<=e&&(this.destination.next(i),n===e&&(this.destination.complete(),this.unsubscribe()))}}class EO extends Et{constructor(i,e){super()}schedule(i,e=0){return this}}class cu extends EO{constructor(i,e){super(i,e),this.scheduler=i,this.work=e,this.pending=!1}schedule(i,e=0){if(this.closed)return this;this.state=i;const n=this.id,s=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(s,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(s,this.id,e),this}requestAsyncId(i,e,n=0){return setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(i,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(i,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,e){let s,n=!1;try{this.work(i)}catch(r){n=!0,s=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),s}_unsubscribe(){const i=this.id,e=this.scheduler,n=e.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==s&&n.splice(s,1),null!=i&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null}}let r0=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(e,n=0,s){return new this.SchedulerAction(this,e).schedule(s,n)}}return t.now=()=>Date.now(),t})();class Hi extends r0{constructor(i,e=r0.now){super(i,()=>Hi.delegate&&Hi.delegate!==this?Hi.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(i,e=0,n){return Hi.delegate&&Hi.delegate!==this?Hi.delegate.schedule(i,e,n):super.schedule(i,e,n)}flush(i){const{actions:e}=this;if(this.active)return void e.push(i);let n;this.active=!0;do{if(n=i.execute(i.state,i.delay))break}while(i=e.shift());if(this.active=!1,n){for(;i=e.shift();)i.unsubscribe();throw n}}}const OO=new class LO extends Hi{}(class RO extends cu{constructor(i,e){super(i,e),this.scheduler=i,this.work=e}schedule(i,e=0){return e>0?super.schedule(i,e):(this.delay=e,this.state=i,this.scheduler.flush(this),this)}execute(i,e){return e>0||this.closed?super.execute(i,e):this._execute(i,e)}requestAsyncId(i,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(i,e,n):i.flush(this)}});function tl(t,i){return new Je(i?e=>i.schedule(AO,0,{error:t,subscriber:e}):e=>e.error(t))}function AO({error:t,subscriber:i}){i.error(t)}class Wn{constructor(i,e,n){this.kind=i,this.value=e,this.error=n,this.hasValue="N"===i}observe(i){switch(this.kind){case"N":return i.next&&i.next(this.value);case"E":return i.error&&i.error(this.error);case"C":return i.complete&&i.complete()}}do(i,e,n){switch(this.kind){case"N":return i&&i(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(i,e,n){return i&&"function"==typeof i.next?this.observe(i):this.do(i,e,n)}toObservable(){switch(this.kind){case"N":return oe(this.value);case"E":return tl(this.error);case"C":return au()}throw new Error("unexpected notification kind value")}static createNext(i){return void 0!==i?new Wn("N",i):Wn.undefinedValueNotification}static createError(i){return new Wn("E",void 0,i)}static createComplete(){return Wn.completeNotification}}Wn.completeNotification=new Wn("C"),Wn.undefinedValueNotification=new Wn("N",void 0);class uu extends yt{constructor(i,e,n=0){super(i),this.scheduler=e,this.delay=n}static dispatch(i){const{notification:e,destination:n}=i;e.observe(n),this.unsubscribe()}scheduleMessage(i){this.destination.add(this.scheduler.schedule(uu.dispatch,this.delay,new FO(i,this.destination)))}_next(i){this.scheduleMessage(Wn.createNext(i))}_error(i){this.scheduleMessage(Wn.createError(i)),this.unsubscribe()}_complete(){this.scheduleMessage(Wn.createComplete()),this.unsubscribe()}}class FO{constructor(i,e){this.notification=i,this.destination=e}}class NO extends ct{constructor(i=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=i<1?1:i,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(i){if(!this.isStopped){const e=this._events;e.push(i),e.length>this._bufferSize&&e.shift()}super.next(i)}nextTimeWindow(i){this.isStopped||(this._events.push(new VO(this._getNow(),i)),this._trimBufferThenGetEvents()),super.next(i)}_subscribe(i){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),s=this.scheduler,r=n.length;let o;if(this.closed)throw new nr;if(this.isStopped||this.hasError?o=Et.EMPTY:(this.observers.push(i),o=new Eg(this,i)),s&&i.add(i=new uu(i,s)),e)for(let u=0;ue&&(o=Math.max(o,r-e)),o>0&&s.splice(0,o),s}}class VO{constructor(i,e){this.time=i,this.value=e}}function Gm(t,i,e){let n;return n=t&&"object"==typeof t?t:{bufferSize:t,windowTime:i,refCount:!1,scheduler:e},s=>s.lift(function BO({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:i=Number.POSITIVE_INFINITY,refCount:e,scheduler:n}){let s,o,r=0,u=!1,h=!1;return function(y){let w;r++,!s||u?(u=!1,s=new NO(t,i,n),w=s.subscribe(this),o=y.subscribe({next(M){s.next(M)},error(M){u=!0,s.error(M)},complete(){h=!0,o=void 0,s.complete()}}),h&&(o=void 0)):w=s.subscribe(this),this.add(()=>{r--,w.unsubscribe(),w=void 0,o&&!h&&e&&0===r&&(o.unsubscribe(),o=void 0,s=void 0)})}}(n))}function qi(t,i){return"function"==typeof i?e=>e.pipe(qi((n,s)=>Dn(t(n,s)).pipe(et((r,o)=>i(n,r,s,o))))):e=>e.lift(new HO(t))}class HO{constructor(i){this.project=i}call(i,e){return e.subscribe(new qO(i,this.project))}}class qO extends Zo{constructor(i,e){super(i),this.project=e,this.index=0}_next(i){let e;const n=this.index++;try{e=this.project(i,n)}catch(s){return void this.destination.error(s)}this._innerSub(e)}_innerSub(i){const e=this.innerSubscription;e&&e.unsubscribe();const n=new Yo(this),s=this.destination;s.add(n),this.innerSubscription=Xo(i,n),this.innerSubscription!==n&&s.add(this.innerSubscription)}_complete(){const{innerSubscription:i}=this;(!i||i.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(i){this.destination.next(i)}}class nl{}let o0=(()=>{class t extends nl{getTranslation(e){return oe({})}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class zm{}let a0=(()=>{class t{handle(e){return e.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function il(t,i){if(t===i)return!0;if(null===t||null===i)return!1;if(t!=t&&i!=i)return!0;let s,r,o,e=typeof t;if(e==typeof i&&"object"==e){if(!Array.isArray(t)){if(Array.isArray(i))return!1;for(r in o=Object.create(null),t){if(!il(t[r],i[r]))return!1;o[r]=!0}for(r in i)if(!(r in o)&&void 0!==i[r])return!1;return!0}if(!Array.isArray(i))return!1;if((s=t.length)==i.length){for(r=0;r{jm(i[n])?n in t?e[n]=l0(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e}class du{}let c0=(()=>{class t extends du{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(e,n){let s;return s="string"==typeof e?this.interpolateString(e,n):"function"==typeof e?this.interpolateFunction(e,n):e,s}getValue(e,n){let s="string"==typeof n?n.split("."):[n];n="";do{n+=s.shift(),!si(e)||!si(e[n])||"object"!=typeof e[n]&&s.length?s.length?n+=".":e=void 0:(e=e[n],n="")}while(s.length);return e}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(s,r)=>{let o=this.getValue(n,r);return si(o)?o:s}):e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class pu{}let u0=(()=>{class t extends pu{compile(e,n){return e}compileTranslations(e,n){return e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class d0{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new H,this.onLangChange=new H,this.onDefaultLangChange=new H}}const $m=new be("USE_STORE"),Wm=new be("USE_DEFAULT_LANG"),Km=new be("DEFAULT_LANGUAGE"),Qm=new be("USE_EXTEND");let Le=(()=>{class t{constructor(e,n,s,r,o,u=!0,h=!1,b=!1,y){this.store=e,this.currentLoader=n,this.compiler=s,this.parser=r,this.missingTranslationHandler=o,this.useDefaultLang=u,this.isolate=h,this.extend=b,this.pending=!1,this._onTranslationChange=new H,this._onLangChange=new H,this._onDefaultLangChange=new H,this._langs=[],this._translations={},this._translationRequests={},y&&this.setDefaultLang(y)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(br(1)).subscribe(s=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return oe(this.translations[e]);let n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(br(1)).subscribe(s=>{this.changeLang(e)}),n):(this.changeLang(e),oe(this.translations[e]))}retrieveTranslations(e){let n;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),n=this._translationRequests[e]),n}getTranslation(e){this.pending=!0;const n=this.currentLoader.getTranslation(e).pipe(Gm(1),br(1));return this.loadingTranslations=n.pipe(et(s=>this.compiler.compileTranslations(s,e)),Gm(1),br(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?Object.assign(Object.assign({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),n}setTranslation(e,n,s=!1){n=this.compiler.compileTranslations(n,e),this.translations[e]=(s||this.extend)&&this.translations[e]?l0(this.translations[e],n):n,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(n=>{-1===this.langs.indexOf(n)&&this.langs.push(n)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,n,s){let r;if(n instanceof Array){let o={},u=!1;for(let h of n)o[h]=this.getParsedResult(e,h,s),ns(o[h])&&(u=!0);return u?n0(n.map(b=>ns(o[b])?o[b]:oe(o[b]))).pipe(et(b=>{let y={};return b.forEach((w,M)=>{y[n[M]]=w}),y})):o}if(e&&(r=this.parser.interpolate(this.parser.getValue(e,n),s)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],n),s)),void 0===r){let o={key:n,translateService:this};void 0!==s&&(o.interpolateParams=s),r=this.missingTranslationHandler.handle(o)}return void 0!==r?r:n}get(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(_r(s=>ns(s=this.getParsedResult(s,e,n))?s:oe(s)));{let s=this.getParsedResult(this.translations[this.currentLang],e,n);return ns(s)?s:oe(s)}}getStreamOnTranslationChange(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');return el(lu(()=>this.get(e,n)),this.onTranslationChange.pipe(qi(s=>{const r=this.getParsedResult(s.translations,e,n);return"function"==typeof r.subscribe?r:oe(r)})))}stream(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');return el(lu(()=>this.get(e,n)),this.onLangChange.pipe(qi(s=>{const r=this.getParsedResult(s.translations,e,n);return ns(r)?r:oe(r)})))}instant(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');let s=this.getParsedResult(this.translations[this.currentLang],e,n);if(ns(s)){if(e instanceof Array){let r={};return e.forEach((o,u)=>{r[e[u]]=e[u]}),r}return e}return s}set(e,n,s=this.currentLang){this.translations[s][e]=this.compiler.compile(n,s),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==e?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}}return t.\u0275fac=function(e){return new(e||t)(K(d0),K(nl),K(pu),K(du),K(zm),K(Wm),K($m),K(Qm),K(Km))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),hu=(()=>{class t{constructor(e,n,s){this.translateService=e,this.element=n,this._ref=s,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(r=>{r.lang===this.translateService.currentLang&&this.checkNodes(!0,r.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(r=>{this.checkNodes(!0,r.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(r=>{this.checkNodes(!0)}))}set translate(e){e&&(this.key=e,this.checkNodes())}set translateParams(e){il(this.currentParams,e)||(this.currentParams=e,this.checkNodes(!0))}ngAfterViewChecked(){this.checkNodes()}checkNodes(e=!1,n){let s=this.element.nativeElement.childNodes;s.length||(this.setContent(this.element.nativeElement,this.key),s=this.element.nativeElement.childNodes);for(let r=0;r{o!==e&&(n.lastKey=e),n.originalContent||(n.originalContent=this.getContent(n)),n.currentValue=si(o)?o:n.originalContent||e,this.setContent(n,this.key?n.currentValue:n.originalContent.replace(e,n.currentValue)),this._ref.markForCheck()};if(si(s)){let o=this.translateService.getParsedResult(s,e,this.currentParams);ns(o)?o.subscribe({next:r}):r(o)}else this.translateService.get(e,this.currentParams).subscribe(r)}}getContent(e){return si(e.textContent)?e.textContent:e.data}setContent(e,n){si(e.textContent)?e.textContent=n:e.data=n}ngOnDestroy(){this.onLangChangeSub&&this.onLangChangeSub.unsubscribe(),this.onDefaultLangChangeSub&&this.onDefaultLangChangeSub.unsubscribe(),this.onTranslationChangeSub&&this.onTranslationChangeSub.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Re),x(ot))},t.\u0275dir=le({type:t,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}}),t})(),de=(()=>{class t{constructor(e,n){this.translate=e,this._ref=n,this.value="",this.lastKey=null,this.lastParams=[]}updateValue(e,n,s){let r=o=>{this.value=void 0!==o?o:e,this.lastKey=e,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(s,e,n);ns(o.subscribe)?o.subscribe(r):r(o)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(il(e,this.lastKey)&&il(n,this.lastParams))return this.value;let s;if(si(n[0])&&n.length)if("string"==typeof n[0]&&n[0].length){let r=n[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else"object"==typeof n[0]&&!Array.isArray(n[0])&&(s=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(x(Le,16),x(ot,16))},t.\u0275pipe=An({name:"translate",type:t,pure:!1}),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),UO=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:nl,useClass:o0},e.compiler||{provide:pu,useClass:u0},e.parser||{provide:du,useClass:c0},e.missingTranslationHandler||{provide:zm,useClass:a0},d0,{provide:$m,useValue:e.isolate},{provide:Wm,useValue:e.useDefaultLang},{provide:Qm,useValue:e.extend},{provide:Km,useValue:e.defaultLanguage},Le]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:nl,useClass:o0},e.compiler||{provide:pu,useClass:u0},e.parser||{provide:du,useClass:c0},e.missingTranslationHandler||{provide:zm,useClass:a0},{provide:$m,useValue:e.isolate},{provide:Wm,useValue:e.useDefaultLang},{provide:Qm,useValue:e.extend},{provide:Km,useValue:e.defaultLanguage},Le]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();class GO{constructor(i,e="/assets/i18n/",n=".json"){this.http=i,this.prefix=e,this.suffix=n}getTranslation(i){return this.http.get(`${this.prefix}${i}${this.suffix}`)}}let p0=(()=>{class t{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(x(wn),x(Re))},t.\u0275dir=le({type:t}),t})(),vr=(()=>{class t extends p0{}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,features:[ut]}),t})();const dn=new be("NgValueAccessor"),jO={provide:dn,useExisting:Ue(()=>Ye),multi:!0},WO=new be("CompositionEventMode");let Ye=(()=>{class t extends p0{constructor(e,n,s){super(e,n),this._compositionMode=s,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function $O(){const t=ts()?ts().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",null==e?"":e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(x(wn),x(Re),x(WO,8))},t.\u0275dir=le({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&C("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},features:[Ne([jO]),ut]}),t})();function Us(t){return null==t||0===t.length}const Rn=new be("NgValidators"),Gs=new be("NgAsyncValidators");function _0(t){return Us(t.value)?{required:!0}:null}function mu(t){return null}function T0(t){return null!=t}function S0(t){const i=Ra(t)?Dn(t):t;return Dh(i),i}function x0(t){let i={};return t.forEach(e=>{i=null!=e?Object.assign(Object.assign({},i),e):i}),0===Object.keys(i).length?null:i}function D0(t,i){return i.map(e=>e(t))}function M0(t){return t.map(i=>function QO(t){return!t.validate}(i)?i:e=>i.validate(e))}function Jm(t){return null!=t?function k0(t){if(!t)return null;const i=t.filter(T0);return 0==i.length?null:function(e){return x0(D0(e,i))}}(M0(t)):null}function Ym(t){return null!=t?function I0(t){if(!t)return null;const i=t.filter(T0);return 0==i.length?null:function(e){return n0(D0(e,i).map(S0)).pipe(et(x0))}}(M0(t)):null}function E0(t,i){return null===t?[i]:Array.isArray(t)?[...t,i]:[t,i]}function Zm(t){return t?Array.isArray(t)?t:[t]:[]}function fu(t,i){return Array.isArray(t)?t.includes(i):t===i}function O0(t,i){const e=Zm(i);return Zm(t).forEach(s=>{fu(e,s)||e.push(s)}),e}function A0(t,i){return Zm(i).filter(e=>!fu(t,e))}class P0{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=Jm(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=Ym(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i){this.control&&this.control.reset(i)}hasError(i,e){return!!this.control&&this.control.hasError(i,e)}getError(i,e){return this.control?this.control.getError(i,e):null}}class is extends P0{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Gn extends P0{get formDirective(){return null}get path(){return null}}class F0{constructor(i){this._cd=i}is(i){var e,n,s;return"submitted"===i?!!(null===(e=this._cd)||void 0===e?void 0:e.submitted):!!(null===(s=null===(n=this._cd)||void 0===n?void 0:n.control)||void 0===s?void 0:s[i])}}let Te=(()=>{class t extends F0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(x(is,2))},t.\u0275dir=le({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ii("ng-untouched",n.is("untouched"))("ng-touched",n.is("touched"))("ng-pristine",n.is("pristine"))("ng-dirty",n.is("dirty"))("ng-valid",n.is("valid"))("ng-invalid",n.is("invalid"))("ng-pending",n.is("pending"))},features:[ut]}),t})(),Ge=(()=>{class t extends F0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(x(Gn,10))},t.\u0275dir=le({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ii("ng-untouched",n.is("untouched"))("ng-touched",n.is("touched"))("ng-pristine",n.is("pristine"))("ng-dirty",n.is("dirty"))("ng-valid",n.is("valid"))("ng-invalid",n.is("invalid"))("ng-pending",n.is("pending"))("ng-submitted",n.is("submitted"))},features:[ut]}),t})();function sl(t,i){tf(t,i),i.valueAccessor.writeValue(t.value),function iA(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&V0(t,i)})}(t,i),function rA(t,i){const e=(n,s)=>{i.valueAccessor.writeValue(n),s&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,i),function sA(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&V0(t,i),"submit"!==t.updateOn&&t.markAsTouched()})}(t,i),function nA(t,i){if(i.valueAccessor.setDisabledState){const e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,i)}function vu(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function tf(t,i){const e=function R0(t){return t._rawValidators}(t);null!==i.validator?t.setValidators(E0(e,i.validator)):"function"==typeof e&&t.setValidators([e]);const n=function L0(t){return t._rawAsyncValidators}(t);null!==i.asyncValidator?t.setAsyncValidators(E0(n,i.asyncValidator)):"function"==typeof n&&t.setAsyncValidators([n]);const s=()=>t.updateValueAndValidity();vu(i._rawValidators,s),vu(i._rawAsyncValidators,s)}function V0(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function rf(t,i){const e=t.indexOf(i);e>-1&&t.splice(e,1)}const rl="VALID",yu="INVALID",Eo="PENDING",ol="DISABLED";function af(t){return(wu(t)?t.validators:t)||null}function U0(t){return Array.isArray(t)?Jm(t):t||null}function lf(t,i){return(wu(i)?i.asyncValidators:t)||null}function G0(t){return Array.isArray(t)?Ym(t):t||null}function wu(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}const cf=t=>t instanceof df;function j0(t){return(t=>t instanceof K0)(t)?t.value:t.getRawValue()}function $0(t,i){const e=cf(t),n=t.controls;if(!(e?Object.keys(n):n).length)throw new re(1e3,"");if(!n[i])throw new re(1001,"")}function W0(t,i){cf(t),t._forEachChild((n,s)=>{if(void 0===i[s])throw new re(1002,"")})}class uf{constructor(i,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=i,this._rawAsyncValidators=e,this._composedValidatorFn=U0(this._rawValidators),this._composedAsyncValidatorFn=G0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get valid(){return this.status===rl}get invalid(){return this.status===yu}get pending(){return this.status==Eo}get disabled(){return this.status===ol}get enabled(){return this.status!==ol}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._rawValidators=i,this._composedValidatorFn=U0(i)}setAsyncValidators(i){this._rawAsyncValidators=i,this._composedAsyncValidatorFn=G0(i)}addValidators(i){this.setValidators(O0(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(O0(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(A0(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(A0(i,this._rawAsyncValidators))}hasValidator(i){return fu(this._rawValidators,i)}hasAsyncValidator(i){return fu(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){this.touched=!0,this._parent&&!i.onlySelf&&this._parent.markAsTouched(i)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(i=>i.markAllAsTouched())}markAsUntouched(i={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}markAsDirty(i={}){this.pristine=!1,this._parent&&!i.onlySelf&&this._parent.markAsDirty(i)}markAsPristine(i={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}markAsPending(i={}){this.status=Eo,!1!==i.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!i.onlySelf&&this._parent.markAsPending(i)}disable(i={}){const e=this._parentMarkedDirty(i.onlySelf);this.status=ol,this.errors=null,this._forEachChild(n=>{n.disable(Object.assign(Object.assign({},i),{onlySelf:!0}))}),this._updateValue(),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},i),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!0))}enable(i={}){const e=this._parentMarkedDirty(i.onlySelf);this.status=rl,this._forEachChild(n=>{n.enable(Object.assign(Object.assign({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},i),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(i){this._parent=i}updateValueAndValidity(i={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rl||this.status===Eo)&&this._runAsyncValidator(i.emitEvent)),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(i)}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ol:rl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i){if(this.asyncValidator){this.status=Eo,this._hasOwnPendingAsyncValidator=!0;const e=S0(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:i})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(!1!==e.emitEvent)}get(i){return function cA(t,i,e){if(null==i||(Array.isArray(i)||(i=i.split(e)),Array.isArray(i)&&0===i.length))return null;let n=t;return i.forEach(s=>{n=cf(n)?n.controls.hasOwnProperty(s)?n.controls[s]:null:(t=>t instanceof dA)(n)&&n.at(s)||null}),n}(this,i,".")}getError(i,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(i)}_initObservables(){this.valueChanges=new H,this.statusChanges=new H}_calculateStatus(){return this._allControlsDisabled()?ol:this.errors?yu:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Eo)?Eo:this._anyControlsHaveStatus(yu)?yu:rl}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i={}){this.pristine=!this._anyControlsDirty(),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}_updateTouched(i={}){this.touched=this._anyControlsTouched(),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}_isBoxedValue(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){wu(i)&&null!=i.updateOn&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class K0 extends uf{constructor(i=null,e,n){super(af(e),lf(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),wu(e)&&e.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(i)?i.value:i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(n=>n(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){rf(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){rf(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(i){this._isBoxedValue(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}}class df extends uf{constructor(i,e,n){super(af(e),lf(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){W0(this,i),Object.keys(i).forEach(n=>{$0(this,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){null!=i&&(Object.keys(i).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,s)=>{n.reset(i[s],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=j0(e),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>!!n._syncPendingControls()||e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{const n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&i(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(i,e,n)=>((e.enabled||this.disabled)&&(i[n]=e.value),i))}_reduceChildren(i,e){let n=i;return this._forEachChild((s,r)=>{n=e(n,s,r)}),n}_allControlsDisabled(){for(const i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class dA extends uf{constructor(i,e,n){super(af(e),lf(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(i){return this.controls[i]}push(i,e={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,n={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){W0(this,i),i.forEach((n,s)=>{$0(this,s),this.at(s).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){null!=i&&(i.forEach((n,s)=>{this.at(s)&&this.at(s).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((n,s)=>{n.reset(i[s],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(i=>j0(i))}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_syncPendingControls(){let i=this.controls.reduce((e,n)=>!!n._syncPendingControls()||e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,n)=>{i(e,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(const i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}}const pA={provide:Gn,useExisting:Ue(()=>He)},al=(()=>Promise.resolve(null))();let He=(()=>{class t extends Gn{constructor(e,n){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new H,this.form=new df({},Jm(e),Ym(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){al.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),sl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){al.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){al.then(()=>{const n=this._findContainer(e.path),s=new df({});(function B0(t,i){tf(t,i)})(s,e),n.registerControl(e.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){al.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){al.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,function q0(t,i){t._syncPendingControls(),i.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return t.\u0275fac=function(e){return new(e||t)(x(Rn,10),x(Gs,10))},t.\u0275dir=le({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&C("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ne([pA]),ut]}),t})();const mA={provide:is,useExisting:Ue(()=>_e)},Y0=(()=>Promise.resolve(null))();let _e=(()=>{class t extends is{constructor(e,n,s,r,o){super(),this._changeDetectorRef=o,this.control=new K0,this._registered=!1,this.update=new H,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=function sf(t,i){if(!i)return null;let e,n,s;return Array.isArray(i),i.forEach(r=>{r.constructor===Ye?e=r:function lA(t){return Object.getPrototypeOf(t.constructor)===vr}(r)?n=r:s=r}),s||n||e||null}(0,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function nf(t,i){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(i,e.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){sl(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Y0.then(()=>{var n;this.control.setValue(e,{emitViewToModelChange:!1}),null===(n=this._changeDetectorRef)||void 0===n||n.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,s=""===n||n&&"false"!==n;Y0.then(()=>{var r;s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),null===(r=this._changeDetectorRef)||void 0===r||r.markForCheck()})}_getPath(e){return this._parent?function _u(t,i){return[...i.path,t]}(e,this._parent):[e]}}return t.\u0275fac=function(e){return new(e||t)(x(Gn,9),x(Rn,10),x(Gs,10),x(dn,10),x(ot,8))},t.\u0275dir=le({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ne([mA]),ut,mn]}),t})(),ze=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const fA={provide:dn,useExisting:Ue(()=>Tu),multi:!0};let Tu=(()=>{class t extends vr{writeValue(e){this.setProperty("value",null==e?"":e)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&C("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},features:[Ne([fA]),ut]}),t})(),Z0=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();const pf=new be("NgModelWithFormControlWarning");function aw(t){return"number"==typeof t?t:parseFloat(t)}let Cr=(()=>{class t{constructor(){this._validator=mu}ngOnChanges(e){if(this.inputName in e){const n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):mu,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,features:[mn]}),t})();const RA={provide:Rn,useExisting:Ue(()=>Su),multi:!0};let Su=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>aw(e),this.createValidator=e=>function g0(t){return i=>{if(Us(i.value)||Us(t))return null;const e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}(e)}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&ne("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Ne([RA]),ut]}),t})();const LA={provide:Rn,useExisting:Ue(()=>xu),multi:!0};let xu=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>aw(e),this.createValidator=e=>function f0(t){return i=>{if(Us(i.value)||Us(t))return null;const e=parseFloat(i.value);return!isNaN(e)&&ell),multi:!0};let ll=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=e=>function EA(t){return null!=t&&!1!==t&&"false"!=`${t}`}(e),this.createValidator=e=>_0}enabled(e){return e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&ne("required",n._enabled?"":null)},inputs:{required:"required"},features:[Ne([OA]),ut]}),t})();const NA={provide:Rn,useExisting:Ue(()=>fn),multi:!0};let fn=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>function ow(t){return"number"==typeof t?t:parseInt(t,10)}(e),this.createValidator=e=>function y0(t){return i=>function m0(t){return null!=t&&"number"==typeof t.length}(i.value)&&i.value.length>t?{maxlength:{requiredLength:t,actualLength:i.value.length}}:null}(e)}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&ne("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Ne([NA]),ut]}),t})(),pw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Z0]]}),t})(),Du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[pw]}),t})(),BA=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:pf,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[pw]}),t})();class hw{}const vs="*";function wi(t,i){return{type:7,name:t,definitions:i,options:{}}}function kt(t,i=null){return{type:4,styles:i,timings:t}}function mw(t,i=null){return{type:2,steps:t,options:i}}function it(t){return{type:6,styles:t,offset:null}}function Cs(t,i,e){return{type:0,name:t,styles:i,options:e}}function Ot(t,i,e=null){return{type:1,expr:t,animation:i,options:e}}function Mu(t,i=null){return{type:8,animation:t,options:i}}function qA(t=null){return{type:9,options:t}}function fw(t,i=null){return{type:10,animation:t,options:i}}function UA(t,i,e=null){return{type:11,selector:t,animation:i,options:e}}function gw(t){Promise.resolve(null).then(t)}class cl{constructor(i=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._onStartFns.push(i)}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){gw(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class _w{constructor(i){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=i;let e=0,n=0,s=0;const r=this.players.length;0==r?gw(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++e==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,u)=>Math.max(o,u.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){const e=i*this.totalTime;this.players.forEach(n=>{const s=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(s)})}getPosition(){const i=this.players.reduce((e,n)=>null===e||n.totalTime>e.totalTime?n:e,null);return null!=i?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}const Ze=!1;function bw(t){return new re(3e3,Ze)}function wP(){return"undefined"!=typeof window&&void 0!==window.document}function vf(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function zs(t){switch(t.length){case 0:return new cl;case 1:return t[0];default:return new _w(t)}}function vw(t,i,e,n,s={},r={}){const o=[],u=[];let h=-1,b=null;if(n.forEach(y=>{const w=y.offset,M=w==h,E=M&&b||{};Object.keys(y).forEach(R=>{let O=R,N=y[R];if("offset"!==R)switch(O=i.normalizePropertyName(O,o),N){case"!":N=s[R];break;case vs:N=r[R];break;default:N=i.normalizeStyleValue(R,O,N,o)}E[O]=N}),M||u.push(E),b=E,h=w}),o.length)throw function dP(t){return new re(3502,Ze)}();return u}function Cf(t,i,e,n){switch(i){case"start":t.onStart(()=>n(e&&yf(e,"start",t)));break;case"done":t.onDone(()=>n(e&&yf(e,"done",t)));break;case"destroy":t.onDestroy(()=>n(e&&yf(e,"destroy",t)))}}function yf(t,i,e){const n=e.totalTime,r=wf(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,null==n?t.totalTime:n,!!e.disabled),o=t._data;return null!=o&&(r._data=o),r}function wf(t,i,e,n,s="",r=0,o){return{element:t,triggerName:i,fromState:e,toState:n,phaseName:s,totalTime:r,disabled:!!o}}function ri(t,i,e){let n;return t instanceof Map?(n=t.get(i),n||t.set(i,n=e)):(n=t[i],n||(n=t[i]=e)),n}function Cw(t){const i=t.indexOf(":");return[t.substring(1,i),t.substr(i+1)]}let Tf=(t,i)=>!1,yw=(t,i,e)=>[],ww=null;function Sf(t){const i=t.parentNode||t.host;return i===ww?null:i}(vf()||"undefined"!=typeof Element)&&(wP()?(ww=(()=>document.documentElement)(),Tf=(t,i)=>{for(;i;){if(i===t)return!0;i=Sf(i)}return!1}):Tf=(t,i)=>t.contains(i),yw=(t,i,e)=>{if(e)return Array.from(t.querySelectorAll(i));const n=t.querySelector(i);return n?[n]:[]});let yr=null,Tw=!1;function Sw(t){yr||(yr=function SP(){return"undefined"!=typeof document?document.body:null}()||{},Tw=!!yr.style&&"WebkitAppearance"in yr.style);let i=!0;return yr.style&&!function TP(t){return"ebkit"==t.substring(1,6)}(t)&&(i=t in yr.style,!i&&Tw&&(i="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in yr.style)),i}const xw=Tf,Dw=yw;let Mw=(()=>{class t{validateStyleProperty(e){return Sw(e)}matchesElement(e,n){return!1}containsElement(e,n){return xw(e,n)}getParentElement(e){return Sf(e)}query(e,n,s){return Dw(e,n,s)}computeStyle(e,n,s){return s||""}animate(e,n,s,r,o,u=[],h){return new cl(s,r)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),xf=(()=>{class t{}return t.NOOP=new Mw,t})();const Df="ng-enter",Iu="ng-leave",Eu="ng-trigger",Ru=".ng-trigger",Iw="ng-animating",Mf=".ng-animating";function wr(t){if("number"==typeof t)return t;const i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:kf(parseFloat(i[1]),i[2])}function kf(t,i){return"s"===i?1e3*t:t}function Lu(t,i,e){return t.hasOwnProperty("duration")?t:function MP(t,i,e){let s,r=0,o="";if("string"==typeof t){const u=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===u)return i.push(bw()),{duration:0,delay:0,easing:""};s=kf(parseFloat(u[1]),u[2]);const h=u[3];null!=h&&(r=kf(parseFloat(h),u[4]));const b=u[5];b&&(o=b)}else s=t;if(!e){let u=!1,h=i.length;s<0&&(i.push(function GA(){return new re(3100,Ze)}()),u=!0),r<0&&(i.push(function zA(){return new re(3101,Ze)}()),u=!0),u&&i.splice(h,0,bw())}return{duration:s,delay:r,easing:o}}(t,i,e)}function Ro(t,i={}){return Object.keys(t).forEach(e=>{i[e]=t[e]}),i}function js(t,i,e={}){if(i)for(let n in t)e[n]=t[n];else Ro(t,e);return e}function Rw(t,i,e){return e?i+":"+e+";":""}function Lw(t){let i="";for(let e=0;e{const s=Ef(n);e&&!e.hasOwnProperty(n)&&(e[n]=t.style[s]),t.style[s]=i[n]}),vf()&&Lw(t))}function Tr(t,i){t.style&&(Object.keys(i).forEach(e=>{const n=Ef(e);t.style[n]=""}),vf()&&Lw(t))}function ul(t){return Array.isArray(t)?1==t.length?t[0]:mw(t):t}const If=new RegExp("{{\\s*(.+?)\\s*}}","g");function Ow(t){let i=[];if("string"==typeof t){let e;for(;e=If.exec(t);)i.push(e[1]);If.lastIndex=0}return i}function Ou(t,i,e){const n=t.toString(),s=n.replace(If,(r,o)=>{let u=i[o];return i.hasOwnProperty(o)||(e.push(function $A(t){return new re(3003,Ze)}()),u=""),u.toString()});return s==n?t:s}function Au(t){const i=[];let e=t.next();for(;!e.done;)i.push(e.value),e=t.next();return i}const IP=/-+([a-z0-9])/g;function Ef(t){return t.replace(IP,(...i)=>i[1].toUpperCase())}function EP(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function oi(t,i,e){switch(i.type){case 7:return t.visitTrigger(i,e);case 0:return t.visitState(i,e);case 1:return t.visitTransition(i,e);case 2:return t.visitSequence(i,e);case 3:return t.visitGroup(i,e);case 4:return t.visitAnimate(i,e);case 5:return t.visitKeyframes(i,e);case 6:return t.visitStyle(i,e);case 8:return t.visitReference(i,e);case 9:return t.visitAnimateChild(i,e);case 10:return t.visitAnimateRef(i,e);case 11:return t.visitQuery(i,e);case 12:return t.visitStagger(i,e);default:throw function WA(t){return new re(3004,Ze)}()}}function Aw(t,i){return window.getComputedStyle(t)[i]}function FP(t,i){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(n=>function NP(t,i,e){if(":"==t[0]){const h=function VP(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}(t,e);if("function"==typeof h)return void i.push(h);t=h}const n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return e.push(function oP(t){return new re(3015,Ze)}()),i;const s=n[1],r=n[2],o=n[3];i.push(Pw(s,o));"<"==r[0]&&!("*"==s&&"*"==o)&&i.push(Pw(o,s))}(n,e,i)):e.push(t),e}const Vu=new Set(["true","1"]),Bu=new Set(["false","0"]);function Pw(t,i){const e=Vu.has(t)||Bu.has(t),n=Vu.has(i)||Bu.has(i);return(s,r)=>{let o="*"==t||t==s,u="*"==i||i==r;return!o&&e&&"boolean"==typeof s&&(o=s?Vu.has(t):Bu.has(t)),!u&&n&&"boolean"==typeof r&&(u=r?Vu.has(i):Bu.has(i)),o&&u}}const BP=new RegExp("s*:selfs*,?","g");function Rf(t,i,e,n){return new HP(t).build(i,e,n)}class HP{constructor(i){this._driver=i}build(i,e,n){const s=new GP(e);this._resetContextStyleTimingState(s);const r=oi(this,ul(i),s);return s.unsupportedCSSPropertiesFound.size&&s.unsupportedCSSPropertiesFound.keys(),r}_resetContextStyleTimingState(i){i.currentQuerySelector="",i.collectedStyles={},i.collectedStyles[""]={},i.currentTime=0}visitTrigger(i,e){let n=e.queryCount=0,s=e.depCount=0;const r=[],o=[];return"@"==i.name.charAt(0)&&e.errors.push(function QA(){return new re(3006,Ze)}()),i.definitions.forEach(u=>{if(this._resetContextStyleTimingState(e),0==u.type){const h=u,b=h.name;b.toString().split(/\s*,\s*/).forEach(y=>{h.name=y,r.push(this.visitState(h,e))}),h.name=b}else if(1==u.type){const h=this.visitTransition(u,e);n+=h.queryCount,s+=h.depCount,o.push(h)}else e.errors.push(function JA(){return new re(3007,Ze)}())}),{type:7,name:i.name,states:r,transitions:o,queryCount:n,depCount:s,options:null}}visitState(i,e){const n=this.visitStyle(i.styles,e),s=i.options&&i.options.params||null;if(n.containsDynamicStyles){const r=new Set,o=s||{};n.styles.forEach(u=>{if(Hu(u)){const h=u;Object.keys(h).forEach(b=>{Ow(h[b]).forEach(y=>{o.hasOwnProperty(y)||r.add(y)})})}}),r.size&&(Au(r.values()),e.errors.push(function YA(t,i){return new re(3008,Ze)}()))}return{type:0,name:i.name,style:n,options:s?{params:s}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;const n=oi(this,ul(i.animation),e);return{type:1,matchers:FP(i.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Sr(i.options)}}visitSequence(i,e){return{type:2,steps:i.steps.map(n=>oi(this,n,e)),options:Sr(i.options)}}visitGroup(i,e){const n=e.currentTime;let s=0;const r=i.steps.map(o=>{e.currentTime=n;const u=oi(this,o,e);return s=Math.max(s,e.currentTime),u});return e.currentTime=s,{type:3,steps:r,options:Sr(i.options)}}visitAnimate(i,e){const n=function jP(t,i){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return Lf(Lu(t,i).duration,0,"");const e=t;if(e.split(/\s+/).some(r=>"{"==r.charAt(0)&&"{"==r.charAt(1))){const r=Lf(0,0,"");return r.dynamic=!0,r.strValue=e,r}const s=Lu(e,i);return Lf(s.duration,s.delay,s.easing)}(i.timings,e.errors);e.currentAnimateTimings=n;let s,r=i.styles?i.styles:it({});if(5==r.type)s=this.visitKeyframes(r,e);else{let o=i.styles,u=!1;if(!o){u=!0;const b={};n.easing&&(b.easing=n.easing),o=it(b)}e.currentTime+=n.duration+n.delay;const h=this.visitStyle(o,e);h.isEmptyStep=u,s=h}return e.currentAnimateTimings=null,{type:4,timings:n,style:s,options:null}}visitStyle(i,e){const n=this._makeStyleAst(i,e);return this._validateStyleAst(n,e),n}_makeStyleAst(i,e){const n=[];Array.isArray(i.styles)?i.styles.forEach(o=>{"string"==typeof o?o==vs?n.push(o):e.errors.push(function ZA(t){return new re(3002,Ze)}()):n.push(o)}):n.push(i.styles);let s=!1,r=null;return n.forEach(o=>{if(Hu(o)){const u=o,h=u.easing;if(h&&(r=h,delete u.easing),!s)for(let b in u)if(u[b].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:n,easing:r,offset:i.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(i,e){const n=e.currentAnimateTimings;let s=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),i.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(u=>{if(!this._driver.validateStyleProperty(u))return delete o[u],void e.unsupportedCSSPropertiesFound.add(u);const h=e.collectedStyles[e.currentQuerySelector],b=h[u];let y=!0;b&&(r!=s&&r>=b.startTime&&s<=b.endTime&&(e.errors.push(function XA(t,i,e,n,s){return new re(3010,Ze)}()),y=!1),r=b.startTime),y&&(h[u]={startTime:r,endTime:s}),e.options&&function kP(t,i,e){const n=i.params||{},s=Ow(t);s.length&&s.forEach(r=>{n.hasOwnProperty(r)||e.push(function jA(t){return new re(3001,Ze)}())})}(o[u],e.options,e.errors)})})}visitKeyframes(i,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function eP(){return new re(3011,Ze)}()),n;let r=0;const o=[];let u=!1,h=!1,b=0;const y=i.steps.map(U=>{const P=this._makeStyleAst(U,e);let J=null!=P.offset?P.offset:function zP(t){if("string"==typeof t)return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(Hu(e)&&e.hasOwnProperty("offset")){const n=e;i=parseFloat(n.offset),delete n.offset}});else if(Hu(t)&&t.hasOwnProperty("offset")){const e=t;i=parseFloat(e.offset),delete e.offset}return i}(P.styles),se=0;return null!=J&&(r++,se=P.offset=J),h=h||se<0||se>1,u=u||se0&&r{const J=M>0?P==E?1:M*P:o[P],se=J*N;e.currentTime=R+O.delay+se,O.duration=se,this._validateStyleAst(U,e),U.offset=J,n.styles.push(U)}),n}visitReference(i,e){return{type:8,animation:oi(this,ul(i.animation),e),options:Sr(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:9,options:Sr(i.options)}}visitAnimateRef(i,e){return{type:10,animation:this.visitReference(i.animation,e),options:Sr(i.options)}}visitQuery(i,e){const n=e.currentQuerySelector,s=i.options||{};e.queryCount++,e.currentQuery=i;const[r,o]=function qP(t){const i=!!t.split(/\s*,\s*/).find(e=>":self"==e);return i&&(t=t.replace(BP,"")),t=t.replace(/@\*/g,Ru).replace(/@\w+/g,e=>Ru+"-"+e.substr(1)).replace(/:animating/g,Mf),[t,i]}(i.selector);e.currentQuerySelector=n.length?n+" "+r:r,ri(e.collectedStyles,e.currentQuerySelector,{});const u=oi(this,ul(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:s.limit||0,optional:!!s.optional,includeSelf:o,animation:u,originalSelector:i.selector,options:Sr(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(function sP(){return new re(3013,Ze)}());const n="full"===i.timings?{duration:0,delay:0,easing:"full"}:Lu(i.timings,e.errors,!0);return{type:12,animation:oi(this,ul(i.animation),e),timings:n,options:null}}}class GP{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Hu(t){return!Array.isArray(t)&&"object"==typeof t}function Sr(t){return t?(t=Ro(t)).params&&(t.params=function UP(t){return t?Ro(t):null}(t.params)):t={},t}function Lf(t,i,e){return{duration:t,delay:i,easing:e}}function Of(t,i,e,n,s,r,o=null,u=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:n,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:u}}class qu{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,e){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}}const KP=new RegExp(":enter","g"),JP=new RegExp(":leave","g");function Af(t,i,e,n,s,r={},o={},u,h,b=[]){return(new YP).buildKeyframes(t,i,e,n,s,r,o,u,h,b)}class YP{buildKeyframes(i,e,n,s,r,o,u,h,b,y=[]){b=b||new qu;const w=new Pf(i,e,b,s,r,y,[]);w.options=h,w.currentTimeline.setStyles([o],null,w.errors,h),oi(this,n,w);const M=w.timelines.filter(E=>E.containsAnimation());if(Object.keys(u).length){let E;for(let R=M.length-1;R>=0;R--){const O=M[R];if(O.element===e){E=O;break}}E&&!E.allowOnlyTimelineStyles()&&E.setStyles([u],null,w.errors,h)}return M.length?M.map(E=>E.buildKeyframes()):[Of(e,[],[],[],0,0,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){const n=e.subInstructions.get(e.element);if(n){const s=e.createSubContext(i.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,s,s.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=i}visitAnimateRef(i,e){const n=e.createSubContext(i.options);n.transformIntoNewTimeline(),this.visitReference(i.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=i}_visitSubInstructions(i,e,n){let r=e.currentTimeline.currentTime;const o=null!=n.duration?wr(n.duration):null,u=null!=n.delay?wr(n.delay):null;return 0!==o&&i.forEach(h=>{const b=e.appendInstructionToTimeline(h,o,u);r=Math.max(r,b.duration+b.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),oi(this,i.animation,e),e.previousNode=i}visitSequence(i,e){const n=e.subContextCount;let s=e;const r=i.options;if(r&&(r.params||r.delay)&&(s=e.createSubContext(r),s.transformIntoNewTimeline(),null!=r.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=Uu);const o=wr(r.delay);s.delayNextStep(o)}i.steps.length&&(i.steps.forEach(o=>oi(this,o,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>n&&s.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){const n=[];let s=e.currentTimeline.currentTime;const r=i.options&&i.options.delay?wr(i.options.delay):0;i.steps.forEach(o=>{const u=e.createSubContext(i.options);r&&u.delayNextStep(r),oi(this,o,u),s=Math.max(s,u.currentTimeline.currentTime),n.push(u.currentTimeline)}),n.forEach(o=>e.currentTimeline.mergeTimelineCollectedStyles(o)),e.transformIntoNewTimeline(s),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){const n=i.strValue;return Lu(e.params?Ou(n,e.params,e.errors):n,e.errors)}return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){const n=e.currentAnimateTimings=this._visitTiming(i.timings,e),s=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),s.snapshotCurrentStyles());const r=i.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),s.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){const n=e.currentTimeline,s=e.currentAnimateTimings;!s&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=s&&s.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(r):n.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){const n=e.currentAnimateTimings,s=e.currentTimeline.duration,r=n.duration,u=e.createSubContext().currentTimeline;u.easing=n.easing,i.styles.forEach(h=>{u.forwardTime((h.offset||0)*r),u.setStyles(h.styles,h.easing,e.errors,e.options),u.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(u),e.transformIntoNewTimeline(s+r),e.previousNode=i}visitQuery(i,e){const n=e.currentTimeline.currentTime,s=i.options||{},r=s.delay?wr(s.delay):0;r&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Uu);let o=n;const u=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!s.optional,e.errors);e.currentQueryTotal=u.length;let h=null;u.forEach((b,y)=>{e.currentQueryIndex=y;const w=e.createSubContext(i.options,b);r&&w.delayNextStep(r),b===e.element&&(h=w.currentTimeline),oi(this,i.animation,w),w.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,w.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),h&&(e.currentTimeline.mergeTimelineCollectedStyles(h),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){const n=e.parentContext,s=e.currentTimeline,r=i.timings,o=Math.abs(r.duration),u=o*(e.currentQueryTotal-1);let h=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":h=u-h;break;case"full":h=n.currentStaggerTime}const y=e.currentTimeline;h&&y.delayNextStep(h);const w=y.currentTime;oi(this,i.animation,e),e.previousNode=i,n.currentStaggerTime=s.currentTime-w+(s.startTime-n.currentTimeline.startTime)}}const Uu={};class Pf{constructor(i,e,n,s,r,o,u,h){this._driver=i,this.element=e,this.subInstructions=n,this._enterClassName=s,this._leaveClassName=r,this.errors=o,this.timelines=u,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Uu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=h||new Gu(this._driver,e,0),u.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;const n=i;let s=this.options;null!=n.duration&&(s.duration=wr(n.duration)),null!=n.delay&&(s.delay=wr(n.delay));const r=n.params;if(r){let o=s.params;o||(o=this.options.params={}),Object.keys(r).forEach(u=>{(!e||!o.hasOwnProperty(u))&&(o[u]=Ou(r[u],o,this.errors))})}}_copyOptions(){const i={};if(this.options){const e=this.options.params;if(e){const n=i.params={};Object.keys(e).forEach(s=>{n[s]=e[s]})}}return i}createSubContext(i=null,e,n){const s=e||this.element,r=new Pf(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=Uu,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,n){const s={duration:null!=e?e:i.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+i.delay,easing:""},r=new ZP(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,s,i.stretchStartingKeyframe);return this.timelines.push(r),s}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,n,s,r,o){let u=[];if(s&&u.push(this.element),i.length>0){i=(i=i.replace(KP,"."+this._enterClassName)).replace(JP,"."+this._leaveClassName);let b=this._driver.query(this.element,i,1!=n);0!==n&&(b=n<0?b.slice(b.length+n,b.length):b.slice(0,n)),u.push(...b)}return!r&&0==u.length&&o.push(function rP(t){return new re(3014,Ze)}()),u}}class Gu{constructor(i,e,n,s){this._driver=i,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=s,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(i){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new Gu(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles[i]=e,this._globalTimelineStyles[i]=e,this._styleSummary[i]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&(this._previousKeyframe.easing=i),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||vs,this._currentKeyframe[e]=vs}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,n,s){e&&(this._previousKeyframe.easing=e);const r=s&&s.params||{},o=function XP(t,i){const e={};let n;return t.forEach(s=>{"*"===s?(n=n||Object.keys(i),n.forEach(r=>{e[r]=vs})):js(s,!1,e)}),e}(i,this._globalTimelineStyles);Object.keys(o).forEach(u=>{const h=Ou(o[u],r,n);this._pendingStyles[u]=h,this._localTimelineStyles.hasOwnProperty(u)||(this._backFill[u]=this._globalTimelineStyles.hasOwnProperty(u)?this._globalTimelineStyles[u]:vs),this._updateStyle(u,h)})}applyStylesToKeyframe(){const i=this._pendingStyles,e=Object.keys(i);0!=e.length&&(this._pendingStyles={},e.forEach(n=>{this._currentKeyframe[n]=i[n]}),Object.keys(this._localTimelineStyles).forEach(n=>{this._currentKeyframe.hasOwnProperty(n)||(this._currentKeyframe[n]=this._localTimelineStyles[n])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(i=>{const e=this._localTimelineStyles[i];this._pendingStyles[i]=e,this._updateStyle(i,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){Object.keys(i._styleSummary).forEach(e=>{const n=this._styleSummary[e],s=i._styleSummary[e];(!n||s.time>n.time)&&this._updateStyle(e,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const i=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((u,h)=>{const b=js(u,!0);Object.keys(b).forEach(y=>{const w=b[y];"!"==w?i.add(y):w==vs&&e.add(y)}),n||(b.offset=h/this.duration),s.push(b)});const r=i.size?Au(i.values()):[],o=e.size?Au(e.values()):[];if(n){const u=s[0],h=Ro(u);u.offset=0,h.offset=1,s=[u,h]}return Of(this.element,s,r,o,this.duration,this.startTime,this.easing,!1)}}class ZP extends Gu{constructor(i,e,n,s,r,o,u=!1){super(i,e,o.delay),this.keyframes=n,this.preStyleProps=s,this.postStyleProps=r,this._stretchStartingKeyframe=u,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:n,easing:s}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],o=n+e,u=e/o,h=js(i[0],!1);h.offset=0,r.push(h);const b=js(i[0],!1);b.offset=Vw(u),r.push(b);const y=i.length-1;for(let w=1;w<=y;w++){let M=js(i[w],!1);M.offset=Vw((e+M.offset*n)/o),r.push(M)}n=o,e=0,s="",i=r}return Of(this.element,i,this.preStyleProps,this.postStyleProps,n,e,s,!0)}}function Vw(t,i=3){const e=Math.pow(10,i-1);return Math.round(t*e)/e}class Ff{}class eF extends Ff{normalizePropertyName(i,e){return Ef(i)}normalizeStyleValue(i,e,n,s){let r="";const o=n.toString().trim();if(tF[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const u=n.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&0==u[1].length&&s.push(function KA(t,i){return new re(3005,Ze)}())}return o+r}}const tF=(()=>function nF(t){const i={};return t.forEach(e=>i[e]=!0),i}("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".split(",")))();function Bw(t,i,e,n,s,r,o,u,h,b,y,w,M){return{type:0,element:t,triggerName:i,isRemovalTransition:s,fromState:e,fromStyles:r,toState:n,toStyles:o,timelines:u,queriedElements:h,preStyleProps:b,postStyleProps:y,totalTime:w,errors:M}}const Nf={};class Hw{constructor(i,e,n){this._triggerName=i,this.ast=e,this._stateStyles=n}match(i,e,n,s){return function iF(t,i,e,n,s){return t.some(r=>r(i,e,n,s))}(this.ast.matchers,i,e,n,s)}buildStyles(i,e,n){const s=this._stateStyles["*"],r=this._stateStyles[i],o=s?s.buildStyles(e,n):{};return r?r.buildStyles(e,n):o}build(i,e,n,s,r,o,u,h,b,y){const w=[],M=this.ast.options&&this.ast.options.params||Nf,R=this.buildStyles(n,u&&u.params||Nf,w),O=h&&h.params||Nf,N=this.buildStyles(s,O,w),U=new Set,P=new Map,J=new Map,se="void"===s,Me={params:Object.assign(Object.assign({},M),O)},ht=y?[]:Af(i,e,this.ast.animation,r,o,R,N,Me,b,w);let Ct=0;if(ht.forEach(At=>{Ct=Math.max(At.duration+At.delay,Ct)}),w.length)return Bw(e,this._triggerName,n,s,se,R,N,[],[],P,J,Ct,w);ht.forEach(At=>{const pn=At.element,$o=ri(P,pn,{});At.preStyleProps.forEach(ji=>$o[ji]=!0);const Ds=ri(J,pn,{});At.postStyleProps.forEach(ji=>Ds[ji]=!0),pn!==e&&U.add(pn)});const zt=Au(U.values());return Bw(e,this._triggerName,n,s,se,R,N,ht,zt,P,J,Ct)}}class sF{constructor(i,e,n){this.styles=i,this.defaultParams=e,this.normalizer=n}buildStyles(i,e){const n={},s=Ro(this.defaultParams);return Object.keys(i).forEach(r=>{const o=i[r];null!=o&&(s[r]=o)}),this.styles.styles.forEach(r=>{if("string"!=typeof r){const o=r;Object.keys(o).forEach(u=>{let h=o[u];h.length>1&&(h=Ou(h,s,e));const b=this.normalizer.normalizePropertyName(u,e);h=this.normalizer.normalizeStyleValue(u,b,h,e),n[b]=h})}}),n}}class oF{constructor(i,e,n){this.name=i,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states={},e.states.forEach(s=>{this.states[s.name]=new sF(s.style,s.options&&s.options.params||{},n)}),qw(this.states,"true","1"),qw(this.states,"false","0"),e.transitions.forEach(s=>{this.transitionFactories.push(new Hw(i,s,this.states))}),this.fallbackTransition=function aF(t,i,e){return new Hw(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,u)=>!0],options:null,queryCount:0,depCount:0},i)}(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,n,s){return this.transitionFactories.find(o=>o.match(i,e,n,s))||null}matchStyles(i,e,n){return this.fallbackTransition.buildStyles(i,e,n)}}function qw(t,i,e){t.hasOwnProperty(i)?t.hasOwnProperty(e)||(t[e]=t[i]):t.hasOwnProperty(e)&&(t[i]=t[e])}const lF=new qu;class cF{constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(i,e){const n=[],r=Rf(this._driver,e,n,[]);if(n.length)throw function pP(t){return new re(3503,Ze)}();this._animations[i]=r}_buildPlayer(i,e,n){const s=i.element,r=vw(0,this._normalizer,0,i.keyframes,e,n);return this._driver.animate(s,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,n={}){const s=[],r=this._animations[i];let o;const u=new Map;if(r?(o=Af(this._driver,e,r,Df,Iu,{},{},n,lF,s),o.forEach(y=>{const w=ri(u,y.element,{});y.postStyleProps.forEach(M=>w[M]=null)})):(s.push(function hP(){return new re(3300,Ze)}()),o=[]),s.length)throw function mP(t){return new re(3504,Ze)}();u.forEach((y,w)=>{Object.keys(y).forEach(M=>{y[M]=this._driver.computeStyle(w,M,vs)})});const b=zs(o.map(y=>{const w=u.get(y.element);return this._buildPlayer(y,{},w)}));return this._playersById[i]=b,b.onDestroy(()=>this.destroy(i)),this.players.push(b),b}destroy(i){const e=this._getPlayer(i);e.destroy(),delete this._playersById[i];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(i){const e=this._playersById[i];if(!e)throw function fP(t){return new re(3301,Ze)}();return e}listen(i,e,n,s){const r=wf(e,"","","");return Cf(this._getPlayer(i),n,r,s),()=>{}}command(i,e,n,s){if("register"==n)return void this.register(i,s[0]);if("create"==n)return void this.create(i,e,s[0]||{});const r=this._getPlayer(i);switch(n){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(s[0]));break;case"destroy":this.destroy(i)}}}const Uw="ng-animate-queued",Vf="ng-animate-disabled",mF=[],Gw={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},fF={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ti="__ng_removed";class Bf{constructor(i,e=""){this.namespaceId=e;const n=i&&i.hasOwnProperty("value");if(this.value=function vF(t){return null!=t?t:null}(n?i.value:i),n){const r=Ro(i);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(i){const e=i.params;if(e){const n=this.options.params;Object.keys(e).forEach(s=>{null==n[s]&&(n[s]=e[s])})}}}const dl="void",Hf=new Bf(dl);class gF{constructor(i,e,n){this.id=i,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,Si(e,this._hostClassName)}listen(i,e,n,s){if(!this._triggers.hasOwnProperty(e))throw function gP(t,i){return new re(3302,Ze)}();if(null==n||0==n.length)throw function _P(t){return new re(3303,Ze)}();if(!function CF(t){return"start"==t||"done"==t}(n))throw function bP(t,i){return new re(3400,Ze)}();const r=ri(this._elementListeners,i,[]),o={name:e,phase:n,callback:s};r.push(o);const u=ri(this._engine.statesByElement,i,{});return u.hasOwnProperty(e)||(Si(i,Eu),Si(i,Eu+"-"+e),u[e]=Hf),()=>{this._engine.afterFlush(()=>{const h=r.indexOf(o);h>=0&&r.splice(h,1),this._triggers[e]||delete u[e]})}}register(i,e){return!this._triggers[i]&&(this._triggers[i]=e,!0)}_getTrigger(i){const e=this._triggers[i];if(!e)throw function vP(t){return new re(3401,Ze)}();return e}trigger(i,e,n,s=!0){const r=this._getTrigger(e),o=new qf(this.id,e,i);let u=this._engine.statesByElement.get(i);u||(Si(i,Eu),Si(i,Eu+"-"+e),this._engine.statesByElement.set(i,u={}));let h=u[e];const b=new Bf(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&h&&b.absorbOptions(h.options),u[e]=b,h||(h=Hf),b.value!==dl&&h.value===b.value){if(!function TF(t,i){const e=Object.keys(t),n=Object.keys(i);if(e.length!=n.length)return!1;for(let s=0;s{Tr(i,N),ss(i,U)})}return}const M=ri(this._engine.playersByElement,i,[]);M.forEach(O=>{O.namespaceId==this.id&&O.triggerName==e&&O.queued&&O.destroy()});let E=r.matchTransition(h.value,b.value,i,b.params),R=!1;if(!E){if(!s)return;E=r.fallbackTransition,R=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:E,fromState:h,toState:b,player:o,isFallbackTransition:R}),R||(Si(i,Uw),o.onStart(()=>{Lo(i,Uw)})),o.onDone(()=>{let O=this.players.indexOf(o);O>=0&&this.players.splice(O,1);const N=this._engine.playersByElement.get(i);if(N){let U=N.indexOf(o);U>=0&&N.splice(U,1)}}),this.players.push(o),M.push(o),o}deregister(i){delete this._triggers[i],this._engine.statesByElement.forEach((e,n)=>{delete e[i]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(s=>s.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);const e=this._engine.playersByElement.get(i);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){const n=this._engine.driver.query(i,Ru,!0);n.forEach(s=>{if(s[Ti])return;const r=this._engine.fetchNamespacesByElement(s);r.size?r.forEach(o=>o.triggerLeaveAnimation(s,e,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(i,e,n,s){const r=this._engine.statesByElement.get(i),o=new Map;if(r){const u=[];if(Object.keys(r).forEach(h=>{if(o.set(h,r[h].value),this._triggers[h]){const b=this.trigger(i,h,dl,s);b&&u.push(b)}}),u.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,o),n&&zs(u).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){const e=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(e&&n){const s=new Set;e.forEach(r=>{const o=r.name;if(s.has(o))return;s.add(o);const h=this._triggers[o].fallbackTransition,b=n[o]||Hf,y=new Bf(dl),w=new qf(this.id,o,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:o,transition:h,fromState:b,toState:y,player:w,isFallbackTransition:!0})})}}removeNode(i,e){const n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let s=!1;if(n.totalAnimations){const r=n.players.length?n.playersByQueriedElement.get(i):[];if(r&&r.length)s=!0;else{let o=i;for(;o=o.parentNode;)if(n.statesByElement.get(o)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(i),s)n.markElementAsRemoved(this.id,i,!1,e);else{const r=i[Ti];(!r||r===Gw)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,e))}}insertNode(i,e){Si(i,this._hostClassName)}drainQueuedTransitions(i){const e=[];return this._queue.forEach(n=>{const s=n.player;if(s.destroyed)return;const r=n.element,o=this._elementListeners.get(r);o&&o.forEach(u=>{if(u.name==n.triggerName){const h=wf(r,n.triggerName,n.fromState.value,n.toState.value);h._data=i,Cf(n.player,u.phase,h,u.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):e.push(n)}),this._queue=[],e.sort((n,s)=>{const r=n.transition.ast.depCount,o=s.transition.ast.depCount;return 0==r||0==o?r-o:this._engine.driver.containsElement(n.element,s.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}elementContainsData(i){let e=!1;return this._elementListeners.has(i)&&(e=!0),e=!!this._queue.find(n=>n.element===i)||e,e}}class _F{constructor(i,e,n){this.bodyNode=i,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,r)=>{}}_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}get queuedPlayers(){const i=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,e){const n=new gF(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,e){const n=this._namespaceList,s=this.namespacesByHostElement,r=n.length-1;if(r>=0){let o=!1;if(void 0!==this.driver.getParentElement){let u=this.driver.getParentElement(e);for(;u;){const h=s.get(u);if(h){const b=n.indexOf(h);n.splice(b+1,0,i),o=!0;break}u=this.driver.getParentElement(u)}}else for(let u=r;u>=0;u--)if(this.driver.containsElement(n[u].hostElement,e)){n.splice(u+1,0,i),o=!0;break}o||n.unshift(i)}else n.push(i);return s.set(e,i),i}register(i,e){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,e)),n}registerTrigger(i,e,n){let s=this._namespaceLookup[i];s&&s.register(e,n)&&this.totalAnimations++}destroy(i,e){if(!i)return;const n=this._fetchNamespace(i);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[i];const s=this._namespaceList.indexOf(n);s>=0&&this._namespaceList.splice(s,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){const e=new Set,n=this.statesByElement.get(i);if(n){const s=Object.keys(n);for(let r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(i){const o=this._fetchNamespace(i);o&&o.insertNode(e,n)}s&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),Si(i,Vf)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),Lo(i,Vf))}removeNode(i,e,n,s){if(zu(e)){const r=i?this._fetchNamespace(i):null;if(r?r.removeNode(e,s):this.markElementAsRemoved(i,e,!1,s),n){const o=this.namespacesByHostElement.get(e);o&&o.id!==i&&o.removeNode(e,s)}}else this._onRemovalComplete(e,s)}markElementAsRemoved(i,e,n,s,r){this.collectedLeaveElements.push(e),e[Ti]={namespaceId:i,setForRemoval:s,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,n,s,r){return zu(e)?this._fetchNamespace(i).listen(e,n,s,r):()=>{}}_buildInstruction(i,e,n,s,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,s,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,Ru,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(i,Mf,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){const e=this.playersByElement.get(i);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){const e=this.playersByQueriedElement.get(i);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return zs(this.players).onDone(()=>i());i()})}processLeaveNode(i){var e;const n=i[Ti];if(n&&n.setForRemoval){if(i[Ti]=Gw,n.namespaceId){this.destroyInnerAnimations(i);const s=this._fetchNamespace(n.namespaceId);s&&s.clearElementCache(i)}this._onRemovalComplete(i,n.setForRemoval)}(null===(e=i.classList)||void 0===e?void 0:e.contains(Vf))&&this.markElementAsDisabled(i,!1),this.driver.query(i,".ng-animate-disabled",!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,s)=>this._balanceNamespaceList(n,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],e.length?zs(e).onDone(()=>{n.forEach(s=>s())}):n.forEach(s=>s())}}reportError(i){throw function CP(t){return new re(3402,Ze)}()}_flushAnimations(i,e){const n=new qu,s=[],r=new Map,o=[],u=new Map,h=new Map,b=new Map,y=new Set;this.disabledNodes.forEach(ae=>{y.add(ae);const fe=this.driver.query(ae,".ng-animate-queued",!0);for(let Se=0;Se{const Se=Df+O++;R.set(fe,Se),ae.forEach(rt=>Si(rt,Se))});const N=[],U=new Set,P=new Set;for(let ae=0;aeU.add(rt)):P.add(fe))}const J=new Map,se=$w(M,Array.from(U));se.forEach((ae,fe)=>{const Se=Iu+O++;J.set(fe,Se),ae.forEach(rt=>Si(rt,Se))}),i.push(()=>{E.forEach((ae,fe)=>{const Se=R.get(fe);ae.forEach(rt=>Lo(rt,Se))}),se.forEach((ae,fe)=>{const Se=J.get(fe);ae.forEach(rt=>Lo(rt,Se))}),N.forEach(ae=>{this.processLeaveNode(ae)})});const Me=[],ht=[];for(let ae=this._namespaceList.length-1;ae>=0;ae--)this._namespaceList[ae].drainQueuedTransitions(e).forEach(Se=>{const rt=Se.player,_n=Se.element;if(Me.push(rt),this.collectedEnterElements.length){const jn=_n[Ti];if(jn&&jn.setForMove){if(jn.previousTriggersValues&&jn.previousTriggersValues.has(Se.triggerName)){const Pr=jn.previousTriggersValues.get(Se.triggerName),tr=this.statesByElement.get(Se.element);tr&&tr[Se.triggerName]&&(tr[Se.triggerName].value=Pr)}return void rt.destroy()}}const ls=!w||!this.driver.containsElement(w,_n),ui=J.get(_n),er=R.get(_n),jt=this._buildInstruction(Se,n,er,ui,ls);if(jt.errors&&jt.errors.length)return void ht.push(jt);if(ls)return rt.onStart(()=>Tr(_n,jt.fromStyles)),rt.onDestroy(()=>ss(_n,jt.toStyles)),void s.push(rt);if(Se.isFallbackTransition)return rt.onStart(()=>Tr(_n,jt.fromStyles)),rt.onDestroy(()=>ss(_n,jt.toStyles)),void s.push(rt);const ES=[];jt.timelines.forEach(jn=>{jn.stretchStartingKeyframe=!0,this.disabledNodes.has(jn.element)||ES.push(jn)}),jt.timelines=ES,n.append(_n,jt.timelines),o.push({instruction:jt,player:rt,element:_n}),jt.queriedElements.forEach(jn=>ri(u,jn,[]).push(rt)),jt.preStyleProps.forEach((jn,Pr)=>{const tr=Object.keys(jn);if(tr.length){let Fr=h.get(Pr);Fr||h.set(Pr,Fr=new Set),tr.forEach(xg=>Fr.add(xg))}}),jt.postStyleProps.forEach((jn,Pr)=>{const tr=Object.keys(jn);let Fr=b.get(Pr);Fr||b.set(Pr,Fr=new Set),tr.forEach(xg=>Fr.add(xg))})});if(ht.length){const ae=[];ht.forEach(fe=>{ae.push(function yP(t,i){return new re(3505,Ze)}())}),Me.forEach(fe=>fe.destroy()),this.reportError(ae)}const Ct=new Map,zt=new Map;o.forEach(ae=>{const fe=ae.element;n.has(fe)&&(zt.set(fe,fe),this._beforeAnimationBuild(ae.player.namespaceId,ae.instruction,Ct))}),s.forEach(ae=>{const fe=ae.element;this._getPreviousPlayers(fe,!1,ae.namespaceId,ae.triggerName,null).forEach(rt=>{ri(Ct,fe,[]).push(rt),rt.destroy()})});const At=N.filter(ae=>Kw(ae,h,b)),pn=new Map;jw(pn,this.driver,P,b,vs).forEach(ae=>{Kw(ae,h,b)&&At.push(ae)});const Ds=new Map;E.forEach((ae,fe)=>{jw(Ds,this.driver,new Set(ae),h,"!")}),At.forEach(ae=>{const fe=pn.get(ae),Se=Ds.get(ae);pn.set(ae,Object.assign(Object.assign({},fe),Se))});const ji=[],Wo=[],Ko={};o.forEach(ae=>{const{element:fe,player:Se,instruction:rt}=ae;if(n.has(fe)){if(y.has(fe))return Se.onDestroy(()=>ss(fe,rt.toStyles)),Se.disabled=!0,Se.overrideTotalTime(rt.totalTime),void s.push(Se);let _n=Ko;if(zt.size>1){let ui=fe;const er=[];for(;ui=ui.parentNode;){const jt=zt.get(ui);if(jt){_n=jt;break}er.push(ui)}er.forEach(jt=>zt.set(jt,_n))}const ls=this._buildAnimation(Se.namespaceId,rt,Ct,r,Ds,pn);if(Se.setRealPlayer(ls),_n===Ko)ji.push(Se);else{const ui=this.playersByElement.get(_n);ui&&ui.length&&(Se.parentPlayer=zs(ui)),s.push(Se)}}else Tr(fe,rt.fromStyles),Se.onDestroy(()=>ss(fe,rt.toStyles)),Wo.push(Se),y.has(fe)&&s.push(Se)}),Wo.forEach(ae=>{const fe=r.get(ae.element);if(fe&&fe.length){const Se=zs(fe);ae.setRealPlayer(Se)}}),s.forEach(ae=>{ae.parentPlayer?ae.syncPlayerEvents(ae.parentPlayer):ae.destroy()});for(let ae=0;ae!ls.destroyed);_n.length?yF(this,fe,_n):this.processLeaveNode(fe)}return N.length=0,ji.forEach(ae=>{this.players.push(ae),ae.onDone(()=>{ae.destroy();const fe=this.players.indexOf(ae);this.players.splice(fe,1)}),ae.play()}),ji}elementContainsData(i,e){let n=!1;const s=e[Ti];return s&&s.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(i).elementContainsData(e)||n}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,n,s,r){let o=[];if(e){const u=this.playersByQueriedElement.get(i);u&&(o=u)}else{const u=this.playersByElement.get(i);if(u){const h=!r||r==dl;u.forEach(b=>{b.queued||!h&&b.triggerName!=s||o.push(b)})}}return(n||s)&&(o=o.filter(u=>!(n&&n!=u.namespaceId||s&&s!=u.triggerName))),o}_beforeAnimationBuild(i,e,n){const r=e.element,o=e.isRemovalTransition?void 0:i,u=e.isRemovalTransition?void 0:e.triggerName;for(const h of e.timelines){const b=h.element,y=b!==r,w=ri(n,b,[]);this._getPreviousPlayers(b,y,o,u,e.toState).forEach(E=>{const R=E.getRealPlayer();R.beforeDestroy&&R.beforeDestroy(),E.destroy(),w.push(E)})}Tr(r,e.fromStyles)}_buildAnimation(i,e,n,s,r,o){const u=e.triggerName,h=e.element,b=[],y=new Set,w=new Set,M=e.timelines.map(R=>{const O=R.element;y.add(O);const N=O[Ti];if(N&&N.removedBeforeQueried)return new cl(R.duration,R.delay);const U=O!==h,P=function wF(t){const i=[];return Ww(t,i),i}((n.get(O)||mF).map(Ct=>Ct.getRealPlayer())).filter(Ct=>!!Ct.element&&Ct.element===O),J=r.get(O),se=o.get(O),Me=vw(0,this._normalizer,0,R.keyframes,J,se),ht=this._buildPlayer(R,Me,P);if(R.subTimeline&&s&&w.add(O),U){const Ct=new qf(i,u,O);Ct.setRealPlayer(ht),b.push(Ct)}return ht});b.forEach(R=>{ri(this.playersByQueriedElement,R.element,[]).push(R),R.onDone(()=>function bF(t,i,e){let n;if(t instanceof Map){if(n=t.get(i),n){if(n.length){const s=n.indexOf(e);n.splice(s,1)}0==n.length&&t.delete(i)}}else if(n=t[i],n){if(n.length){const s=n.indexOf(e);n.splice(s,1)}0==n.length&&delete t[i]}return n}(this.playersByQueriedElement,R.element,R))}),y.forEach(R=>Si(R,Iw));const E=zs(M);return E.onDestroy(()=>{y.forEach(R=>Lo(R,Iw)),ss(h,e.toStyles)}),w.forEach(R=>{ri(s,R,[]).push(E)}),E}_buildPlayer(i,e,n){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,n):new cl(i.duration,i.delay)}}class qf{constructor(i,e,n){this.namespaceId=i,this.triggerName=e,this.element=n,this._player=new cl,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>Cf(i,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){const e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){ri(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return!this.queued&&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(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){const e=this._player;e.triggerCallback&&e.triggerCallback(i)}}function zu(t){return t&&1===t.nodeType}function zw(t,i){const e=t.style.display;return t.style.display=null!=i?i:"none",e}function jw(t,i,e,n,s){const r=[];e.forEach(h=>r.push(zw(h)));const o=[];n.forEach((h,b)=>{const y={};h.forEach(w=>{const M=y[w]=i.computeStyle(b,w,s);(!M||0==M.length)&&(b[Ti]=fF,o.push(b))}),t.set(b,y)});let u=0;return e.forEach(h=>zw(h,r[u++])),o}function $w(t,i){const e=new Map;if(t.forEach(u=>e.set(u,[])),0==i.length)return e;const s=new Set(i),r=new Map;function o(u){if(!u)return 1;let h=r.get(u);if(h)return h;const b=u.parentNode;return h=e.has(b)?b:s.has(b)?1:o(b),r.set(u,h),h}return i.forEach(u=>{const h=o(u);1!==h&&e.get(h).push(u)}),e}function Si(t,i){var e;null===(e=t.classList)||void 0===e||e.add(i)}function Lo(t,i){var e;null===(e=t.classList)||void 0===e||e.remove(i)}function yF(t,i,e){zs(e).onDone(()=>t.processLeaveNode(i))}function Ww(t,i){for(let e=0;es.add(r)):i.set(t,n),e.delete(t),!0}class ju{constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(s,r)=>{},this._transitionEngine=new _F(i,e,n),this._timelineEngine=new cF(i,e,n),this._transitionEngine.onRemovalComplete=(s,r)=>this.onRemovalComplete(s,r)}registerTrigger(i,e,n,s,r){const o=i+"-"+s;let u=this._triggerCache[o];if(!u){const h=[],y=Rf(this._driver,r,h,[]);if(h.length)throw function uP(t,i){return new re(3404,Ze)}();u=function rF(t,i,e){return new oF(t,i,e)}(s,y,this._normalizer),this._triggerCache[o]=u}this._transitionEngine.registerTrigger(e,s,u)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,n,s){this._transitionEngine.insertNode(i,e,n,s)}onRemove(i,e,n,s){this._transitionEngine.removeNode(i,e,s||!1,n)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,n,s){if("@"==n.charAt(0)){const[r,o]=Cw(n);this._timelineEngine.command(r,e,o,s)}else this._transitionEngine.trigger(i,e,n,s)}listen(i,e,n,s,r){if("@"==n.charAt(0)){const[o,u]=Cw(n);return this._timelineEngine.listen(o,e,u,r)}return this._transitionEngine.listen(i,e,n,s,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let xF=(()=>{class t{constructor(e,n,s){this._element=e,this._startStyles=n,this._endStyles=s,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&ss(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ss(this._element,this._initialStyles),this._endStyles&&(ss(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Tr(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Tr(this._element,this._endStyles),this._endStyles=null),ss(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Uf(t){let i=null;const e=Object.keys(t);for(let n=0;ni()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(i,e,n){return i.animate(e,n)}onStart(i){this._onStartFns.push(i)}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&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(i=>i()),this._onDestroyFns=[])}setPosition(i){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const i={};if(this.hasStarted()){const e=this._finalKeyframe;Object.keys(e).forEach(n=>{"offset"!=n&&(i[n]=this._finished?e[n]:Aw(this.element,n))})}this.currentSnapshot=i}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class MF{validateStyleProperty(i){return Sw(i)}matchesElement(i,e){return!1}containsElement(i,e){return xw(i,e)}getParentElement(i){return Sf(i)}query(i,e,n){return Dw(i,e,n)}computeStyle(i,e,n){return window.getComputedStyle(i)[e]}animate(i,e,n,s,r,o=[]){const h={duration:n,delay:s,fill:0==s?"both":"forwards"};r&&(h.easing=r);const b={},y=o.filter(M=>M instanceof Qw);(function RP(t,i){return 0===t||0===i})(n,s)&&y.forEach(M=>{let E=M.currentSnapshot;Object.keys(E).forEach(R=>b[R]=E[R])}),e=function LP(t,i,e){const n=Object.keys(e);if(n.length&&i.length){let r=i[0],o=[];if(n.forEach(u=>{r.hasOwnProperty(u)||o.push(u),r[u]=e[u]}),o.length)for(var s=1;sjs(M,!1)),b);const w=function SF(t,i){let e=null,n=null;return Array.isArray(i)&&i.length?(e=Uf(i[0]),i.length>1&&(n=Uf(i[i.length-1]))):i&&(e=Uf(i)),e||n?new xF(t,e,n):null}(i,e);return new Qw(i,e,h,w)}}let kF=(()=>{class t extends hw{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:ki.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const s=Array.isArray(e)?mw(e):e;return Jw(this._renderer,null,n,"register",[s]),new IF(n,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(K(Ba),K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class IF extends class HA{}{constructor(i,e){super(),this._id=i,this._renderer=e}create(i,e){return new EF(this._id,i,e||{},this._renderer)}}class EF{constructor(i,e,n,s){this.id=i,this.element=e,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(i,e){return this._renderer.listen(this.element,`@@${this.id}:${i}`,e)}_command(i,...e){return Jw(this._renderer,this.element,this.id,i,e)}onDone(i){this._listen("done",i)}onStart(i){this._listen("start",i)}onDestroy(i){this._listen("destroy",i)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(i){this._command("setPosition",i)}getPosition(){var i,e;return null!==(e=null===(i=this._renderer.engine.players[+this.id])||void 0===i?void 0:i.getPosition())&&void 0!==e?e:0}}function Jw(t,i,e,n,s){return t.setProperty(i,`@@${e}:${n}`,s)}const Yw="@.disabled";let RF=(()=>{class t{constructor(e,n,s){this.delegate=e,this.engine=n,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=(r,o)=>{const u=null==o?void 0:o.parentNode(r);u&&o.removeChild(u,r)}}createRenderer(e,n){const r=this.delegate.createRenderer(e,n);if(!(e&&n&&n.data&&n.data.animation)){let y=this._rendererCache.get(r);return y||(y=new Zw("",r,this.engine),this._rendererCache.set(r,y)),y}const o=n.id,u=n.id+"-"+this._currentId;this._currentId++,this.engine.register(u,e);const h=y=>{Array.isArray(y)?y.forEach(h):this.engine.registerTrigger(o,u,e,y.name,y)};return n.data.animation.forEach(h),new LF(this,u,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,n,s){e>=0&&en(s)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(r=>{const[o,u]=r;o(u)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([n,s]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(K(Ba),K(ju),K(nt))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Zw{constructor(i,e,n){this.namespaceId=i,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,n,s=!0){this.delegate.insertBefore(i,e,n),this.engine.onInsert(this.namespaceId,e,i,s)}removeChild(i,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,n,s){this.delegate.setAttribute(i,e,n,s)}removeAttribute(i,e,n){this.delegate.removeAttribute(i,e,n)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,n,s){this.delegate.setStyle(i,e,n,s)}removeStyle(i,e,n){this.delegate.removeStyle(i,e,n)}setProperty(i,e,n){"@"==e.charAt(0)&&e==Yw?this.disableAnimations(i,!!n):this.delegate.setProperty(i,e,n)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,n){return this.delegate.listen(i,e,n)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}}class LF extends Zw{constructor(i,e,n,s){super(e,n,s),this.factory=i,this.namespaceId=e}setProperty(i,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&e==Yw?this.disableAnimations(i,n=void 0===n||!!n):this.engine.process(this.namespaceId,i,e.substr(1),n):this.delegate.setProperty(i,e,n)}listen(i,e,n){if("@"==e.charAt(0)){const s=function OF(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(i);let r=e.substr(1),o="";return"@"!=r.charAt(0)&&([r,o]=function AF(t){const i=t.indexOf(".");return[t.substring(0,i),t.substr(i+1)]}(r)),this.engine.listen(this.namespaceId,s,r,o,u=>{this.factory.scheduleListenerCallback(u._data||-1,n,u)})}return this.delegate.listen(i,e,n)}}let PF=(()=>{class t extends ju{constructor(e,n,s){super(e.body,n,s)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(K(en),K(xf),K(Ff))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Xw=new be("AnimationModuleType"),eT=[{provide:hw,useClass:kF},{provide:Ff,useFactory:function FF(){return new eF}},{provide:ju,useClass:PF},{provide:Ba,useFactory:function NF(t,i,e){return new RF(t,i,e)},deps:[su,ju,nt]}],tT=[{provide:xf,useFactory:()=>new MF},{provide:Xw,useValue:"BrowserAnimations"},...eT],VF=[{provide:xf,useClass:Mw},{provide:Xw,useValue:"NoopAnimations"},...eT];let BF=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?VF:tT}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:tT,imports:[qy]}),t})();class Z{static equals(i,e,n){return n?this.resolveFieldData(i,n)===this.resolveFieldData(e,n):this.equalsByValue(i,e)}static equalsByValue(i,e){if(i===e)return!0;if(i&&e&&"object"==typeof i&&"object"==typeof e){var r,o,u,n=Array.isArray(i),s=Array.isArray(e);if(n&&s){if((o=i.length)!=e.length)return!1;for(r=o;0!=r--;)if(!this.equalsByValue(i[r],e[r]))return!1;return!0}if(n!=s)return!1;var h=i instanceof Date,b=e instanceof Date;if(h!=b)return!1;if(h&&b)return i.getTime()==e.getTime();var y=i instanceof RegExp,w=e instanceof RegExp;if(y!=w)return!1;if(y&&w)return i.toString()==e.toString();var M=Object.keys(i);if((o=M.length)!==Object.keys(e).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,M[r]))return!1;for(r=o;0!=r--;)if(!this.equalsByValue(i[u=M[r]],e[u]))return!1;return!0}return i!=i&&e!=e}static resolveFieldData(i,e){if(i&&e){if(this.isFunction(e))return e(i);if(-1==e.indexOf("."))return i[e];{let n=e.split("."),s=i;for(let r=0,o=n.length;r=i.length&&(n%=i.length,e%=i.length),i.splice(n,0,i.splice(e,1)[0]))}static insertIntoOrderedArray(i,e,n,s){if(n.length>0){let r=!1;for(let o=0;oe){n.splice(o,0,i),r=!0;break}r||n.push(i)}else n.push(i)}static findIndexInList(i,e){let n=-1;if(e)for(let s=0;s-1&&(i=i.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),i}static isEmpty(i){return null==i||""===i||Array.isArray(i)&&0===i.length||!(i instanceof Date)&&"object"==typeof i&&0===Object.keys(i).length}static isNotEmpty(i){return!this.isEmpty(i)}}var nT=0;function pl(){return"pr_id_"+ ++nT}var gt=function HF(){let t=[];const s=r=>r&&parseInt(r.style.zIndex,10)||0;return{get:s,set:(r,o,u)=>{o&&(o.style.zIndex=String(((r,o)=>{let u=t.length>0?t[t.length-1]:{key:r,value:o},h=u.value+(u.key===r?0:o)+1;return t.push({key:r,value:h}),h})(r,u)))},clear:r=>{r&&((r=>{t=t.filter(o=>o.value!==r)})(s(r)),r.style.zIndex="")},getCurrent:()=>t.length>0?t[t.length-1].value:0}}();const iT=["*"];let _t=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.IN="in",t.LESS_THAN="lt",t.LESS_THAN_OR_EQUAL_TO="lte",t.GREATER_THAN="gt",t.GREATER_THAN_OR_EQUAL_TO="gte",t.BETWEEN="between",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.DATE_IS="dateIs",t.DATE_IS_NOT="dateIsNot",t.DATE_BEFORE="dateBefore",t.DATE_AFTER="dateAfter",t})(),zn=(()=>{class t{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[_t.STARTS_WITH,_t.CONTAINS,_t.NOT_CONTAINS,_t.ENDS_WITH,_t.EQUALS,_t.NOT_EQUALS],numeric:[_t.EQUALS,_t.NOT_EQUALS,_t.LESS_THAN,_t.LESS_THAN_OR_EQUAL_TO,_t.GREATER_THAN,_t.GREATER_THAN_OR_EQUAL_TO],date:[_t.DATE_IS,_t.DATE_IS_NOT,_t.DATE_BEFORE,_t.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new ct,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=Object.assign(Object.assign({},this.translation),e),this.translationSource.next(this.translation)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ft=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.NO_FILTER="noFilter",t.LT="lt",t.LTE="lte",t.GT="gt",t.GTE="gte",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.CLEAR="clear",t.APPLY="apply",t.MATCH_ALL="matchAll",t.MATCH_ANY="matchAny",t.ADD_RULE="addRule",t.REMOVE_RULE="removeRule",t.ACCEPT="accept",t.REJECT="reject",t.CHOOSE="choose",t.UPLOAD="upload",t.CANCEL="cancel",t.DAY_NAMES="dayNames",t.DAY_NAMES_SHORT="dayNamesShort",t.DAY_NAMES_MIN="dayNamesMin",t.MONTH_NAMES="monthNames",t.MONTH_NAMES_SHORT="monthNamesShort",t.FIRST_DAY_OF_WEEK="firstDayOfWeek",t.TODAY="today",t.WEEK_HEADER="weekHeader",t.WEAK="weak",t.MEDIUM="medium",t.STRONG="strong",t.PASSWORD_PROMPT="passwordPrompt",t.EMPTY_MESSAGE="emptyMessage",t.EMPTY_FILTER_MESSAGE="emptyFilterMessage",t})(),hl=(()=>{class t{constructor(){this.filters={startsWith:(e,n,s)=>{if(null==n||""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return Z.removeAccents(e.toString()).toLocaleLowerCase(s).slice(0,r.length)===r},contains:(e,n,s)=>{if(null==n||"string"==typeof n&&""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return-1!==Z.removeAccents(e.toString()).toLocaleLowerCase(s).indexOf(r)},notContains:(e,n,s)=>{if(null==n||"string"==typeof n&&""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return-1===Z.removeAccents(e.toString()).toLocaleLowerCase(s).indexOf(r)},endsWith:(e,n,s)=>{if(null==n||""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s),o=Z.removeAccents(e.toString()).toLocaleLowerCase(s);return-1!==o.indexOf(r,o.length-r.length)},equals:(e,n,s)=>null==n||"string"==typeof n&&""===n.trim()||null!=e&&(e.getTime&&n.getTime?e.getTime()===n.getTime():Z.removeAccents(e.toString()).toLocaleLowerCase(s)==Z.removeAccents(n.toString()).toLocaleLowerCase(s)),notEquals:(e,n,s)=>!(null==n||"string"==typeof n&&""===n.trim()||null!=e&&(e.getTime&&n.getTime?e.getTime()===n.getTime():Z.removeAccents(e.toString()).toLocaleLowerCase(s)==Z.removeAccents(n.toString()).toLocaleLowerCase(s))),in:(e,n)=>{if(null==n||0===n.length)return!0;for(let s=0;snull==n||null==n[0]||null==n[1]||null!=e&&(e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1]),lt:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n),gt:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()>n.getTime():e>n),gte:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n),is:(e,n,s)=>this.filters.equals(e,n,s),isNot:(e,n,s)=>this.filters.notEquals(e,n,s),before:(e,n,s)=>this.filters.lt(e,n,s),after:(e,n,s)=>this.filters.gt(e,n,s),dateIs:(e,n)=>null==n||null!=e&&e.toDateString()===n.toDateString(),dateIsNot:(e,n)=>null==n||null!=e&&e.toDateString()!==n.toDateString(),dateBefore:(e,n)=>null==n||null!=e&&e.getTime()null==n||null!=e&&e.getTime()>n.getTime()}}filter(e,n,s,r,o){let u=[];if(e)for(let h of e)for(let b of n){let y=Z.resolveFieldData(h,b);if(this.filters[r](y,s,o)){u.push(h);break}}return u}register(e,n){this.filters[e]=n}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ys=(()=>{class t{constructor(){this.messageSource=new ct,this.clearSource=new ct,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),$s=(()=>{class t{constructor(){this.clickSource=new ct,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ml=(()=>{class t{}return t.AND="and",t.OR="or",t})(),Oo=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-header"]],ngContentSelectors:iT,decls:1,vars:0,template:function(e,n){1&e&&(yn(),St(0))},encapsulation:2}),t})(),fl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-footer"]],ngContentSelectors:iT,decls:1,vars:0,template:function(e,n){1&e&&(yn(),St(0))},encapsulation:2}),t})(),ie=(()=>{class t{constructor(e){this.template=e}getType(){return this.name}}return t.\u0275fac=function(e){return new(e||t)(x(bi))},t.\u0275dir=le({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),t})(),Nt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function qF(t,i){if(1&t&&(l(0,"span",9),g(1),c()),2&t){const e=d();a(1),T(" ",e.header," ")}}function UF(t,i){1&t&&Y(0)}function GF(t,i){1&t&&St(0,1,["*ngIf","hasHeaderFacet"])}function zF(t,i){1&t&&Y(0)}function jF(t,i){if(1&t&&(ce(0),_(1,zF,1,0,"ng-container",5),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.contentTemplate)}}const $F=["*",[["p-header"]]],WF=function(t){return{"p-accordion-tab-active":t}},KF=function(t,i){return{"p-highlight":t,"p-disabled":i}},sT=function(t){return{transitionParams:t}},QF=function(t){return{value:"visible",params:t}},JF=function(t){return{value:"hidden",params:t}},YF=["*","p-header"],ZF=["*"];let XF=0,Ws=(()=>{class t{constructor(e,n){this.changeDetector=n,this.cache=!0,this.selectedChange=new H,this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.id="p-accordiontab-"+XF++,this.accordion=e}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||(this._selected&&this.cache&&(this.loaded=!0),this.changeDetector.detectChanges())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":default:this.contentTemplate=e.template;break;case"header":this.headerTemplate=e.template}})}toggle(e){if(this.disabled)return!1;let n=this.findTabIndex();if(this.selected)this.selected=!1,this.accordion.onClose.emit({originalEvent:e,index:n});else{if(!this.accordion.multiple)for(var s=0;s0}onKeydown(e){(32===e.which||13===e.which)&&(this.toggle(e),e.preventDefault())}ngOnDestroy(){this.accordion.tabs.splice(this.findTabIndex(),1)}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>Ks)),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-accordionTab"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,4),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{header:"header",disabled:"disabled",cache:"cache",transitionOptions:"transitionOptions",selected:"selected"},outputs:{selectedChange:"selectedChange"},ngContentSelectors:YF,decls:11,vars:28,consts:[[1,"p-accordion-tab",3,"ngClass"],[1,"p-accordion-header",3,"ngClass"],["role","tab",1,"p-accordion-header-link",3,"click","keydown"],[1,"p-accordion-toggle-icon",3,"ngClass"],["class","p-accordion-header-text",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["role","region",1,"p-toggleable-content"],[1,"p-accordion-content"],[1,"p-accordion-header-text"]],template:function(e,n){1&e&&(yn($F),l(0,"div",0)(1,"div",1)(2,"a",2),C("click",function(r){return n.toggle(r)})("keydown",function(r){return n.onKeydown(r)}),k(3,"span",3),_(4,qF,2,1,"span",4),_(5,UF,1,0,"ng-container",5),_(6,GF,1,0,"ng-content",6),c()(),l(7,"div",7)(8,"div",8),St(9),_(10,jF,2,1,"ng-container",6),c()()()),2&e&&(p("ngClass",z(15,WF,n.selected)),a(1),p("ngClass",We(17,KF,n.selected,n.disabled)),a(1),ne("tabindex",n.disabled?null:0)("id",n.id)("aria-controls",n.id+"-content")("aria-expanded",n.selected),a(1),p("ngClass",n.selected?n.accordion.collapseIcon:n.accordion.expandIcon),a(1),p("ngIf",!n.hasHeaderFacet),a(1),p("ngTemplateOutlet",n.headerTemplate),a(1),p("ngIf",n.hasHeaderFacet),a(1),p("@tabContent",n.selected?z(22,QF,z(20,sT,n.transitionOptions)):z(26,JF,z(24,sT,n.transitionOptions))),ne("id",n.id+"-content")("aria-hidden",!n.selected)("aria-labelledby",n.id),a(3),p("ngIf",n.contentTemplate&&(n.cache?n.loaded:n.selected)))},directives:[Oe,Q,Lt],styles:[".p-accordion-header-link{cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;position:relative;text-decoration:none}.p-accordion-header-link:focus{z-index:1}.p-accordion-header-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("tabContent",[Cs("hidden",it({height:"0",overflow:"hidden"})),Cs("visible",it({height:"*"})),Ot("visible <=> hidden",[it({overflow:"hidden"}),kt("{{transitionParams}}")]),Ot("void => *",kt(0))])]},changeDetection:0}),t})(),Ks=(()=>{class t{constructor(e,n){this.el=e,this.changeDetector=n,this.onClose=new H,this.onOpen=new H,this.expandIcon="pi pi-fw pi-chevron-right",this.collapseIcon="pi pi-fw pi-chevron-down",this.activeIndexChange=new H,this.tabs=[]}ngAfterContentInit(){this.initTabs(),this.tabListSubscription=this.tabList.changes.subscribe(e=>{this.initTabs()})}initTabs(){this.tabs=this.tabList.toArray(),this.updateSelectionState(),this.changeDetector.markForCheck()}getBlockableElement(){return this.el.nativeElement.children[0]}get activeIndex(){return this._activeIndex}set activeIndex(e){this._activeIndex=e,this.preventActiveIndexPropagation?this.preventActiveIndexPropagation=!1:this.updateSelectionState()}updateSelectionState(){if(this.tabs&&this.tabs.length&&null!=this._activeIndex)for(let e=0;e{if(n.selected){if(!this.multiple)return void(e=s);e.push(s)}}),this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(e)}ngOnDestroy(){this.tabListSubscription&&this.tabListSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-accordion"]],contentQueries:function(e,n,s){if(1&e&&st(s,Ws,4),2&e){let r;V(r=B())&&(n.tabList=r)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",expandIcon:"expandIcon",collapseIcon:"collapseIcon",activeIndex:"activeIndex"},outputs:{onClose:"onClose",onOpen:"onOpen",activeIndexChange:"activeIndexChange"},ngContentSelectors:ZF,decls:2,vars:4,consts:[["role","tablist",3,"ngClass","ngStyle"]],template:function(e,n){1&e&&(yn(),l(0,"div",0),St(1),c()),2&e&&(me(n.styleClass),p("ngClass","p-accordion p-component")("ngStyle",n.style))},directives:[Oe,lt],encapsulation:2,changeDetection:0}),t})(),eN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be],Nt]}),t})(),L=(()=>{class t{static addClass(e,n){e.classList?e.classList.add(n):e.className+=" "+n}static addMultipleClasses(e,n){if(e.classList){let s=n.trim().split(" ");for(let r=0;ru.height?(h=-1*s.height,e.style.transformOrigin="bottom",o.top+h<0&&(h=-1*o.top)):(h=r,e.style.transformOrigin="top"),b=s.width>u.width?-1*o.left:o.left+s.width>u.width?-1*(o.left+s.width-u.width):0,e.style.top=h+"px",e.style.left=b+"px"}static absolutePosition(e,n){let E,R,s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),r=s.height,o=s.width,u=n.offsetHeight,h=n.offsetWidth,b=n.getBoundingClientRect(),y=this.getWindowScrollTop(),w=this.getWindowScrollLeft(),M=this.getViewport();b.top+u+r>M.height?(E=b.top+y-r,e.style.transformOrigin="bottom",E<0&&(E=y)):(E=u+b.top+y,e.style.transformOrigin="top"),R=b.left+o>M.width?Math.max(0,b.left+w+h-o):b.left+w,e.style.top=E+"px",e.style.left=R+"px"}static getParents(e,n=[]){return null===e.parentNode?n:this.getParents(e.parentNode,n.concat([e.parentNode]))}static getScrollableParents(e){let n=[];if(e){let s=this.getParents(e);const r=/(auto|scroll)/,o=u=>{let h=window.getComputedStyle(u,null);return r.test(h.getPropertyValue("overflow"))||r.test(h.getPropertyValue("overflowX"))||r.test(h.getPropertyValue("overflowY"))};for(let u of s){let h=1===u.nodeType&&u.dataset.scrollselectors;if(h){let b=h.split(",");for(let y of b){let w=this.findSingle(u,y);w&&o(w)&&n.push(w)}}9!==u.nodeType&&o(u)&&n.push(u)}}return n}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementDimensions(e){let n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}static scrollInView(e,n){let s=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=s?parseFloat(s):0,o=getComputedStyle(e).getPropertyValue("paddingTop"),u=o?parseFloat(o):0,h=e.getBoundingClientRect(),y=n.getBoundingClientRect().top+document.body.scrollTop-(h.top+document.body.scrollTop)-r-u,w=e.scrollTop,M=e.clientHeight,E=this.getOuterHeight(n);y<0?e.scrollTop=w+y:y+E>M&&(e.scrollTop=w+y-M+E)}static fadeIn(e,n){e.style.opacity=0;let s=+new Date,r=0,o=function(){r=+e.style.opacity.replace(",",".")+((new Date).getTime()-s)/n,e.style.opacity=r,s=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))};o()}static fadeOut(e,n){var s=1,u=50/n;let h=setInterval(()=>{(s-=u)<=0&&(s=0,clearInterval(h)),e.style.opacity=s},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,n){var s=Element.prototype;return(s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||function(o){return-1!==[].indexOf.call(document.querySelectorAll(o),this)}).call(e,n)}static getOuterWidth(e,n){let s=e.offsetWidth;if(n){let r=getComputedStyle(e);s+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return s}static getHorizontalPadding(e){let n=getComputedStyle(e);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(e){let n=getComputedStyle(e);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(e){let n=e.offsetWidth,s=getComputedStyle(e);return n+=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),n}static width(e){let n=e.offsetWidth,s=getComputedStyle(e);return n-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),n}static getInnerHeight(e){let n=e.offsetHeight,s=getComputedStyle(e);return n+=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),n}static getOuterHeight(e,n){let s=e.offsetHeight;if(n){let r=getComputedStyle(e);s+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return s}static getHeight(e){let n=e.offsetHeight,s=getComputedStyle(e);return n-=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)+parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),n}static getWidth(e){let n=e.offsetWidth,s=getComputedStyle(e);return n-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight)+parseFloat(s.borderLeftWidth)+parseFloat(s.borderRightWidth),n}static getViewport(){let e=window,n=document,s=n.documentElement,r=n.getElementsByTagName("body")[0];return{width:e.innerWidth||s.clientWidth||r.clientWidth,height:e.innerHeight||s.clientHeight||r.clientHeight}}static getOffset(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,n){let s=e.parentNode;if(!s)throw"Can't replace element";return s.replaceChild(n,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,n){if(this.isElement(n))n.appendChild(e);else{if(!n.el||!n.el.nativeElement)throw"Cannot append "+n+" to "+e;n.el.nativeElement.appendChild(e)}}static removeChild(e,n){if(this.isElement(n))n.removeChild(e);else{if(!n.el||!n.el.nativeElement)throw"Cannot remove "+e+" from "+n;n.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let n=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let s=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=s,s}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(e,n,s){e[n].apply(e,s)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return null===e.offsetParent}static getFocusableElements(e){let n=t.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),s=[];for(let r of n)"none"!=getComputedStyle(r).display&&"hidden"!=getComputedStyle(r).visibility&&s.push(r);return s}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return t.zindex=1e3,t.calculatedScrollbarWidth=null,t.calculatedScrollbarHeight=null,t})();class Qs{constructor(i,e=(()=>{})){this.element=i,this.listener=e}bindScrollListener(){this.scrollableParents=L.getScrollableParents(this.element);for(let i=0;i{class t{constructor(e,n,s){this.el=e,this.zone=n,this.config=s}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let n=this.getInk();if(!n||"none"===getComputedStyle(n,null).display)return;if(L.removeClass(n,"p-ink-active"),!L.getHeight(n)&&!L.getWidth(n)){let u=Math.max(L.getOuterWidth(this.el.nativeElement),L.getOuterHeight(this.el.nativeElement));n.style.height=u+"px",n.style.width=u+"px"}let s=L.getOffset(this.el.nativeElement),r=e.pageX-s.left+document.body.scrollTop-L.getWidth(n)/2,o=e.pageY-s.top+document.body.scrollLeft-L.getHeight(n)/2;n.style.top=o+"px",n.style.left=r+"px",L.addClass(n,"p-ink-active")}getInk(){for(let e=0;e{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function tN(t,i){1&t&&Y(0)}const nN=function(t,i,e,n){return{"p-button-icon":!0,"p-button-icon-left":t,"p-button-icon-right":i,"p-button-icon-top":e,"p-button-icon-bottom":n}};function iN(t,i){if(1&t&&k(0,"span",4),2&t){const e=d();me(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),p("ngClass",_i(4,nN,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),ne("aria-hidden",!0)}}function sN(t,i){if(1&t&&(l(0,"span",5),g(1),c()),2&t){const e=d();ne("aria-hidden",e.icon&&!e.label),a(1),S(e.label||"\xa0")}}function rN(t,i){if(1&t&&(l(0,"span",4),g(1),c()),2&t){const e=d();me(e.badgeClass),p("ngClass",e.badgeStyleClass()),a(1),S(e.badge)}}const oN=function(t,i,e,n,s){return{"p-button p-component":!0,"p-button-icon-only":t,"p-button-vertical":i,"p-disabled":e,"p-button-loading":n,"p-button-loading-label-only":s}},aN=["*"];let Ln=(()=>{class t{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1}ngAfterViewInit(){this._initialStyleClass=this.el.nativeElement.className,L.addMultipleClasses(this.el.nativeElement,this.getStyleClass()),(this.icon||this.loading)&&this.createIconEl();let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",this.label?e.appendChild(document.createTextNode(this.label)):e.innerHTML=" ",this.el.nativeElement.appendChild(e),this.initialized=!0}getStyleClass(){let e="p-button p-component";return this.icon&&!this.label&&(e+=" p-button-icon-only"),this.loading&&(e+=" p-disabled p-button-loading",!this.icon&&this.label&&(e+=" p-button-loading-label-only")),e}setStyleClass(){let e=this.getStyleClass();this.el.nativeElement.className=e+" "+this._initialStyleClass}createIconEl(){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let n=this.label?"p-button-icon-"+this.iconPos:null;n&&L.addClass(e,n);let s=this.getIconClass();s&&L.addMultipleClasses(e,s);let r=L.findSingle(this.el.nativeElement,".p-button-label");r?this.el.nativeElement.insertBefore(e,r):this.el.nativeElement.appendChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}setIconClass(){let e=L.findSingle(this.el.nativeElement,".p-button-icon");e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIconEl()}removeIconElement(){let e=L.findSingle(this.el.nativeElement,".p-button-icon");this.el.nativeElement.removeChild(e)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(L.findSingle(this.el.nativeElement,".p-button-label").textContent=this._label||" ",(this.loading||this.icon)&&this.setIconClass(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.setIconClass(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.loading||this.icon?this.setIconClass():this.removeIconElement(),this.setStyleClass())}ngOnDestroy(){this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),t})(),ve=(()=>{class t{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new H,this.onFocus=new H,this.onBlur=new H}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-button"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:aN,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(e,n){1&e&&(yn(),l(0,"button",0),C("click",function(r){return n.onClick.emit(r)})("focus",function(r){return n.onFocus.emit(r)})("blur",function(r){return n.onBlur.emit(r)}),St(1),_(2,tN,1,0,"ng-container",1),_(3,iN,1,9,"span",2),_(4,sN,2,2,"span",3),_(5,rN,2,4,"span",2),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("disabled",n.disabled||n.loading)("ngClass",pr(11,oN,n.icon&&!n.label,("top"===n.iconPos||"bottom"===n.iconPos)&&n.label,n.disabled||n.loading,n.loading,n.loading&&!n.icon&&n.label)),ne("type",n.type)("aria-label",n.ariaLabel),a(2),p("ngTemplateOutlet",n.contentTemplate),a(1),p("ngIf",!n.contentTemplate&&(n.icon||n.loading)),a(1),p("ngIf",!n.contentTemplate),a(1),p("ngIf",!n.contentTemplate&&n.badge))},directives:[vt,lt,Oe,Lt,Q],encapsulation:2,changeDetection:0}),t})(),gl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();const lN=["container"],cN=["inputfield"],uN=["contentWrapper"];function dN(t,i){if(1&t){const e=I();l(0,"i",8),C("click",function(){return v(e),d(2).clear()}),c()}}function pN(t,i){if(1&t){const e=I();l(0,"button",9),C("click",function(s){v(e),d();const r=F(1);return d().onButtonClick(s,r)}),c()}if(2&t){const e=d(2);p("icon",e.icon)("disabled",e.disabled),ne("aria-label",e.iconAriaLabel)}}function hN(t,i){if(1&t){const e=I();l(0,"input",4,5),C("focus",function(s){return v(e),d().onInputFocus(s)})("keydown",function(s){return v(e),d().onInputKeydown(s)})("click",function(){return v(e),d().onInputClick()})("blur",function(s){return v(e),d().onInputBlur(s)})("input",function(s){return v(e),d().onUserInput(s)}),c(),_(2,dN,1,0,"i",6),_(3,pN,1,3,"button",7)}if(2&t){const e=d();me(e.inputStyleClass),p("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),ne("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),a(2),p("ngIf",e.showClear&&!e.disabled&&null!=e.value),a(1),p("ngIf",e.showIcon)}}function mN(t,i){1&t&&Y(0)}function fN(t,i){if(1&t){const e=I();l(0,"button",30),C("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(4).onPrevButtonClick(s)}),k(1,"span",31),c()}}function gN(t,i){if(1&t){const e=I();l(0,"button",32),C("click",function(s){return v(e),d(4).switchToMonthView(s)})("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)}),g(1),c()}if(2&t){const e=d().$implicit,n=d(3);p("disabled",n.switchViewButtonDisabled()),a(1),T(" ",n.getMonthName(e.month)," ")}}function _N(t,i){if(1&t){const e=I();l(0,"button",33),C("click",function(s){return v(e),d(4).switchToYearView(s)})("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)}),g(1),c()}if(2&t){const e=d().$implicit,n=d(3);p("disabled",n.switchViewButtonDisabled()),a(1),T(" ",n.getYear(e)," ")}}function bN(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(5);a(1),$e("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function vN(t,i){1&t&&Y(0)}const rT=function(t){return{$implicit:t}};function CN(t,i){if(1&t&&(l(0,"span",34),_(1,bN,2,2,"ng-container",13),_(2,vN,1,0,"ng-container",35),c()),2&t){const e=d(4);a(1),p("ngIf",!e.decadeTemplate),a(1),p("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",z(3,rT,e.yearPickerValues))}}function yN(t,i){if(1&t&&(l(0,"th",41)(1,"span"),g(2),c()()),2&t){const e=d(5);a(2),S(e.getTranslation("weekHeader"))}}function wN(t,i){if(1&t&&(l(0,"th",42)(1,"span"),g(2),c()()),2&t){const e=i.$implicit;a(2),S(e)}}function TN(t,i){if(1&t&&(l(0,"td",45)(1,"span",46),g(2),c()()),2&t){const e=d().index,n=d(2).$implicit;a(2),T(" ",n.weekNumbers[e]," ")}}function SN(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2).$implicit;a(1),S(e.day)}}function xN(t,i){1&t&&Y(0)}const DN=function(t,i){return{"p-highlight":t,"p-disabled":i}};function MN(t,i){if(1&t){const e=I();ce(0),l(1,"span",48),C("click",function(s){v(e);const r=d().$implicit;return d(6).onDateSelect(s,r)})("keydown",function(s){v(e);const r=d().$implicit,o=d(3).index;return d(3).onDateCellKeydown(s,r,o)}),_(2,SN,2,1,"ng-container",13),_(3,xN,1,0,"ng-container",35),c(),ue()}if(2&t){const e=d().$implicit,n=d(6);a(1),p("ngClass",We(4,DN,n.isSelected(e),!e.selectable)),a(1),p("ngIf",!n.dateTemplate),a(1),p("ngTemplateOutlet",n.dateTemplate)("ngTemplateOutletContext",z(7,rT,e))}}const kN=function(t,i){return{"p-datepicker-other-month":t,"p-datepicker-today":i}};function IN(t,i){if(1&t&&(l(0,"td",47),_(1,MN,4,9,"ng-container",13),c()),2&t){const e=i.$implicit,n=d(6);p("ngClass",We(2,kN,e.otherMonth,e.today)),a(1),p("ngIf",!e.otherMonth||n.showOtherMonths)}}function EN(t,i){if(1&t&&(l(0,"tr"),_(1,TN,3,1,"td",43),_(2,IN,2,5,"td",44),c()),2&t){const e=i.$implicit,n=d(5);a(1),p("ngIf",n.showWeek),a(1),p("ngForOf",e)}}function RN(t,i){if(1&t&&(l(0,"div",36)(1,"table",37)(2,"thead")(3,"tr"),_(4,yN,3,1,"th",38),_(5,wN,3,1,"th",39),c()(),l(6,"tbody"),_(7,EN,3,2,"tr",40),c()()()),2&t){const e=d().$implicit,n=d(3);a(4),p("ngIf",n.showWeek),a(1),p("ngForOf",n.weekDays),a(2),p("ngForOf",e.dates)}}function LN(t,i){if(1&t){const e=I();l(0,"div",20)(1,"div",21),_(2,fN,2,0,"button",22),l(3,"div",23),_(4,gN,2,2,"button",24),_(5,_N,2,2,"button",25),_(6,CN,3,5,"span",26),c(),l(7,"button",27),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).onNextButtonClick(s)}),k(8,"span",28),c()(),_(9,RN,8,3,"div",29),c()}if(2&t){const e=i.index,n=d(3);a(2),p("ngIf",0===e),a(2),p("ngIf","date"===n.currentView),a(1),p("ngIf","year"!==n.currentView),a(1),p("ngIf","year"===n.currentView),a(1),Hn("display",1===n.numberOfMonths||e===n.numberOfMonths-1?"inline-flex":"none"),a(2),p("ngIf","date"===n.currentView)}}const oT=function(t){return{"p-highlight":t}};function ON(t,i){if(1&t){const e=I();l(0,"span",51),C("click",function(s){const o=v(e).index;return d(4).onMonthSelect(s,o)})("keydown",function(s){const o=v(e).index;return d(4).onMonthCellKeydown(s,o)}),g(1),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(4);p("ngClass",z(2,oT,s.isMonthSelected(n))),a(1),T(" ",e," ")}}function AN(t,i){if(1&t&&(l(0,"div",49),_(1,ON,2,4,"span",50),c()),2&t){const e=d(3);a(1),p("ngForOf",e.monthPickerValues())}}function PN(t,i){if(1&t){const e=I();l(0,"span",54),C("click",function(s){const o=v(e).$implicit;return d(4).onYearSelect(s,o)})("keydown",function(s){const o=v(e).$implicit;return d(4).onYearCellKeydown(s,o)}),g(1),c()}if(2&t){const e=i.$implicit,n=d(4);p("ngClass",z(2,oT,n.isYearSelected(e))),a(1),T(" ",e," ")}}function FN(t,i){if(1&t&&(l(0,"div",52),_(1,PN,2,4,"span",53),c()),2&t){const e=d(3);a(1),p("ngForOf",e.yearPickerValues())}}function NN(t,i){if(1&t&&(ce(0),l(1,"div",16),_(2,LN,10,7,"div",17),c(),_(3,AN,2,1,"div",18),_(4,FN,2,1,"div",19),ue()),2&t){const e=d(2);a(2),p("ngForOf",e.months),a(1),p("ngIf","month"===e.currentView),a(1),p("ngIf","year"===e.currentView)}}function VN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function BN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function HN(t,i){if(1&t&&(l(0,"div",60)(1,"span"),g(2),c()()),2&t){const e=d(3);a(2),S(e.timeSeparator)}}function qN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function UN(t,i){if(1&t){const e=I();l(0,"div",65)(1,"button",57),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(3).incrementSecond(s)})("keydown.space",function(s){return v(e),d(3).incrementSecond(s)})("mousedown",function(s){return v(e),d(3).onTimePickerElementMouseDown(s,2,1)})("mouseup",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(3).onTimePickerElementMouseLeave()}),k(2,"span",58),c(),l(3,"span"),_(4,qN,2,0,"ng-container",13),g(5),c(),l(6,"button",57),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(3).decrementSecond(s)})("keydown.space",function(s){return v(e),d(3).decrementSecond(s)})("mousedown",function(s){return v(e),d(3).onTimePickerElementMouseDown(s,2,-1)})("mouseup",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(3).onTimePickerElementMouseLeave()}),k(7,"span",59),c()()}if(2&t){const e=d(3);a(4),p("ngIf",e.currentSecond<10),a(1),S(e.currentSecond)}}function GN(t,i){if(1&t){const e=I();l(0,"div",66)(1,"button",67),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).toggleAMPM(s)})("keydown.enter",function(s){return v(e),d(3).toggleAMPM(s)}),k(2,"span",58),c(),l(3,"span"),g(4),c(),l(5,"button",67),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).toggleAMPM(s)})("keydown.enter",function(s){return v(e),d(3).toggleAMPM(s)}),k(6,"span",59),c()()}if(2&t){const e=d(3);a(4),S(e.pm?"PM":"AM")}}function zN(t,i){if(1&t){const e=I();l(0,"div",55)(1,"div",56)(2,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).incrementHour(s)})("keydown.space",function(s){return v(e),d(2).incrementHour(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,0,1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(3,"span",58),c(),l(4,"span"),_(5,VN,2,0,"ng-container",13),g(6),c(),l(7,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).decrementHour(s)})("keydown.space",function(s){return v(e),d(2).decrementHour(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,0,-1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(8,"span",59),c()(),l(9,"div",60)(10,"span"),g(11),c()(),l(12,"div",61)(13,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).incrementMinute(s)})("keydown.space",function(s){return v(e),d(2).incrementMinute(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,1,1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(14,"span",58),c(),l(15,"span"),_(16,BN,2,0,"ng-container",13),g(17),c(),l(18,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).decrementMinute(s)})("keydown.space",function(s){return v(e),d(2).decrementMinute(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,1,-1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(19,"span",59),c()(),_(20,HN,3,1,"div",62),_(21,UN,8,2,"div",63),_(22,GN,7,1,"div",64),c()}if(2&t){const e=d(2);a(5),p("ngIf",e.currentHour<10),a(1),S(e.currentHour),a(5),S(e.timeSeparator),a(5),p("ngIf",e.currentMinute<10),a(1),S(e.currentMinute),a(3),p("ngIf",e.showSeconds),a(1),p("ngIf",e.showSeconds),a(1),p("ngIf","12"==e.hourFormat)}}const aT=function(t){return[t]};function jN(t,i){if(1&t){const e=I();l(0,"div",68)(1,"button",69),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(2).onTodayButtonClick(s)}),c(),l(2,"button",69),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(2).onClearButtonClick(s)}),c()()}if(2&t){const e=d(2);a(1),p("label",e.getTranslation("today"))("ngClass",z(4,aT,e.todayButtonStyleClass)),a(1),p("label",e.getTranslation("clear"))("ngClass",z(6,aT,e.clearButtonStyleClass))}}function $N(t,i){1&t&&Y(0)}const WN=function(t,i,e,n,s,r){return{"p-datepicker p-component":!0,"p-datepicker-inline":t,"p-disabled":i,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":n,"p-datepicker-monthpicker":s,"p-datepicker-touch-ui":r}},lT=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},KN=function(t){return{value:"visibleTouchUI",params:t}},QN=function(t){return{value:"visible",params:t}};function JN(t,i){if(1&t){const e=I();l(0,"div",10,11),C("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationDone(s)})("click",function(s){return v(e),d().onOverlayClick(s)}),St(2),_(3,mN,1,0,"ng-container",12),_(4,NN,5,3,"ng-container",13),_(5,zN,23,8,"div",14),_(6,jN,3,8,"div",15),St(7,1),_(8,$N,1,0,"ng-container",12),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngStyle",e.panelStyle)("ngClass",Do(11,WN,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?z(21,KN,We(18,lT,e.showTransitionOptions,e.hideTransitionOptions)):z(26,QN,We(23,lT,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),a(3),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",!e.timeOnly),a(1),p("ngIf",(e.showTime||e.timeOnly)&&"date"===e.currentView),a(1),p("ngIf",e.showButtonBar),a(2),p("ngTemplateOutlet",e.footerTemplate)}}const YN=[[["p-header"]],[["p-footer"]]],ZN=function(t,i,e,n){return{"p-calendar":!0,"p-calendar-w-btn":t,"p-calendar-timeonly":i,"p-calendar-disabled":e,"p-focus":n}},XN=["p-header","p-footer"],e5={provide:dn,useExisting:Ue(()=>xr),multi:!0};let xr=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.config=o,this.overlayService=u,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.showClear=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new H,this.onBlur=new H,this.onClose=new H,this.onSelect=new H,this.onClear=new H,this.onInput=new H,this.onTodayClick=new H,this.onClearClick=new H,this.onMonthChange=new H,this.onYearChange=new H,this.onClickOutside=new H,this.onShow=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(h,b){return"12"==this.hourFormat?12===h?b?12:0:b?h+12:h:h}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const n=e.split(":"),s=parseInt(n[0]),r=parseInt(n[1]);this.populateYearOptions(s,r)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=pl();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=L.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let s=e;s<=n;s++)this.yearOptions.push(s)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Ft.DAY_NAMES_MIN);for(let s=0;s<7;s++)this.weekDays.push(n[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let s=0;s<10;s++)e.push(n+s);return e}createMonths(e,n){this.months=this.months=[];for(let s=0;s11&&(r=r%11-1,o=n+1),this.months.push(this.createMonth(r,o))}}getWeekNumber(e){let n=new Date(e.getTime());n.setDate(n.getDate()+4-(n.getDay()||7));let s=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((s-n.getTime())/864e5)/7)+1}createMonth(e,n){let s=[],r=this.getFirstDayOfMonthIndex(e,n),o=this.getDaysCountInMonth(e,n),u=this.getDaysCountInPrevMonth(e,n),h=1,b=new Date,y=[],w=Math.ceil((o+r)/7);for(let M=0;Mo){let O=this.getNextMonthAndYear(e,n);E.push({day:h-o,month:O.month,year:O.year,otherMonth:!0,today:this.isToday(b,h-o,O.month,O.year),selectable:this.isSelectable(h-o,O.month,O.year,!0)})}else E.push({day:h,month:e,year:n,today:this.isToday(b,h,e,n),selectable:this.isSelectable(h,e,n,!1)});h++}this.showWeek&&y.push(this.getWeekNumber(new Date(E[0].year,E[0].month,E[0].day))),s.push(E)}return{month:e,year:n,dates:s,weekNumbers:y}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){!this.disabled&&n.selectable?(this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((s,r)=>!this.isDateEquals(s,n)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,n){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){"year"===this.view?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=new Date(e.year,e.month,e.day);if(this.showTime&&(n.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate=s.getTime()?r=n:(s=n,r=null),this.updateModel([s,r])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;this.value&&(n=this.value.map(s=>this.formatDateTime(s))),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let s=new Date;s.setDate(1),s.setMonth(e),s.setFullYear(n);let r=s.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let s=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(s.month,s.year)}getPreviousMonthAndYear(e,n){let s,r;return 0===e?(s=11,r=n-1):(s=e-1,r=n),{month:s,year:r}}getNextMonthAndYear(e,n){let s,r;return 11===e?(s=0,r=n+1):(s=e+1,r=n),{month:s,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let s of this.value)if(n=this.isDateEquals(s,e),n)break;return n}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getMonth()===e&&n.getFullYear()===this.currentYear}return!1}isYearSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getFullYear()===e}return!1}isDateEquals(e,n){return!!(e&&e instanceof Date)&&e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year}isDateBetween(e,n,s){if(e&&n){let o=new Date(s.year,s.month,s.day);return e.getTime()<=o.getTime()&&n.getTime()>=o.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,n,s,r){return e.getDate()===n&&e.getMonth()===s&&e.getFullYear()===r}isSelectable(e,n,s,r){let o=!0,u=!0,h=!0,b=!0;return!(r&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>s||this.minDate.getFullYear()===s&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(o=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(L.getFocusableElements(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,s){const r=e.currentTarget,o=r.parentElement;switch(e.which){case 40:{r.tabIndex="-1";let u=L.index(o),h=o.parentElement.nextElementSibling;h?L.hasClass(h.children[u].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(h.children[u].children[0].tabIndex="0",h.children[u].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{r.tabIndex="-1";let u=L.index(o),h=o.parentElement.previousElementSibling;if(h){let b=h.children[u].children[0];L.hasClass(b,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(b.tabIndex="0",b.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let u=o.previousElementSibling;if(u){let h=u.children[0];L.hasClass(h,"p-disabled")||L.hasClass(h.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,s):(h.tabIndex="0",h.focus())}else this.navigateToMonth(!0,s);e.preventDefault();break}case 39:{r.tabIndex="-1";let u=o.nextElementSibling;if(u){let h=u.children[0];L.hasClass(h,"p-disabled")?this.navigateToMonth(!1,s):(h.tabIndex="0",h.focus())}else this.navigateToMonth(!1,s);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,n),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,n){const s=e.currentTarget;switch(e.which){case 38:case 40:{s.tabIndex="-1";var r=s.parentElement.children,o=L.index(s);let u=r[40===e.which?o+3:o-3];u&&(u.tabIndex="0",u.focus()),e.preventDefault();break}case 37:{s.tabIndex="-1";let u=s.previousElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{s.tabIndex="-1";let u=s.nextElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,n),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,n){const s=e.currentTarget;switch(e.which){case 38:case 40:{s.tabIndex="-1";var r=s.parentElement.children,o=L.index(s);let u=r[40===e.which?o+2:o-2];u&&(u.tabIndex="0",u.focus()),e.preventDefault();break}case 37:{s.tabIndex="-1";let u=s.previousElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{s.tabIndex="-1";let u=s.nextElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,n),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,n){if(e)if(1===this.numberOfMonths||0===n)this.navigationState={backward:!0},this.navBackward(event);else{let r=L.find(this.contentViewChild.nativeElement.children[n-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),o=r[r.length-1];o.tabIndex="0",o.focus()}else if(1===this.numberOfMonths||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let r=L.findSingle(this.contentViewChild.nativeElement.children[n+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");r.tabIndex="0",r.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let n;n=L.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else e=L.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e;if("month"===this.currentView){let n=L.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),s=L.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month.p-highlight");n.forEach(r=>r.tabIndex=-1),e=s||n[0],0===n.length&&L.find(this.contentViewChild.nativeElement,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(o=>o.tabIndex=-1)}else if("year"===this.currentView){let n=L.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),s=L.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year.p-highlight");n.forEach(r=>r.tabIndex=-1),e=s||n[0],0===n.length&&L.find(this.contentViewChild.nativeElement,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(o=>o.tabIndex=-1)}else if(e=L.findSingle(this.contentViewChild.nativeElement,"span.p-highlight"),!e){let n=L.findSingle(this.contentViewChild.nativeElement,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");e=n||L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}e&&(e.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{e.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=L.getFocusableElements(this.contentViewChild.nativeElement);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==s||0===s)if(this.focusTrap)n[n.length-1].focus();else{if(-1===s)return this.hideOverlay();if(0===s)return}else n[s-1].focus();else if(-1==s||s===n.length-1){if(!this.focusTrap&&-1!=s)return this.hideOverlay();n[0].focus()}else n[s+1].focus()}else n[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,n,s,r){let o=this.value;const u=this.convertTo24Hour(e,r);this.isRangeSelection()&&(o=this.value[1]||this.value[0]),this.isMultipleSelection()&&(o=this.value[this.value.length-1]);const h=o?o.toDateString():null;return!(this.minDate&&h&&this.minDate.toDateString()===h&&(this.minDate.getHours()>u||this.minDate.getHours()===u&&(this.minDate.getMinutes()>n||this.minDate.getMinutes()===n&&this.minDate.getSeconds()>s))||this.maxDate&&h&&this.maxDate.toDateString()===h&&(this.maxDate.getHours()=24?s-24:s:"12"==this.hourFormat&&(this.currentHour<12&&s>11&&(r=!this.pm),s=s>=13?s-12:s),this.validateTime(s,this.currentMinute,this.currentSecond,r)&&(this.currentHour=s,this.pm=r),e.preventDefault()}onTimePickerElementMouseDown(e,n,s){this.disabled||(this.repeat(e,null,n,s),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,s,r){let o=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,s,r),this.cd.markForCheck()},o),s){case 0:1===r?this.incrementHour(e):this.decrementHour(e);break;case 1:1===r?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===r?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=this.currentHour-this.stepHour,s=this.pm;"24"==this.hourFormat?n=n<0?24+n:n:"12"==this.hourFormat&&(12===this.currentHour&&(s=!this.pm),n=n<=0?12+n:n),this.validateTime(n,this.currentMinute,this.currentSecond,s)&&(this.currentHour=n,this.pm=s),e.preventDefault()}incrementMinute(e){let n=this.currentMinute+this.stepMinute;n=n>59?n-60:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}decrementMinute(e){let n=this.currentMinute-this.stepMinute;n=n<0?60+n:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const n=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,n)&&(this.pm=n,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let s=this.parseValueFromString(n);this.isValidSelection(s)&&(this.updateModel(s),this.updateUI())}catch(s){this.updateModel(this.keepInvalid?n:null)}this.filled=null!=n&&n.length,this.onInput.emit(e)}isValidSelection(e){let n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(s=>this.isSelectable(s.getDate(),s.getMonth(),s.getFullYear(),!1))&&this.isRangeSelection()&&(n=e.length>1&&e[1]>e[0]),n}parseValueFromString(e){if(!e||0===e.trim().length)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let s=e.split(this.multipleSeparator);n=[];for(let r of s)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let s=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r{this.disableModality()}),document.body.appendChild(this.mask),L.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(L.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){document.body.removeChild(this.mask);let n,e=document.body.children;for(let s=0;s{const w=s+1{let E=""+w;if(r(y))for(;E.lengthr(y)?E[w]:M[w];let h="",b=!1;if(e)for(s=0;s11&&12!=s&&(s-=12),n+="12"==this.hourFormat&&0===s?12:s<10?"0"+s:s,n+=":",n+=r<10?"0"+r:r,this.showSeconds&&(n+=":",n+=o<10?"0"+o:o),"12"==this.hourFormat&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":");if(n.length!==(this.showSeconds?3:2))throw"Invalid time";let r=parseInt(n[0]),o=parseInt(n[1]),u=this.showSeconds?parseInt(n[2]):null;if(isNaN(r)||isNaN(o)||r>23||o>59||"12"==this.hourFormat&&r>12||this.showSeconds&&(isNaN(u)||u>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==r&&this.pm?r+=12:!this.pm&&12===r&&(r-=12)),{hour:r,minute:o,second:u}}parseDate(e,n){if(null==n||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let s,r,o,R,u=0,h="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),b=-1,y=-1,w=-1,M=-1,E=!1,O=J=>{let se=s+1{let se=O(J),Me="@"===J?14:"!"===J?20:"y"===J&&se?4:"o"===J?3:2,Ct=new RegExp("^\\d{"+("y"===J?Me:1)+","+Me+"}"),zt=e.substring(u).match(Ct);if(!zt)throw"Missing number at position "+u;return u+=zt[0].length,parseInt(zt[0],10)},U=(J,se,Me)=>{let ht=-1,Ct=O(J)?Me:se,zt=[];for(let At=0;At-(At[1].length-pn[1].length));for(let At=0;At{if(e.charAt(u)!==n.charAt(s))throw"Unexpected literal at position "+u;u++};for("month"===this.view&&(w=1),s=0;s-1)for(y=1,w=M;r=this.getDaysCountInMonth(b,y-1),!(w<=r);)y++,w-=r;if(R=this.daylightSavingAdjust(new Date(b,y-1,w)),R.getFullYear()!==b||R.getMonth()+1!==y||R.getDate()!==w)throw"Invalid date";return R}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let n=new Date,s={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,s),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(s=>!(!s.breakpoint||!s.numMonths)).sort((s,r)=>-1*s.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let s=0;s{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return L.hasClass(e.target,"p-datepicker-prev")||L.hasClass(e.target,"p-datepicker-prev-icon")||L.hasClass(e.target,"p-datepicker-next")||L.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!L.isAndroid()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&>.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-calendar"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(lN,5),j(cN,5),j(uN,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.inputfieldViewChild=s.first),V(s=B())&&(n.content=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focus)("p-calendar-clearable",n.showClear&&!n.disabled)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Ne([e5])],ngContentSelectors:XN,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["class","p-calendar-clear-icon pi pi-times",3,"click",4,"ngIf"],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],[1,"p-calendar-clear-icon","pi","pi-times",3,"click"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,n){1&e&&(yn(YN),l(0,"span",0,1),_(2,hN,4,17,"ng-template",2),_(3,JN,9,28,"div",3),c()),2&e&&(me(n.styleClass),p("ngClass",_i(6,ZN,n.showIcon,n.timeOnly,n.disabled,n.focus))("ngStyle",n.style),a(2),p("ngIf",!n.inline),a(1),p("ngIf",n.inline||n.overlayVisible))},directives:[Oe,lt,Q,Ln,vt,Lt,at],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-calendar-clearable{position:relative}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Cs("visibleTouchUI",it({transform:"translate(-50%,-50%)",opacity:1})),Ot("void => visible",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}",it({opacity:1,transform:"*"}))]),Ot("visible => void",[kt("{{hideTransitionParams}}",it({opacity:0}))]),Ot("void => visibleTouchUI",[it({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),kt("{{showTransitionParams}}")]),Ot("visibleTouchUI => void",[kt("{{hideTransitionParams}}",it({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),t})(),cT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gl,Nt,gn],gl,Nt]}),t})();function t5(t,i){1&t&&Y(0)}function n5(t,i){if(1&t&&(l(0,"div",8),St(1,1),_(2,t5,1,0,"ng-container",6),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}function s5(t,i){1&t&&Y(0)}function r5(t,i){if(1&t&&(l(0,"div",9),g(1),_(2,s5,1,0,"ng-container",6),c()),2&t){const e=d();a(1),T(" ",e.header," "),a(1),p("ngTemplateOutlet",e.titleTemplate)}}function o5(t,i){1&t&&Y(0)}function a5(t,i){if(1&t&&(l(0,"div",10),g(1),_(2,o5,1,0,"ng-container",6),c()),2&t){const e=d();a(1),T(" ",e.subheader," "),a(1),p("ngTemplateOutlet",e.subtitleTemplate)}}function l5(t,i){1&t&&Y(0)}function c5(t,i){1&t&&Y(0)}function u5(t,i){if(1&t&&(l(0,"div",11),St(1,2),_(2,c5,1,0,"ng-container",6),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const d5=["*",[["p-header"]],[["p-footer"]]],p5=["*","p-header","p-footer"];let Pe=(()=>{class t{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275cmp=G({type:t,selectors:[["p-card"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:p5,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(e,n){1&e&&(yn(d5),l(0,"div",0),_(1,n5,3,1,"div",1),l(2,"div",2),_(3,r5,3,2,"div",3),_(4,a5,3,2,"div",4),l(5,"div",5),St(6),_(7,l5,1,0,"ng-container",6),c(),_(8,u5,3,1,"div",7),c()()),2&e&&(me(n.styleClass),p("ngClass","p-card p-component")("ngStyle",n.style),a(1),p("ngIf",n.headerFacet||n.headerTemplate),a(2),p("ngIf",n.header||n.titleTemplate),a(1),p("ngIf",n.subheader||n.subtitleTemplate),a(3),p("ngTemplateOutlet",n.contentTemplate),a(1),p("ngIf",n.footerFacet||n.footerTemplate))},directives:[Oe,lt,Q,Lt],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),h5=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be],Nt]}),t})();const m5=["cb"],f5=function(t,i,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":t,"p-disabled":i,"p-checkbox-label-focus":e}};function g5(t,i){if(1&t){const e=I();l(0,"label",7),C("click",function(s){v(e);const r=d(),o=F(3);return r.onClick(s,o,!0)}),g(1),c()}if(2&t){const e=d();me(e.labelStyleClass),p("ngClass",Rt(5,f5,e.checked(),e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const _5=function(t,i,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":t,"p-checkbox-disabled":i,"p-checkbox-focused":e}},b5=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-focus":e}},v5={provide:dn,useExisting:Ue(()=>rn),multi:!0};let rn=(()=>{class t{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,n,s){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),s&&n.focus())}updateModel(e){let n;this.binary?(n=this.checked()?this.falseValue:this.trueValue,this.model=n,this.onModelChange(n)):(n=this.checked()?this.model.filter(s=>!Z.equals(s,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(n),this.model=n,this.formControl&&this.formControl.setValue(n)),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Z.contains(this.value,this.model)}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-checkbox"]],viewQuery:function(e,n){if(1&e&&j(m5,5),2&e){let s;V(s=B())&&(n.inputViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Ne([v5])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()})("change",function(o){return n.handleChange(o)}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.onClick(o,u,!0)}),k(5,"span",5),c()(),_(6,g5,2,9,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Rt(18,_5,n.checked(),n.disabled,n.focused)),a(2),p("readonly",n.readonly)("value",n.value)("checked",n.checked())("disabled",n.disabled),ne("id",n.inputId)("name",n.name)("tabindex",n.tabindex)("aria-labelledby",n.ariaLabelledBy)("aria-label",n.ariaLabel)("aria-checked",n.checked())("required",n.required),a(2),p("ngClass",Rt(22,b5,n.checked(),n.disabled,n.focused)),a(1),p("ngClass",n.checked()?n.checkboxIcon:null),a(1),p("ngIf",n.label))},directives:[lt,Oe,Q],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),t})(),C5=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function Wu(t,i=0){return function w5(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):i}function Gf(t,i,e,n){return Ms(e)&&(n=e,e=void 0),n?Gf(t,i,e).pipe(et(s=>Nr(s)?n(...s):n(s))):new Je(s=>{uT(t,i,function r(o){s.next(arguments.length>1?Array.prototype.slice.call(arguments):o)},s,e)})}function uT(t,i,e,n,s){let r;if(function D5(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const o=t;t.addEventListener(i,e,s),r=()=>o.removeEventListener(i,e,s)}else if(function x5(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const o=t;t.on(i,e),r=()=>o.off(i,e)}else if(function S5(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const o=t;t.addListener(i,e),r=()=>o.removeListener(i,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,u=t.length;o0?super.requestAsyncId(i,e,n):(i.actions.push(this),i.scheduled||(i.scheduled=requestAnimationFrame(()=>i.flush(null))))}recycleAsyncId(i,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(i,e,n);0===i.actions.length&&(cancelAnimationFrame(e),i.scheduled=void 0)}});let E5=1;const R5=Promise.resolve(),Ku={};function dT(t){return t in Ku&&(delete Ku[t],!0)}const pT={setImmediate(t){const i=E5++;return Ku[i]=!0,R5.then(()=>dT(i)&&t()),i},clearImmediate(t){dT(t)}},A5=new class O5 extends Hi{flush(i){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,s=-1,r=e.length;i=i||e.shift();do{if(n=i.execute(i.state,i.delay))break}while(++s0?super.requestAsyncId(i,e,n):(i.actions.push(this),i.scheduled||(i.scheduled=pT.setImmediate(i.flush.bind(i,null))))}recycleAsyncId(i,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(i,e,n);0===i.actions.length&&(pT.clearImmediate(e),i.scheduled=void 0)}});class F5{constructor(i,e){this.compare=i,this.keySelector=e}call(i,e){return e.subscribe(new N5(i,this.compare,this.keySelector))}}class N5 extends yt{constructor(i,e,n){super(i),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(i,e){return i===e}_next(i){let e;try{const{keySelector:s}=this;e=s?s(i):i}catch(s){return this.destination.error(s)}let n=!1;if(this.hasKey)try{const{compare:s}=this;n=s(this.key,e)}catch(s){return this.destination.error(s)}else this.hasKey=!0;n||(this.key=e,this.destination.next(i))}}const zf=new Hi(cu);class B5{constructor(i){this.durationSelector=i}call(i,e){return e.subscribe(new H5(i,this.durationSelector))}}class H5 extends Zo{constructor(i,e){super(i),this.durationSelector=e,this.hasValue=!1}_next(i){if(this.value=i,this.hasValue=!0,!this.throttled){let e;try{const{durationSelector:s}=this;e=s(i)}catch(s){return this.destination.error(s)}const n=Xo(e,new Yo(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:i,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(i))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function hT(t){return!Nr(t)&&t-parseFloat(t)+1>=0}function U5(t){const{index:i,period:e,subscriber:n}=t;if(n.next(i),!n.closed){if(-1===e)return n.complete();t.index=i+1,this.schedule(t,e)}}function jf(t,i=zf){return function V5(t){return function(e){return e.lift(new B5(t))}}(()=>function q5(t=0,i,e){let n=-1;return hT(i)?n=Number(i)<1?1:Number(i):Vr(i)&&(e=i),Vr(e)||(e=zf),new Je(s=>{const r=hT(t)?t:+t-e.now();return e.schedule(U5,r,{index:0,period:n,subscriber:s})})}(t,i))}function $f(t){return i=>i.lift(new G5(t))}class G5{constructor(i){this.notifier=i}call(i,e){const n=new z5(i),s=Xo(this.notifier,new Yo(n));return s&&!n.seenValue?(n.add(s),e.subscribe(n)):n}}class z5 extends Zo{constructor(i){super(i),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function Qu(...t){const i=t[t.length-1];return Vr(i)?(t.pop(),e=>el(t,e,i)):e=>el(t,e)}class $5{call(i,e){return e.subscribe(new W5(i))}}class W5 extends yt{constructor(i){super(i),this.hasPrev=!1}_next(i){let e;this.hasPrev?e=[this.prev,i]:this.hasPrev=!0,this.prev=i,e&&this.destination.next(e)}}let Wf;try{Wf="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(t){Wf=!1}let Ju,Dr,mT=(()=>{class t{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function D4(t){return t===ky}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Wf)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(K(Hc))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function bl(){if("object"!=typeof document||!document)return 0;if(null==Ju){const t=document.createElement("div"),i=t.style;t.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";const e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",t.appendChild(e),document.body.appendChild(t),Ju=0,0===t.scrollLeft&&(t.scrollLeft=1,Ju=0===t.scrollLeft?1:2),t.remove()}return Ju}const Y5=new be("cdk-dir-doc",{providedIn:"root",factory:function Z5(){return O_(en)}}),X5=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let gT=(()=>{class t{constructor(e){if(this.value="ltr",this.change=new H,e){const s=e.documentElement?e.documentElement.dir:null;this.value=function eV(t){const i=(null==t?void 0:t.toLowerCase())||"";return"auto"===i&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?X5.test(navigator.language)?"rtl":"ltr":"rtl"===i?"rtl":"ltr"}((e.body?e.body.dir:null)||s||"ltr")}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(K(Y5,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();class iV extends class tV{}{constructor(i){super(),this._data=i}connect(){return ns(this._data)?this._data:oe(this._data)}disconnect(){}}class sV{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(i,e,n,s,r){i.forEachOperation((o,u,h)=>{let b,y;null==o.previousIndex?(b=this._insertView(()=>n(o,u,h),h,e,s(o)),y=b?1:0):null==h?(this._detachAndCacheView(u,e),y=3):(b=this._moveView(u,h,e,s(o)),y=2),r&&r({context:null==b?void 0:b.context,operation:y,record:o})})}detach(){for(const i of this._viewCache)i.destroy();this._viewCache=[]}_insertView(i,e,n,s){const r=this._insertViewFromCache(e,n);if(r)return void(r.context.$implicit=s);const o=i();return n.createEmbeddedView(o.templateRef,o.context,o.index)}_detachAndCacheView(i,e){const n=e.detach(i);this._maybeCacheView(n,e)}_moveView(i,e,n,s){const r=n.get(i);return n.move(r,e),r.context.$implicit=s,r}_maybeCacheView(i,e){if(this._viewCache.lengthe.lift(new F5(t,i))}()),this._viewport=null,this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=n}attach(i){this._viewport=i,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(i,e,n){this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=n,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(i,e){this._viewport&&this._viewport.scrollToOffset(i*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const i=this._viewport.getRenderedRange(),e={start:i.start,end:i.end},n=this._viewport.getViewportSize(),s=this._viewport.getDataLength();let r=this._viewport.measureScrollOffset(),o=this._itemSize>0?r/this._itemSize:0;if(e.end>s){const h=Math.ceil(n/this._itemSize),b=Math.max(0,Math.min(o,s-h));o!=b&&(o=b,r=b*this._itemSize,e.start=Math.floor(o)),e.end=Math.max(0,Math.min(s,e.start+h))}const u=r-e.start*this._itemSize;if(u0&&(e.end=Math.min(s,e.end+b),e.start=Math.max(0,Math.floor(o-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(o))}}function lV(t){return t._scrollStrategy}let Qf=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new aV(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Wu(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Wu(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Wu(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ne([{provide:vT,useFactory:lV,deps:[Ue(()=>t)]}]),mn]}),t})(),CT=(()=>{class t{constructor(e,n,s){this._ngZone=e,this._platform=n,this._scrolled=new ct,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const n=this.scrollContainers.get(e);n&&(n.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Je(n=>{this._globalSubscription||this._addGlobalListener();const s=e>0?this._scrolled.pipe(jf(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):oe()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(e,n){const s=this.getAncestorScrollContainers(e);return this.scrolled(n).pipe(qs(r=>!r||s.indexOf(r)>-1))}getAncestorScrollContainers(e){const n=[];return this.scrollContainers.forEach((s,r)=>{this._scrollableContainsElement(r,e)&&n.push(r)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,n){let s=function T5(t){return t instanceof Re?t.nativeElement:t}(n),r=e.getElementRef().nativeElement;do{if(s==r)return!0}while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Gf(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(K(nt),K(mT),K(en,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yT=(()=>{class t{constructor(e,n,s,r){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=s,this.dir=r,this._destroyed=new ct,this._elementScrolled=new Je(o=>this.ngZone.runOutsideAngular(()=>Gf(this.elementRef.nativeElement,"scroll").pipe($f(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const n=this.elementRef.nativeElement,s=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=s?e.end:e.start),null==e.right&&(e.right=s?e.start:e.end),null!=e.bottom&&(e.top=n.scrollHeight-n.clientHeight-e.bottom),s&&0!=bl()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==bl()?e.left=e.right:1==bl()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=n.scrollWidth-n.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const n=this.elementRef.nativeElement;!function Q5(){if(null==Dr){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Dr=!1,Dr;if("scrollBehavior"in document.documentElement.style)Dr=!0;else{const t=Element.prototype.scrollTo;Dr=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Dr}()?(null!=e.top&&(n.scrollTop=e.top),null!=e.left&&(n.scrollLeft=e.left)):n.scrollTo(e)}measureScrollOffset(e){const n="left",s="right",r=this.elementRef.nativeElement;if("top"==e)return r.scrollTop;if("bottom"==e)return r.scrollHeight-r.clientHeight-r.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==e?e=o?s:n:"end"==e&&(e=o?n:s),o&&2==bl()?e==n?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:o&&1==bl()?e==n?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==n?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(CT),x(nt),x(gT,8))},t.\u0275dir=le({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),dV=(()=>{class t{constructor(e,n,s){this._platform=e,this._change=new ct,this._changeListener=r=>{this._change.next(r)},this._document=s,n.runOutsideAngular(()=>{if(e.isBrowser){const r=this._getWindow();r.addEventListener("resize",this._changeListener),r.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:n,height:s}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+s,right:e.left+n,height:s,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,n=this._getWindow(),s=e.documentElement,r=s.getBoundingClientRect();return{top:-r.top||e.body.scrollTop||n.scrollY||s.scrollTop||0,left:-r.left||e.body.scrollLeft||n.scrollX||s.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(jf(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(K(mT),K(nt),K(en,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const hV="undefined"!=typeof requestAnimationFrame?I5:A5;let Po=(()=>{class t extends yT{constructor(e,n,s,r,o,u,h){super(e,u,s,o),this.elementRef=e,this._changeDetectorRef=n,this._scrollStrategy=r,this._detachedSubject=new ct,this._renderedRangeSubject=new ct,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Je(b=>this._scrollStrategy.scrolledIndexChange.subscribe(y=>Promise.resolve().then(()=>this.ngZone.run(()=>b.next(y))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=Et.EMPTY,this._viewportChanges=h.change().subscribe(()=>{this.checkViewportSize()})}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=function y5(t){return null!=t&&"false"!=`${t}`}(e)}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(Qu(null),jf(0,hV)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe($f(this._detachedSubject)).subscribe(n=>{const s=n.length;s!==this._dataLength&&(this._dataLength=s,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function pV(t,i){return t.start==i.start&&t.end==i.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,n="to-start"){const r="horizontal"==this.orientation,o=r?"X":"Y";let h=`translate${o}(${Number((r&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e=this.appendOnly&&"to-start"===n?0:e,"to-end"===n&&(h+=` translate${o}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=h&&(this._renderedContentTransform=h,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,n="auto"){const s={behavior:n};"horizontal"===this.orientation?s.start=e:s.top=e,this.scrollTo(s)}scrollToIndex(e,n="auto"){this._scrollStrategy.scrollToIndex(e,n)}measureScrollOffset(e){return super.measureScrollOffset(e||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const e=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?e.clientWidth:e.clientHeight}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const n of e)n()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(nt),x(vT,8),x(gT,8),x(CT),x(dV))},t.\u0275cmp=G({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&j(rV,7),2&e){let s;V(s=B())&&(n._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ii("cdk-virtual-scroll-orientation-horizontal","horizontal"===n.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==n.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ne([{provide:yT,useExisting:t}]),ut],ngContentSelectors:oV,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(yn(),l(0,"div",0,1),St(2),c(),k(3,"div",2)),2&e&&(a(3),Hn("width",n._totalContentWidth)("height",n._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"],encapsulation:2,changeDetection:0}),t})();function wT(t,i,e){if(!e.getBoundingClientRect)return 0;const s=e.getBoundingClientRect();return"horizontal"===t?"start"===i?s.left:s.right:"start"===i?s.top:s.bottom}let Jf=(()=>{class t{constructor(e,n,s,r,o,u){this._viewContainerRef=e,this._template=n,this._differs=s,this._viewRepeater=r,this._viewport=o,this.viewChange=new ct,this._dataSourceChanges=new ct,this.dataStream=this._dataSourceChanges.pipe(Qu(null),function j5(){return t=>t.lift(new $5)}(),qi(([h,b])=>this._changeDataSource(h,b)),Gm(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new ct,this.dataStream.subscribe(h=>{this._data=h,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe($f(this._destroyed)).subscribe(h=>{this._renderedRange=h,this.viewChange.observers.length&&u.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function nV(t){return t&&"function"==typeof t.connect}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new iV(ns(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(n,s)=>e(n+(this._renderedRange?this._renderedRange.start:0),s):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=Wu(e)}measureRangeSize(e,n){if(e.start>=e.end)return 0;const s=e.start-this._renderedRange.start,r=e.end-e.start;let o,u;for(let h=0;h-1;h--){const b=this._viewContainerRef.get(h+s);if(b&&b.rootNodes.length){u=b.rootNodes[b.rootNodes.length-1];break}}return o&&u?wT(n,"end",u)-wT(n,"start",o):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,n)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,n):n)),this._needsUpdate=!0)}_changeDataSource(e,n){return e&&e.disconnect(this),this._needsUpdate=!0,n?n.connect(this):oe()}_updateContext(){const e=this._data.length;let n=this._viewContainerRef.length;for(;n--;){const s=this._viewContainerRef.get(n);s.context.index=this._renderedRange.start+n,s.context.count=e,this._updateComputedContextProperties(s.context),s.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(r,o,u)=>this._getEmbeddedViewArgs(r,u),r=>r.item),e.forEachIdentityChange(r=>{this._viewContainerRef.get(r.currentIndex).context.$implicit=r.item});const n=this._data.length;let s=this._viewContainerRef.length;for(;s--;){const r=this._viewContainerRef.get(s);r.context.index=this._renderedRange.start+s,r.context.count=n,this._updateComputedContextProperties(r.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,n){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:n}}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x($a),x(bT),x(Po,4),x(nt))},t.\u0275dir=le({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Ne([{provide:bT,useClass:sV}])]}),t})(),TT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})(),Fo=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[_T,TT],_T,TT]}),t})(),Jt=(()=>{class t{constructor(e,n,s){this.el=e,this.zone=n,this.config=s,this.escape=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.addEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.tooltipOptions&&(this._tooltipOptions=Object.assign(Object.assign({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?L.appendChild(this.container,this.el.nativeElement):L.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block"}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),L.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?gt.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&>.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+L.getWindowScrollLeft(),top:e.top+L.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),n=e.left+L.getOuterWidth(this.el.nativeElement),s=e.top+(L.getOuterHeight(this.el.nativeElement)-L.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),n=e.left-L.getOuterWidth(this.container),s=e.top+(L.getOuterHeight(this.el.nativeElement)-L.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),n=e.left+(L.getOuterWidth(this.el.nativeElement)-L.getOuterWidth(this.container))/2,s=e.top-L.getOuterHeight(this.container);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),n=e.left+(L.getOuterWidth(this.el.nativeElement)-L.getOuterWidth(this.container))/2,s=e.top+L.getOuterHeight(this.el.nativeElement);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=Object.assign(Object.assign({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return L.hasClass(e,"p-inputwrapper")?L.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let n="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?n+" "+this.getOption("tooltipStyleClass"):n}isOutOfBounds(){let e=this.container.getBoundingClientRect(),n=e.top,s=e.left,r=L.getOuterWidth(this.container),o=L.getOuterHeight(this.container),u=L.getViewport();return s+r>u.width||s<0||n<0||n+o>u.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):L.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&>.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(zn))},t.\u0275dir=le({type:t,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[mn]}),t})(),ai=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function mV(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d();a(1),S(e.label||"empty")}}function fV(t,i){1&t&&Y(0)}const ST=function(t){return{height:t}},gV=function(t,i){return{"p-dropdown-item":!0,"p-highlight":t,"p-disabled":i}},Yf=function(t){return{$implicit:t}},_V=["container"],bV=["filter"],vV=["in"],CV=["editableInput"];function yV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),S(e.label||"empty")}}function wV(t,i){1&t&&Y(0)}const TV=function(t){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":t}};function SV(t,i){if(1&t&&(l(0,"span",12),_(1,yV,2,1,"ng-container",13),_(2,wV,1,0,"ng-container",14),c()),2&t){const e=d();p("ngClass",z(9,TV,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),ne("id",e.labelId),a(1),p("ngIf",!e.selectedItemTemplate),a(1),p("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",z(11,Yf,e.selectedOption))}}const xV=function(t){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":t}};function DV(t,i){if(1&t&&(l(0,"span",15),g(1),c()),2&t){const e=d();p("ngClass",z(2,xV,null==e.placeholder||0===e.placeholder.length)),a(1),S(e.placeholder||"empty")}}function MV(t,i){if(1&t){const e=I();l(0,"input",16,17),C("click",function(){return v(e),d().onEditableInputClick()})("input",function(s){return v(e),d().onEditableInputChange(s)})("focus",function(s){return v(e),d().onEditableInputFocus(s)})("blur",function(s){return v(e),d().onInputBlur(s)}),c()}if(2&t){const e=d();p("disabled",e.disabled),ne("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function kV(t,i){if(1&t){const e=I();l(0,"i",18),C("click",function(s){return v(e),d().clear(s)}),c()}}function IV(t,i){1&t&&Y(0)}function EV(t,i){if(1&t){const e=I();l(0,"div",26)(1,"div",27),C("click",function(s){return s.stopPropagation()}),l(2,"input",28,29),C("keydown.enter",function(s){return s.preventDefault()})("keydown",function(s){return v(e),d(2).onKeydown(s,!1)})("input",function(s){return v(e),d(2).onFilterInputChange(s)}),c(),k(4,"span",30),c()()}if(2&t){const e=d(2);a(2),p("value",e.filterValue||""),ne("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function RV(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(3);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function LV(t,i){1&t&&Y(0)}function OV(t,i){1&t&&Y(0)}const xT=function(t,i){return{$implicit:t,selectedOption:i}};function AV(t,i){if(1&t&&(l(0,"li",32),_(1,RV,2,1,"span",13),_(2,LV,1,0,"ng-container",14),c(),_(3,OV,1,0,"ng-container",14)),2&t){const e=i.$implicit;d(2);const n=F(8),s=d();a(1),p("ngIf",!s.groupTemplate),a(1),p("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",z(5,Yf,e)),a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",We(7,xT,s.getOptionGroupChildren(e),s.selectedOption))}}function PV(t,i){if(1&t&&(ce(0),_(1,AV,4,10,"ng-template",31),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.optionsToDisplay)}}function FV(t,i){1&t&&Y(0)}function NV(t,i){if(1&t&&(ce(0),_(1,FV,1,0,"ng-container",14),ue()),2&t){d();const e=F(8),n=d();a(1),p("ngTemplateOutlet",e)("ngTemplateOutletContext",We(2,xT,n.optionsToDisplay,n.selectedOption))}}function VV(t,i){if(1&t){const e=I();l(0,"p-dropdownItem",35),C("onClick",function(s){return v(e),d(4).onItemClick(s)}),c()}if(2&t){const e=i.$implicit,n=d(2).selectedOption,s=d(2);p("option",e)("selected",n==e)("label",s.getOptionLabel(e))("disabled",s.isOptionDisabled(e))("template",s.itemTemplate)}}function BV(t,i){if(1&t&&(ce(0),_(1,VV,1,5,"ng-template",31),ue()),2&t){const e=d().$implicit;a(1),p("ngForOf",e)}}function HV(t,i){if(1&t){const e=I();ce(0),l(1,"p-dropdownItem",35),C("onClick",function(s){return v(e),d(5).onItemClick(s)}),c(),ue()}if(2&t){const e=i.$implicit,n=d(3).selectedOption,s=d(2);a(1),p("option",e)("selected",n==e)("label",s.getOptionLabel(e))("disabled",s.isOptionDisabled(e))("template",s.itemTemplate)}}function qV(t,i){if(1&t){const e=I();l(0,"cdk-virtual-scroll-viewport",37,38),C("scrolledIndexChange",function(){return v(e),d(4).scrollToSelectedVirtualScrollElement()}),_(2,HV,2,5,"ng-container",39),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("ngStyle",z(3,ST,n.scrollHeight))("itemSize",n.itemSize),a(2),p("cdkVirtualForOf",e)}}function UV(t,i){if(1&t&&_(0,qV,3,5,"cdk-virtual-scroll-viewport",36),2&t){const e=d(3);p("ngIf",e.virtualScroll&&e.optionsToDisplay&&e.optionsToDisplay.length)}}function GV(t,i){if(1&t&&(_(0,BV,2,1,"ng-container",33),_(1,UV,1,1,"ng-template",null,34,we)),2&t){const e=F(2);p("ngIf",!d(2).virtualScroll)("ngIfElse",e)}}function zV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function jV(t,i){1&t&&Y(0,null,41)}function $V(t,i){if(1&t&&(l(0,"li",40),_(1,zV,2,1,"ng-container",33),_(2,jV,2,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function WV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyMessageLabel," ")}}function KV(t,i){1&t&&Y(0,null,42)}function QV(t,i){if(1&t&&(l(0,"li",40),_(1,WV,2,1,"ng-container",33),_(2,KV,2,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function JV(t,i){1&t&&Y(0)}const YV=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},ZV=function(t){return{value:"visible",params:t}},XV=function(t){return{"p-dropdown-virtualscroll":t}};function e6(t,i){if(1&t){const e=I();l(0,"div",19),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationEnd(s)}),_(1,IV,1,0,"ng-container",20),_(2,EV,5,4,"div",21),l(3,"div",22)(4,"ul",23),_(5,PV,2,1,"ng-container",13),_(6,NV,2,5,"ng-container",13),_(7,GV,3,2,"ng-template",null,24,we),_(9,$V,3,3,"li",25),_(10,QV,3,3,"li",25),c()(),_(11,JV,1,0,"ng-container",20),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngClass","p-dropdown-panel p-component")("@overlayAnimation",z(19,ZV,We(16,YV,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),a(1),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",e.filter),a(1),Hn("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),a(1),p("ngClass",z(21,XV,e.virtualScroll)),ne("id",e.listId),a(1),p("ngIf",e.group),a(1),p("ngIf",!e.group),a(3),p("ngIf",e.filterValue&&e.isEmpty()),a(1),p("ngIf",!e.filterValue&&e.isEmpty()),a(1),p("ngTemplateOutlet",e.footerTemplate)}}const t6=function(t,i,e,n){return{"p-dropdown p-component":!0,"p-disabled":t,"p-dropdown-open":i,"p-focus":e,"p-dropdown-clearable":n}},n6={provide:dn,useExisting:Ue(()=>Vt),multi:!0};let i6=(()=>{class t{constructor(){this.onClick=new H}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"li",0),C("click",function(r){return n.onOptionClick(r)}),_(1,mV,2,1,"span",1),_(2,fV,1,0,"ng-container",2),c()),2&e&&(p("ngStyle",z(8,ST,n.itemSize+"px"))("id",n.selected?"p-highlighted-option":"")("ngClass",We(10,gV,n.selected,n.disabled)),ne("aria-label",n.label)("aria-selected",n.selected),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(13,Yf,n.option)))},directives:[vt,lt,Oe,Q,Lt],encapsulation:2}),t})(),Vt=(()=>{class t{constructor(e,n,s,r,o,u,h){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.filterService=o,this.config=u,this.overlayService=h,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.onChange=new H,this.onFilter=new H,this.onFocus=new H,this.onBlur=new H,this.onClick=new H,this.onShow=new H,this.onHide=new H,this.onClear=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.viewPortOffsetTop=0,this.id=pl()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list"}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),this.selectedOption||(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ft.EMPTY_FILTER_MESSAGE)}get filled(){return this.value||null!=this.value||null!=this.value}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const n=e.option;this.isOptionDisabled(n)||(this.selectItem(e.originalEvent,n),this.accessibleViewChild.nativeElement.focus()),setTimeout(()=>{this.hide()},150)}selectItem(e,n){this.selectedOption!=n&&(this.selectedOption=n,this.value=this.getOptionValue(n),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.virtualScroll&&setTimeout(()=>{this.viewPortOffsetTop=this.viewPort?this.viewPort.measureScrollOffset():0},1))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.virtualScroll&&this.updateVirtualScrollSelectedIndex(!0),this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){if(this.virtualScroll&&this.viewPort){let n=this.viewPort.getRenderedRange();this.updateVirtualScrollSelectedIndex(!1),(n.start>this.virtualScrollSelectedIndex||n.end-1&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)),this.virtualAutoScrolled=!0}updateVirtualScrollSelectedIndex(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay))}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):L.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=L.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.virtualScroll&&(this.virtualAutoScrolled=!1),this.cd.markForCheck()}alignOverlay(){this.overlay&&(this.appendTo?L.absolutePosition(this.overlay,this.containerViewChild.nativeElement):L.relativePosition(this.overlay,this.containerViewChild.nativeElement))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let n;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let s=e-1;0<=s;s--){let r=this.optionsToDisplay[s];if(!this.isOptionDisabled(r)){n=r;break}}if(!n)for(let s=this.optionsToDisplay.length-1;s>=e;s--){let r=this.optionsToDisplay[s];if(!this.isOptionDisabled(r)){n=r;break}}}return n}findNextEnabledOption(e){let n;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let s=e+1;s0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let s=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,r=this.findNextEnabledOption(s);r&&(this.selectItem(e,r),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let s=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==s){let r=s.itemIndex-1;if(r>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[s.groupIndex])[r]),this.selectedOptionUpdated=!0;else if(r<0){let o=this.optionsToDisplay[s.groupIndex-1];o&&(this.selectItem(e,this.getOptionGroupChildren(o)[this.getOptionGroupChildren(o).length-1]),this.selectedOptionUpdated=!0)}}}else{let s=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,r=this.findPrevEnabledOption(s);r&&(this.selectItem(e,r),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:n&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:n&&!e.metaKey&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const n=e.key;let s;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=n,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+n:n,this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};s=this.searchOptionWithinGroup(r)}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;s=this.searchOption(++r)}s&&!this.isOptionDisabled(s)&&(this.selectItem(e,s),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let n;return this.searchValue&&(n=this.searchOptionInRange(e,this.optionsToDisplay.length),n||(n=this.searchOptionInRange(0,e))),n}searchOptionInRange(e,n){for(let s=e;s{!this.preventDocumentDefault&&this.isOutsideClicked(n)&&(this.hide(),this.unbindDocumentClickListener()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){this.overlayVisible&&!L.isTouchDevice()&&this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,e=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}clear(e){this.value=null,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel(),this.onClear.emit(e)}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&>.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(hl),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-dropdown"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(_V,5),j(bV,5),j(vV,5),j(Po,5),j(CV,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.filterViewChild=s.first),V(s=B())&&(n.accessibleViewChild=s.first),V(s=B())&&(n.viewPort=s.first),V(s=B())&&(n.editableInputViewChild=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focused||n.overlayVisible)},inputs:{scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",selectId:"selectId",dataKey:"dataKey",filterBy:"filterBy",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",virtualScroll:"virtualScroll",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",disabled:"disabled",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear"},features:[Ne([n6])],decls:12,vars:25,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","","aria-haspopup","listbox","aria-haspopup","listbox","role","combobox",3,"disabled","focus","blur","keydown"],["in",""],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","text","class","p-dropdown-label p-inputtext","aria-haspopup","listbox",3,"disabled","click","input","focus","blur",4,"ngIf"],["class","p-dropdown-clear-icon pi pi-times",3,"click",4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-dropdown-trigger"],[1,"p-dropdown-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],["type","text","aria-haspopup","listbox",1,"p-dropdown-label","p-inputtext",3,"disabled","click","input","focus","blur"],["editableInput",""],[1,"p-dropdown-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","click"],[4,"ngTemplateOutlet"],["class","p-dropdown-header",4,"ngIf"],[1,"p-dropdown-items-wrapper"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["itemslist",""],["class","p-dropdown-empty-message",4,"ngIf"],[1,"p-dropdown-header"],[1,"p-dropdown-filter-container",3,"click"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","keydown.enter","keydown","input"],["filter",""],[1,"p-dropdown-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-dropdown-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],[3,"option","selected","label","disabled","template","onClick"],[3,"ngStyle","itemSize","scrolledIndexChange",4,"ngIf"],[3,"ngStyle","itemSize","scrolledIndexChange"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[1,"p-dropdown-empty-message"],["emptyFilter",""],["empty",""]],template:function(e,n){1&e&&(l(0,"div",0,1),C("click",function(r){return n.onMouseclick(r)}),l(2,"div",2)(3,"input",3,4),C("focus",function(r){return n.onInputFocus(r)})("blur",function(r){return n.onInputBlur(r)})("keydown",function(r){return n.onKeydown(r,!0)}),c()(),_(5,SV,3,13,"span",5),_(6,DV,2,4,"span",6),_(7,MV,2,4,"input",7),_(8,kV,1,0,"i",8),l(9,"div",9),k(10,"span",10),c(),_(11,e6,12,23,"div",11),c()),2&e&&(me(n.styleClass),p("ngClass",_i(20,t6,n.disabled,n.overlayVisible,n.focused,n.showClear&&!n.disabled))("ngStyle",n.style),a(3),p("disabled",n.disabled),ne("id",n.inputId)("placeholder",n.placeholder)("aria-label",n.ariaLabel)("aria-expanded",!1)("aria-labelledby",n.ariaLabelledBy)("tabindex",n.tabindex)("autofocus",n.autofocus)("aria-activedescendant",n.overlayVisible?n.labelId:null),a(2),p("ngIf",!n.editable&&null!=n.label),a(1),p("ngIf",!n.editable&&null==n.label),a(1),p("ngIf",n.editable),a(1),p("ngIf",null!=n.value&&n.showClear&&!n.disabled),a(1),ne("aria-expanded",n.overlayVisible),a(1),p("ngClass",n.dropdownIcon),a(1),p("ngIf",n.overlayVisible))},directives:[i6,Po,Oe,lt,Q,Jt,Lt,at,Qf,Jf],styles:[".p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;visibility:hidden}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-panel{position:absolute;top:0;left:0}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),Yu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,Fo,ai,gn],Nt,Fo]}),t})(),DT=(()=>{class t{constructor(e,n,s){this.el=e,this.ngModel=n,this.cd=s}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(_e,8),x(ot))},t.\u0275dir=le({type:t,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,n){1&e&&C("input",function(r){return n.onInput(r)}),2&e&&ii("p-filled",n.filled)}}),t})(),MT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const s6=["input"];function r6(t,i){if(1&t){const e=I();l(0,"i",6),C("click",function(){return v(e),d().clear()}),c()}}const kT=function(){return{"p-inputnumber-button p-inputnumber-button-up":!0}},IT=function(){return{"p-inputnumber-button p-inputnumber-button-down":!0}};function o6(t,i){if(1&t){const e=I();l(0,"span",7)(1,"button",8),C("mousedown",function(s){return v(e),d().onUpButtonMouseDown(s)})("mouseup",function(){return v(e),d().onUpButtonMouseUp()})("mouseleave",function(){return v(e),d().onUpButtonMouseLeave()})("keydown",function(s){return v(e),d().onUpButtonKeyDown(s)})("keyup",function(){return v(e),d().onUpButtonKeyUp()}),c(),l(2,"button",8),C("mousedown",function(s){return v(e),d().onDownButtonMouseDown(s)})("mouseup",function(){return v(e),d().onDownButtonMouseUp()})("mouseleave",function(){return v(e),d().onDownButtonMouseLeave()})("keydown",function(s){return v(e),d().onDownButtonKeyDown(s)})("keyup",function(){return v(e),d().onDownButtonKeyUp()}),c()()}if(2&t){const e=d();a(1),me(e.incrementButtonClass),p("ngClass",A(10,kT))("icon",e.incrementButtonIcon)("disabled",e.disabled),a(1),me(e.decrementButtonClass),p("ngClass",A(11,IT))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}function a6(t,i){if(1&t){const e=I();l(0,"button",8),C("mousedown",function(s){return v(e),d().onUpButtonMouseDown(s)})("mouseup",function(){return v(e),d().onUpButtonMouseUp()})("mouseleave",function(){return v(e),d().onUpButtonMouseLeave()})("keydown",function(s){return v(e),d().onUpButtonKeyDown(s)})("keyup",function(){return v(e),d().onUpButtonKeyUp()}),c()}if(2&t){const e=d();me(e.incrementButtonClass),p("ngClass",A(5,kT))("icon",e.incrementButtonIcon)("disabled",e.disabled)}}function l6(t,i){if(1&t){const e=I();l(0,"button",8),C("mousedown",function(s){return v(e),d().onDownButtonMouseDown(s)})("mouseup",function(){return v(e),d().onDownButtonMouseUp()})("mouseleave",function(){return v(e),d().onDownButtonMouseLeave()})("keydown",function(s){return v(e),d().onDownButtonKeyDown(s)})("keyup",function(){return v(e),d().onDownButtonKeyUp()}),c()}if(2&t){const e=d();me(e.decrementButtonClass),p("ngClass",A(5,IT))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}const c6=function(t,i,e){return{"p-inputnumber p-component":!0,"p-inputnumber-buttons-stacked":t,"p-inputnumber-buttons-horizontal":i,"p-inputnumber-buttons-vertical":e}},u6={provide:dn,useExisting:Ue(()=>dt),multi:!0};let dt=(()=>{class t{constructor(e,n){this.el=e,this.cd=n,this.showButtons=!1,this.format=!0,this.buttonLayout="stacked",this.incrementButtonIcon="pi pi-angle-up",this.decrementButtonIcon="pi pi-angle-down",this.readonly=!1,this.step=1,this.allowEmpty=!0,this.mode="decimal",this.useGrouping=!0,this.showClear=!1,this.onInput=new H,this.onFocus=new H,this.onBlur=new H,this.onKeyDown=new H,this.onClear=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.groupChar="",this.prefixChar="",this.suffixChar=""}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1),this._disabled=e,this.timer&&this.clearTimer()}ngOnChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(s=>!!e[s])&&this.updateConstructParser()}ngOnInit(){this.constructParser(),this.initialized=!0}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),n=new Map(e.map((s,r)=>[s,r]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=s=>n.get(s)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,Object.assign(Object.assign({},this.getOptions()),{useGrouping:!1}));return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")}getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let s=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(s=this.prefix+s),this.suffix&&(s+=this.suffix),s}return e.toString()}return""}parseValue(e){let n=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(n){if("-"===n)return n;let s=+n;return isNaN(s)?null:s}return null}repeat(e,n,s){if(this.readonly)return;let r=n||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,s)},r),this.spin(e,s)}spin(e,n){let s=this.step*n,r=this.parseValue(this.input.nativeElement.value)||0,o=this.validateValue(r+s);this.maxlength&&this.maxlength0&&n>h){const w=this.isDecimalMode()&&(this.minFractionDigits||0)0?o:""):o=r.slice(0,n-1)+r.slice(n)}this.updateValue(e,o,null,"delete-single")}else o=this.deleteRange(r,n,s),this.updateValue(e,o,null,"delete-range");break;case 46:if(e.preventDefault(),n===s){const u=r.charAt(n),{decimalCharIndex:h,decimalCharIndexWithoutPrefix:b}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(u)){const y=this.getDecimalLength(r);if(this._group.test(u))this._group.lastIndex=0,o=r.slice(0,n)+r.slice(n+2);else if(this._decimal.test(u))this._decimal.lastIndex=0,y?this.input.nativeElement.setSelectionRange(n+1,n+1):o=r.slice(0,n)+r.slice(n+1);else if(h>0&&n>h){const w=this.isDecimalMode()&&(this.minFractionDigits||0)0?o:""):o=r.slice(0,n)+r.slice(n+1)}this.updateValue(e,o,null,"delete-back-single")}else o=this.deleteRange(r,n,s),this.updateValue(e,o,null,"delete-range")}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let n=e.which||e.keyCode,s=String.fromCharCode(n);const r=this.isDecimalSign(s),o=this.isMinusSign(s);(48<=n&&n<=57||o||r)&&this.insert(e,s,{isDecimalSign:r,isMinusSign:o})}onPaste(e){if(!this.disabled&&!this.readonly){e.preventDefault();let n=(e.clipboardData||window.clipboardData).getData("Text");if(n){let s=this.parseValue(n);null!=s&&this.insert(e,s.toString())}}}allowMinusSign(){return null==this.min||this.min<0}isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e||(this._minusSign.lastIndex=0,0))}isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)}isDecimalMode(){return"decimal"===this.mode}getDecimalCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;const r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){const n=e.search(this._decimal);this._decimal.lastIndex=0;const s=e.search(this._minusSign);this._minusSign.lastIndex=0;const r=e.search(this._suffix);this._suffix.lastIndex=0;const o=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:s,suffixCharIndex:r,currencyCharIndex:o}}insert(e,n,s={isDecimalSign:!1,isMinusSign:!1}){const r=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==r)return;let o=this.input.nativeElement.selectionStart,u=this.input.nativeElement.selectionEnd,h=this.input.nativeElement.value.trim();const{decimalCharIndex:b,minusCharIndex:y,suffixCharIndex:w,currencyCharIndex:M}=this.getCharIndexes(h);let E;if(s.isMinusSign)0===o&&(E=h,(-1===y||0!==u)&&(E=this.insertText(h,n,0,u)),this.updateValue(e,E,n,"insert"));else if(s.isDecimalSign)b>0&&o===b?this.updateValue(e,h,n,"insert"):(b>o&&b0&&o>b){if(o+n.length-(b+1)<=R){const N=M>=o?M-1:w>=o?w:h.length;E=h.slice(0,o)+n+h.slice(o+n.length,N)+h.slice(N),this.updateValue(e,E,n,O)}}else E=this.insertText(h,n,o,u),this.updateValue(e,E,n,O)}}insertText(e,n,s,r){if(2===("."===n?n:n.split(".")).length){const u=e.slice(s,r).search(this._decimal);return this._decimal.lastIndex=0,u>0?e.slice(0,s)+this.formatValue(n)+e.slice(r):e||this.formatValue(n)}return r-s===e.length?this.formatValue(n):0===s?n+e.slice(r):r===e.length?e.slice(0,s)+n:e.slice(0,s)+n+e.slice(r)}deleteRange(e,n,s){let r;return r=s-n===e.length?"":0===n?e.slice(s):s===e.length?e.slice(0,n):e.slice(0,n)+e.slice(s),r}initCursor(){let e=this.input.nativeElement.selectionStart,n=this.input.nativeElement.value,s=n.length,r=null,o=(this.prefixChar||"").length;n=n.replace(this._prefix,""),e-=o;let u=n.charAt(e);if(this.isNumeralChar(u))return e+o;let h=e-1;for(;h>=0;){if(u=n.charAt(h),this.isNumeralChar(u)){r=h+o;break}h--}if(null!==r)this.input.nativeElement.setSelectionRange(r+1,r+1);else{for(h=e;hthis.max?this.max:e}updateInput(e,n,s,r){n=n||"";let o=this.input.nativeElement.value,u=this.formatValue(e),h=o.length;if(u!==r&&(u=this.concatValues(u,r)),0===h){this.input.nativeElement.value=u,this.input.nativeElement.setSelectionRange(0,0);const y=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(y,y)}else{let b=this.input.nativeElement.selectionStart,y=this.input.nativeElement.selectionEnd;if(this.maxlength&&this.maxlength0}clearTimer(){this.timer&&clearInterval(this.timer)}getFormatter(){return this.numberFormat}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-inputNumber"]],viewQuery:function(e,n){if(1&e&&j(s6,5),2&e){let s;V(s=B())&&(n.input=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focused)("p-inputnumber-clearable",n.showClear&&"vertical"!=n.buttonLayout)},inputs:{showButtons:"showButtons",format:"format",buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",style:"style",placeholder:"placeholder",size:"size",maxlength:"maxlength",tabindex:"tabindex",title:"title",ariaLabel:"ariaLabel",ariaRequired:"ariaRequired",name:"name",required:"required",autocomplete:"autocomplete",min:"min",max:"max",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:"readonly",step:"step",allowEmpty:"allowEmpty",locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:"showClear",disabled:"disabled"},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[Ne([u6]),mn],decls:7,vars:32,consts:[[3,"ngClass","ngStyle"],["pInputText","","inputmode","decimal",3,"ngClass","ngStyle","value","disabled","readonly","input","keydown","keypress","paste","click","focus","blur"],["input",""],["class","p-inputnumber-clear-icon pi pi-times",3,"click",4,"ngIf"],["class","p-inputnumber-button-group",4,"ngIf"],["type","button","pButton","",3,"ngClass","class","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],[1,"p-inputnumber-clear-icon","pi","pi-times",3,"click"],[1,"p-inputnumber-button-group"],["type","button","pButton","",3,"ngClass","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup"]],template:function(e,n){1&e&&(l(0,"span",0)(1,"input",1,2),C("input",function(r){return n.onUserInput(r)})("keydown",function(r){return n.onInputKeyDown(r)})("keypress",function(r){return n.onInputKeyPress(r)})("paste",function(r){return n.onPaste(r)})("click",function(){return n.onInputClick()})("focus",function(r){return n.onInputFocus(r)})("blur",function(r){return n.onInputBlur(r)}),c(),_(3,r6,1,0,"i",3),_(4,o6,3,12,"span",4),_(5,a6,1,6,"button",5),_(6,l6,1,6,"button",5),c()),2&e&&(me(n.styleClass),p("ngClass",Rt(28,c6,n.showButtons&&"stacked"===n.buttonLayout,n.showButtons&&"horizontal"===n.buttonLayout,n.showButtons&&"vertical"===n.buttonLayout))("ngStyle",n.style),a(1),me(n.inputStyleClass),p("ngClass","p-inputnumber-input")("ngStyle",n.inputStyle)("value",n.formattedValue())("disabled",n.disabled)("readonly",n.readonly),ne("placeholder",n.placeholder)("title",n.title)("id",n.inputId)("size",n.size)("name",n.name)("autocomplete",n.autocomplete)("maxlength",n.maxlength)("tabindex",n.tabindex)("aria-label",n.ariaLabel)("aria-required",n.ariaRequired)("required",n.required)("min",n.min)("max",n.max),a(2),p("ngIf","vertical"!=n.buttonLayout&&n.showClear&&n.value),a(1),p("ngIf",n.showButtons&&"stacked"===n.buttonLayout),a(1),p("ngIf",n.showButtons&&"stacked"!==n.buttonLayout),a(1),p("ngIf",n.showButtons&&"stacked"!==n.buttonLayout))},directives:[Oe,lt,DT,Q,Ln],styles:["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}.p-inputnumber-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-inputnumber-clearable{position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),Zu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,MT,gl]]}),t})();function d6(t,i){1&t&&Y(0)}const Zf=function(t){return{$implicit:t}};function p6(t,i){if(1&t&&(l(0,"div",15),_(1,d6,1,0,"ng-container",16),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",z(2,Zf,e.paginatorState))}}function h6(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(2);a(1),S(e.currentPageReport)}}const Xu=function(t){return{"p-disabled":t}};function m6(t,i){if(1&t){const e=I();l(0,"button",18),C("click",function(s){return v(e),d(2).changePageToFirst(s)}),k(1,"span",19),c()}if(2&t){const e=d(2);p("disabled",e.isFirstPage()||e.empty())("ngClass",z(2,Xu,e.isFirstPage()||e.empty()))}}const f6=function(t){return{"p-highlight":t}};function g6(t,i){if(1&t){const e=I();l(0,"button",22),C("click",function(s){const o=v(e).$implicit;return d(3).onPageLinkClick(s,o-1)}),g(1),c()}if(2&t){const e=i.$implicit,n=d(3);p("ngClass",z(2,f6,e-1==n.getPage())),a(1),S(e)}}function _6(t,i){if(1&t&&(l(0,"span",20),_(1,g6,2,4,"button",21),c()),2&t){const e=d(2);a(1),p("ngForOf",e.pageLinks)}}function b6(t,i){1&t&&g(0),2&t&&S(d(3).currentPageReport)}function v6(t,i){if(1&t){const e=I();l(0,"p-dropdown",23),C("onChange",function(s){return v(e),d(2).onPageDropdownChange(s)}),_(1,b6,1,1,"ng-template",24),c()}if(2&t){const e=d(2);p("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight)}}function C6(t,i){if(1&t){const e=I();l(0,"button",25),C("click",function(s){return v(e),d(2).changePageToLast(s)}),k(1,"span",26),c()}if(2&t){const e=d(2);p("disabled",e.isLastPage()||e.empty())("ngClass",z(2,Xu,e.isLastPage()||e.empty()))}}function y6(t,i){if(1&t){const e=I();l(0,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d(2).changePage(s-1)}),c()}if(2&t){const e=d(2);p("ngModel",e.currentPage())("disabled",e.empty())}}function w6(t,i){1&t&&Y(0)}function T6(t,i){if(1&t&&_(0,w6,1,0,"ng-container",16),2&t){const e=i.$implicit;p("ngTemplateOutlet",d(4).dropdownItemTemplate)("ngTemplateOutletContext",z(2,Zf,e))}}function S6(t,i){1&t&&(ce(0),_(1,T6,1,4,"ng-template",30),ue())}function x6(t,i){if(1&t){const e=I();l(0,"p-dropdown",28),C("ngModelChange",function(s){return v(e),d(2).rows=s})("onChange",function(s){return v(e),d(2).onRppChange(s)}),_(1,S6,2,0,"ng-container",29),c()}if(2&t){const e=d(2);p("options",e.rowsPerPageItems)("ngModel",e.rows)("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight),a(1),p("ngIf",e.dropdownItemTemplate)}}function D6(t,i){1&t&&Y(0)}function M6(t,i){if(1&t&&(l(0,"div",31),_(1,D6,1,0,"ng-container",16),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",z(2,Zf,e.paginatorState))}}function k6(t,i){if(1&t){const e=I();l(0,"div",1),_(1,p6,2,4,"div",2),_(2,h6,2,1,"span",3),_(3,m6,2,4,"button",4),l(4,"button",5),C("click",function(s){return v(e),d().changePageToPrev(s)}),k(5,"span",6),c(),_(6,_6,2,1,"span",7),_(7,v6,2,5,"p-dropdown",8),l(8,"button",9),C("click",function(s){return v(e),d().changePageToNext(s)}),k(9,"span",10),c(),_(10,C6,2,4,"button",11),_(11,y6,1,2,"p-inputNumber",12),_(12,x6,2,6,"p-dropdown",13),_(13,M6,2,4,"div",14),c()}if(2&t){const e=d();me(e.styleClass),p("ngStyle",e.style)("ngClass","p-paginator p-component"),a(1),p("ngIf",e.templateLeft),a(1),p("ngIf",e.showCurrentPageReport),a(1),p("ngIf",e.showFirstLastIcon),a(1),p("disabled",e.isFirstPage()||e.empty())("ngClass",z(17,Xu,e.isFirstPage()||e.empty())),a(2),p("ngIf",e.showPageLinks),a(1),p("ngIf",e.showJumpToPageDropdown),a(1),p("disabled",e.isLastPage()||e.empty())("ngClass",z(19,Xu,e.isLastPage()||e.empty())),a(2),p("ngIf",e.showFirstLastIcon),a(1),p("ngIf",e.showJumpToPageInput),a(1),p("ngIf",e.rowsPerPageOptions),a(1),p("ngIf",e.templateRight)}}let ET=(()=>{class t{constructor(e){this.cd=e,this.pageLinkSize=5,this.onPageChange=new H,this.alwaysShow=!0,this.dropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.totalRecords=0,this.rows=0,this.showPageLinks=!0,this._first=0,this._page=0}ngOnInit(){this.updatePaginatorState()}ngOnChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions()}get first(){return this._first}set first(e){this._first=e}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];for(let e of this.rowsPerPageOptions)"object"==typeof e&&e.showAll?this.rowsPerPageItems.unshift({label:e.showAll,value:this.totalRecords}):this.rowsPerPageItems.push({label:String(e),value:e})}}isFirstPage(){return 0===this.getPage()}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),n=Math.min(this.pageLinkSize,e),s=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,s+n-1);return s=Math.max(0,s-(this.pageLinkSize-(r-s+1))),[s,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),s=e[1];for(let r=e[0];r<=s;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,n){this.changePage(n),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return 0===this.getPageCount()}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-paginator"]],hostAttrs:[1,"p-element"],inputs:{pageLinkSize:"pageLinkSize",style:"style",styleClass:"styleClass",alwaysShow:"alwaysShow",templateLeft:"templateLeft",templateRight:"templateRight",dropdownAppendTo:"dropdownAppendTo",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showFirstLastIcon:"showFirstLastIcon",totalRecords:"totalRecords",rows:"rows",rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showPageLinks:"showPageLinks",dropdownItemTemplate:"dropdownItemTemplate",first:"first"},outputs:{onPageChange:"onPageChange"},features:[mn],decls:1,vars:1,consts:[[3,"class","ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","ngClass"],["class","p-paginator-left-content",4,"ngIf"],["class","p-paginator-current",4,"ngIf"],["type","button","pRipple","","class","p-paginator-first p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-prev","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-left"],["class","p-paginator-pages",4,"ngIf"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-next","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-right"],["type","button","pRipple","","class","p-paginator-last p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["class","p-paginator-page-input",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange",4,"ngIf"],["class","p-paginator-right-content",4,"ngIf"],[1,"p-paginator-left-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-paginator-current"],["type","button","pRipple","",1,"p-paginator-first","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-left"],[1,"p-paginator-pages"],["type","button","class","p-paginator-page p-paginator-element p-link","pRipple","",3,"ngClass","click",4,"ngFor","ngForOf"],["type","button","pRipple","",1,"p-paginator-page","p-paginator-element","p-link",3,"ngClass","click"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange"],["pTemplate","selectedItem"],["type","button","pRipple","",1,"p-paginator-last","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-right"],[1,"p-paginator-page-input",3,"ngModel","disabled","ngModelChange"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange"],[4,"ngIf"],["pTemplate","item"],[1,"p-paginator-right-content"]],template:function(e,n){1&e&&_(0,k6,14,21,"div",0),2&e&&p("ngIf",!!n.alwaysShow||n.pageLinks&&n.pageLinks.length>1)},directives:[Vt,dt,Q,lt,Oe,Lt,vt,at,Te,_e,ie],styles:[".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),RT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Yu,Zu,Du,Nt,gn],Yu,Zu,Du,Nt]}),t})();function I6(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),k(2,"i"),c()()),2&t){const e=d();a(2),me("p-dataview-loading-icon pi-spin "+e.loadingIcon)}}function E6(t,i){1&t&&Y(0)}function R6(t,i){if(1&t&&(l(0,"div",12),St(1),_(2,E6,1,0,"ng-container",13),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}function L6(t,i){if(1&t){const e=I();l(0,"p-paginator",14),C("onPageChange",function(s){return v(e),d().paginate(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)}}function O6(t,i){1&t&&Y(0)}const A6=function(t,i){return{$implicit:t,rowIndex:i}};function P6(t,i){if(1&t&&_(0,O6,1,0,"ng-container",15),2&t){const e=i.$implicit,n=i.index;p("ngTemplateOutlet",d().itemTemplate)("ngTemplateOutletContext",We(2,A6,e,n))}}function F6(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),T(" ",e.emptyMessageLabel," ")}}function N6(t,i){1&t&&Y(0,null,19)}function V6(t,i){if(1&t&&(l(0,"div",16)(1,"div",17),_(2,F6,2,1,"ng-container",18),_(3,N6,2,0,"ng-container",13),c()()),2&t){const e=d();a(2),p("ngIf",!e.emptyMessageTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyMessageTemplate)}}function B6(t,i){if(1&t){const e=I();l(0,"p-paginator",20),C("onPageChange",function(s){return v(e),d().paginate(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)}}function H6(t,i){1&t&&Y(0)}function q6(t,i){if(1&t&&(l(0,"div",21),St(1,1),_(2,H6,1,0,"ng-container",13),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const U6=[[["p-header"]],[["p-footer"]]],G6=function(t,i){return{"p-dataview p-component":!0,"p-dataview-list":t,"p-dataview-grid":i}},z6=["p-header","p-footer"];let j6=(()=>{class t{constructor(e,n,s,r){this.el=e,this.cd=n,this.filterService=s,this.config=r,this.pageLinks=5,this.paginatorPosition="bottom",this.alwaysShowPaginator=!0,this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.emptyMessage="",this.onLazyLoad=new H,this.trackBy=(o,u)=>u,this.loadingIcon="pi pi-spinner",this.first=0,this.onPage=new H,this.onSort=new H,this.onChangeLayout=new H,this._layout="list"}get layout(){return this._layout}set layout(e){this._layout=e,this.initialized&&this.changeLayout(e)}ngOnInit(){this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.initialized=!0}ngOnChanges(e){e.value&&(this._value=e.value.currentValue,this.updateTotalRecords(),!this.lazy&&this.hasFilter()&&this.filter(this.filterValue)),(e.sortField||e.sortOrder)&&(!this.lazy||this.initialized)&&this.sort()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"listItem":this.listItemTemplate=e.template;break;case"gridItem":this.gridItemTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"empty":this.emptyMessageTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}}),this.updateItemTemplate()}updateItemTemplate(){switch(this.layout){case"list":this.itemTemplate=this.listItemTemplate;break;case"grid":this.itemTemplate=this.gridItemTemplate}}changeLayout(e){this._layout=e,this.onChangeLayout.emit({layout:this.layout}),this.updateItemTemplate(),this.cd.markForCheck()}updateTotalRecords(){this.totalRecords=this.lazy?this.totalRecords:this._value?this._value.length:0}paginate(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows})}sort(){this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.value.sort((e,n)=>{let s=Z.resolveFieldData(e,this.sortField),r=Z.resolveFieldData(n,this.sortField),o=null;return o=null==s&&null!=r?-1:null!=s&&null==r?1:null==s&&null==r?0:"string"==typeof s&&"string"==typeof r?s.localeCompare(r):sr?1:0,this.sortOrder*o}),this.hasFilter()&&this.filter(this.filterValue)),this.onSort.emit({sortField:this.sortField,sortOrder:this.sortOrder})}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder}}getBlockableElement(){return this.el.nativeElement.children[0]}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}filter(e,n="contains"){if(this.filterValue=e,this.value&&this.value.length){let s=this.filterBy.split(",");this.filteredValue=this.filterService.filter(this.value,s,e,n,this.filterLocale),this.filteredValue.length===this.value.length&&(this.filteredValue=null),this.paginator&&(this.first=0,this.totalRecords=this.filteredValue?this.filteredValue.length:this.value?this.value.length:0),this.cd.markForCheck()}}hasFilter(){return this.filterValue&&this.filterValue.trim().length>0}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(hl),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-dataView"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.header=r.first),V(r=B())&&(n.footer=r.first),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{paginator:"paginator",rows:"rows",totalRecords:"totalRecords",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",paginatorPosition:"paginatorPosition",alwaysShowPaginator:"alwaysShowPaginator",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",lazy:"lazy",emptyMessage:"emptyMessage",style:"style",styleClass:"styleClass",trackBy:"trackBy",filterBy:"filterBy",filterLocale:"filterLocale",loading:"loading",loadingIcon:"loadingIcon",first:"first",sortField:"sortField",sortOrder:"sortOrder",value:"value",layout:"layout"},outputs:{onLazyLoad:"onLazyLoad",onPage:"onPage",onSort:"onSort",onChangeLayout:"onChangeLayout"},features:[mn],ngContentSelectors:z6,decls:11,vars:19,consts:[[3,"ngClass","ngStyle"],["class","p-dataview-loading",4,"ngIf"],["class","p-dataview-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange",4,"ngIf"],[1,"p-dataview-content"],[1,"p-grid","p-nogutter","grid","grid-nogutter"],["ngFor","",3,"ngForOf","ngForTrackBy"],["class","p-col col",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange",4,"ngIf"],["class","p-dataview-footer",4,"ngIf"],[1,"p-dataview-loading"],[1,"p-dataview-loading-overlay","p-component-overlay"],[1,"p-dataview-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-col","col"],[1,"p-dataview-emptymessage"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange"],[1,"p-dataview-footer"]],template:function(e,n){1&e&&(yn(U6),l(0,"div",0),_(1,I6,3,2,"div",1),_(2,R6,3,1,"div",2),_(3,L6,1,16,"p-paginator",3),l(4,"div",4)(5,"div",5),_(6,P6,1,5,"ng-template",6),m(7,"slice"),_(8,V6,4,3,"div",7),c()(),_(9,B6,1,16,"p-paginator",8),_(10,q6,3,1,"div",9),c()),2&e&&(me(n.styleClass),p("ngClass",We(16,G6,"list"===n.layout,"grid"===n.layout))("ngStyle",n.style),a(1),p("ngIf",n.loading),a(1),p("ngIf",n.header||n.headerTemplate),a(1),p("ngIf",n.paginator&&("top"===n.paginatorPosition||"both"==n.paginatorPosition)),a(3),p("ngForOf",n.paginator?function hC(t,i,e,n,s){const r=t+20,o=W(),u=zr(o,r);return Ga(o,r)?uC(o,Fn(),i,u.transform,e,n,s,u):u.transform(e,n,s)}(7,12,n.filteredValue||n.value,n.lazy?0:n.first,(n.lazy?0:n.first)+n.rows):n.filteredValue||n.value)("ngForTrackBy",n.trackBy),a(2),p("ngIf",n.isEmpty()),a(1),p("ngIf",n.paginator&&("bottom"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngIf",n.footer||n.footerTemplate))},directives:[ET,Oe,lt,Q,Lt,at],pipes:[My],styles:[".p-dataview{position:relative}.p-dataview .p-dataview-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}\n"],encapsulation:2,changeDetection:0}),t})(),$6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,RT],Nt]}),t})(),W6=(()=>{class t{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();let n=L.getFocusableElements(this.el.nativeElement);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?-1==s||0===s?n[n.length-1].focus():n[s-1].focus():-1==s||s===n.length-1?n[0].focus():n[s+1].focus()}else n[0].focus()}}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,n){1&e&&C("keydown.tab",function(r){return n.onkeydown(r)})("keydown.shift.tab",function(r){return n.onkeydown(r)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),t})(),K6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const Q6=["titlebar"],J6=["content"],Y6=["footer"];function Z6(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(4);ne("id",e.id+"-label"),a(1),S(e.header)}}function X6(t,i){1&t&&(l(0,"span",17),St(1,1),c()),2&t&&ne("id",d(4).id+"-label")}function e7(t,i){1&t&&Y(0)}const t7=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function n7(t,i){if(1&t){const e=I();l(0,"button",18),C("click",function(){return v(e),d(4).maximize()})("keydown.enter",function(){return v(e),d(4).maximize()}),k(1,"span",19),c()}if(2&t){const e=d(4);p("ngClass",A(2,t7)),a(1),p("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const i7=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function s7(t,i){if(1&t){const e=I();l(0,"button",20),C("click",function(s){return v(e),d(4).close(s)})("keydown.enter",function(s){return v(e),d(4).close(s)}),k(1,"span",21),c()}if(2&t){const e=d(4);p("ngClass",A(4,i7)),ne("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),a(1),p("ngClass",e.closeIcon)}}function r7(t,i){if(1&t){const e=I();l(0,"div",11,12),C("mousedown",function(s){return v(e),d(3).initDrag(s)}),_(2,Z6,2,2,"span",13),_(3,X6,2,1,"span",13),_(4,e7,1,0,"ng-container",8),l(5,"div",14),_(6,n7,2,3,"button",15),_(7,s7,2,5,"button",16),c()()}if(2&t){const e=d(3);a(2),p("ngIf",!e.headerFacet&&!e.headerTemplate),a(1),p("ngIf",e.headerFacet),a(1),p("ngTemplateOutlet",e.headerTemplate),a(2),p("ngIf",e.maximizable),a(1),p("ngIf",e.closable)}}function o7(t,i){1&t&&Y(0)}function a7(t,i){1&t&&Y(0)}function l7(t,i){if(1&t&&(l(0,"div",22,23),St(2,2),_(3,a7,1,0,"ng-container",8),c()),2&t){const e=d(3);a(3),p("ngTemplateOutlet",e.footerTemplate)}}function c7(t,i){if(1&t){const e=I();l(0,"div",24),C("mousedown",function(s){return v(e),d(3).initResize(s)}),c()}}const u7=function(t,i,e,n){return{"p-dialog p-component":!0,"p-dialog-rtl":t,"p-dialog-draggable":i,"p-dialog-resizable":e,"p-dialog-maximized":n}},d7=function(t,i){return{transform:t,transition:i}},p7=function(t){return{value:"visible",params:t}};function h7(t,i){if(1&t){const e=I();l(0,"div",3,4),C("@animation.start",function(s){return v(e),d(2).onAnimationStart(s)})("@animation.done",function(s){return v(e),d(2).onAnimationEnd(s)}),_(2,r7,8,5,"div",5),l(3,"div",6,7),St(5),_(6,o7,1,0,"ng-container",8),c(),_(7,l7,4,1,"div",9),_(8,c7,1,0,"div",10),c()}if(2&t){const e=d(2);me(e.styleClass),p("ngClass",_i(15,u7,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",z(23,p7,We(20,d7,e.transformOptions,e.transitionOptions))),ne("aria-labelledby",e.id+"-label"),a(2),p("ngIf",e.showHeader),a(1),me(e.contentStyleClass),p("ngClass","p-dialog-content")("ngStyle",e.contentStyle),a(3),p("ngTemplateOutlet",e.contentTemplate),a(1),p("ngIf",e.footerFacet||e.footerTemplate),a(1),p("ngIf",e.resizable)}}const m7=function(t,i,e,n,s,r,o,u,h,b){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":t,"p-dialog-mask-scrollblocker":i,"p-dialog-left":e,"p-dialog-right":n,"p-dialog-top":s,"p-dialog-top-left":r,"p-dialog-top-right":o,"p-dialog-bottom":u,"p-dialog-bottom-left":h,"p-dialog-bottom-right":b}};function f7(t,i){if(1&t&&(l(0,"div",1),_(1,h7,9,25,"div",2),c()),2&t){const e=d();me(e.maskStyleClass),p("ngClass",Hh(4,m7,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),a(1),p("ngIf",e.visible)}}const g7=["*",[["p-header"]],[["p-footer"]]],_7=["*","p-header","p-footer"],b7=Mu([it({transform:"{{transform}}",opacity:0}),kt("{{transition}}")]),v7=Mu([kt("{{transition}}",it({transform:"{{transform}}",opacity:0}))]);let Tn=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.zone=s,this.cd=r,this.config=o,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new H,this.onHide=new H,this.visibleChange=new H,this.onResizeInit=new H,this.onResizeEnd=new H,this.onDragEnd=new H,this.onMaximize=new H,this.id=pl(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style=Object.assign({},e),this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=L.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&L.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&L.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?L.addClass(document.body,"p-overflow-hidden"):L.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(gt.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let n in this.breakpoints)e+=`\n @media screen and (max-width: ${n}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[n]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){L.hasClass(e.target,"p-dialog-header-icon")||L.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",L.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let n=L.getFocusableElements(this.container);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?-1==s||0===s?n[n.length-1].focus():n[s-1].focus():-1==s||s===n.length-1?n[0].focus():n[s+1].focus()}else n[0].focus()}}onDrag(e){if(this.dragging){let n=L.getOuterWidth(this.container),s=L.getOuterHeight(this.container),r=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,u=this.container.getBoundingClientRect(),h=u.left+r,b=u.top+o,y=L.getViewport();this.container.style.position="fixed",this.keepInViewport?(h>=this.minX&&h+n=this.minY&&b+sparseInt(y))&&M.left+hparseInt(w))&&M.top+b{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",n=>{27==n.which&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):L.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&L.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&L.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({});break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(L.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&L.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&>.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?Object.assign({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(nt),x(ot),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-dialog"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Q6,5),j(J6,5),j(Y6,5)),2&e){let s;V(s=B())&&(n.headerViewChild=s.first),V(s=B())&&(n.contentViewChild=s.first),V(s=B())&&(n.footerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:_7,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"]],template:function(e,n){1&e&&(yn(g7),_(0,f7,2,15,"div",0)),2&e&&p("ngIf",n.maskVisible)},directives:[Q,Oe,W6,lt,Lt,vt],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translate(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0px!important;left:0px!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[wi("animation",[Ot("void => visible",[fw(b7)]),Ot("visible => void",[fw(v7)])])]},changeDetection:0}),t})(),C7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,K6,gn],Nt]}),t})();const y7=["*"];let w7=(()=>{class t{constructor(){this.layout="horizontal",this.type="solid"}containerClass(){return{"p-divider p-component":!0,"p-divider-horizontal":"horizontal"===this.layout,"p-divider-vertical":"vertical"===this.layout,"p-divider-solid":"solid"===this.type,"p-divider-dashed":"dashed"===this.type,"p-divider-dotted":"dotted"===this.type,"p-divider-left":"horizontal"===this.layout&&(!this.align||"left"===this.align),"p-divider-center":"horizontal"===this.layout&&"center"===this.align||"vertical"===this.layout&&(!this.align||"center"===this.align),"p-divider-right":"horizontal"===this.layout&&"right"===this.align,"p-divider-top":"vertical"===this.layout&&"top"===this.align,"p-divider-bottom":"vertical"===this.layout&&"bottom"===this.align}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-divider"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",layout:"layout",type:"type",align:"align"},ngContentSelectors:y7,decls:3,vars:4,consts:[["role","separator",3,"ngClass","ngStyle"],[1,"p-divider-content"]],template:function(e,n){1&e&&(yn(),l(0,"div",0)(1,"div",1),St(2),c()()),2&e&&(me(n.styleClass),p("ngClass",n.containerClass())("ngStyle",n.style))},directives:[Oe,lt],styles:['.p-divider-horizontal{display:flex;width:100%;position:relative;align-items:center}.p-divider-horizontal:before{position:absolute;display:block;top:50%;left:0;width:100%;content:""}.p-divider-horizontal.p-divider-left{justify-content:flex-start}.p-divider-horizontal.p-divider-right{justify-content:flex-end}.p-divider-horizontal.p-divider-center{justify-content:center}.p-divider-content{z-index:1}.p-divider-vertical{min-height:100%;margin:0 1rem;display:flex;position:relative;justify-content:center}.p-divider-vertical:before{position:absolute;display:block;top:0;left:50%;height:100%;content:""}.p-divider-vertical.p-divider-top{align-items:flex-start}.p-divider-vertical.p-divider-center{align-items:center}.p-divider-vertical.p-divider-bottom{align-items:flex-end}.p-divider-solid.p-divider-horizontal:before{border-top-style:solid}.p-divider-solid.p-divider-vertical:before{border-left-style:solid}.p-divider-dashed.p-divider-horizontal:before{border-top-style:dashed}.p-divider-dashed.p-divider-vertical:before{border-left-style:dashed}.p-divider-dotted.p-divider-horizontal:before{border-top-style:dotted}.p-divider-dotted.p-divider-horizontal:before{border-left-style:dotted}\n'],encapsulation:2,changeDetection:0}),t})(),T7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const S7=function(t,i){return{"pi-minus":t,"pi-plus":i}};function x7(t,i){if(1&t&&k(0,"span",9),2&t){const e=d(2);p("ngClass",We(1,S7,!e.collapsed,e.collapsed))}}function D7(t,i){1&t&&Y(0)}function M7(t,i){if(1&t){const e=I();ce(0),l(1,"a",7),C("click",function(s){return v(e),d().toggle(s)})("keydown.enter",function(s){return v(e),d().toggle(s)}),_(2,x7,1,4,"span",8),_(3,D7,1,0,"ng-container",6),c(),ue()}if(2&t){const e=d(),n=F(4);a(1),ne("aria-controls",e.id+"-content")("aria-expanded",!e.collapsed),a(1),p("ngIf",e.toggleable),a(1),p("ngTemplateOutlet",n)}}function k7(t,i){1&t&&Y(0)}function I7(t,i){if(1&t&&(l(0,"span",10),g(1),c(),St(2,1),_(3,k7,1,0,"ng-container",6)),2&t){const e=d();a(1),S(e.legend),a(2),p("ngTemplateOutlet",e.headerTemplate)}}function E7(t,i){1&t&&Y(0)}const R7=["*",[["p-header"]]],L7=function(t){return{"p-fieldset p-component":!0,"p-fieldset-toggleable":t}},O7=function(t){return{transitionParams:t,height:"0"}},A7=function(t){return{value:"hidden",params:t}},P7=function(t){return{transitionParams:t,height:"*"}},F7=function(t){return{value:"visible",params:t}},N7=["*","p-header"];let V7=0,Ui=(()=>{class t{constructor(e){this.el=e,this.collapsed=!1,this.collapsedChange=new H,this.onBeforeToggle=new H,this.onAfterToggle=new H,this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.id="p-fieldset-"+V7++}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template}})}toggle(e){if(this.animating)return!1;this.animating=!0,this.onBeforeToggle.emit({originalEvent:e,collapsed:this.collapsed}),this.collapsed?this.expand(e):this.collapse(e),this.onAfterToggle.emit({originalEvent:e,collapsed:this.collapsed}),e.preventDefault()}expand(e){this.collapsed=!1,this.collapsedChange.emit(this.collapsed)}collapse(e){this.collapsed=!0,this.collapsedChange.emit(this.collapsed)}getBlockableElement(){return this.el.nativeElement.children[0]}onToggleDone(){this.animating=!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275cmp=G({type:t,selectors:[["p-fieldset"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{legend:"legend",toggleable:"toggleable",collapsed:"collapsed",style:"style",styleClass:"styleClass",transitionOptions:"transitionOptions"},outputs:{collapsedChange:"collapsedChange",onBeforeToggle:"onBeforeToggle",onAfterToggle:"onAfterToggle"},ngContentSelectors:N7,decls:9,vars:22,consts:[[3,"ngClass","ngStyle"],[1,"p-fieldset-legend"],[4,"ngIf","ngIfElse"],["legendContent",""],["role","region",1,"p-toggleable-content"],[1,"p-fieldset-content"],[4,"ngTemplateOutlet"],["tabindex","0","pRipple","",3,"click","keydown.enter"],["class","p-fieldset-toggler pi",3,"ngClass",4,"ngIf"],[1,"p-fieldset-toggler","pi",3,"ngClass"],[1,"p-fieldset-legend-text"]],template:function(e,n){if(1&e&&(yn(R7),l(0,"fieldset",0)(1,"legend",1),_(2,M7,4,4,"ng-container",2),_(3,I7,4,2,"ng-template",null,3,we),c(),l(5,"div",4),C("@fieldsetContent.done",function(){return n.onToggleDone()}),l(6,"div",5),St(7),_(8,E7,1,0,"ng-container",6),c()()()),2&e){const s=F(4);me(n.styleClass),p("ngClass",z(12,L7,n.toggleable))("ngStyle",n.style),ne("id",n.id),a(2),p("ngIf",n.toggleable)("ngIfElse",s),a(3),p("@fieldsetContent",n.collapsed?z(16,A7,z(14,O7,n.transitionOptions)):z(20,F7,z(18,P7,n.animating?n.transitionOptions:"0ms"))),ne("id",n.id+"-content")("aria-labelledby",n.id)("aria-hidden",n.collapsed),a(3),p("ngTemplateOutlet",n.contentTemplate)}},directives:[Oe,lt,Q,vt,Lt],styles:[".p-fieldset-legend>a,.p-fieldset-legend>span{display:flex;align-items:center;justify-content:center}.p-fieldset-toggleable .p-fieldset-legend a{cursor:pointer;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-fieldset-legend-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("fieldsetContent",[Cs("hidden",it({height:"0",overflow:"hidden"})),Cs("visible",it({height:"*"})),Ot("visible <=> hidden",[it({overflow:"hidden"}),kt("{{transitionParams}}")]),Ot("void => *",kt(0))])]},changeDetection:0}),t})(),B7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn],Nt]}),t})();const H7=["headerchkbox"];function q7(t,i){1&t&&Y(0)}function U7(t,i){if(1&t&&(l(0,"div",6),St(1),_(2,q7,1,0,"ng-container",7),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}const LT=function(t){return{"p-checkbox-disabled":t}},G7=function(t,i,e){return{"p-highlight":t,"p-focus":i,"p-disabled":e}},OT=function(t){return{"pi pi-check":t}};function z7(t,i){if(1&t){const e=I();l(0,"div",10)(1,"div",11)(2,"input",12),C("focus",function(){return v(e),d(2).onHeaderCheckboxFocus()})("blur",function(){return v(e),d(2).onHeaderCheckboxBlur()})("keydown.space",function(s){return v(e),d(2).toggleAll(s)}),c()(),l(3,"div",13,14),C("click",function(s){return v(e),d(2).toggleAll(s)}),k(5,"span",15),c()()}if(2&t){const e=d(2);p("ngClass",z(5,LT,e.disabled||e.toggleAllDisabled)),a(2),p("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),a(1),p("ngClass",Rt(7,G7,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),a(2),p("ngClass",z(11,OT,e.allChecked))}}function j7(t,i){if(1&t){const e=I();l(0,"div",16)(1,"input",17),C("input",function(s){return v(e),d(2).onFilter(s)}),c(),k(2,"span",18),c()}if(2&t){const e=d(2);a(1),p("value",e.filterValue||"")("disabled",e.disabled),ne("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function $7(t,i){if(1&t&&(l(0,"div",6),_(1,z7,6,13,"div",8),_(2,j7,3,4,"div",9),c()),2&t){const e=d();a(1),p("ngIf",e.checkbox&&e.multiple&&e.showToggleAll),a(1),p("ngIf",e.filter)}}function W7(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(2);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function K7(t,i){1&t&&Y(0)}function Q7(t,i){1&t&&Y(0)}const Xf=function(t){return{$implicit:t}};function J7(t,i){if(1&t&&(l(0,"li",20),_(1,W7,2,1,"span",3),_(2,K7,1,0,"ng-container",21),c(),_(3,Q7,1,0,"ng-container",21)),2&t){const e=i.$implicit,n=d(2),s=F(8);a(1),p("ngIf",!n.groupTemplate),a(1),p("ngTemplateOutlet",n.groupTemplate)("ngTemplateOutletContext",z(5,Xf,e)),a(1),p("ngTemplateOutlet",s)("ngTemplateOutletContext",z(7,Xf,n.getOptionGroupChildren(e)))}}function Y7(t,i){if(1&t&&(ce(0),_(1,J7,4,9,"ng-template",19),ue()),2&t){const e=d();a(1),p("ngForOf",e.optionsToRender)}}function Z7(t,i){1&t&&Y(0)}function X7(t,i){if(1&t&&(ce(0),_(1,Z7,1,0,"ng-container",21),ue()),2&t){const e=d(),n=F(8);a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",z(2,Xf,e.optionsToRender))}}const eB=function(t){return{"p-highlight":t}};function tB(t,i){if(1&t&&(l(0,"div",10)(1,"div",25),k(2,"span",15),c()()),2&t){const e=d().$implicit,n=d(2);p("ngClass",z(3,LT,n.disabled||n.isOptionDisabled(e))),a(1),p("ngClass",z(5,eB,n.isSelected(e))),a(1),p("ngClass",z(7,OT,n.isSelected(e)))}}function nB(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(2);a(1),S(n.getOptionLabel(e))}}function iB(t,i){1&t&&Y(0)}const sB=function(t,i){return{"p-listbox-item":!0,"p-highlight":t,"p-disabled":i}},rB=function(t,i){return{$implicit:t,index:i}};function oB(t,i){if(1&t){const e=I();l(0,"li",24),C("click",function(s){const o=v(e).$implicit;return d(2).onOptionClick(s,o)})("dblclick",function(s){const o=v(e).$implicit;return d(2).onOptionDoubleClick(s,o)})("touchend",function(){const r=v(e).$implicit;return d(2).onOptionTouchEnd(r)})("keydown",function(s){const o=v(e).$implicit;return d(2).onOptionKeyDown(s,o)}),_(1,tB,3,9,"div",8),_(2,nB,2,1,"span",3),_(3,iB,1,0,"ng-container",21),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngClass",We(8,sB,s.isSelected(e),s.isOptionDisabled(e))),ne("tabindex",s.disabled||s.isOptionDisabled(e)?null:"0")("aria-label",s.getOptionLabel(e))("aria-selected",s.isSelected(e)),a(1),p("ngIf",s.checkbox&&s.multiple),a(1),p("ngIf",!s.itemTemplate),a(1),p("ngTemplateOutlet",s.itemTemplate)("ngTemplateOutletContext",We(11,rB,e,n))}}function aB(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function lB(t,i){1&t&&Y(0,null,28)}function cB(t,i){if(1&t&&(l(0,"li",26),_(1,aB,2,1,"ng-container",27),_(2,lB,2,0,"ng-container",7),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function uB(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyMessageLabel," ")}}function dB(t,i){1&t&&Y(0,null,29)}function pB(t,i){if(1&t&&(l(0,"li",26),_(1,uB,2,1,"ng-container",27),_(2,dB,2,0,"ng-container",7),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function hB(t,i){if(1&t&&(_(0,oB,4,14,"li",22),_(1,cB,3,3,"li",23),_(2,pB,3,3,"li",23)),2&t){const e=i.$implicit,n=d();p("ngForOf",e),a(1),p("ngIf",n.hasFilter()&&n.isEmpty(e)),a(1),p("ngIf",!n.hasFilter()&&n.isEmpty(e))}}function mB(t,i){1&t&&Y(0)}function fB(t,i){if(1&t&&(l(0,"div",30),St(1,1),_(2,mB,1,0,"ng-container",7),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const gB=[[["p-header"]],[["p-footer"]]],_B=function(t){return{"p-listbox p-component":!0,"p-disabled":t}},bB=["p-header","p-footer"],vB={provide:dn,useExisting:Ue(()=>ws),multi:!0};let ws=(()=>{class t{constructor(e,n,s,r){this.el=e,this.cd=n,this.filterService=s,this.config=r,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new H,this.onClick=new H,this.onDblClick=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,n){this.disabled||this.isOptionDisabled(n)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,n):this.onOptionClickMultiple(e,n):this.onOptionClickSingle(e,n),this.onClick.emit({originalEvent:e,option:n,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,n){this.disabled||this.isOptionDisabled(n)||this.readonly||this.onDblClick.emit({originalEvent:e,option:n,value:this.value})}onOptionClickSingle(e,n){let s=this.isSelected(n),r=!1;if(!this.optionTouched&&this.metaKeySelection){let u=e.metaKey||e.ctrlKey;s?u&&(this.value=null,r=!0):(this.value=this.getOptionValue(n),r=!0)}else this.value=s?null:this.getOptionValue(n),r=!0;r&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickMultiple(e,n){let s=this.isSelected(n),r=!1;if(!this.optionTouched&&this.metaKeySelection){let u=e.metaKey||e.ctrlKey;s?(u?this.removeOption(n):this.value=[this.getOptionValue(n)],r=!0):(this.value=u&&this.value||[],this.value=[...this.value,this.getOptionValue(n)],r=!0)}else s?this.removeOption(n):this.value=[...this.value||[],this.getOptionValue(n)],r=!0;r&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickCheckbox(e,n){this.disabled||this.readonly||(this.isSelected(n)?this.removeOption(n):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(n)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}removeOption(e){this.value=this.value.filter(n=>!Z.equals(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,s=this.getOptionValue(e);if(this.multiple){if(this.value)for(let r of this.value)if(Z.equals(r,s,this.dataKey)){n=!0;break}}else n=Z.equals(this.value,s,this.dataKey);return n}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let n=0,s=0,r=0,o=this.group?0:this.optionsToRender.length;for(let u of e)if(this.group)for(let h of this.getOptionGroupChildren(u)){let b=this.isOptionDisabled(h),y=this.isSelected(h);if(b)y?n++:s++;else{if(!y)return!1;r++}o++}else{let h=this.isOptionDisabled(u),b=this.isSelected(u);if(h)b?n++:s++;else{if(!b)return!1;r++}}return o===n||o===r||r&&o===r+s+n}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ft.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(e){return!e||e&&0===e.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.optionLabel||"label").split(","),n=[];for(let s of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(s),e,this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&n.push(Object.assign(Object.assign({},s),{[this.optionGroupChildren]:r}))}this._filteredOptions=n}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),this._filterValue,this.filterLocale));else this._filteredOptions=null}get toggleAllDisabled(){let e=this.optionsToRender;if(!e||0===e.length)return!0;for(let n of e)if(!this.isOptionDisabled(n))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.preventDefault())}checkAll(){let n=[];this.optionsToRender.forEach(s=>{if(this.group){let r=this.getOptionGroupChildren(s);r&&r.forEach(o=>{let u=this.isOptionDisabled(o);(!u||u&&this.isSelected(o))&&n.push(this.getOptionValue(o))})}else{let r=this.isOptionDisabled(s);(!r||r&&this.isSelected(s))&&n.push(this.getOptionValue(s))}}),this.value=n}uncheckAll(){let n=[];this.optionsToRender.forEach(s=>{this.group?s.items&&s.items.forEach(r=>{this.isOptionDisabled(r)&&this.isSelected(r)&&n.push(this.getOptionValue(r))}):this.isOptionDisabled(s)&&this.isSelected(s)&&n.push(this.getOptionValue(s))}),this.value=n}onOptionKeyDown(e,n){if(this.readonly)return;let s=e.currentTarget;switch(e.which){case 40:var r=this.findNextItem(s);r&&r.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(s);o&&o.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,n),e.preventDefault()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-disabled")||L.isHidden(n)||L.hasClass(n,"p-listbox-item-group")?this.findNextItem(n):n:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-disabled")||L.isHidden(n)||L.hasClass(n,"p-listbox-item-group")?this.findPrevItem(n):n:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(hl),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-listbox"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(H7,5),2&e){let s;V(s=B())&&(n.headerCheckboxViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ne([vB])],ngContentSelectors:bB,decls:10,vars:15,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox","aria-multiselectable","multiple",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["class","p-listbox-empty-message",4,"ngIf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(e,n){1&e&&(yn(gB),l(0,"div",0),_(1,U7,3,1,"div",1),_(2,$7,3,2,"div",1),l(3,"div",0)(4,"ul",2),_(5,Y7,2,1,"ng-container",3),_(6,X7,2,4,"ng-container",3),_(7,hB,3,3,"ng-template",null,4,we),c()(),_(9,fB,3,1,"div",5),c()),2&e&&(me(n.styleClass),p("ngClass",z(13,_B,n.disabled))("ngStyle",n.style),a(1),p("ngIf",n.headerFacet||n.headerTemplate),a(1),p("ngIf",n.checkbox&&n.multiple&&n.showToggleAll||n.filter),a(1),me(n.listStyleClass),p("ngClass","p-listbox-list-wrapper")("ngStyle",n.listStyle),a(2),p("ngIf",n.group),a(1),p("ngIf",!n.group),a(3),p("ngIf",n.footerFacet||n.footerTemplate))},directives:[Oe,lt,Q,Lt,at,vt],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),CB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,gn],Nt]}),t})();class Gi extends ct{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){const e=super._subscribe(i);return e&&!e.closed&&i.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new nr;return this._value}next(i){super.next(this._value=i)}}class yB extends yt{notifyNext(i,e,n,s,r){this.destination.next(e)}notifyError(i,e){this.destination.error(i)}notifyComplete(i){this.destination.complete()}}class wB extends yt{constructor(i,e,n){super(),this.parent=i,this.outerValue=e,this.outerIndex=n,this.index=0}_next(i){this.parent.notifyNext(this.outerValue,i,this.outerIndex,this.index++,this)}_error(i){this.parent.notifyError(i,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function TB(t,i,e,n,s=new wB(t,e,n)){if(!s.closed)return i instanceof Je?i.subscribe(s):Od(i)(s)}const AT={};class xB{constructor(i){this.resultSelector=i}call(i,e){return e.subscribe(new DB(i,this.resultSelector))}}class DB extends yB{constructor(i,e){super(i),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(i){this.values.push(AT),this.observables.push(i)}_complete(){const i=this.observables,e=i.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();function PT(t,i){let e=!1;return arguments.length>=2&&(e=!0),function(s){return s.lift(new MB(t,i,e))}}class MB{constructor(i,e,n=!1){this.accumulator=i,this.seed=e,this.hasSeed=n}call(i,e){return e.subscribe(new kB(i,this.accumulator,this.seed,this.hasSeed))}}class kB extends yt{constructor(i,e,n,s){super(i),this.accumulator=e,this._seed=n,this.hasSeed=s,this.index=0}get seed(){return this._seed}set seed(i){this.hasSeed=!0,this._seed=i}_next(i){if(this.hasSeed)return this._tryNext(i);this.seed=i,this.destination.next(i)}_tryNext(i){const e=this.index++;let n;try{n=this.accumulator(this.seed,i,e)}catch(s){this.destination.error(s)}this.seed=n,this.destination.next(n)}}function Mr(t){return function(e){const n=new IB(t),s=e.lift(n);return n.caught=s}}class IB{constructor(i){this.selector=i}call(i,e){return e.subscribe(new EB(i,this.selector,this.caught))}}class EB extends Zo{constructor(i,e,n){super(i),this.selector=e,this.caught=n}error(i){if(!this.isStopped){let e;try{e=this.selector(i,this.caught)}catch(r){return void super.error(r)}this._unsubscribeAndRecycle();const n=new Yo(this);this.add(n);const s=Xo(e,n);s!==n&&this.add(s)}}}function eg(t){return function(e){return 0===t?au():e.lift(new RB(t))}}class RB{constructor(i){if(this.total=i,this.total<0)throw new s0}call(i,e){return e.subscribe(new LB(i,this.total))}}class LB extends yt{constructor(i,e){super(i),this.total=e,this.ring=new Array,this.count=0}_next(i){const e=this.ring,n=this.total,s=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,s=this.ring;for(let r=0;ri.lift(new OB(t))}class OB{constructor(i){this.errorFactory=i}call(i,e){return e.subscribe(new AB(i,this.errorFactory))}}class AB extends yt{constructor(i,e){super(i),this.errorFactory=e,this.hasValue=!1}_next(i){this.hasValue=!0,this.destination.next(i)}_complete(){if(this.hasValue)return this.destination.complete();{let i;try{i=this.errorFactory()}catch(e){i=e}this.destination.error(i)}}}function PB(){return new ed}function NT(t=null){return i=>i.lift(new FB(t))}class FB{constructor(i){this.defaultValue=i}call(i,e){return e.subscribe(new NB(i,this.defaultValue))}}class NB extends yt{constructor(i,e){super(i),this.defaultValue=e,this.isEmpty=!0}_next(i){this.isEmpty=!1,this.destination.next(i)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function No(t,i){const e=arguments.length>=2;return n=>n.pipe(t?qs((s,r)=>t(s,r,n)):Vl,br(1),e?NT(i):FT(()=>new ed))}function Js(){}function li(t,i,e){return function(s){return s.lift(new BB(t,i,e))}}class BB{constructor(i,e,n){this.nextOrObserver=i,this.error=e,this.complete=n}call(i,e){return e.subscribe(new HB(i,this.nextOrObserver,this.error,this.complete))}}class HB extends yt{constructor(i,e,n,s){super(i),this._tapNext=Js,this._tapError=Js,this._tapComplete=Js,this._tapError=n||Js,this._tapComplete=s||Js,Ms(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Js,this._tapError=e.error||Js,this._tapComplete=e.complete||Js)}_next(i){try{this._tapNext.call(this._context,i)}catch(e){return void this.destination.error(e)}this.destination.next(i)}_error(i){try{this._tapError.call(this._context,i)}catch(e){return void this.destination.error(e)}this.destination.error(i)}_complete(){try{this._tapComplete.call(this._context)}catch(i){return void this.destination.error(i)}return this.destination.complete()}}class UB{constructor(i){this.callback=i}call(i,e){return e.subscribe(new GB(i,this.callback))}}class GB extends yt{constructor(i,e){super(i),this.add(new Et(e))}}class Ts{constructor(i,e){this.id=i,this.url=e}}class tg extends Ts{constructor(i,e,n="imperative",s=null){super(i,e),this.navigationTrigger=n,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class vl extends Ts{constructor(i,e,n){super(i,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class VT extends Ts{constructor(i,e,n){super(i,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class zB extends Ts{constructor(i,e,n){super(i,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $B extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class WB extends Ts{constructor(i,e,n,s,r){super(i,e),this.urlAfterRedirects=n,this.state=s,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class KB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class QB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class BT{constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class HT{constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class JB{constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class YB{constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZB{constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class XB{constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qT{constructor(i,e,n){this.routerEvent=i,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Ke="primary";class e8{constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){const e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){const e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Vo(t){return new e8(t)}const UT="ngNavigationCancelingError";function ng(t){const i=Error("NavigationCancelingError: "+t);return i[UT]=!0,i}function n8(t,i,e){const n=e.path.split("/");if(n.length>t.length||"full"===e.pathMatch&&(i.hasChildren()||n.lengthn[r]===s)}return t===i}function zT(t){return Array.prototype.concat.apply([],t)}function jT(t){return t.length>0?t[t.length-1]:null}function Sn(t,i){for(const e in t)t.hasOwnProperty(e)&&i(t[e],e)}function os(t){return Dh(t)?t:Ra(t)?Dn(Promise.resolve(t)):oe(t)}const r8={exact:function KT(t,i,e){if(!Ir(t.segments,i.segments)||!td(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children)if(!t.children[n]||!KT(t.children[n],i.children[n],e))return!1;return!0},subset:QT},$T={exact:function o8(t,i){return rs(t,i)},subset:function a8(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>GT(t[e],i[e]))},ignored:()=>!0};function WT(t,i,e){return r8[e.paths](t.root,i.root,e.matrixParams)&&$T[e.queryParams](t.queryParams,i.queryParams)&&!("exact"===e.fragment&&t.fragment!==i.fragment)}function QT(t,i,e){return JT(t,i,i.segments,e)}function JT(t,i,e,n){if(t.segments.length>e.length){const s=t.segments.slice(0,e.length);return!(!Ir(s,e)||i.hasChildren()||!td(s,e,n))}if(t.segments.length===e.length){if(!Ir(t.segments,e)||!td(t.segments,e,n))return!1;for(const s in i.children)if(!t.children[s]||!QT(t.children[s],i.children[s],n))return!1;return!0}{const s=e.slice(0,t.segments.length),r=e.slice(t.segments.length);return!!(Ir(t.segments,s)&&td(t.segments,s,n)&&t.children[Ke])&&JT(t.children[Ke],i,r,n)}}function td(t,i,e){return i.every((n,s)=>$T[e](t[s].parameters,n.parameters))}class kr{constructor(i,e,n){this.root=i,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){return u8.serialize(this)}}class Xe{constructor(i,e){this.segments=i,this.children=e,this.parent=null,Sn(e,(n,s)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return nd(this)}}class Cl{constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Vo(this.parameters)),this._parameterMap}toString(){return t2(this)}}function Ir(t,i){return t.length===i.length&&t.every((e,n)=>e.path===i[n].path)}class YT{}class ZT{parse(i){const e=new v8(i);return new kr(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){const e=`/${yl(i.root,!0)}`,n=function h8(t){const i=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(s=>`${id(e)}=${id(s)}`).join("&"):`${id(e)}=${id(n)}`}).filter(e=>!!e);return i.length?`?${i.join("&")}`:""}(i.queryParams),s="string"==typeof i.fragment?`#${function d8(t){return encodeURI(t)}(i.fragment)}`:"";return`${e}${n}${s}`}}const u8=new ZT;function nd(t){return t.segments.map(i=>t2(i)).join("/")}function yl(t,i){if(!t.hasChildren())return nd(t);if(i){const e=t.children[Ke]?yl(t.children[Ke],!1):"",n=[];return Sn(t.children,(s,r)=>{r!==Ke&&n.push(`${r}:${yl(s,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function c8(t,i){let e=[];return Sn(t.children,(n,s)=>{s===Ke&&(e=e.concat(i(n,s)))}),Sn(t.children,(n,s)=>{s!==Ke&&(e=e.concat(i(n,s)))}),e}(t,(n,s)=>s===Ke?[yl(t.children[Ke],!1)]:[`${s}:${yl(n,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[Ke]?`${nd(t)}/${e[0]}`:`${nd(t)}/(${e.join("//")})`}}function XT(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function id(t){return XT(t).replace(/%3B/gi,";")}function ig(t){return XT(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function sd(t){return decodeURIComponent(t)}function e2(t){return sd(t.replace(/\+/g,"%20"))}function t2(t){return`${ig(t.path)}${function p8(t){return Object.keys(t).map(i=>`;${ig(i)}=${ig(t[i])}`).join("")}(t.parameters)}`}const m8=/^[^\/()?;=#]+/;function rd(t){const i=t.match(m8);return i?i[0]:""}const f8=/^[^=?&#]+/,_8=/^[^&#]+/;class v8{constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Xe([],{}):new Xe([],this.parseChildren())}parseQueryParams(){const i={};if(this.consumeOptional("?"))do{this.parseQueryParam(i)}while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(e).length>0)&&(n[Ke]=new Xe(i,e)),n}parseSegment(){const i=rd(this.remaining);if(""===i&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(i),new Cl(sd(i),this.parseMatrixParams())}parseMatrixParams(){const i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){const e=rd(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const s=rd(this.remaining);s&&(n=s,this.capture(n))}i[sd(e)]=sd(n)}parseQueryParam(i){const e=function g8(t){const i=t.match(f8);return i?i[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function b8(t){const i=t.match(_8);return i?i[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const s=e2(e),r=e2(n);if(i.hasOwnProperty(s)){let o=i[s];Array.isArray(o)||(o=[o],i[s]=o),o.push(r)}else i[s]=r}parseParens(i){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=rd(this.remaining),s=this.remaining[n.length];if("/"!==s&&")"!==s&&";"!==s)throw new Error(`Cannot parse url '${this.url}'`);let r;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):i&&(r=Ke);const o=this.parseChildren();e[r]=1===Object.keys(o).length?o[Ke]:new Xe([],o),this.consumeOptional("//")}return e}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return!!this.peekStartsWith(i)&&(this.remaining=this.remaining.substring(i.length),!0)}capture(i){if(!this.consumeOptional(i))throw new Error(`Expected "${i}".`)}}class n2{constructor(i){this._root=i}get root(){return this._root.value}parent(i){const e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){const e=sg(i,this._root);return e?e.children.map(n=>n.value):[]}firstChild(i){const e=sg(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){const e=rg(i,this._root);return e.length<2?[]:e[e.length-2].children.map(s=>s.value).filter(s=>s!==i)}pathFromRoot(i){return rg(i,this._root).map(e=>e.value)}}function sg(t,i){if(t===i.value)return i;for(const e of i.children){const n=sg(t,e);if(n)return n}return null}function rg(t,i){if(t===i.value)return[i];for(const e of i.children){const n=rg(t,e);if(n.length)return n.unshift(i),n}return[]}class Ss{constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}}function Bo(t){const i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}class s2 extends n2{constructor(i,e){super(i),this.snapshot=e,og(this,i)}toString(){return this.snapshot.toString()}}function r2(t,i){const e=function C8(t,i){const o=new od([],{},{},"",{},Ke,i,null,t.root,-1,{});return new a2("",new Ss(o,[]))}(t,i),n=new Gi([new Cl("",{})]),s=new Gi({}),r=new Gi({}),o=new Gi({}),u=new Gi(""),h=new Er(n,s,o,u,r,Ke,i,e.root);return h.snapshot=e.root,new s2(new Ss(h,[]),e)}class Er{constructor(i,e,n,s,r,o,u,h){this.url=i,this.params=e,this.queryParams=n,this.fragment=s,this.data=r,this.outlet=o,this.component=u,this._futureSnapshot=h}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(et(i=>Vo(i)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(i=>Vo(i)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function o2(t,i="emptyOnly"){const e=t.pathFromRoot;let n=0;if("always"!==i)for(n=e.length-1;n>=1;){const s=e[n],r=e[n-1];if(s.routeConfig&&""===s.routeConfig.path)n--;else{if(r.component)break;n--}}return function y8(t){return t.reduce((i,e)=>({params:Object.assign(Object.assign({},i.params),e.params),data:Object.assign(Object.assign({},i.data),e.data),resolve:Object.assign(Object.assign({},i.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(n))}class od{constructor(i,e,n,s,r,o,u,h,b,y,w){this.url=i,this.params=e,this.queryParams=n,this.fragment=s,this.data=r,this.outlet=o,this.component=u,this.routeConfig=h,this._urlSegment=b,this._lastPathIndex=y,this._resolve=w}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Vo(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class a2 extends n2{constructor(i,e){super(e),this.url=i,og(this,e)}toString(){return l2(this._root)}}function og(t,i){i.value._routerState=t,i.children.forEach(e=>og(t,e))}function l2(t){const i=t.children.length>0?` { ${t.children.map(l2).join(", ")} } `:"";return`${t.value}${i}`}function ag(t){if(t.snapshot){const i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,rs(i.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),i.fragment!==e.fragment&&t.fragment.next(e.fragment),rs(i.params,e.params)||t.params.next(e.params),function i8(t,i){if(t.length!==i.length)return!1;for(let e=0;ers(e.parameters,i[n].parameters))}(t.url,i.url);return e&&!(!t.parent!=!i.parent)&&(!t.parent||lg(t.parent,i.parent))}function wl(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=i.value;const s=function T8(t,i,e){return i.children.map(n=>{for(const s of e.children)if(t.shouldReuseRoute(n.value,s.value.snapshot))return wl(t,n,s);return wl(t,n)})}(t,i,e);return new Ss(n,s)}{if(t.shouldAttach(i.value)){const r=t.retrieve(i.value);if(null!==r){const o=r.route;return o.value._futureSnapshot=i.value,o.children=i.children.map(u=>wl(t,u)),o}}const n=function S8(t){return new Er(new Gi(t.url),new Gi(t.params),new Gi(t.queryParams),new Gi(t.fragment),new Gi(t.data),t.outlet,t.component,t)}(i.value),s=i.children.map(r=>wl(t,r));return new Ss(n,s)}}function ad(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Tl(t){return"object"==typeof t&&null!=t&&t.outlets}function cg(t,i,e,n,s){let r={};if(n&&Sn(n,(u,h)=>{r[h]=Array.isArray(u)?u.map(b=>`${b}`):`${u}`}),t===i)return new kr(e,r,s);const o=c2(t,i,e);return new kr(o,r,s)}function c2(t,i,e){const n={};return Sn(t.children,(s,r)=>{n[r]=s===i?e:c2(s,i,e)}),new Xe(t.segments,n)}class u2{constructor(i,e,n){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=n,i&&n.length>0&&ad(n[0]))throw new Error("Root segment cannot have matrix parameters");const s=n.find(Tl);if(s&&s!==jT(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ug{constructor(i,e,n){this.segmentGroup=i,this.processChildren=e,this.index=n}}function d2(t,i,e){if(t||(t=new Xe([],{})),0===t.segments.length&&t.hasChildren())return ld(t,i,e);const n=function E8(t,i,e){let n=0,s=i;const r={match:!1,pathIndex:0,commandIndex:0};for(;s=e.length)return r;const o=t.segments[s],u=e[n];if(Tl(u))break;const h=`${u}`,b=n0&&void 0===h)break;if(h&&b&&"object"==typeof b&&void 0===b.outlets){if(!h2(h,b,o))return r;n+=2}else{if(!h2(h,{},o))return r;n++}s++}return{match:!0,pathIndex:s,commandIndex:n}}(t,i,e),s=e.slice(n.commandIndex);if(n.match&&n.pathIndex{"string"==typeof r&&(r=[r]),null!==r&&(s[o]=d2(t.children[o],i,r))}),Sn(t.children,(r,o)=>{void 0===n[o]&&(s[o]=r)}),new Xe(t.segments,s)}}function dg(t,i,e){const n=t.segments.slice(0,i);let s=0;for(;s{"string"==typeof e&&(e=[e]),null!==e&&(i[n]=dg(new Xe([],{}),0,e))}),i}function p2(t){const i={};return Sn(t,(e,n)=>i[n]=`${e}`),i}function h2(t,i,e){return t==e.path&&rs(i,e.parameters)}class O8{constructor(i,e,n,s){this.routeReuseStrategy=i,this.futureState=e,this.currState=n,this.forwardEvent=s}activate(i){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,i),ag(this.futureState.root),this.activateChildRoutes(e,n,i)}deactivateChildRoutes(i,e,n){const s=Bo(e);i.children.forEach(r=>{const o=r.value.outlet;this.deactivateRoutes(r,s[o],n),delete s[o]}),Sn(s,(r,o)=>{this.deactivateRouteAndItsChildren(r,n)})}deactivateRoutes(i,e,n){const s=i.value,r=e?e.value:null;if(s===r)if(s.component){const o=n.getContext(s.outlet);o&&this.deactivateChildRoutes(i,e,o.children)}else this.deactivateChildRoutes(i,e,n);else r&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){const n=e.getContext(i.value.outlet),s=n&&i.value.component?n.children:e,r=Bo(i);for(const o of Object.keys(r))this.deactivateRouteAndItsChildren(r[o],s);if(n&&n.outlet){const o=n.outlet.detach(),u=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:o,route:i,contexts:u})}}deactivateRouteAndOutlet(i,e){const n=e.getContext(i.value.outlet),s=n&&i.value.component?n.children:e,r=Bo(i);for(const o of Object.keys(r))this.deactivateRouteAndItsChildren(r[o],s);n&&n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated(),n.attachRef=null,n.resolver=null,n.route=null)}activateChildRoutes(i,e,n){const s=Bo(e);i.children.forEach(r=>{this.activateRoutes(r,s[r.value.outlet],n),this.forwardEvent(new XB(r.value.snapshot))}),i.children.length&&this.forwardEvent(new YB(i.value.snapshot))}activateRoutes(i,e,n){const s=i.value,r=e?e.value:null;if(ag(s),s===r)if(s.component){const o=n.getOrCreateContext(s.outlet);this.activateChildRoutes(i,e,o.children)}else this.activateChildRoutes(i,e,n);else if(s.component){const o=n.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const u=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),o.children.onOutletReAttached(u.contexts),o.attachRef=u.componentRef,o.route=u.route.value,o.outlet&&o.outlet.attach(u.componentRef,u.route.value),ag(u.route.value),this.activateChildRoutes(i,null,o.children)}else{const u=function A8(t){for(let i=t.parent;i;i=i.parent){const e=i.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(s.snapshot),h=u?u.module.componentFactoryResolver:null;o.attachRef=null,o.route=s,o.resolver=h,o.outlet&&o.outlet.activateWith(s,h),this.activateChildRoutes(i,null,o.children)}}else this.activateChildRoutes(i,null,n)}}class pg{constructor(i,e){this.routes=i,this.module=e}}function Ys(t){return"function"==typeof t}function Rr(t){return t instanceof kr}const Sl=Symbol("INITIAL_VALUE");function xl(){return qi(t=>function SB(...t){let i,e;return Vr(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(i=t.pop()),1===t.length&&Nr(t[0])&&(t=t[0]),Pd(t,e).lift(new xB(i))}(t.map(i=>i.pipe(br(1),Qu(Sl)))).pipe(PT((i,e)=>{let n=!1;return e.reduce((s,r,o)=>s!==Sl?s:(r===Sl&&(n=!0),n||!1!==r&&o!==e.length-1&&!Rr(r)?s:r),i)},Sl),qs(i=>i!==Sl),et(i=>Rr(i)?i:!0===i),br(1)))}class H8{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Dl,this.attachRef=null}}class Dl{constructor(){this.contexts=new Map}onChildOutletCreated(i,e){const n=this.getOrCreateContext(i);n.outlet=e,this.contexts.set(i,n)}onChildOutletDestroyed(i){const e=this.getContext(i);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let e=this.getContext(i);return e||(e=new H8,this.contexts.set(i,e)),e}getContext(i){return this.contexts.get(i)||null}}let Ml=(()=>{class t{constructor(e,n,s,r,o){this.parentContexts=e,this.location=n,this.resolver=s,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new H,this.deactivateEvents=new H,this.attachEvents=new H,this.detachEvents=new H,this.name=r||Ke,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const o=(n=n||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),u=this.parentContexts.getOrCreateContext(this.name).children,h=new q8(e,u,this.location.injector);this.activated=this.location.createComponent(o,this.location.length,h),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(x(Dl),x(vi),x(Va),ua("name"),x(ot))},t.\u0275dir=le({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),t})();class q8{constructor(i,e,n){this.route=i,this.childContexts=e,this.parent=n}get(i,e){return i===Er?this.route:i===Dl?this.childContexts:this.parent.get(i,e)}}let m2=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,n){1&e&&k(0,"router-outlet")},directives:[Ml],encapsulation:2}),t})();function f2(t,i=""){for(let e=0;exi(n)===i);return e.push(...t.filter(n=>xi(n)!==i)),e}const _2={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function cd(t,i,e){var n;if(""===i.path)return"full"===i.pathMatch&&(t.hasChildren()||e.length>0)?Object.assign({},_2):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(i.matcher||n8)(e,t,i);if(!r)return Object.assign({},_2);const o={};Sn(r.posParams,(h,b)=>{o[b]=h.path});const u=r.consumed.length>0?Object.assign(Object.assign({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:u,positionalParamSegments:null!==(n=r.posParams)&&void 0!==n?n:{}}}function ud(t,i,e,n,s="corrected"){if(e.length>0&&function $8(t,i,e){return e.some(n=>dd(t,i,n)&&xi(n)!==Ke)}(t,e,n)){const o=new Xe(i,function j8(t,i,e,n){const s={};s[Ke]=n,n._sourceSegment=t,n._segmentIndexShift=i.length;for(const r of e)if(""===r.path&&xi(r)!==Ke){const o=new Xe([],{});o._sourceSegment=t,o._segmentIndexShift=i.length,s[xi(r)]=o}return s}(t,i,n,new Xe(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=i.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function W8(t,i,e){return e.some(n=>dd(t,i,n))}(t,e,n)){const o=new Xe(t.segments,function z8(t,i,e,n,s,r){const o={};for(const u of n)if(dd(t,e,u)&&!s[xi(u)]){const h=new Xe([],{});h._sourceSegment=t,h._segmentIndexShift="legacy"===r?t.segments.length:i.length,o[xi(u)]=h}return Object.assign(Object.assign({},s),o)}(t,i,e,n,t.children,s));return o._sourceSegment=t,o._segmentIndexShift=i.length,{segmentGroup:o,slicedSegments:e}}const r=new Xe(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=i.length,{segmentGroup:r,slicedSegments:e}}function dd(t,i,e){return(!(t.hasChildren()||i.length>0)||"full"!==e.pathMatch)&&""===e.path}function b2(t,i,e,n){return!!(xi(t)===n||n!==Ke&&dd(i,e,t))&&("**"===t.path||cd(i,t,e).matched)}function v2(t,i,e){return 0===i.length&&!t.children[e]}class pd{constructor(i){this.segmentGroup=i||null}}class C2{constructor(i){this.urlTree=i}}function kl(t){return tl(new pd(t))}function y2(t){return tl(new C2(t))}function K8(t){return tl(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class Y8{constructor(i,e,n,s,r){this.configLoader=e,this.urlSerializer=n,this.urlTree=s,this.config=r,this.allowRedirects=!0,this.ngModule=i.get(fs)}apply(){const i=ud(this.urlTree.root,[],[],this.config).segmentGroup,e=new Xe(i.segments,i.children);return this.expandSegmentGroup(this.ngModule,this.config,e,Ke).pipe(et(r=>this.createUrlTree(mg(r),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Mr(r=>{if(r instanceof C2)return this.allowRedirects=!1,this.match(r.urlTree);throw r instanceof pd?this.noMatchError(r):r}))}match(i){return this.expandSegmentGroup(this.ngModule,this.config,i.root,Ke).pipe(et(s=>this.createUrlTree(mg(s),i.queryParams,i.fragment))).pipe(Mr(s=>{throw s instanceof pd?this.noMatchError(s):s}))}noMatchError(i){return new Error(`Cannot match any routes. URL Segment: '${i.segmentGroup}'`)}createUrlTree(i,e,n){const s=i.segments.length>0?new Xe([],{[Ke]:i}):i;return new kr(s,e,n)}expandSegmentGroup(i,e,n,s){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(i,e,n).pipe(et(r=>new Xe([],r))):this.expandSegment(i,n,e,n.segments,s,!0)}expandChildren(i,e,n){const s=[];for(const r of Object.keys(n.children))"primary"===r?s.unshift(r):s.push(r);return Dn(s).pipe(_r(r=>{const o=n.children[r],u=g2(e,r);return this.expandSegmentGroup(i,u,o,r).pipe(et(h=>({segment:h,outlet:r})))}),PT((r,o)=>(r[o.outlet]=o.segment,r),{}),function VB(t,i){const e=arguments.length>=2;return n=>n.pipe(t?qs((s,r)=>t(s,r,n)):Vl,eg(1),e?NT(i):FT(()=>new ed))}())}expandSegment(i,e,n,s,r,o){return Dn(n).pipe(_r(u=>this.expandSegmentAgainstRoute(i,e,n,u,s,r,o).pipe(Mr(b=>{if(b instanceof pd)return oe(null);throw b}))),No(u=>!!u),Mr((u,h)=>{if(u instanceof ed||"EmptyError"===u.name)return v2(e,s,r)?oe(new Xe([],{})):kl(e);throw u}))}expandSegmentAgainstRoute(i,e,n,s,r,o,u){return b2(s,e,r,o)?void 0===s.redirectTo?this.matchSegmentAgainstRoute(i,e,s,r,o):u&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o):kl(e):kl(e)}expandSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o){return"**"===s.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(i,n,s,o):this.expandRegularSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(i,e,n,s){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?y2(r):this.lineralizeSegments(n,r).pipe(bn(o=>{const u=new Xe(o,{});return this.expandSegment(i,u,e,o,s,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o){const{matched:u,consumedSegments:h,remainingSegments:b,positionalParamSegments:y}=cd(e,s,r);if(!u)return kl(e);const w=this.applyRedirectCommands(h,s.redirectTo,y);return s.redirectTo.startsWith("/")?y2(w):this.lineralizeSegments(s,w).pipe(bn(M=>this.expandSegment(i,e,n,M.concat(b),o,!1)))}matchSegmentAgainstRoute(i,e,n,s,r){if("**"===n.path)return n.loadChildren?(n._loadedConfig?oe(n._loadedConfig):this.configLoader.load(i.injector,n)).pipe(et(w=>(n._loadedConfig=w,new Xe(s,{})))):oe(new Xe(s,{}));const{matched:o,consumedSegments:u,remainingSegments:h}=cd(e,n,s);return o?this.getChildConfig(i,n,s).pipe(bn(y=>{const w=y.module,M=y.routes,{segmentGroup:E,slicedSegments:R}=ud(e,u,h,M),O=new Xe(E.segments,E.children);if(0===R.length&&O.hasChildren())return this.expandChildren(w,M,O).pipe(et(J=>new Xe(u,J)));if(0===M.length&&0===R.length)return oe(new Xe(u,{}));const N=xi(n)===r;return this.expandSegment(w,O,M,R,N?Ke:r,!0).pipe(et(P=>new Xe(u.concat(P.segments),P.children)))})):kl(e)}getChildConfig(i,e,n){return e.children?oe(new pg(e.children,i)):e.loadChildren?void 0!==e._loadedConfig?oe(e._loadedConfig):this.runCanLoadGuards(i.injector,e,n).pipe(bn(s=>s?this.configLoader.load(i.injector,e).pipe(et(r=>(e._loadedConfig=r,r))):function Q8(t){return tl(ng(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`))}(e))):oe(new pg([],i))}runCanLoadGuards(i,e,n){const s=e.canLoad;if(!s||0===s.length)return oe(!0);const r=s.map(o=>{const u=i.get(o);let h;if(function F8(t){return t&&Ys(t.canLoad)}(u))h=u.canLoad(e,n);else{if(!Ys(u))throw new Error("Invalid CanLoad guard");h=u(e,n)}return os(h)});return oe(r).pipe(xl(),li(o=>{if(!Rr(o))return;const u=ng(`Redirecting to "${this.urlSerializer.serialize(o)}"`);throw u.url=o,u}),et(o=>!0===o))}lineralizeSegments(i,e){let n=[],s=e.root;for(;;){if(n=n.concat(s.segments),0===s.numberOfChildren)return oe(n);if(s.numberOfChildren>1||!s.children[Ke])return K8(i.redirectTo);s=s.children[Ke]}}applyRedirectCommands(i,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),i,n)}applyRedirectCreatreUrlTree(i,e,n,s){const r=this.createSegmentGroup(i,e.root,n,s);return new kr(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){const n={};return Sn(i,(s,r)=>{if("string"==typeof s&&s.startsWith(":")){const u=s.substring(1);n[r]=e[u]}else n[r]=s}),n}createSegmentGroup(i,e,n,s){const r=this.createSegments(i,e.segments,n,s);let o={};return Sn(e.children,(u,h)=>{o[h]=this.createSegmentGroup(i,u,n,s)}),new Xe(r,o)}createSegments(i,e,n,s){return e.map(r=>r.path.startsWith(":")?this.findPosParam(i,r,s):this.findOrReturn(r,n))}findPosParam(i,e,n){const s=n[e.path.substring(1)];if(!s)throw new Error(`Cannot redirect to '${i}'. Cannot find '${e.path}'.`);return s}findOrReturn(i,e){let n=0;for(const s of e){if(s.path===i.path)return e.splice(n),s;n++}return i}}function mg(t){const i={};for(const n of Object.keys(t.children)){const r=mg(t.children[n]);(r.segments.length>0||r.hasChildren())&&(i[n]=r)}return function Z8(t){if(1===t.numberOfChildren&&t.children[Ke]){const i=t.children[Ke];return new Xe(t.segments.concat(i.segments),i.children)}return t}(new Xe(t.segments,i))}class w2{constructor(i){this.path=i,this.route=this.path[this.path.length-1]}}class hd{constructor(i,e){this.component=i,this.route=e}}function eH(t,i,e){const n=t._root;return Il(n,i?i._root:null,e,[n.value])}function md(t,i,e){const n=function nH(t){if(!t)return null;for(let i=t.parent;i;i=i.parent){const e=i.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(i);return(n?n.module.injector:e).get(t)}function Il(t,i,e,n,s={canDeactivateChecks:[],canActivateChecks:[]}){const r=Bo(i);return t.children.forEach(o=>{(function iH(t,i,e,n,s={canDeactivateChecks:[],canActivateChecks:[]}){const r=t.value,o=i?i.value:null,u=e?e.getContext(t.value.outlet):null;if(o&&r.routeConfig===o.routeConfig){const h=function sH(t,i,e){if("function"==typeof e)return e(t,i);switch(e){case"pathParamsChange":return!Ir(t.url,i.url);case"pathParamsOrQueryParamsChange":return!Ir(t.url,i.url)||!rs(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!lg(t,i)||!rs(t.queryParams,i.queryParams);default:return!lg(t,i)}}(o,r,r.routeConfig.runGuardsAndResolvers);h?s.canActivateChecks.push(new w2(n)):(r.data=o.data,r._resolvedData=o._resolvedData),Il(t,i,r.component?u?u.children:null:e,n,s),h&&u&&u.outlet&&u.outlet.isActivated&&s.canDeactivateChecks.push(new hd(u.outlet.component,o))}else o&&El(i,u,s),s.canActivateChecks.push(new w2(n)),Il(t,null,r.component?u?u.children:null:e,n,s)})(o,r[o.value.outlet],e,n.concat([o.value]),s),delete r[o.value.outlet]}),Sn(r,(o,u)=>El(o,e.getContext(u),s)),s}function El(t,i,e){const n=Bo(t),s=t.value;Sn(n,(r,o)=>{El(r,s.component?i?i.children.getContext(o):null:i,e)}),e.canDeactivateChecks.push(new hd(s.component&&i&&i.outlet&&i.outlet.isActivated?i.outlet.component:null,s))}class hH{}function T2(t){return new Je(i=>i.error(t))}class fH{constructor(i,e,n,s,r,o){this.rootComponentType=i,this.config=e,this.urlTree=n,this.url=s,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=o}recognize(){const i=ud(this.urlTree.root,[],[],this.config.filter(o=>void 0===o.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,i,Ke);if(null===e)return null;const n=new od([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Ke,this.rootComponentType,null,this.urlTree.root,-1,{}),s=new Ss(n,e),r=new a2(this.url,s);return this.inheritParamsAndData(r._root),r}inheritParamsAndData(i){const e=i.value,n=o2(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),i.children.forEach(s=>this.inheritParamsAndData(s))}processSegmentGroup(i,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(i,e):this.processSegment(i,e,e.segments,n)}processChildren(i,e){const n=[];for(const r of Object.keys(e.children)){const o=e.children[r],u=g2(i,r),h=this.processSegmentGroup(u,o,r);if(null===h)return null;n.push(...h)}const s=S2(n);return function gH(t){t.sort((i,e)=>i.value.outlet===Ke?-1:e.value.outlet===Ke?1:i.value.outlet.localeCompare(e.value.outlet))}(s),s}processSegment(i,e,n,s){for(const r of i){const o=this.processSegmentAgainstRoute(r,e,n,s);if(null!==o)return o}return v2(e,n,s)?[]:null}processSegmentAgainstRoute(i,e,n,s){if(i.redirectTo||!b2(i,e,n,s))return null;let r,o=[],u=[];if("**"===i.path){const E=n.length>0?jT(n).parameters:{};r=new od(n,E,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,M2(i),xi(i),i.component,i,x2(e),D2(e)+n.length,k2(i))}else{const E=cd(e,i,n);if(!E.matched)return null;o=E.consumedSegments,u=E.remainingSegments,r=new od(o,E.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,M2(i),xi(i),i.component,i,x2(e),D2(e)+o.length,k2(i))}const h=function _H(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(i),{segmentGroup:b,slicedSegments:y}=ud(e,o,u,h.filter(E=>void 0===E.redirectTo),this.relativeLinkResolution);if(0===y.length&&b.hasChildren()){const E=this.processChildren(h,b);return null===E?null:[new Ss(r,E)]}if(0===h.length&&0===y.length)return[new Ss(r,[])];const w=xi(i)===s,M=this.processSegment(h,b,y,w?Ke:s);return null===M?null:[new Ss(r,M)]}}function bH(t){const i=t.value.routeConfig;return i&&""===i.path&&void 0===i.redirectTo}function S2(t){const i=[],e=new Set;for(const n of t){if(!bH(n)){i.push(n);continue}const s=i.find(r=>n.value.routeConfig===r.value.routeConfig);void 0!==s?(s.children.push(...n.children),e.add(s)):i.push(n)}for(const n of e){const s=S2(n.children);i.push(new Ss(n.value,s))}return i.filter(n=>!e.has(n))}function x2(t){let i=t;for(;i._sourceSegment;)i=i._sourceSegment;return i}function D2(t){let i=t,e=i._segmentIndexShift?i._segmentIndexShift:0;for(;i._sourceSegment;)i=i._sourceSegment,e+=i._segmentIndexShift?i._segmentIndexShift:0;return e-1}function M2(t){return t.data||{}}function k2(t){return t.resolve||{}}function I2(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function fg(t){return qi(i=>{const e=t(i);return e?Dn(e).pipe(et(()=>i)):oe(i)})}class DH extends class xH{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}}{}const gg=new be("ROUTES");class E2{constructor(i,e,n,s){this.injector=i,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=s}load(i,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const s=this.loadModuleFactory(e.loadChildren).pipe(et(r=>{this.onLoadEndListener&&this.onLoadEndListener(e);const o=r.create(i);return new pg(zT(o.injector.get(gg,void 0,xe.Self|xe.Optional)).map(hg),o)}),Mr(r=>{throw e._loader$=void 0,r}));return e._loader$=new Fg(s,()=>new ct).pipe(Fd()),e._loader$}loadModuleFactory(i){return os(i()).pipe(bn(e=>e instanceof iC?oe(e):Dn(this.compiler.compileModuleAsync(e))))}}class kH{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,e){return i}}function IH(t){throw t}function EH(t,i,e){return i.parse("/")}function R2(t,i){return oe(null)}const RH={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},LH={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let It=(()=>{class t{constructor(e,n,s,r,o,u,h){this.rootComponentType=e,this.urlSerializer=n,this.rootContexts=s,this.location=r,this.config=h,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ct,this.errorHandler=IH,this.malformedUriErrorHandler=EH,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:R2,afterPreactivation:R2},this.urlHandlingStrategy=new kH,this.routeReuseStrategy=new DH,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=o.get(fs),this.console=o.get(wR);const w=o.get(nt);this.isNgZoneEnabled=w instanceof nt&&nt.isInAngularZone(),this.resetConfig(h),this.currentUrlTree=function s8(){return new kr(new Xe([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new E2(o,u,M=>this.triggerEvent(new BT(M)),M=>this.triggerEvent(new HT(M))),this.routerState=r2(this.currentUrlTree,this.rootComponentType),this.transitions=new Gi({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const n=this.events;return e.pipe(qs(s=>0!==s.id),et(s=>Object.assign(Object.assign({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),qi(s=>{let r=!1,o=!1;return oe(s).pipe(li(u=>{this.currentNavigation={id:u.id,initialUrl:u.currentRawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),qi(u=>{const h=this.browserUrlTree.toString(),b=!this.navigated||u.extractedUrl.toString()!==h||h!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||b)&&this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return L2(u.source)&&(this.browserUrlTree=u.extractedUrl),oe(u).pipe(qi(w=>{const M=this.transitions.getValue();return n.next(new tg(w.id,this.serializeUrl(w.extractedUrl),w.source,w.restoredState)),M!==this.transitions.getValue()?Io:Promise.resolve(w)}),function X8(t,i,e,n){return qi(s=>function J8(t,i,e,n,s){return new Y8(t,i,e,n,s).apply()}(t,i,e,s.extractedUrl,n).pipe(et(r=>Object.assign(Object.assign({},s),{urlAfterRedirects:r}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),li(w=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:w.urlAfterRedirects})}),function vH(t,i,e,n,s){return bn(r=>function mH(t,i,e,n,s="emptyOnly",r="legacy"){try{const o=new fH(t,i,e,n,s,r).recognize();return null===o?T2(new hH):oe(o)}catch(o){return T2(o)}}(t,i,r.urlAfterRedirects,e(r.urlAfterRedirects),n,s).pipe(et(o=>Object.assign(Object.assign({},r),{targetSnapshot:o}))))}(this.rootComponentType,this.config,w=>this.serializeUrl(w),this.paramsInheritanceStrategy,this.relativeLinkResolution),li(w=>{if("eager"===this.urlUpdateStrategy){if(!w.extras.skipLocationChange){const E=this.urlHandlingStrategy.merge(w.urlAfterRedirects,w.rawUrl);this.setBrowserUrl(E,w)}this.browserUrlTree=w.urlAfterRedirects}const M=new jB(w.id,this.serializeUrl(w.extractedUrl),this.serializeUrl(w.urlAfterRedirects),w.targetSnapshot);n.next(M)}));if(b&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:M,extractedUrl:E,source:R,restoredState:O,extras:N}=u,U=new tg(M,this.serializeUrl(E),R,O);n.next(U);const P=r2(E,this.rootComponentType).snapshot;return oe(Object.assign(Object.assign({},u),{targetSnapshot:P,urlAfterRedirects:E,extras:Object.assign(Object.assign({},N),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=u.rawUrl,u.resolve(null),Io}),fg(u=>{const{targetSnapshot:h,id:b,extractedUrl:y,rawUrl:w,extras:{skipLocationChange:M,replaceUrl:E}}=u;return this.hooks.beforePreactivation(h,{navigationId:b,appliedUrlTree:y,rawUrlTree:w,skipLocationChange:!!M,replaceUrl:!!E})}),li(u=>{const h=new $B(u.id,this.serializeUrl(u.extractedUrl),this.serializeUrl(u.urlAfterRedirects),u.targetSnapshot);this.triggerEvent(h)}),et(u=>Object.assign(Object.assign({},u),{guards:eH(u.targetSnapshot,u.currentSnapshot,this.rootContexts)})),function rH(t,i){return bn(e=>{const{targetSnapshot:n,currentSnapshot:s,guards:{canActivateChecks:r,canDeactivateChecks:o}}=e;return 0===o.length&&0===r.length?oe(Object.assign(Object.assign({},e),{guardsResult:!0})):function oH(t,i,e,n){return Dn(t).pipe(bn(s=>function pH(t,i,e,n,s){const r=i&&i.routeConfig?i.routeConfig.canDeactivate:null;return r&&0!==r.length?oe(r.map(u=>{const h=md(u,i,s);let b;if(function B8(t){return t&&Ys(t.canDeactivate)}(h))b=os(h.canDeactivate(t,i,e,n));else{if(!Ys(h))throw new Error("Invalid CanDeactivate guard");b=os(h(t,i,e,n))}return b.pipe(No())})).pipe(xl()):oe(!0)}(s.component,s.route,e,i,n)),No(s=>!0!==s,!0))}(o,n,s,t).pipe(bn(u=>u&&function P8(t){return"boolean"==typeof t}(u)?function aH(t,i,e,n){return Dn(i).pipe(_r(s=>el(function cH(t,i){return null!==t&&i&&i(new JB(t)),oe(!0)}(s.route.parent,n),function lH(t,i){return null!==t&&i&&i(new ZB(t)),oe(!0)}(s.route,n),function dH(t,i,e){const n=i[i.length-1],r=i.slice(0,i.length-1).reverse().map(o=>function tH(t){const i=t.routeConfig?t.routeConfig.canActivateChild:null;return i&&0!==i.length?{node:t,guards:i}:null}(o)).filter(o=>null!==o).map(o=>lu(()=>oe(o.guards.map(h=>{const b=md(h,o.node,e);let y;if(function V8(t){return t&&Ys(t.canActivateChild)}(b))y=os(b.canActivateChild(n,t));else{if(!Ys(b))throw new Error("Invalid CanActivateChild guard");y=os(b(n,t))}return y.pipe(No())})).pipe(xl())));return oe(r).pipe(xl())}(t,s.path,e),function uH(t,i,e){const n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||0===n.length)return oe(!0);const s=n.map(r=>lu(()=>{const o=md(r,i,e);let u;if(function N8(t){return t&&Ys(t.canActivate)}(o))u=os(o.canActivate(i,t));else{if(!Ys(o))throw new Error("Invalid CanActivate guard");u=os(o(i,t))}return u.pipe(No())}));return oe(s).pipe(xl())}(t,s.route,e))),No(s=>!0!==s,!0))}(n,r,t,i):oe(u)),et(u=>Object.assign(Object.assign({},e),{guardsResult:u})))})}(this.ngModule.injector,u=>this.triggerEvent(u)),li(u=>{if(Rr(u.guardsResult)){const b=ng(`Redirecting to "${this.serializeUrl(u.guardsResult)}"`);throw b.url=u.guardsResult,b}const h=new WB(u.id,this.serializeUrl(u.extractedUrl),this.serializeUrl(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.triggerEvent(h)}),qs(u=>!!u.guardsResult||(this.restoreHistory(u),this.cancelNavigationTransition(u,""),!1)),fg(u=>{if(u.guards.canActivateChecks.length)return oe(u).pipe(li(h=>{const b=new KB(h.id,this.serializeUrl(h.extractedUrl),this.serializeUrl(h.urlAfterRedirects),h.targetSnapshot);this.triggerEvent(b)}),qi(h=>{let b=!1;return oe(h).pipe(function CH(t,i){return bn(e=>{const{targetSnapshot:n,guards:{canActivateChecks:s}}=e;if(!s.length)return oe(e);let r=0;return Dn(s).pipe(_r(o=>function yH(t,i,e,n){return function wH(t,i,e,n){const s=I2(t);if(0===s.length)return oe({});const r={};return Dn(s).pipe(bn(o=>function TH(t,i,e,n){const s=md(t,i,n);return os(s.resolve?s.resolve(i,e):s(i,e))}(t[o],i,e,n).pipe(li(u=>{r[o]=u}))),eg(1),bn(()=>I2(r).length===s.length?oe(r):Io))}(t._resolve,t,i,n).pipe(et(r=>(t._resolvedData=r,t.data=Object.assign(Object.assign({},t.data),o2(t,e).resolve),null)))}(o.route,n,t,i)),li(()=>r++),eg(1),bn(o=>r===s.length?oe(e):Io))})}(this.paramsInheritanceStrategy,this.ngModule.injector),li({next:()=>b=!0,complete:()=>{b||(this.restoreHistory(h),this.cancelNavigationTransition(h,"At least one route resolver didn't emit any value."))}}))}),li(h=>{const b=new QB(h.id,this.serializeUrl(h.extractedUrl),this.serializeUrl(h.urlAfterRedirects),h.targetSnapshot);this.triggerEvent(b)}))}),fg(u=>{const{targetSnapshot:h,id:b,extractedUrl:y,rawUrl:w,extras:{skipLocationChange:M,replaceUrl:E}}=u;return this.hooks.afterPreactivation(h,{navigationId:b,appliedUrlTree:y,rawUrlTree:w,skipLocationChange:!!M,replaceUrl:!!E})}),et(u=>{const h=function w8(t,i,e){const n=wl(t,i._root,e?e._root:void 0);return new s2(n,i)}(this.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return Object.assign(Object.assign({},u),{targetRouterState:h})}),li(u=>{this.currentUrlTree=u.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl),this.routerState=u.targetRouterState,"deferred"===this.urlUpdateStrategy&&(u.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,u),this.browserUrlTree=u.urlAfterRedirects)}),((t,i,e)=>et(n=>(new O8(i,n.targetRouterState,n.currentRouterState,e).activate(t),n)))(this.rootContexts,this.routeReuseStrategy,u=>this.triggerEvent(u)),li({next(){r=!0},complete(){r=!0}}),function qB(t){return i=>i.lift(new UB(t))}(()=>{var u;r||o||this.cancelNavigationTransition(s,`Navigation ID ${s.id} is not equal to the current navigation id ${this.navigationId}`),(null===(u=this.currentNavigation)||void 0===u?void 0:u.id)===s.id&&(this.currentNavigation=null)}),Mr(u=>{if(o=!0,function t8(t){return t&&t[UT]}(u)){const h=Rr(u.url);h||(this.navigated=!0,this.restoreHistory(s,!0));const b=new VT(s.id,this.serializeUrl(s.extractedUrl),u.message);n.next(b),h?setTimeout(()=>{const y=this.urlHandlingStrategy.merge(u.url,this.rawUrlTree),w={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||L2(s.source)};this.scheduleNavigation(y,"imperative",null,w,{resolve:s.resolve,reject:s.reject,promise:s.promise})},0):s.resolve(!1)}else{this.restoreHistory(s,!0);const h=new zB(s.id,this.serializeUrl(s.extractedUrl),u);n.next(h);try{s.resolve(this.errorHandler(u))}catch(b){s.reject(b)}}return Io}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const n="popstate"===e.type?"popstate":"hashchange";"popstate"===n&&setTimeout(()=>{var s;const r={replaceUrl:!0},o=(null===(s=e.state)||void 0===s?void 0:s.navigationId)?e.state:null;if(o){const h=Object.assign({},o);delete h.navigationId,delete h.\u0275routerPageId,0!==Object.keys(h).length&&(r.state=h)}const u=this.parseUrl(e.url);this.scheduleNavigation(u,n,o,r)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){f2(e),this.config=e.map(hg),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,n={}){const{relativeTo:s,queryParams:r,fragment:o,queryParamsHandling:u,preserveFragment:h}=n,b=s||this.routerState.root,y=h?this.currentUrlTree.fragment:o;let w=null;switch(u){case"merge":w=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":w=this.currentUrlTree.queryParams;break;default:w=r||null}return null!==w&&(w=this.removeEmptyProps(w)),function x8(t,i,e,n,s){if(0===e.length)return cg(i.root,i.root,i.root,n,s);const r=function D8(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new u2(!0,0,t);let i=0,e=!1;const n=t.reduce((s,r,o)=>{if("object"==typeof r&&null!=r){if(r.outlets){const u={};return Sn(r.outlets,(h,b)=>{u[b]="string"==typeof h?h.split("/"):h}),[...s,{outlets:u}]}if(r.segmentPath)return[...s,r.segmentPath]}return"string"!=typeof r?[...s,r]:0===o?(r.split("/").forEach((u,h)=>{0==h&&"."===u||(0==h&&""===u?e=!0:".."===u?i++:""!=u&&s.push(u))}),s):[...s,r]},[]);return new u2(e,i,n)}(e);if(r.toRoot())return cg(i.root,i.root,new Xe([],{}),n,s);const o=function M8(t,i,e){if(t.isAbsolute)return new ug(i.root,!0,0);if(-1===e.snapshot._lastPathIndex){const r=e.snapshot._urlSegment;return new ug(r,r===i.root,0)}const n=ad(t.commands[0])?0:1;return function k8(t,i,e){let n=t,s=i,r=e;for(;r>s;){if(r-=s,n=n.parent,!n)throw new Error("Invalid number of '../'");s=n.segments.length}return new ug(n,!1,s-r)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(r,i,t),u=o.processChildren?ld(o.segmentGroup,o.index,r.commands):d2(o.segmentGroup,o.index,r.commands);return cg(i.root,o.segmentGroup,u,n,s)}(b,this.currentUrlTree,e,w,null!=y?y:null)}navigateByUrl(e,n={skipLocationChange:!1}){const s=Rr(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,n)}navigate(e,n={skipLocationChange:!1}){return function OH(t){for(let i=0;i{const r=e[s];return null!=r&&(n[s]=r),n},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new vl(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,n,s,r,o){var u,h;if(this.disposed)return Promise.resolve(!1);let b,y,w;o?(b=o.resolve,y=o.reject,w=o.promise):w=new Promise((R,O)=>{b=R,y=O});const M=++this.navigationId;let E;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(s=this.location.getState()),E=s&&s.\u0275routerPageId?s.\u0275routerPageId:r.replaceUrl||r.skipLocationChange?null!==(u=this.browserPageId)&&void 0!==u?u:0:(null!==(h=this.browserPageId)&&void 0!==h?h:0)+1):E=0,this.setTransition({id:M,targetPageId:E,source:n,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:r,resolve:b,reject:y,promise:w,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),w.catch(R=>Promise.reject(R))}setBrowserUrl(e,n){const s=this.urlSerializer.serialize(e),r=Object.assign(Object.assign({},n.extras.state),this.generateNgRouterState(n.id,n.targetPageId));this.location.isCurrentPathEqualTo(s)||n.extras.replaceUrl?this.location.replaceState(s,"",r):this.location.go(s,"",r)}restoreHistory(e,n=!1){var s,r;if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)||0===o?this.currentUrlTree===(null===(r=this.currentNavigation)||void 0===r?void 0:r.finalUrl)&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(o)}else"replace"===this.canceledNavigationResolution&&(n&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,n){const s=new VT(e.id,this.serializeUrl(e.extractedUrl),n);this.triggerEvent(s),e.resolve(!1)}generateNgRouterState(e,n){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}}return t.\u0275fac=function(e){Sh()},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function L2(t){return"imperative"!==t}let fd=(()=>{class t{constructor(e,n,s,r,o){this.router=e,this.route=n,this.tabIndexAttribute=s,this.renderer=r,this.el=o,this.commands=null,this.onChanges=new ct,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){if(null!=this.tabIndexAttribute)return;const n=this.renderer,s=this.el.nativeElement;null!==e?n.setAttribute(s,"tabindex",e):n.removeAttribute(s,"tabindex")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const e={skipLocationChange:qo(this.skipLocationChange),replaceUrl:qo(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:qo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),ua("tabindex"),x(wn),x(Re))},t.\u0275dir=le({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,n){1&e&&C("click",function(){return n.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[mn]}),t})(),Ho=(()=>{class t{constructor(e,n,s){this.router=e,this.route=n,this.locationStrategy=s,this.commands=null,this.href=null,this.onChanges=new ct,this.subscription=e.events.subscribe(r=>{r instanceof vl&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:null}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,n,s,r,o){if(0!==e||n||s||r||o||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const u={skipLocationChange:qo(this.skipLocationChange),replaceUrl:qo(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,u),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:qo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),x(ko))},t.\u0275dir=le({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r.button,r.ctrlKey,r.shiftKey,r.altKey,r.metaKey)}),2&e&&ne("target",n.target)("href",n.href,Xt)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[mn]}),t})();function qo(t){return""===t||!!t}let gd=(()=>{class t{constructor(e,n,s,r,o,u){this.router=e,this.element=n,this.renderer=s,this.cdr=r,this.link=o,this.linkWithHref=u,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new H,this.routerEventsSubscription=e.events.subscribe(h=>{h instanceof vl&&this.update()})}ngAfterContentInit(){oe(this.links.changes,this.linksWithHrefs.changes,oe(null)).pipe(ea()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const n=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(s=>!!s).map(s=>s.onChanges);this.linkInputChangesSubscription=Dn(n).pipe(ea()).subscribe(s=>{this.isActive!==this.isLinkActive(this.router)(s)&&this.update()})}set routerLinkActive(e){const n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(s=>!!s)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),this.isActiveChange.emit(e))})}isLinkActive(e){const n=function AH(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>!!s.urlTree&&e.isActive(s.urlTree,n)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Re),x(wn),x(ot),x(fd,8),x(Ho,8))},t.\u0275dir=le({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,n,s){if(1&e&&(st(s,fd,5),st(s,Ho,5)),2&e){let r;V(r=B())&&(n.links=r),V(r=B())&&(n.linksWithHrefs=r)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[mn]}),t})();class O2{}class A2{preload(i,e){return oe(null)}}let P2=(()=>{class t{constructor(e,n,s,r){this.router=e,this.injector=s,this.preloadingStrategy=r,this.loader=new E2(s,n,h=>e.triggerEvent(new BT(h)),h=>e.triggerEvent(new HT(h)))}setUpPreloading(){this.subscription=this.router.events.pipe(qs(e=>e instanceof vl),_r(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(fs);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,n){const s=[];for(const r of n)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const o=r._loadedConfig;s.push(this.processRoutes(o.module,o.routes))}else r.loadChildren&&!r.canLoad?s.push(this.preloadConfig(e,r)):r.children&&s.push(this.processRoutes(e,r.children));return Dn(s).pipe(ea(),et(r=>{}))}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>(n._loadedConfig?oe(n._loadedConfig):this.loader.load(e.injector,n)).pipe(bn(r=>(n._loadedConfig=r,this.processRoutes(r.module,r.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(K(It),K(qC),K(In),K(O2))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),_g=(()=>{class t{constructor(e,n,s={}){this.router=e,this.viewportScroller=n,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof tg?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof vl&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof qT&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,n){this.router.triggerEvent(new qT(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){Sh()},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Lr=new be("ROUTER_CONFIGURATION"),F2=new be("ROUTER_FORROOT_GUARD"),FH=[_m,{provide:YT,useClass:ZT},{provide:It,useFactory:function qH(t,i,e,n,s,r,o={},u,h){const b=new It(null,t,i,e,n,s,zT(r));return u&&(b.urlHandlingStrategy=u),h&&(b.routeReuseStrategy=h),function UH(t,i){t.errorHandler&&(i.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(i.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(i.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(i.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(i.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(i.urlUpdateStrategy=t.urlUpdateStrategy),t.canceledNavigationResolution&&(i.canceledNavigationResolution=t.canceledNavigationResolution)}(o,b),o.enableTracing&&b.events.subscribe(y=>{var w,M;null===(w=console.group)||void 0===w||w.call(console,`Router Event: ${y.constructor.name}`),console.log(y.toString()),console.log(y),null===(M=console.groupEnd)||void 0===M||M.call(console)}),b},deps:[YT,Dl,_m,In,qC,gg,Lr,[class MH{},new Ps],[class SH{},new Ps]]},Dl,{provide:Er,useFactory:function GH(t){return t.routerState.root},deps:[It]},P2,A2,class PH{preload(i,e){return e().pipe(Mr(()=>oe(null)))}},{provide:Lr,useValue:{enableTracing:!1}}];function NH(){return new $C("Router",It)}let On=(()=>{class t{constructor(e,n){}static forRoot(e,n){return{ngModule:t,providers:[FH,N2(e),{provide:F2,useFactory:HH,deps:[[It,new Ps,new _a]]},{provide:Lr,useValue:n||{}},{provide:ko,useFactory:BH,deps:[fr,[new uc(gm),new Ps],Lr]},{provide:_g,useFactory:VH,deps:[It,M4,Lr]},{provide:O2,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:A2},{provide:$C,multi:!0,useFactory:NH},[bg,{provide:em,multi:!0,useFactory:zH,deps:[bg]},{provide:V2,useFactory:jH,deps:[bg]},{provide:HC,multi:!0,useExisting:V2}]]}}static forChild(e){return{ngModule:t,providers:[N2(e)]}}}return t.\u0275fac=function(e){return new(e||t)(K(F2,8),K(It,8))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();function VH(t,i,e){return e.scrollOffset&&i.setOffset(e.scrollOffset),new _g(t,i,e)}function BH(t,i,e={}){return e.useHash?new fL(t,i):new dy(t,i)}function HH(t){return"guarded"}function N2(t){return[{provide:pD,multi:!0,useValue:t},{provide:gg,multi:!0,useValue:t}]}let bg=(()=>{class t{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ct}appInitializer(){return this.injector.get(pL,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let n=null;const s=new Promise(u=>n=u),r=this.injector.get(It),o=this.injector.get(Lr);return"disabled"===o.initialNavigation?(r.setUpLocationChangeListener(),n(!0)):"enabled"===o.initialNavigation||"enabledBlocking"===o.initialNavigation?(r.hooks.afterPreactivation=()=>this.initNavigation?oe(null):(this.initNavigation=!0,n(!0),this.resultOfPreactivationDone),r.initialNavigation()):n(!0),s})}bootstrapListener(e){const n=this.injector.get(Lr),s=this.injector.get(P2),r=this.injector.get(_g),o=this.injector.get(It),u=this.injector.get(cm);e===u.components[0]&&(("enabledNonBlocking"===n.initialNavigation||void 0===n.initialNavigation)&&o.initialNavigation(),s.setUpPreloading(),r.init(),o.resetRootComponentType(u.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return t.\u0275fac=function(e){return new(e||t)(K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function zH(t){return t.appInitializer.bind(t)}function jH(t){return t.bootstrapListener.bind(t)}const V2=new be("Router Initializer");let d9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,gn,ai],On,ai]}),t})();function p9(t,i){1&t&&k(0,"span",6),2&t&&p("innerHTML",d(3).text,Ht)}function h9(t,i){if(1&t&&(l(0,"div"),_(1,p9,1,1,"span",5),c()),2&t){const e=d(2);a(1),p("ngIf",!e.escape)}}function m9(t,i){if(1&t&&(l(0,"span",8),g(1),c()),2&t){const e=d(3);a(1),S(e.text)}}function f9(t,i){1&t&&_(0,m9,2,1,"span",7),2&t&&p("ngIf",d(2).escape)}const g9=function(t,i,e,n,s){return{"p-inline-message-info":t,"p-inline-message-warn":i,"p-inline-message-error":e,"p-inline-message-success":n,"p-inline-message-icon-only":s}};function _9(t,i){if(1&t&&(l(0,"div",1),k(1,"span",2),_(2,h9,2,1,"div",3),_(3,f9,1,1,"ng-template",null,4,we),c()),2&t){const e=F(4),n=d();me(n.styleClass),p("ngStyle",n.style)("ngClass",pr(7,g9,"info"===n.severity,"warn"===n.severity,"error"===n.severity,"success"===n.severity,null==n.text)),a(1),p("ngClass",n.icon),a(1),p("ngIf",!n.escape)("ngIfElse",e)}}let qe=(()=>{class t{constructor(){this.escape=!0}get icon(){let e=null;if(this.severity)switch(this.severity){case"success":e="pi pi-check";break;case"info":default:e="pi pi-info-circle";break;case"error":e="pi pi-times-circle";break;case"warn":e="pi pi-exclamation-triangle"}return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-message"]],hostAttrs:[1,"p-element"],inputs:{severity:"severity",text:"text",escape:"escape",style:"style",styleClass:"styleClass"},decls:1,vars:1,consts:[["aria-live","polite","class","p-inline-message p-component p-inline-message",3,"ngStyle","class","ngClass",4,"ngIf"],["aria-live","polite",1,"p-inline-message","p-component","p-inline-message",3,"ngStyle","ngClass"],[1,"p-inline-message-icon",3,"ngClass"],[4,"ngIf","ngIfElse"],["escapeOut",""],["class","p-inline-message-text",3,"innerHTML",4,"ngIf"],[1,"p-inline-message-text",3,"innerHTML"],["class","p-inline-message-text",4,"ngIf"],[1,"p-inline-message-text"]],template:function(e,n){1&e&&_(0,_9,5,13,"div",0),2&e&&p("ngIf",n.severity)},directives:[Q,lt,Oe],styles:[".p-inline-message{display:inline-flex;align-items:center;justify-content:center;vertical-align:top}.p-inline-message-icon-only .p-inline-message-text{visibility:hidden;width:0}.p-fluid .p-inline-message{display:flex}\n"],encapsulation:2,changeDetection:0}),t})(),b9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),R9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();function L9(t,i){1&t&&Y(0)}function O9(t,i){if(1&t){const e=I();l(0,"button",5),C("click",function(s){return v(e),d(2).onCloseClick(s)})("keydown.enter",function(){return v(e),d(2).hide()}),k(1,"span",6),c()}2&t&&ne("aria-label",d(2).ariaCloseLabel)}const A9=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},P9=function(t,i){return{value:t,params:i}};function F9(t,i){if(1&t){const e=I();l(0,"div",1),C("click",function(s){return v(e),d().onOverlayClick(s)})("@animation.start",function(s){return v(e),d().onAnimationStart(s)})("@animation.done",function(s){return v(e),d().onAnimationEnd(s)}),l(1,"div",2),C("click",function(){return v(e),d().onContentClick()})("mousedown",function(){return v(e),d().onContentClick()}),St(2),_(3,L9,1,0,"ng-container",3),c(),_(4,O9,2,1,"button",4),c()}if(2&t){const e=d();me(e.styleClass),p("ngClass","p-overlaypanel p-component")("ngStyle",e.style)("@animation",We(10,P9,e.overlayVisible?"open":"close",We(7,A9,e.showTransitionOptions,e.hideTransitionOptions))),a(3),p("ngTemplateOutlet",e.contentTemplate),a(1),p("ngIf",e.showCloseIcon)}}const N9=["*"];let V9=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.config=o,this.overlayService=u,this.dismissable=!0,this.appendTo="body",this.autoZIndex=!0,this.baseZIndex=0,this.focusOnShow=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H,this.overlayVisible=!1,this.render=!1,this.selfClick=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template,this.cd.markForCheck()})}bindDocumentClickListener(){!this.documentClickListener&&this.dismissable&&this.zone.runOutsideAngular(()=>{let e=L.isIOS()?"touchstart":"click";this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document",e,s=>{!this.container.contains(s.target)&&this.target!==s.target&&!this.target.contains(s.target)&&!this.selfClick&&this.zone.run(()=>{this.hide()}),this.selfClick=!1,this.cd.markForCheck()})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,n){this.overlayVisible?(this.hasTargetChanged(e,n)&&(this.destroyCallback=()=>{this.show(null,n||e.currentTarget||e.target)}),this.hide()):this.show(e,n)}show(e,n){this.target=n||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(){this.selfClick=!0}hasTargetChanged(e,n){return null!=this.target&&this.target!==(n||e.currentTarget||e.target)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):L.appendChild(this.container,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}align(){this.autoZIndex&>.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay),L.absolutePosition(this.container,this.target);const e=L.getOffset(this.container),n=L.getOffset(this.target);let s=0;e.left{this.container&&this.container.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener))}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&>.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1}}focus(){let e=L.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&>.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-overlayPanel"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{dismissable:"dismissable",showCloseIcon:"showCloseIcon",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",ariaCloseLabel:"ariaCloseLabel",baseZIndex:"baseZIndex",focusOnShow:"focusOnShow",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},ngContentSelectors:N9,decls:1,vars:1,consts:[[3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],[1,"p-overlaypanel-content",3,"click","mousedown"],[4,"ngTemplateOutlet"],["type","button","class","p-overlaypanel-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],["type","button","pRipple","",1,"p-overlaypanel-close","p-link",3,"click","keydown.enter"],[1,"p-overlaypanel-close-icon","pi","pi-times"]],template:function(e,n){1&e&&(yn(),_(0,F9,5,13,"div",0)),2&e&&p("ngIf",n.render)},directives:[Q,Oe,lt,Lt,vt],styles:['.p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:" ";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n'],encapsulation:2,data:{animation:[wi("animation",[Cs("void",it({transform:"scaleY(0.8)",opacity:0})),Cs("close",it({opacity:0})),Cs("open",it({transform:"translateY(0)",opacity:1})),Ot("void => open",kt("{{showTransitionParams}}")),Ot("open => close",kt("{{hideTransitionParams}}"))])]},changeDetection:0}),t})(),B9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn,Nt],Nt]}),t})(),W9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,gn],Nt]}),t})(),Uo=(()=>{class t{constructor(){this.strokeWidth="2",this.fill="none",this.animationDuration="2s"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-progressSpinner"]],hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration"},decls:3,vars:6,consts:[["role","alert","aria-busy","true",1,"p-progress-spinner",3,"ngStyle","ngClass"],["viewBox","25 25 50 50",1,"p-progress-spinner-svg"],["cx","50","cy","50","r","20","stroke-miterlimit","10",1,"p-progress-spinner-circle"]],template:function(e,n){1&e&&(l(0,"div",0),function d_(){Ie.lFrame.currentNamespace="svg"}(),l(1,"svg",1),k(2,"circle",2),c()()),2&e&&(p("ngStyle",n.style)("ngClass",n.styleClass),a(1),Hn("animation-duration",n.animationDuration),a(1),ne("fill",n.fill)("stroke-width",n.strokeWidth))},directives:[lt,Oe],styles:['.p-progress-spinner{position:relative;margin:0 auto;width:100px;height:100px;display:inline-block}.p-progress-spinner:before{content:"";display:block;padding-top:100%}.p-progress-spinner-svg{animation:p-progress-spinner-rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.p-progress-spinner-circle{stroke-dasharray:89,200;stroke-dashoffset:0;stroke:#d62d20;animation:p-progress-spinner-dash 1.5s ease-in-out infinite,p-progress-spinner-color 6s ease-in-out infinite;stroke-linecap:round}@keyframes p-progress-spinner-rotate{to{transform:rotate(360deg)}}@keyframes p-progress-spinner-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes p-progress-spinner-color{to,0%{stroke:#d62d20}40%{stroke:#0057e7}66%{stroke:#008744}80%,90%{stroke:#ffa700}}\n'],encapsulation:2,changeDetection:0}),t})(),K9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();Mu([it({transform:"{{transform}}",opacity:0}),kt("{{transition}}")]),Mu([kt("{{transition}}",it({transform:"{{transform}}",opacity:0}))]);let eq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})(),tq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),uq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,ai],On,ai]}),t})();function dq(t,i){1&t&&k(0,"span",8),2&t&&(me(d(2).$implicit.icon),p("ngClass","p-button-icon p-button-icon-left"))}function pq(t,i){if(1&t&&(ce(0),_(1,dq,1,3,"span",6),l(2,"span",7),g(3),c(),ue()),2&t){const e=d().$implicit,n=d();a(1),p("ngIf",e.icon),a(2),S(n.getOptionLabel(e))}}function hq(t,i){1&t&&Y(0)}const mq=function(t,i){return{$implicit:t,index:i}};function fq(t,i){if(1&t&&_(0,hq,1,0,"ng-container",9),2&t){const e=d(),n=e.$implicit,s=e.index;p("ngTemplateOutlet",d().itemTemplate)("ngTemplateOutletContext",We(2,mq,n,s))}}const gq=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-button-icon-only":e}};function _q(t,i){if(1&t){const e=I();l(0,"div",2,3),C("click",function(s){const r=v(e),o=r.$implicit,u=r.index;return d().onItemClick(s,o,u)})("keydown.enter",function(s){const r=v(e),o=r.$implicit,u=r.index;return d().onItemClick(s,o,u)})("blur",function(){return v(e),d().onBlur()}),_(2,pq,4,2,"ng-container",4),_(3,fq,1,5,"ng-template",null,5,we),c()}if(2&t){const e=i.$implicit,n=F(4),s=d();me(e.styleClass),p("ngClass",Rt(10,gq,s.isSelected(e),s.disabled||s.isOptionDisabled(e),e.icon&&!s.getOptionLabel(e))),ne("aria-pressed",s.isSelected(e))("title",e.title)("aria-label",e.label)("tabindex",s.disabled?null:s.tabindex)("aria-labelledby",s.getOptionLabel(e)),a(2),p("ngIf",!s.itemTemplate)("ngIfElse",n)}}const bq={provide:dn,useExisting:Ue(()=>vq),multi:!0};let vq=(()=>{class t{constructor(e){this.cd=e,this.tabindex=0,this.onOptionClick=new H,this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onItemClick(e,n,s){if(!this.disabled&&!this.isOptionDisabled(n)){if(this.multiple)this.isSelected(n)?this.removeOption(n):this.value=[...this.value||[],this.getOptionValue(n)],this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value});else{let r=this.getOptionValue(n);this.value!==r&&(this.value=this.getOptionValue(n),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}this.onOptionClick.emit({originalEvent:e,option:n,index:s})}}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(n=>!Z.equals(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,s=this.getOptionValue(e);if(this.multiple){if(this.value)for(let r of this.value)if(Z.equals(r,s,this.dataKey)){n=!0;break}}else n=Z.equals(this.getOptionValue(e),this.value,this.dataKey);return n}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-selectButton"]],contentQueries:function(e,n,s){if(1&e&&st(s,bi,5),2&e){let r;V(r=B())&&(n.itemTemplate=r.first)}},hostAttrs:[1,"p-element"],inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",tabindex:"tabindex",multiple:"multiple",style:"style",styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",disabled:"disabled",dataKey:"dataKey"},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[Ne([bq])],decls:2,vars:5,consts:[["role","group",3,"ngClass","ngStyle"],["class","p-button p-component","role","button","pRipple","",3,"class","ngClass","click","keydown.enter","blur",4,"ngFor","ngForOf"],["role","button","pRipple","",1,"p-button","p-component",3,"ngClass","click","keydown.enter","blur"],["btn",""],[4,"ngIf","ngIfElse"],["customcontent",""],[3,"ngClass","class",4,"ngIf"],[1,"p-button-label"],[3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,_q,5,14,"div",1),c()),2&e&&(me(n.styleClass),p("ngClass","p-selectbutton p-buttonset p-component")("ngStyle",n.style),a(1),p("ngForOf",n.options))},directives:[Oe,lt,at,vt,Q,Lt],styles:[".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}\n"],encapsulation:2,changeDetection:0}),t})(),Cq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();const yq=function(t,i,e){return{"p-checkbox-label-active":t,"p-disabled":i,"p-checkbox-label-focus":e}};function wq(t,i){if(1&t){const e=I();l(0,"label",7),C("click",function(s){v(e);const r=d(),o=F(3);return r.onClick(s,o)}),g(1),c()}if(2&t){const e=d();p("ngClass",Rt(3,yq,null!=e.value,e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const Tq=function(t,i){return{"p-checkbox p-component":!0,"p-checkbox-disabled":t,"p-checkbox-focused":i}},Sq=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-focus":e}},xq={provide:dn,useExisting:Ue(()=>q2),multi:!0};let q2=(()=>{class t{constructor(e){this.cd=e,this.checkboxTrueIcon="pi pi-check",this.checkboxFalseIcon="pi pi-times",this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}onClick(e,n){!this.disabled&&!this.readonly&&(this.toggle(e),this.focused=!0,n.focus())}onKeydown(e){32==e.keyCode&&e.preventDefault()}onKeyup(e){32==e.keyCode&&!this.readonly&&(this.toggle(e),e.preventDefault())}toggle(e){null==this.value||null==this.value?this.value=!0:1==this.value?this.value=!1:0==this.value&&(this.value=null),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}writeValue(e){this.value=e,this.cd.markForCheck()}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-triStateCheckbox"]],hostAttrs:[1,"p-element"],inputs:{disabled:"disabled",name:"name",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",label:"label",readonly:"readonly",checkboxTrueIcon:"checkboxTrueIcon",checkboxFalseIcon:"checkboxFalseIcon"},outputs:{onChange:"onChange"},features:[Ne([xq])],decls:7,vars:21,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","text","inputmode","none",3,"name","readonly","disabled","keyup","keydown","focus","blur"],["input",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],["class","p-checkbox-label",3,"ngClass","click",4,"ngIf"],[1,"p-checkbox-label",3,"ngClass","click"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("keyup",function(o){return n.onKeyup(o)})("keydown",function(o){return n.onKeydown(o)})("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.onClick(o,u)}),k(5,"span",5),c()(),_(6,wq,2,7,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",We(14,Tq,n.disabled,n.focused)),a(2),p("name",n.name)("readonly",n.readonly)("disabled",n.disabled),ne("id",n.inputId)("tabindex",n.tabindex)("aria-labelledby",n.ariaLabelledBy),a(2),p("ngClass",Rt(17,Sq,null!=n.value,n.disabled,n.focused)),ne("aria-checked",!0===n.value),a(1),p("ngClass",!0===n.value?n.checkboxTrueIcon:!1===n.value?n.checkboxFalseIcon:""),a(1),p("ngIf",n.label))},directives:[lt,Oe,Q],encapsulation:2,changeDetection:0}),t})(),Dq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const Mq=["container"],kq=["resizeHelper"],Iq=["reorderIndicatorUp"],Eq=["reorderIndicatorDown"],Rq=["wrapper"],Lq=["table"],Oq=["tableHeader"];function Aq(t,i){if(1&t&&(l(0,"div",14),k(1,"i"),c()),2&t){const e=d();a(1),me("p-datatable-loading-icon pi-spin "+e.loadingIcon)}}function Pq(t,i){1&t&&Y(0)}function Fq(t,i){if(1&t&&(l(0,"div",15),_(1,Pq,1,0,"ng-container",16),c()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.captionTemplate)}}function Nq(t,i){if(1&t){const e=I();l(0,"p-paginator",17),C("onPageChange",function(s){return v(e),d().onPageChange(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function Vq(t,i){1&t&&Y(0)}function Bq(t,i){1&t&&Y(0)}function Hq(t,i){if(1&t&&k(0,"tbody",25),2&t){const e=d(2);p("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.frozenBodyTemplate)("frozen",!0)}}function qq(t,i){1&t&&Y(0)}const Zs=function(t){return{$implicit:t}};function Uq(t,i){if(1&t&&(l(0,"tfoot",26),_(1,qq,1,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",z(2,Zs,e.columns))}}function Gq(t,i){if(1&t&&(l(0,"table",18,19),_(2,Vq,1,0,"ng-container",20),l(3,"thead",21),_(4,Bq,1,0,"ng-container",20),c(),_(5,Hq,1,5,"tbody",22),k(6,"tbody",23),_(7,Uq,2,4,"tfoot",24),c()),2&t){const e=d();p("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),a(2),p("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(12,Zs,e.columns)),a(2),p("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",z(14,Zs,e.columns)),a(1),p("ngIf",e.frozenValue||e.frozenBodyTemplate),a(1),p("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),a(1),p("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function zq(t,i){1&t&&Y(0)}function jq(t,i){1&t&&Y(0)}function $q(t,i){if(1&t&&k(0,"tbody",25),2&t){const e=d(2);p("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate)("frozen",!0)}}function Wq(t,i){1&t&&Y(0)}function Kq(t,i){if(1&t&&(l(0,"tfoot",26),_(1,Wq,1,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",z(2,Zs,e.columns))}}function Qq(t,i){if(1&t){const e=I();l(0,"cdk-virtual-scroll-viewport",27),C("scrolledIndexChange",function(s){return v(e),d().onScrollIndexChange(s)}),l(1,"table",18,19),_(3,zq,1,0,"ng-container",20),l(4,"thead",21,28),_(6,jq,1,0,"ng-container",20),c(),_(7,$q,1,5,"tbody",22),k(8,"tbody",23),_(9,Kq,2,4,"tfoot",24),c()()}if(2&t){const e=d();Hn("height","flex"!==e.scrollHeight?e.scrollHeight:void 0),p("itemSize",e.virtualRowHeight)("minBufferPx",e.minBufferPx)("maxBufferPx",e.maxBufferPx),a(1),p("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),a(2),p("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(17,Zs,e.columns)),a(3),p("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",z(19,Zs,e.columns)),a(1),p("ngIf",e.frozenValue||e.frozenBodyTemplate),a(1),p("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),a(1),p("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function Jq(t,i){if(1&t){const e=I();l(0,"p-paginator",29),C("onPageChange",function(s){return v(e),d().onPageChange(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function Yq(t,i){1&t&&Y(0)}function Zq(t,i){if(1&t&&(l(0,"div",30),_(1,Yq,1,0,"ng-container",16),c()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.summaryTemplate)}}function Xq(t,i){1&t&&k(0,"div",31,32)}function eU(t,i){1&t&&k(0,"span",33,34)}function tU(t,i){1&t&&k(0,"span",35,36)}const nU=function(t,i,e,n,s,r,o,u,h,b,y,w,M,E){return{"p-datatable p-component":!0,"p-datatable-hoverable-rows":t,"p-datatable-auto-layout":i,"p-datatable-resizable":e,"p-datatable-resizable-fit":n,"p-datatable-scrollable":s,"p-datatable-scrollable-vertical":r,"p-datatable-scrollable-horizontal":o,"p-datatable-scrollable-both":u,"p-datatable-flex-scrollable":h,"p-datatable-responsive-stack":b,"p-datatable-responsive-scroll":y,"p-datatable-responsive":w,"p-datatable-grouped-header":M,"p-datatable-grouped-footer":E}},iU=function(t){return{height:t}},sU=["pTableBody",""];function rU(t,i){1&t&&Y(0)}const _d=function(t,i,e,n,s){return{$implicit:t,rowIndex:i,columns:e,editing:n,frozen:s}};function oU(t,i){if(1&t&&(ce(0,3),_(1,rU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupHeaderTemplate)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function aU(t,i){1&t&&Y(0)}function lU(t,i){if(1&t&&(ce(0),_(1,aU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function cU(t,i){1&t&&Y(0)}const uU=function(t,i,e,n,s,r,o){return{$implicit:t,rowIndex:i,columns:e,editing:n,frozen:s,rowgroup:r,rowspan:o}};function dU(t,i){if(1&t&&(ce(0),_(1,cU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",function aC(t,i,e,n,s,r,o,u,h,b){const y=Fn()+t,w=W();let M=gi(w,y,e,n,s,r);return Dc(w,y+4,o,u,h)||M?Xi(w,y+7,b?i.call(b,e,n,s,r,o,u,h):i(e,n,s,r,o,u,h)):Ea(w,y+7)}(2,uU,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,s),r.calculateRowGroupSize(r.value,n,s)))}}function pU(t,i){1&t&&Y(0)}function hU(t,i){if(1&t&&(ce(0,3),_(1,pU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupFooterTemplate)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function mU(t,i){if(1&t&&(_(0,oU,2,8,"ng-container",2),_(1,lU,2,8,"ng-container",0),_(2,dU,2,10,"ng-container",0),_(3,hU,2,8,"ng-container",2)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngIf",s.dt.groupHeaderTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupHeader(s.value,e,n)),a(1),p("ngIf","rowspan"!==s.dt.rowGroupMode),a(1),p("ngIf","rowspan"===s.dt.rowGroupMode),a(1),p("ngIf",s.dt.groupFooterTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupFooter(s.value,e,n))}}function fU(t,i){if(1&t&&(ce(0),_(1,mU,4,4,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function gU(t,i){1&t&&Y(0)}function _U(t,i){if(1&t&&_(0,gU,1,0,"ng-container",4),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngTemplateOutlet",e?s.template:s.dt.loadingBodyTemplate)("ngTemplateOutletContext",pr(2,_d,e,s.dt.paginator?s.dt.first+n:n,s.columns,"row"===s.dt.editMode&&s.dt.isRowEditing(e),s.frozen))}}function bU(t,i){if(1&t&&(ce(0),_(1,_U,1,8,"ng-template",5),ue()),2&t){const e=d();a(1),p("cdkVirtualForOf",e.dt.filteredValue||e.dt.value)("cdkVirtualForTrackBy",e.dt.rowTrackBy)("cdkVirtualForTemplateCacheSize",0)}}function vU(t,i){1&t&&Y(0)}const bd=function(t,i,e,n,s,r){return{$implicit:t,rowIndex:i,columns:e,expanded:n,editing:s,frozen:r}};function CU(t,i){if(1&t&&(ce(0),_(1,vU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function yU(t,i){1&t&&Y(0)}function wU(t,i){if(1&t&&(ce(0,3),_(1,yU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupHeaderTemplate)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function TU(t,i){1&t&&Y(0)}function SU(t,i){1&t&&Y(0)}function xU(t,i){if(1&t&&(ce(0,3),_(1,SU,1,0,"ng-container",4),ue()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupFooterTemplate)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}const U2=function(t,i,e,n){return{$implicit:t,rowIndex:i,columns:e,frozen:n}};function DU(t,i){if(1&t&&(ce(0),_(1,TU,1,0,"ng-container",4),_(2,xU,2,9,"ng-container",2),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.expandedRowTemplate)("ngTemplateOutletContext",_i(3,U2,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.frozen)),a(1),p("ngIf",r.dt.groupFooterTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupFooter(r.value,n,s))}}function MU(t,i){if(1&t&&(_(0,CU,2,9,"ng-container",0),_(1,wU,2,9,"ng-container",2),_(2,DU,3,8,"ng-container",0)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngIf",!s.dt.groupHeaderTemplate),a(1),p("ngIf",s.dt.groupHeaderTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupHeader(s.value,e,n)),a(1),p("ngIf",s.dt.isRowExpanded(e))}}function kU(t,i){if(1&t&&(ce(0),_(1,MU,3,3,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function IU(t,i){1&t&&Y(0)}function EU(t,i){1&t&&Y(0)}function RU(t,i){if(1&t&&(ce(0),_(1,EU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.frozenExpandedRowTemplate)("ngTemplateOutletContext",_i(2,U2,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.frozen))}}function LU(t,i){if(1&t&&(_(0,IU,1,0,"ng-container",4),_(1,RU,2,7,"ng-container",0)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngTemplateOutlet",s.template)("ngTemplateOutletContext",Do(3,bd,e,s.dt.paginator?s.dt.first+n:n,s.columns,s.dt.isRowExpanded(e),"row"===s.dt.editMode&&s.dt.isRowEditing(e),s.frozen)),a(1),p("ngIf",s.dt.isRowExpanded(e))}}function OU(t,i){if(1&t&&(ce(0),_(1,LU,2,10,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function AU(t,i){1&t&&Y(0)}const G2=function(t,i){return{$implicit:t,frozen:i}};function PU(t,i){if(1&t&&(ce(0),_(1,AU,1,0,"ng-container",4),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.dt.loadingBodyTemplate)("ngTemplateOutletContext",We(2,G2,e.columns,e.frozen))}}function FU(t,i){1&t&&Y(0)}function NU(t,i){if(1&t&&(ce(0),_(1,FU,1,0,"ng-container",4),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.dt.emptyMessageTemplate)("ngTemplateOutletContext",We(2,G2,e.columns,e.frozen))}}function VU(t,i){if(1&t&&(l(0,"span",2),g(1),c()),2&t){const e=d();a(1),S(e.getBadgeValue())}}const BU=function(t,i,e){return{"pi-sort-amount-up-alt":t,"pi-sort-amount-down":i,"pi-sort-alt":e}};function HU(t,i){1&t&&Y(0)}function qU(t,i){if(1&t&&(ce(0),_(1,HU,1,0,"ng-container",1),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.inputTemplate)}}function UU(t,i){1&t&&Y(0)}function GU(t,i){if(1&t&&(ce(0),_(1,UU,1,0,"ng-container",1),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.outputTemplate)}}function zU(t,i){1&t&&Y(0)}const jU=function(t,i){return{$implicit:t,filterCallback:i}};function $U(t,i){if(1&t&&(ce(0),_(1,zU,1,0,"ng-container",2),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",We(2,jU,e.filterConstraint.value,e.filterCallback))}}function WU(t,i){if(1&t){const e=I();l(0,"input",8),C("input",function(s){return v(e),d(2).onModelChange(s.target.value)})("keydown.enter",function(s){return v(e),d(2).onTextInputEnterKeyDown(s)}),c()}if(2&t){const e=d(2);p("value",null==e.filterConstraint?null:e.filterConstraint.value),ne("placeholder",e.placeholder)}}function KU(t,i){if(1&t){const e=I();l(0,"p-inputNumber",9),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)})("onKeyDown",function(s){return v(e),d(2).onNumericInputKeyDown(s)}),c()}if(2&t){const e=d(2);p("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)("showButtons",!0)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits)("prefix",e.prefix)("suffix",e.suffix)("placeholder",e.placeholder)("mode",e.currency?"currency":"decimal")("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)}}function QU(t,i){if(1&t){const e=I();l(0,"p-triStateCheckbox",10),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)}),c()}if(2&t){const e=d(2);p("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)}}function JU(t,i){if(1&t){const e=I();l(0,"p-calendar",11),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)}),c()}if(2&t){const e=d(2);p("placeholder",e.placeholder)("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)}}function YU(t,i){1&t&&(ce(0,3),_(1,WU,1,2,"input",4),_(2,KU,1,13,"p-inputNumber",5),_(3,QU,1,1,"p-triStateCheckbox",6),_(4,JU,1,2,"p-calendar",7),ue()),2&t&&(p("ngSwitch",d().type),a(1),p("ngSwitchCase","text"),a(1),p("ngSwitchCase","numeric"),a(1),p("ngSwitchCase","boolean"),a(1),p("ngSwitchCase","date"))}const ZU=["icon"];function XU(t,i){if(1&t&&k(0,"p-columnFilterFormElement",5),2&t){const e=d();p("type",e.type)("field",e.field)("filterConstraint",e.dt.filters[e.field])("filterTemplate",e.filterTemplate)("placeholder",e.placeholder)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits)("prefix",e.prefix)("suffix",e.suffix)("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)}}const eG=function(t,i){return{"p-column-filter-menu-button-open":t,"p-column-filter-menu-button-active":i}};function tG(t,i){if(1&t){const e=I();l(0,"button",6,7),C("click",function(){return v(e),d().toggleMenu()})("keydown",function(s){return v(e),d().onToggleButtonKeyDown(s)}),k(2,"span",8),c()}if(2&t){const e=d();p("ngClass",We(2,eG,e.overlayVisible,e.hasFilter())),ne("aria-expanded",e.overlayVisible)}}const nG=function(t){return{"p-hidden-space":t}};function iG(t,i){if(1&t){const e=I();l(0,"button",9,7),C("click",function(){return v(e),d().clearFilter()}),k(2,"span",10),c()}if(2&t){const e=d();p("ngClass",z(1,nG,!e.hasRowFilter()))}}function sG(t,i){1&t&&Y(0)}const rG=function(t){return{"p-highlight":t}};function oG(t,i){if(1&t){const e=I();l(0,"li",19),C("click",function(){const r=v(e).$implicit;return d(3).onRowMatchModeChange(r.value)})("keydown",function(s){return v(e),d(3).onRowMatchModeKeyDown(s)})("keydown.enter",function(){const r=v(e).$implicit;return d(3).onRowMatchModeChange(r.value)}),g(1),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(3);p("ngClass",z(3,rG,s.isRowMatchModeSelected(e.value))),ne("tabindex",0===n?"0":null),a(1),S(e.label)}}function aG(t,i){if(1&t){const e=I();l(0,"ul",15),_(1,oG,2,5,"li",16),k(2,"li",17),l(3,"li",18),C("click",function(){return v(e),d(2).onRowClearItemClick()})("keydown",function(s){return v(e),d(2).onRowMatchModeKeyDown(s)})("keydown.enter",function(){return v(e),d(2).onRowClearItemClick()}),g(4),c()()}if(2&t){const e=d(2);a(1),p("ngForOf",e.matchModes),a(3),S(e.noFilterLabel)}}function lG(t,i){if(1&t){const e=I();l(0,"div",27)(1,"p-dropdown",28),C("ngModelChange",function(s){return v(e),d(3).onOperatorChange(s)}),c()()}if(2&t){const e=d(3);a(1),p("options",e.operatorOptions)("ngModel",e.operator)}}function cG(t,i){if(1&t){const e=I();l(0,"p-dropdown",33),C("ngModelChange",function(s){v(e);const r=d().$implicit;return d(3).onMenuMatchModeChange(s,r)}),c()}if(2&t){const e=d().$implicit;p("options",d(3).matchModes)("ngModel",e.matchMode)}}function uG(t,i){if(1&t){const e=I();l(0,"button",34),C("click",function(){v(e);const s=d().$implicit;return d(3).removeConstraint(s)}),c()}2&t&&p("label",d(4).removeRuleButtonLabel)}function dG(t,i){if(1&t&&(l(0,"div",29),_(1,cG,1,2,"p-dropdown",30),k(2,"p-columnFilterFormElement",31),l(3,"div"),_(4,uG,1,1,"button",32),c()()),2&t){const e=i.$implicit,n=d(3);a(1),p("ngIf",n.showMatchModes&&n.matchModes),a(1),p("type",n.type)("field",n.field)("filterConstraint",e)("filterTemplate",n.filterTemplate)("placeholder",n.placeholder)("minFractionDigits",n.minFractionDigits)("maxFractionDigits",n.maxFractionDigits)("prefix",n.prefix)("suffix",n.suffix)("locale",n.locale)("localeMatcher",n.localeMatcher)("currency",n.currency)("currencyDisplay",n.currencyDisplay)("useGrouping",n.useGrouping),a(2),p("ngIf",n.showRemoveIcon)}}function pG(t,i){if(1&t){const e=I();l(0,"div",35)(1,"button",36),C("click",function(){return v(e),d(3).addConstraint()}),c()()}if(2&t){const e=d(3);a(1),p("label",e.addRuleButtonLabel)}}function hG(t,i){if(1&t){const e=I();l(0,"button",37),C("click",function(){return v(e),d(3).clearFilter()}),c()}2&t&&p("label",d(3).clearButtonLabel)}function mG(t,i){if(1&t){const e=I();l(0,"button",38),C("click",function(){return v(e),d(3).applyFilter()}),c()}2&t&&p("label",d(3).applyButtonLabel)}function fG(t,i){if(1&t&&(_(0,lG,2,2,"div",20),l(1,"div",21),_(2,dG,5,16,"div",22),c(),_(3,pG,2,1,"div",23),l(4,"div",24),_(5,hG,1,1,"button",25),_(6,mG,1,1,"button",26),c()),2&t){const e=d(2);p("ngIf",e.isShowOperator),a(2),p("ngForOf",e.fieldConstraints),a(1),p("ngIf",e.isShowAddConstraint),a(2),p("ngIf",e.showClearButton),a(1),p("ngIf",e.showApplyButton)}}function gG(t,i){1&t&&Y(0)}const _G=function(t){return{"p-column-filter-overlay p-component p-fluid":!0,"p-column-filter-overlay-menu":t}};function bG(t,i){if(1&t){const e=I();l(0,"div",11),C("click",function(){return v(e),d().onContentClick()})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)})("keydown.escape",function(){return v(e),d().onEscape()}),_(1,sG,1,0,"ng-container",12),_(2,aG,5,2,"ul",13),_(3,fG,7,5,"ng-template",null,14,we),_(5,gG,1,0,"ng-container",12),c()}if(2&t){const e=F(4),n=d();p("ngClass",z(8,_G,"menu"===n.display))("@overlayAnimation","visible"),a(1),p("ngTemplateOutlet",n.headerTemplate)("ngTemplateOutletContext",z(10,Zs,n.field)),a(1),p("ngIf","row"===n.display)("ngIfElse",e),a(3),p("ngTemplateOutlet",n.footerTemplate)("ngTemplateOutletContext",z(12,Zs,n.field))}}const vG=function(t,i){return{"p-column-filter-row":t,"p-column-filter-menu":i}};let vd=(()=>{class t{constructor(){this.sortSource=new ct,this.selectionSource=new ct,this.contextMenuSource=new ct,this.valueSource=new ct,this.totalRecordsSource=new ct,this.columnsSource=new ct,this.resetSource=new ct,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable(),this.resetSource$=this.resetSource.asObservable()}onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onResetChange(){this.resetSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),xn=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.zone=n,this.tableService=s,this.cd=r,this.filterService=o,this.overlayService=u,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectAllChange=new H,this.selectionChange=new H,this.contextMenuSelectionChange=new H,this.contextMenuSelectionMode="separate",this.rowTrackBy=(h,b)=>b,this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.editingRowKeys={},this.rowExpandMode="multiple",this.scrollDirection="vertical",this.virtualScrollDelay=250,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.showLoader=!0,this.showInitialSortBadge=!0,this.stateStorage="session",this.editMode="cell",this.groupRowsByOrder=1,this.responsiveLayout="stack",this.breakpoint="960px",this.onRowSelect=new H,this.onRowUnselect=new H,this.onPage=new H,this.onSort=new H,this.onFilter=new H,this.onLazyLoad=new H,this.onRowExpand=new H,this.onRowCollapse=new H,this.onContextMenuSelect=new H,this.onColResize=new H,this.onColReorder=new H,this.onRowReorder=new H,this.onEditInit=new H,this.onEditComplete=new H,this.onEditCancel=new H,this.onHeaderCheckboxToggle=new H,this.sortFunction=new H,this.firstChange=new H,this.rowsChange=new H,this.onStateSave=new H,this.onStateRestore=new H,this._value=[],this._totalRecords=0,this._first=0,this.selectionKeys={},this._sortOrder=1,this._selectAll=null,this.columnResizing=!1,this.rowGroupHeaderStyleObject={},this.id=pl(),this.virtualScrollInitialized=!1}ngOnInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),"stack"===this.responsiveLayout&&!this.scrollable&&this.createResponsiveStyle(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"rowexpansion":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"rowspan":this.rowspanTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenrows":this.frozenRowsTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenrowexpansion":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template}})}ngAfterViewInit(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths(),this.scrollable&&this.virtualScroll&&(this.virtualScrollSubscription=this.virtualScrollBody.renderedRangeStream.subscribe(e=>{this.tableHeaderViewChild.nativeElement.style.top=e.start*this.virtualRowHeight*-1+"px"}))}ngOnChanges(e){e.value&&(this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&(this.sortField||this.groupRowsBy)?this.sortSingle():"multiple"==this.sortMode&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,"multiple"===this.sortMode&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}get dataToRender(){let e=this.filteredValue||this.value;return e?this.paginator&&!this.lazy?e.slice(this.first,this.first+this.rows):e:[]}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Z.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Z.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows}),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let n=e.originalEvent;if("single"===this.sortMode&&(this._sortOrder=this.sortField===e.field?-1*this.sortOrder:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),"multiple"===this.sortMode){let s=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?s?r.order=-1*r.order:(this._multiSortMeta=[{field:e.field,order:-1*r.order}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!s||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,n=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField)return this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],void this.sortMultiple();if(e&&n){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:n}):(this.value.sort((r,o)=>{let u=Z.resolveFieldData(r,e),h=Z.resolveFieldData(o,e),b=null;return b=null==u&&null!=h?-1:null!=u&&null==h?1:null==u&&null==h?0:"string"==typeof u&&"string"==typeof h?u.localeCompare(h):uh?1:0,n*b}),this._value=[...this.value]),this.hasFilter()&&this._filter());let s={field:e,order:n};this.onSort.emit(s),this.tableService.onSort(s)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,n)=>this.multisortField(e,n,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,n,s,r){let o=Z.resolveFieldData(e,s[r].field),u=Z.resolveFieldData(n,s[r].field),h=null;if(null==o&&null!=u)h=-1;else if(null!=o&&null==u)h=1;else if(null==o&&null==u)h=0;else if("string"==typeof o||o instanceof String){if(o.localeCompare&&o!=u)return s[r].order*o.localeCompare(u)}else h=or?this.multisortField(e,n,s,r+1):0:s[r].order*h}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(let n=0;nR!=M),this.selectionChange.emit(this.selection),y&&delete this.selectionKeys[y]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row"})}else this.isSingleSelectionMode()?(this._selection=o,this.selectionChange.emit(o),y&&(this.selectionKeys={},this.selectionKeys[y]=1)):this.isMultipleSelectionMode()&&(w?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,o],this.selectionChange.emit(this.selection),y&&(this.selectionKeys[y]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u})}else if("single"===this.selectionMode)h?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u})):(this._selection=o,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&(this.selectionKeys={},this.selectionKeys[y]=1));else if("multiple"===this.selectionMode)if(h){let w=this.findIndexInSelection(o);this._selection=this.selection.filter((M,E)=>E!=w),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&delete this.selectionKeys[y]}else this._selection=this.selection?[...this.selection,o]:[o],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&(this.selectionKeys[y]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){const n=e.rowData,s=e.rowIndex;if("separate"===this.contextMenuSelectionMode)this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:n,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(n);else if("joint"===this.contextMenuSelectionMode){this.preventSelectionSetterPropagation=!0;let r=this.isSelected(n),o=this.dataKey?String(Z.resolveFieldData(n,this.dataKey)):null;if(!r){if(!this.isRowSelectable(n,s))return;this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n),o&&(this.selectionKeys={},this.selectionKeys[o]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),o&&(this.selectionKeys[o]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:n,index:e.rowIndex})}}}selectRange(e,n){let s,r;this.anchorRowIndex>n?(s=n,r=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(n=this.anchorRowIndex,s=this.rangeRowIndex):this.rangeRowIndexy!=u);let h=this.dataKey?String(Z.resolveFieldData(o,this.dataKey)):null;h&&delete this.selectionKeys[h],this.onRowUnselect.emit({originalEvent:e,data:o,type:"row"})}}isSelected(e){return!(!e||!this.selection)&&(this.dataKey?void 0!==this.selectionKeys[Z.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length)for(let s=0;sh!=o),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox(e,n){if(null!==this._selectAll)this.selectAllChange.emit({originalEvent:e,checked:n});else{const s=this.selectionPageOnly?this.dataToRender:this.filteredValue||this.value||[];let r=this.selectionPageOnly&&this._selection?this._selection.filter(o=>!s.some(u=>this.equals(o,u))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...s]:[...r,...s],r=this.rowSelectable?r.filter((o,u)=>this.rowSelectable({data:o,index:u})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n}),this.isStateful()&&this.saveState()}}equals(e,n){return"equals"===this.compareSelectionBy?e===n:Z.equals(e,n,this.dataKey)}filter(e,n,s){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:s},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,n){this.filter(e,"global",n)}isFilterBlank(e){return null==e||"string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(this.hasFilter()){let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let n=0;n{s+="\n";for(let y=0;y{let n=Math.floor(e/this.rows),s=0===n?0:(n-1)*this.rows,r=0===n?2*this.rows:3*this.rows;n!==this.virtualPage&&(this.virtualPage=n,this.lazyLoadOnInit||this.virtualScrollInitialized?this.onLazyLoad.emit({first:s,rows:r,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta}):this.virtualScrollInitialized=!0)},this.virtualScrollDelay))}scrollTo(e){this.virtualScrollBody?this.virtualScrollBody.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,n,s,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=s,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&0===L.find(this.editingCell,".ng-invalid.ng-dirty").length}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(L.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))}unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null)}initRowEdit(e){let n=String(Z.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(0===L.find(n,".ng-invalid.ng-dirty").length){let s=String(Z.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[s]}}cancelRowEdit(e){let n=String(Z.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[n]}toggleRow(e,n){if(!this.dataKey)throw new Error("dataKey must be defined to use row expansion");let s=String(Z.resolveFieldData(e,this.dataKey));null!=this.expandedRowKeys[s]?(delete this.expandedRowKeys[s],this.onRowCollapse.emit({originalEvent:n,data:e})):("single"===this.rowExpandMode&&(this.expandedRowKeys={}),this.expandedRowKeys[s]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return!0===this.expandedRowKeys[String(Z.resolveFieldData(e,this.dataKey))]}isRowEditing(e){return!0===this.editingRowKeys[String(Z.resolveFieldData(e,this.dataKey))]}isSingleSelectionMode(){return"single"===this.selectionMode}isMultipleSelectionMode(){return"multiple"===this.selectionMode}onColumnResizeBegin(e){let n=L.getOffset(this.containerViewChild.nativeElement).left;this.resizeColumnElement=e.target.parentElement,this.columnResizing=!0,this.lastResizerHelperX=e.pageX-n+this.containerViewChild.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let n=L.getOffset(this.containerViewChild.nativeElement).left;L.addClass(this.containerViewChild.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-n+this.containerViewChild.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,s=this.resizeColumnElement.offsetWidth+e;if(s>=(this.resizeColumnElement.style.minWidth||15)){if("fit"===this.columnResizeMode){let u=this.resizeColumnElement.nextElementSibling.offsetWidth-e;s>15&&u>15&&this.resizeTableCells(s,u)}else if("expand"===this.columnResizeMode){let o=this.tableViewChild.nativeElement.offsetWidth+e;this.tableViewChild.nativeElement.style.width=o+"px",this.tableViewChild.nativeElement.style.minWidth=o+"px",this.resizeTableCells(s,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",L.removeClass(this.containerViewChild.nativeElement,"p-unselectable-text")}resizeTableCells(e,n){let s=L.index(this.resizeColumnElement),r=[];const o=L.findSingle(this.containerViewChild.nativeElement,".p-datatable-thead");L.find(o,"tr > th").forEach(b=>r.push(L.getOuterWidth(b))),this.destroyStyleElement(),this.createStyleElement();let h="";r.forEach((b,y)=>{let w=y===s?e:n&&y===s+1?n:b;h+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${y+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${y+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${y+1}) {\n ${this.scrollable?`flex: 1 1 ${w}px !important`:`width: ${w}px !important`}\n }\n `}),this.styleElement.innerHTML=h}onColumnDragStart(e,n){this.reorderIconWidth=L.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=L.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let s=L.getOffset(this.containerViewChild.nativeElement),r=L.getOffset(n);if(this.draggedColumn!=n){let o=L.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),u=L.indexWithinGroup(n,"preorderablecolumn"),h=r.left-s.left,y=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-s.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-s.top+n.offsetHeight+"px",e.pageX>y?(this.reorderIndicatorUpViewChild.nativeElement.style.left=h+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=h+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=h-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=h-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),u-o==1&&-1===this.dropPosition||u-o==-1&&1===this.dropPosition?(this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none"):(this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block")}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,n){if(e.preventDefault(),this.draggedColumn){let s=L.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=L.indexWithinGroup(n,"preorderablecolumn"),o=s!=r;o&&(r-s==1&&-1===this.dropPosition||s-r==1&&1===this.dropPosition)&&(o=!1),o&&rs&&-1===this.dropPosition&&(r-=1),o&&(Z.reorderArray(this.columns,s,r),this.onColReorder.emit({dragIndex:s,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,s){if(this.rowDragging&&this.draggedRowIndex!==n){let r=L.getOffset(s).top+L.getWindowScrollTop(),o=e.pageY,u=r+L.getOuterHeight(s)/2,h=s.previousElementSibling;othis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1;Z.reorderArray(this.value,this.draggedRowIndex,s),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:s})}this.onRowDragLeave(e,n),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}isStateful(){return null!=this.stateKey}saveState(){const e=this.getStorage();let n={};this.paginator&&(n.first=this.first,n.rows=this.rows),this.sortField&&(n.sortField=this.sortField,n.sortOrder=this.sortOrder),this.multiSortMeta&&(n.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(n.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(n),this.reorderableColumns&&this.saveColumnOrder(n),this.selection&&(n.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(n.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(n)),this.onStateSave.emit(n)}clearState(){const e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){const n=this.getStorage().getItem(this.stateKey),s=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;if(n){let o=JSON.parse(n,function(o,u){return"string"==typeof u&&s.test(u)?new Date(u):u});this.paginator&&(void 0!==this.first&&(this.first=o.first,this.firstChange.emit(this.first)),void 0!==this.rows&&(this.rows=o.rows,this.rowsChange.emit(this.rows))),o.sortField&&(this.restoringSort=!0,this._sortField=o.sortField,this._sortOrder=o.sortOrder),o.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=o.multiSortMeta),o.filters&&(this.restoringFilter=!0,this.filters=o.filters),this.resizableColumns&&(this.columnWidthsState=o.columnWidths,this.tableWidthState=o.tableWidth),o.expandedRowKeys&&(this.expandedRowKeys=o.expandedRowKeys),o.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(o.selection)),this.stateRestored=!0,this.onStateRestore.emit(o)}}saveColumnWidths(e){let n=[];L.find(this.containerViewChild.nativeElement,".p-datatable-thead > tr > th").forEach(r=>n.push(L.getOuterWidth(r))),e.columnWidths=n.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=L.getOuterWidth(this.tableViewChild.nativeElement)+"px")}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState&&(this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.tableViewChild.nativeElement.style.minWidth=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState),Z.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((s,r)=>{n+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${r+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${r+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${r+1}) {\n ${this.scrollable?`flex: 1 1 ${s}px !important`:`width: ${s}px !important`}\n }\n `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(s=>{n.push(s.field||s.key)}),e.columnOrder=n}}restoreColumnOrder(){const n=this.getStorage().getItem(this.stateKey);if(n){let r=JSON.parse(n).columnOrder;if(r){let o=[];r.map(u=>{let h=this.findColumnByKey(u);h&&o.push(h)}),this.columnOrderStateRestored=!0,this.columns=o}}}findColumnByKey(e){if(!this.columns)return null;for(let n of this.columns)if(n.key===e||n.field===e)return n}createStyleElement(){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.head.appendChild(this.responsiveStyleElement),this.responsiveStyleElement.innerHTML=`\n@media screen and (max-width: ${this.breakpoint}) {\n #${this.id} .p-datatable-thead > tr > th,\n #${this.id} .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n #${this.id} .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n #${this.id} .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n #${this.id}.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n #${this.id} .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n`)}destroyResponsiveStyle(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.virtualScrollInitialized=null,this.virtualScrollSubscription&&this.virtualScrollSubscription.unsubscribe(),this.destroyStyleElement(),this.destroyResponsiveStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(vd),x(ot),x(hl),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-table"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Mq,5),j(kq,5),j(Iq,5),j(Eq,5),j(Rq,5),j(Lq,5),j(Oq,5),j(Po,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.resizeHelperViewChild=s.first),V(s=B())&&(n.reorderIndicatorUpViewChild=s.first),V(s=B())&&(n.reorderIndicatorDownViewChild=s.first),V(s=B())&&(n.wrapperViewChild=s.first),V(s=B())&&(n.tableViewChild=s.first),V(s=B())&&(n.tableHeaderViewChild=s.first),V(s=B())&&(n.virtualScrollBody=s.first)}},hostAttrs:[1,"p-element"],inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:"paginator",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:"alwaysShowPaginator",paginatorPosition:"paginatorPosition",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",defaultSortOrder:"defaultSortOrder",sortMode:"sortMode",resetPageOnSort:"resetPageOnSort",selectionMode:"selectionMode",selectionPageOnly:"selectionPageOnly",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:"metaKeySelection",rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:"lazy",lazyLoadOnInit:"lazyLoadOnInit",compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:"filterDelay",filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:"scrollable",scrollDirection:"scrollDirection",rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:"virtualScroll",virtualScrollDelay:"virtualScrollDelay",virtualRowHeight:"virtualRowHeight",frozenWidth:"frozenWidth",responsive:"responsive",contextMenu:"contextMenu",resizableColumns:"resizableColumns",columnResizeMode:"columnResizeMode",reorderableColumns:"reorderableColumns",loading:"loading",loadingIcon:"loadingIcon",showLoader:"showLoader",rowHover:"rowHover",customSort:"customSort",showInitialSortBadge:"showInitialSortBadge",autoLayout:"autoLayout",exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",groupRowsByOrder:"groupRowsByOrder",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx",responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{selectAllChange:"selectAllChange",selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},features:[Ne([vd]),mn],decls:14,vars:33,consts:[[3,"ngStyle","ngClass"],["container",""],["class","p-datatable-loading-overlay p-component-overlay",4,"ngIf"],["class","p-datatable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],[1,"p-datatable-wrapper",3,"ngStyle"],["wrapper",""],["role","table","class","p-datatable-table",3,"ngClass","ngStyle",4,"ngIf"],["tabindex","0","class","p-datatable-virtual-scrollable-body",3,"itemSize","height","minBufferPx","maxBufferPx","scrolledIndexChange",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],["class","p-datatable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","pi pi-arrow-down p-datatable-reorder-indicator-up","style","display:none",4,"ngIf"],["class","pi pi-arrow-up p-datatable-reorder-indicator-down","style","display:none",4,"ngIf"],[1,"p-datatable-loading-overlay","p-component-overlay"],[1,"p-datatable-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],["role","table",1,"p-datatable-table",3,"ngClass","ngStyle"],["table",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datatable-thead"],["class","p-datatable-tbody p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],[1,"p-datatable-tbody",3,"value","pTableBody","pTableBodyTemplate"],["class","p-datatable-tfoot",4,"ngIf"],[1,"p-datatable-tbody","p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],[1,"p-datatable-tfoot"],["tabindex","0",1,"p-datatable-virtual-scrollable-body",3,"itemSize","minBufferPx","maxBufferPx","scrolledIndexChange"],["tableHeader",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],[1,"p-datatable-footer"],[1,"p-column-resizer-helper",2,"display","none"],["resizeHelper",""],[1,"pi","pi-arrow-down","p-datatable-reorder-indicator-up",2,"display","none"],["reorderIndicatorUp",""],[1,"pi","pi-arrow-up","p-datatable-reorder-indicator-down",2,"display","none"],["reorderIndicatorDown",""]],template:function(e,n){1&e&&(l(0,"div",0,1),_(2,Aq,2,2,"div",2),_(3,Fq,2,1,"div",3),_(4,Nq,1,17,"p-paginator",4),l(5,"div",5,6),_(7,Gq,8,16,"table",7),_(8,Qq,10,21,"cdk-virtual-scroll-viewport",8),c(),_(9,Jq,1,17,"p-paginator",9),_(10,Zq,2,1,"div",10),_(11,Xq,2,0,"div",11),_(12,eU,2,0,"span",12),_(13,tU,2,0,"span",13),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Hh(16,nU,[n.rowHover||n.selectionMode,n.autoLayout,n.resizableColumns,n.resizableColumns&&"fit"===n.columnResizeMode,n.scrollable,n.scrollable&&"vertical"===n.scrollDirection,n.scrollable&&"horizontal"===n.scrollDirection,n.scrollable&&"both"===n.scrollDirection,n.scrollable&&"flex"===n.scrollHeight,"stack"===n.responsiveLayout,"scroll"===n.responsiveLayout,n.responsive,null!=n.headerGroupedTemplate,null!=n.footerGroupedTemplate])),ne("id",n.id),a(2),p("ngIf",n.loading&&n.showLoader),a(1),p("ngIf",n.captionTemplate),a(1),p("ngIf",n.paginator&&("top"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngStyle",z(31,iU,n.scrollHeight)),a(2),p("ngIf",!n.virtualScroll),a(1),p("ngIf",n.virtualScroll),a(1),p("ngIf",n.paginator&&("bottom"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngIf",n.summaryTemplate),a(1),p("ngIf",n.resizableColumns),a(1),p("ngIf",n.reorderableColumns),a(1),p("ngIf",n.reorderableColumns))},directives:function(){return[ET,CG,Po,lt,Oe,Q,Lt,Qf]},styles:[".p-datatable{position:relative}.p-datatable table{border-collapse:collapse;min-width:100%;table-layout:fixed}.p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-datatable .p-sortable-column .p-column-title,.p-datatable .p-sortable-column .p-sortable-column-icon,.p-datatable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-datatable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-datatable-auto-layout>.p-datatable-wrapper{overflow-x:auto}.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper{overflow-x:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper>table,.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-hoverable-rows .p-selectable-row{cursor:pointer}.p-datatable-scrollable .p-datatable-wrapper{position:relative;overflow:auto}.p-datatable-scrollable .p-datatable-thead,.p-datatable-scrollable .p-datatable-tbody,.p-datatable-scrollable .p-datatable-tfoot{display:block}.p-datatable-scrollable .p-datatable-thead>tr,.p-datatable-scrollable .p-datatable-tbody>tr,.p-datatable-scrollable .p-datatable-tfoot>tr{display:flex;flex-wrap:nowrap;width:100%}.p-datatable-scrollable .p-datatable-thead>tr>th,.p-datatable-scrollable .p-datatable-tbody>tr>td,.p-datatable-scrollable .p-datatable-tfoot>tr>td{display:flex;flex:1 1 0;align-items:center}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-virtual-scrollable-body>.cdk-virtual-scroll-content-wrapper>.p-datatable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-frozen-tbody{position:sticky;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot{position:sticky;bottom:0;z-index:1}.p-datatable-scrollable .p-frozen-column{position:sticky;background:inherit}.p-datatable-scrollable th.p-frozen-column{z-index:1}.p-datatable-scrollable-both .p-datatable-thead>tr>th,.p-datatable-scrollable-both .p-datatable-tbody>tr>td,.p-datatable-scrollable-both .p-datatable-tfoot>tr>td,.p-datatable-scrollable-horizontal .p-datatable-thead>tr>th .p-datatable-scrollable-horizontal .p-datatable-tbody>tr>td,.p-datatable-scrollable-horizontal .p-datatable-tfoot>tr>td{flex:0 0 auto}.p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.p-datatable-flex-scrollable .p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-scrollable .p-rowgroup-header{position:sticky;z-index:1}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr{display:table-row}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr>th,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr>td{display:table-cell}.p-datatable-flex-scrollable{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-flex-scrollable .p-datatable-virtual-scrollable-body{flex:1}.p-datatable-resizable>.p-datatable-wrapper{overflow-x:auto}.p-datatable-resizable .p-datatable-thead>tr>th,.p-datatable-resizable .p-datatable-tfoot>tr>td,.p-datatable-resizable .p-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.p-datatable-resizable .p-resizable-column:not(.p-frozen-column){background-clip:padding-box;position:relative}.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-datatable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-datatable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-datatable .p-row-editor-init,.p-datatable .p-row-editor-save,.p-datatable .p-row-editor-cancel,.p-datatable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable-reorder-indicator-up,.p-datatable-reorder-indicator-down{position:absolute;display:none}.p-datatable-reorderablerow-handle,[pReorderableColumn]{cursor:move}.p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-column-filter-row{display:flex;align-items:center;width:100%}.p-column-filter-menu{display:inline-flex}.p-column-filter-row p-columnfilterformelement{flex:1 1 auto;width:1%}.p-column-filter-menu-button,.p-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.p-column-filter-overlay{position:absolute;top:0;left:0}.p-column-filter-row-items{margin:0;padding:0;list-style:none}.p-column-filter-row-item{cursor:pointer}.p-column-filter-add-button,.p-column-filter-remove-button{justify-content:center}.p-column-filter-add-button .p-button-label,.p-column-filter-remove-button .p-button-label{flex-grow:0}.p-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between}.p-column-filter-buttonbar .p-button{width:auto}.p-datatable .p-datatable-tbody>tr>td>.p-column-title{display:none}cdk-virtual-scroll-viewport{outline:0 none}\n"],encapsulation:2}),t})(),CG=(()=>{class t{constructor(e,n,s,r){this.dt=e,this.tableService=n,this.cd=s,this.el=r,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}shouldRenderRowGroupHeader(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s-1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}shouldRenderRowGroupFooter(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s+1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}shouldRenderRowspan(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s-1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}calculateRowGroupSize(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=r,u=0;for(;r===o;){u++;let h=e[++s];if(!h)break;o=Z.resolveFieldData(h,this.dt.groupRowsBy)}return 1===u?null:u}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=L.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=L.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(vd),x(ot),x(Re))},t.\u0275cmp=G({type:t,selectors:[["","pTableBody",""]],hostAttrs:[1,"p-element"],inputs:{columns:["pTableBody","columns"],template:["pTableBodyTemplate","template"],value:"value",frozen:"frozen",frozenRows:"frozenRows"},attrs:sU,decls:6,vars:6,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"]],template:function(e,n){1&e&&(_(0,fU,2,2,"ng-container",0),_(1,bU,2,3,"ng-container",0),_(2,kU,2,2,"ng-container",0),_(3,OU,2,2,"ng-container",0),_(4,PU,2,5,"ng-container",0),_(5,NU,2,5,"ng-container",0)),2&e&&(p("ngIf",!n.dt.expandedRowTemplate&&!n.dt.virtualScroll),a(1),p("ngIf",!n.dt.expandedRowTemplate&&n.dt.virtualScroll),a(1),p("ngIf",n.dt.expandedRowTemplate&&!(n.frozen&&n.dt.frozenExpandedRowTemplate)),a(1),p("ngIf",n.dt.frozenExpandedRowTemplate&&n.frozen),a(1),p("ngIf",n.dt.loading),a(1),p("ngIf",n.dt.isEmpty()&&!n.dt.loading))},directives:[Q,at,Lt,Jf],encapsulation:2}),t})(),yG=(()=>{class t{constructor(e){this.dt=e}get getFrozenRowGroupHeaderStickyPosition(){return this.dt.rowGroupHeaderStyleObject?this.dt.rowGroupHeaderStyleObject.top:""}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275dir=le({type:t,selectors:[["","pRowGroupHeader",""]],hostAttrs:[1,"p-rowgroup-header","p-element"],hostVars:2,hostBindings:function(e,n){2&e&&Hn("top",n.getFrozenRowGroupHeaderStickyPosition)}}),t})(),Cd=(()=>{class t{constructor(e){this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(n=>{this.updateSortState()}))}ngOnInit(){this.isEnabled()&&this.updateSortState()}updateSortState(){this.sorted=this.dt.isSorted(this.field),this.sortOrder=this.sorted?1===this.dt.sortOrder?"ascending":"descending":"none"}onClick(e){this.isEnabled()&&!this.isFilterElement(e.target)&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),L.clearSelection())}onEnterKey(e){this.onClick(e)}isEnabled(){return!0!==this.pSortableColumnDisabled}isFilterElement(e){return L.hasClass(e,"pi-filter-icon")||L.hasClass(e,"p-column-filter-menu-button")}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275dir=le({type:t,selectors:[["","pSortableColumn",""]],hostAttrs:[1,"p-element"],hostVars:7,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("keydown.enter",function(r){return n.onEnterKey(r)}),2&e&&(ne("tabindex",n.isEnabled()?"0":null)("role","columnheader")("aria-sort",n.sortOrder),ii("p-sortable-column",n.isEnabled())("p-highlight",n.sorted))},inputs:{field:["pSortableColumn","field"],pSortableColumnDisabled:"pSortableColumnDisabled"}}),t})(),yd=(()=>{class t{constructor(e,n){this.dt=e,this.cd=n,this.subscription=this.dt.tableService.sortSource$.subscribe(s=>{this.updateSortState()})}ngOnInit(){this.updateSortState()}onClick(e){e.preventDefault()}updateSortState(){if("single"===this.dt.sortMode)this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if("multiple"===this.dt.sortMode){let e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}this.cd.markForCheck()}getMultiSortMetaIndex(){let e=this.dt._multiSortMeta,n=-1;if(e&&"multiple"===this.dt.sortMode&&(this.dt.showInitialSortBadge||e.length>1))for(let s=0;s-1?e:e+1}isMultiSorted(){return"multiple"===this.dt.sortMode&&this.getMultiSortMetaIndex()>-1}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-sortIcon"]],hostAttrs:[1,"p-element"],inputs:{field:"field"},decls:2,vars:6,consts:[[1,"p-sortable-column-icon","pi","pi-fw",3,"ngClass"],["class","p-sortable-column-badge",4,"ngIf"],[1,"p-sortable-column-badge"]],template:function(e,n){1&e&&(k(0,"i",0),_(1,VU,2,1,"span",1)),2&e&&(p("ngClass",Rt(2,BU,1===n.sortOrder,-1===n.sortOrder,0===n.sortOrder)),a(1),p("ngIf",n.isMultiSorted()))},directives:[Oe,Q],encapsulation:2,changeDetection:0}),t})(),wG=(()=>{class t{constructor(e,n){this.dt=e,this.tableService=n,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.selected=this.dt.isSelected(this.data)}))}ngOnInit(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))}onClick(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onTouchEnd(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)}onArrowDownKeyDown(e){if(!this.isEnabled())return;const s=this.findNextSelectableRow(e.currentTarget);s&&s.focus(),e.preventDefault()}onArrowUpKeyDown(e){if(!this.isEnabled())return;const s=this.findPrevSelectableRow(e.currentTarget);s&&s.focus(),e.preventDefault()}onEnterKeyDown(e){!this.isEnabled()||this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onPageDownKeyDown(){this.dt.virtualScroll&&this.dt.virtualScrollBody.elementRef.nativeElement.focus()}onSpaceKeydown(){this.dt.virtualScroll&&!this.dt.editingCell&&this.dt.virtualScrollBody.elementRef.nativeElement.focus()}findNextSelectableRow(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-selectable-row")?n:this.findNextSelectableRow(n):null}findPrevSelectableRow(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-selectable-row")?n:this.findPrevSelectableRow(n):null}isEnabled(){return!0!==this.pSelectableRowDisabled}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(vd))},t.\u0275dir=le({type:t,selectors:[["","pSelectableRow",""]],hostAttrs:[1,"p-element"],hostVars:5,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("touchend",function(r){return n.onTouchEnd(r)})("keydown.arrowdown",function(r){return n.onArrowDownKeyDown(r)})("keydown.arrowup",function(r){return n.onArrowUpKeyDown(r)})("keydown.enter",function(r){return n.onEnterKeyDown(r)})("keydown.shift.enter",function(r){return n.onEnterKeyDown(r)})("keydown.meta.enter",function(r){return n.onEnterKeyDown(r)})("keydown.pagedown",function(){return n.onPageDownKeyDown()})("keydown.pageup",function(){return n.onPageDownKeyDown()})("keydown.home",function(){return n.onPageDownKeyDown()})("keydown.end",function(){return n.onPageDownKeyDown()})("keydown.space",function(){return n.onSpaceKeydown()}),2&e&&(ne("tabindex",n.isEnabled()?0:void 0),ii("p-selectable-row",n.isEnabled())("p-highlight",n.selected))},inputs:{data:["pSelectableRow","data"],index:["pSelectableRowIndex","index"],pSelectableRowDisabled:"pSelectableRowDisabled"}}),t})(),z2=(()=>{class t{constructor(e,n,s){this.dt=e,this.el=n,this.zone=s}ngAfterViewInit(){this.isEnabled()&&L.addClass(this.el.nativeElement,"p-editable-column")}onClick(e){if(this.isEnabled())if(this.dt.selfClick=!0,this.dt.editingCell){if(this.dt.editingCell!==this.el.nativeElement){if(!this.dt.isEditingCellValid())return;this.closeEditingCell(!0,e),this.openCell()}}else this.openCell()}openCell(){this.dt.updateEditingCell(this.el.nativeElement,this.data,this.field,this.rowIndex),L.addClass(this.el.nativeElement,"p-cell-editing"),this.dt.onEditInit.emit({field:this.field,data:this.data,index:this.rowIndex}),this.zone.runOutsideAngular(()=>{setTimeout(()=>{let n=L.findSingle(this.el.nativeElement,this.pFocusCellSelector||"input, textarea, select");n&&n.focus()},50)}),this.overlayEventListener=e=>{this.el&&this.el.nativeElement.contains(e.target)&&(this.dt.selfClick=!0)},this.dt.overlaySubscription=this.dt.overlayService.clickObservable.subscribe(this.overlayEventListener)}closeEditingCell(e,n){e?this.dt.onEditComplete.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:n,index:this.dt.editingCellRowIndex}):this.dt.onEditCancel.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:n,index:this.dt.editingCellRowIndex}),L.removeClass(this.dt.editingCell,"p-cell-editing"),this.dt.editingCell=null,this.dt.editingCellData=null,this.dt.editingCellField=null,this.dt.unbindDocumentEditListener(),this.dt.overlaySubscription&&this.dt.overlaySubscription.unsubscribe()}onEnterKeyDown(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),e.preventDefault())}onEscapeKeyDown(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!1,e),e.preventDefault())}onShiftKeyDown(e){this.isEnabled()&&(e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e))}onArrowDown(e){if(this.isEnabled()){let n=this.findCell(e.target);if(n){let s=L.index(n),r=this.findNextEditableColumnByIndex(n,s);r&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(r,"click")),e.preventDefault()}}}onArrowUp(e){if(this.isEnabled()){let n=this.findCell(e.target);if(n){let s=L.index(n),r=this.findPrevEditableColumnByIndex(n,s);r&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(r,"click")),e.preventDefault()}}}onArrowLeft(e){this.isEnabled()&&this.moveToPreviousCell(e)}onArrowRight(e){this.isEnabled()&&this.moveToNextCell(e)}findCell(e){if(e){let n=e;for(;n&&!L.hasClass(n,"p-cell-editing");)n=n.parentElement;return n}return null}moveToPreviousCell(e){let n=this.findCell(e.target);if(n){let s=this.findPreviousEditableColumn(n);s&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(s,"click"),e.preventDefault())}}moveToNextCell(e){let n=this.findCell(e.target);if(n){let s=this.findNextEditableColumn(n);s&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(s,"click"),e.preventDefault())}}findPreviousEditableColumn(e){let n=e.previousElementSibling;if(!n){let s=e.parentElement.previousElementSibling;s&&(n=s.lastElementChild)}return n?L.hasClass(n,"p-editable-column")?n:this.findPreviousEditableColumn(n):null}findNextEditableColumn(e){let n=e.nextElementSibling;if(!n){let s=e.parentElement.nextElementSibling;s&&(n=s.firstElementChild)}return n?L.hasClass(n,"p-editable-column")?n:this.findNextEditableColumn(n):null}findNextEditableColumnByIndex(e,n){let s=e.parentElement.nextElementSibling;if(s){let r=s.children[n];return r&&L.hasClass(r,"p-editable-column")?r:null}return null}findPrevEditableColumnByIndex(e,n){let s=e.parentElement.previousElementSibling;if(s){let r=s.children[n];return r&&L.hasClass(r,"p-editable-column")?r:null}return null}isEnabled(){return!0!==this.pEditableColumnDisabled}ngOnDestroy(){this.dt.overlaySubscription&&this.dt.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(Re),x(nt))},t.\u0275dir=le({type:t,selectors:[["","pEditableColumn",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("keydown.enter",function(r){return n.onEnterKeyDown(r)})("keydown.escape",function(r){return n.onEscapeKeyDown(r)})("keydown.tab",function(r){return n.onShiftKeyDown(r)})("keydown.shift.tab",function(r){return n.onShiftKeyDown(r)})("keydown.meta.tab",function(r){return n.onShiftKeyDown(r)})("keydown.arrowdown",function(r){return n.onArrowDown(r)})("keydown.arrowup",function(r){return n.onArrowUp(r)})("keydown.arrowleft",function(r){return n.onArrowLeft(r)})("keydown.arrowright",function(r){return n.onArrowRight(r)})},inputs:{data:["pEditableColumn","data"],field:["pEditableColumnField","field"],rowIndex:["pEditableColumnRowIndex","rowIndex"],pEditableColumnDisabled:"pEditableColumnDisabled",pFocusCellSelector:"pFocusCellSelector"}}),t})(),TG=(()=>{class t{constructor(e){this.el=e}isEnabled(){return!0!==this.pEditableRowDisabled}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pEditableRow",""]],hostAttrs:[1,"p-element"],inputs:{data:["pEditableRow","data"],pEditableRowDisabled:"pEditableRowDisabled"}}),t})(),SG=(()=>{class t{constructor(e,n,s){this.dt=e,this.editableColumn=n,this.editableRow=s}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"input":this.inputTemplate=e.template;break;case"output":this.outputTemplate=e.template}})}get editing(){return this.dt.editingCell&&this.editableColumn&&this.dt.editingCell===this.editableColumn.el.nativeElement||this.editableRow&&"row"===this.dt.editMode&&this.dt.isRowEditing(this.editableRow.data)}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(z2,8),x(TG,8))},t.\u0275cmp=G({type:t,selectors:[["p-cellEditor"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(e,n){1&e&&(_(0,qU,2,1,"ng-container",0),_(1,GU,2,1,"ng-container",0)),2&e&&(p("ngIf",n.editing),a(1),p("ngIf",!n.editing))},directives:[Q,Lt],encapsulation:2}),t})(),xG=(()=>{class t{constructor(e){this.dt=e,this.useGrouping=!0}ngOnInit(){this.filterCallback=e=>{this.filterConstraint.value=e,this.dt._filter()}}onModelChange(e){this.filterConstraint.value=e,("boolean"===this.type||""===e)&&this.dt._filter()}onTextInputEnterKeyDown(e){this.dt._filter(),e.preventDefault()}onNumericInputKeyDown(e){"Enter"===e.key&&(this.dt._filter(),e.preventDefault())}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275cmp=G({type:t,selectors:[["p-columnFilterFormElement"]],hostAttrs:[1,"p-element"],inputs:{field:"field",type:"type",filterConstraint:"filterConstraint",filterTemplate:"filterTemplate",placeholder:"placeholder",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["builtInElement",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["type","text","pInputText","",3,"value","input","keydown.enter",4,"ngSwitchCase"],[3,"ngModel","showButtons","minFractionDigits","maxFractionDigits","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping","ngModelChange","onKeyDown",4,"ngSwitchCase"],[3,"ngModel","ngModelChange",4,"ngSwitchCase"],[3,"placeholder","ngModel","ngModelChange",4,"ngSwitchCase"],["type","text","pInputText","",3,"value","input","keydown.enter"],[3,"ngModel","showButtons","minFractionDigits","maxFractionDigits","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping","ngModelChange","onKeyDown"],[3,"ngModel","ngModelChange"],[3,"placeholder","ngModel","ngModelChange"]],template:function(e,n){if(1&e&&(_(0,$U,2,5,"ng-container",0),_(1,YU,5,5,"ng-template",null,1,we)),2&e){const s=F(2);p("ngIf",n.filterTemplate)("ngIfElse",s)}},directives:[dt,q2,xr,Q,Lt,gr,Ja,DT,Te,_e],encapsulation:2}),t})(),vg=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.dt=n,this.renderer=s,this.config=r,this.overlayService=o,this.type="text",this.display="row",this.showMenu=!0,this.operator=ml.AND,this.showOperator=!0,this.showClearButton=!0,this.showApplyButton=!0,this.showMatchModes=!0,this.showAddButton=!0,this.hideOnClear=!1,this.maxConstraints=2,this.useGrouping=!0}ngOnInit(){this.dt.filters[this.field]||this.initFieldFilterConstraint(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.generateMatchModeOptions(),this.generateOperatorOptions()}),this.resetSubscription=this.dt.tableService.resetSource$.subscribe(()=>{this.initFieldFilterConstraint()}),this.generateMatchModeOptions(),this.generateOperatorOptions()}generateMatchModeOptions(){var e;this.matchModes=this.matchModeOptions||(null===(e=this.config.filterMatchModeOptions[this.type])||void 0===e?void 0:e.map(n=>({label:this.config.getTranslation(n),value:n})))}generateOperatorOptions(){this.operatorOptions=[{label:this.config.getTranslation(Ft.MATCH_ALL),value:ml.AND},{label:this.config.getTranslation(Ft.MATCH_ANY),value:ml.OR}]}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"filter":default:this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}initFieldFilterConstraint(){let e=this.getDefaultMatchMode();this.dt.filters[this.field]="row"==this.display?{value:null,matchMode:e}:[{value:null,matchMode:e,operator:this.operator}]}onMenuMatchModeChange(e,n){n.matchMode=e,this.showApplyButton||this.dt._filter()}onRowMatchModeChange(e){this.dt.filters[this.field].matchMode=e,this.dt._filter(),this.hide()}onRowMatchModeKeyDown(e){let n=e.target;switch(e.key){case"ArrowDown":var s=this.findNextItem(n);s&&(n.removeAttribute("tabindex"),s.tabIndex="0",s.focus()),e.preventDefault();break;case"ArrowUp":var r=this.findPrevItem(n);r&&(n.removeAttribute("tabindex"),r.tabIndex="0",r.focus()),e.preventDefault()}}onRowClearItemClick(){this.clearFilter(),this.hide()}isRowMatchModeSelected(e){return this.dt.filters[this.field].matchMode===e}addConstraint(){this.dt.filters[this.field].push({value:null,matchMode:this.getDefaultMatchMode(),operator:this.getDefaultOperator()}),this.dt._filter()}removeConstraint(e){this.dt.filters[this.field]=this.dt.filters[this.field].filter(n=>n!==e),this.dt._filter()}onOperatorChange(e){this.dt.filters[this.field].forEach(n=>{n.operator=e,this.operator=e}),this.showApplyButton||this.dt._filter()}toggleMenu(){this.overlayVisible=!this.overlayVisible}onToggleButtonKeyDown(e){switch(e.key){case"Escape":case"Tab":this.overlayVisible=!1;break;case"ArrowDown":if(this.overlayVisible){let n=L.getFocusableElements(this.overlay);n&&n[0].focus(),e.preventDefault()}else e.altKey&&(this.overlayVisible=!0,e.preventDefault())}}onEscape(){this.overlayVisible=!1,this.icon.nativeElement.focus()}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-column-filter-separator")?this.findNextItem(n):n:e.parentElement.firstElementChild}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-column-filter-separator")?this.findPrevItem(n):n:e.parentElement.lastElementChild}onContentClick(){this.selfClick=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,document.body.appendChild(this.overlay),gt.set("overlay",this.overlay,this.config.zIndex.overlay),L.absolutePosition(this.overlay,this.icon.nativeElement),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.overlayEventListener=n=>{this.overlay&&this.overlay.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener);break;case"void":this.onOverlayHide(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}getDefaultMatchMode(){return this.matchMode?this.matchMode:"text"===this.type?_t.STARTS_WITH:"numeric"===this.type?_t.EQUALS:"date"===this.type?_t.DATE_IS:_t.CONTAINS}getDefaultOperator(){return this.dt.filters?this.dt.filters[this.field][0].operator:this.operator}hasRowFilter(){return this.dt.filters[this.field]&&!this.dt.isFilterBlank(this.dt.filters[this.field].value)}get fieldConstraints(){return this.dt.filters?this.dt.filters[this.field]:null}get showRemoveIcon(){return!!this.fieldConstraints&&this.fieldConstraints.length>1}get showMenuButton(){return this.showMenu&&("row"!==this.display||"boolean"!==this.type)}get isShowOperator(){return this.showOperator&&"boolean"!==this.type}get isShowAddConstraint(){return this.showAddButton&&"boolean"!==this.type&&this.fieldConstraints&&this.fieldConstraints.length{this.overlayVisible&&!this.selfClick&&this.isOutsideClicked(n)&&this.hide(),this.selfClick=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}bindDocumentResizeListener(){this.documentResizeListener=()=>this.hide(),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.icon.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}hide(){this.overlayVisible=!1}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}clearFilter(){this.initFieldFilterConstraint(),this.dt._filter(),this.hideOnClear&&this.hide()}applyFilter(){this.dt._filter(),this.hide()}ngOnDestroy(){this.overlay&&(this.el.nativeElement.appendChild(this.overlay),gt.clear(this.overlay),this.onOverlayHide()),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.resetSubscription&&this.resetSubscription.unsubscribe(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(xn),x(wn),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-columnFilter"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(ZU,5),2&e){let s;V(s=B())&&(n.icon=s.first)}},hostAttrs:[1,"p-element"],inputs:{field:"field",type:"type",display:"display",showMenu:"showMenu",matchMode:"matchMode",operator:"operator",showOperator:"showOperator",showClearButton:"showClearButton",showApplyButton:"showApplyButton",showMatchModes:"showMatchModes",showAddButton:"showAddButton",hideOnClear:"hideOnClear",placeholder:"placeholder",matchModeOptions:"matchModeOptions",maxConstraints:"maxConstraints",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping"},decls:5,vars:8,consts:[[1,"p-column-filter",3,"ngClass"],["class","p-fluid",3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping",4,"ngIf"],["type","button","class","p-column-filter-menu-button p-link","aria-haspopup","true",3,"ngClass","click","keydown",4,"ngIf"],["type","button","class","p-column-filter-clear-button p-link",3,"ngClass","click",4,"ngIf"],[3,"ngClass","click","keydown.escape",4,"ngIf"],[1,"p-fluid",3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping"],["type","button","aria-haspopup","true",1,"p-column-filter-menu-button","p-link",3,"ngClass","click","keydown"],["icon",""],[1,"pi","pi-filter-icon","pi-filter"],["type","button",1,"p-column-filter-clear-button","p-link",3,"ngClass","click"],[1,"pi","pi-filter-slash"],[3,"ngClass","click","keydown.escape"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-column-filter-row-items",4,"ngIf","ngIfElse"],["menu",""],[1,"p-column-filter-row-items"],["class","p-column-filter-row-item",3,"ngClass","click","keydown","keydown.enter",4,"ngFor","ngForOf"],[1,"p-column-filter-separator"],[1,"p-column-filter-row-item",3,"click","keydown","keydown.enter"],[1,"p-column-filter-row-item",3,"ngClass","click","keydown","keydown.enter"],["class","p-column-filter-operator",4,"ngIf"],[1,"p-column-filter-constraints"],["class","p-column-filter-constraint",4,"ngFor","ngForOf"],["class","p-column-filter-add-rule",4,"ngIf"],[1,"p-column-filter-buttonbar"],["type","button","pButton","","class","p-button-outlined p-button-sm","pRipple","",3,"label","click",4,"ngIf"],["type","button","pButton","","class","p-button-sm","pRipple","",3,"label","click",4,"ngIf"],[1,"p-column-filter-operator"],["styleClass","p-column-filter-operator-dropdown",3,"options","ngModel","ngModelChange"],[1,"p-column-filter-constraint"],["styleClass","p-column-filter-matchmode-dropdown",3,"options","ngModel","ngModelChange",4,"ngIf"],[3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping"],["type","button","pButton","","icon","pi pi-trash","class","p-column-filter-remove-button p-button-text p-button-danger p-button-sm","pRipple","",3,"label","click",4,"ngIf"],["styleClass","p-column-filter-matchmode-dropdown",3,"options","ngModel","ngModelChange"],["type","button","pButton","","icon","pi pi-trash","pRipple","",1,"p-column-filter-remove-button","p-button-text","p-button-danger","p-button-sm",3,"label","click"],[1,"p-column-filter-add-rule"],["type","button","pButton","","icon","pi pi-plus","pRipple","",1,"p-column-filter-add-button","p-button-text","p-button-sm",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-outlined","p-button-sm",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-sm",3,"label","click"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,XU,1,14,"p-columnFilterFormElement",1),_(2,tG,3,5,"button",2),_(3,iG,3,3,"button",3),_(4,bG,6,14,"div",4),c()),2&e&&(p("ngClass",We(5,vG,"row"===n.display,"menu"===n.display)),a(1),p("ngIf","row"===n.display),a(1),p("ngIf",n.showMenuButton),a(1),p("ngIf",n.showClearButton&&"row"===n.display),a(1),p("ngIf",n.showMenu&&n.overlayVisible))},directives:[xG,Vt,Oe,Q,Lt,at,Te,_e,Ln],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt(".12s cubic-bezier(0, 0, 0.2, 1)")]),Ot(":leave",[kt(".1s linear",it({opacity:0}))])])]}}),t})(),DG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,RT,MT,Yu,Fo,Du,gl,Cq,cT,Zu,Dq],Nt,Fo]}),t})();const j2=["container"],MG=function(t,i,e,n){return{"pi-info-circle":t,"pi-exclamation-triangle":i,"pi-times-circle":e,"pi-check":n}};function kG(t,i){if(1&t&&(ce(0),k(1,"span",6),l(2,"div",7)(3,"div",8),g(4),c(),l(5,"div",9),g(6),c()(),ue()),2&t){const e=d();a(1),me("p-toast-message-icon pi"+(e.message.icon?" "+e.message.icon:"")),p("ngClass",_i(5,MG,"info"==e.message.severity,"warn"==e.message.severity,"error"==e.message.severity,"success"==e.message.severity)),a(3),S(e.message.summary),a(2),S(e.message.detail)}}function IG(t,i){1&t&&Y(0)}function EG(t,i){if(1&t){const e=I();l(0,"button",10),C("click",function(s){return v(e),d().onCloseIconClick(s)})("keydown.enter",function(s){return v(e),d().onCloseIconClick(s)}),k(1,"span",11),c()}}const RG=function(t){return[t,"p-toast-message"]},LG=function(t,i,e,n){return{showTransformParams:t,hideTransformParams:i,showTransitionParams:e,hideTransitionParams:n}},OG=function(t){return{value:"visible",params:t}},AG=function(t){return{$implicit:t}};function PG(t,i){if(1&t){const e=I();l(0,"p-toastItem",3),C("onClose",function(s){return v(e),d().onMessageClose(s)})("@toastAnimation.start",function(s){return v(e),d().onAnimationStart(s)})("@toastAnimation.done",function(s){return v(e),d().onAnimationEnd(s)}),c()}if(2&t){const e=i.$implicit,n=i.index,s=d();p("message",e)("index",n)("template",s.template)("@toastAnimation",void 0)("showTransformOptions",s.showTransformOptions)("hideTransformOptions",s.hideTransformOptions)("showTransitionOptions",s.showTransitionOptions)("hideTransitionOptions",s.hideTransitionOptions)}}let FG=(()=>{class t{constructor(e){this.zone=e,this.onClose=new H}ngAfterViewInit(){this.initTimeout()}initTimeout(){this.message.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick(e){this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),e.preventDefault()}ngOnDestroy(){this.clearTimeout()}}return t.\u0275fac=function(e){return new(e||t)(x(nt))},t.\u0275cmp=G({type:t,selectors:[["p-toastItem"]],viewQuery:function(e,n){if(1&e&&j(j2,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{message:"message",index:"index",template:"template",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},decls:6,vars:21,consts:[[3,"ngClass","mouseenter","mouseleave"],["container",""],["role","alert","aria-live","assertive","aria-atomic","true",1,"p-toast-message-content",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","class","p-toast-icon-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],[3,"ngClass"],[1,"p-toast-message-text"],[1,"p-toast-summary"],[1,"p-toast-detail"],["type","button","pRipple","",1,"p-toast-icon-close","p-link",3,"click","keydown.enter"],[1,"p-toast-icon-close-icon","pi","pi-times"]],template:function(e,n){1&e&&(l(0,"div",0,1),C("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()}),l(2,"div",2),_(3,kG,7,10,"ng-container",3),_(4,IG,1,0,"ng-container",4),_(5,EG,2,0,"button",5),c()()),2&e&&(me(n.message.styleClass),p("ngClass",z(10,RG,"p-toast-message-"+n.message.severity))("@messageState",z(17,OG,_i(12,LG,n.showTransformOptions,n.hideTransformOptions,n.showTransitionOptions,n.hideTransitionOptions))),ne("id",n.message.id),a(2),p("ngClass",n.message.contentStyleClass),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(19,AG,n.message)),a(1),p("ngIf",!1!==n.message.closable))},directives:[Oe,Q,Lt,vt],encapsulation:2,data:{animation:[wi("messageState",[Cs("visible",it({transform:"translateY(0)",opacity:1})),Ot("void => *",[it({transform:"{{showTransformParams}}",opacity:0}),kt("{{showTransitionParams}}")]),Ot("* => void",[kt("{{hideTransitionParams}}",it({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0}),t})(),wd=(()=>{class t{constructor(e,n,s){this.messageService=e,this.cd=n,this.config=s,this.autoZIndex=!0,this.baseZIndex=0,this.position="top-right",this.preventOpenDuplicates=!1,this.preventDuplicates=!1,this.showTransformOptions="translateY(100%)",this.hideTransformOptions="translateY(-100%)",this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="250ms ease-in",this.onClose=new H,this.id=pl()}ngOnInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e)if(e instanceof Array){const n=e.filter(s=>this.canAdd(s));this.add(n)}else this.canAdd(e)&&this.add([e])}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}ngAfterViewInit(){this.breakpoints&&this.createStyle()}add(e){this.messages=this.messages?[...this.messages,...e]:[...e],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...e]:[...e]),this.cd.markForCheck()}canAdd(e){let n=this.key===e.key;return n&&this.preventOpenDuplicates&&(n=!this.containsMessage(this.messages,e)),n&&this.preventDuplicates&&(n=!this.containsMessage(this.messagesArchieve,e)),n}containsMessage(e,n){return!!e&&null!=e.find(s=>s.summary===n.summary&&s.detail==n.detail&&s.severity===n.severity)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.template=e.template})}onMessageClose(e){this.messages.splice(e.index,1),this.onClose.emit({message:e.message}),this.cd.detectChanges()}onAnimationStart(e){"void"===e.fromState&&(this.containerViewChild.nativeElement.setAttribute(this.id,""),this.autoZIndex&>.set("modal",this.containerViewChild.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(e){"void"===e.toState&&this.autoZIndex&&Z.isEmpty(this.messages)&>.clear(this.containerViewChild.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let n in this.breakpoints){let s="";for(let r in this.breakpoints[n])s+=r+":"+this.breakpoints[n][r]+" !important;";e+=`\n @media screen and (max-width: ${n}) {\n .p-toast[${this.id}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&>.clear(this.containerViewChild.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(ys),x(ot),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-toast"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(j2,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{key:"key",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",style:"style",styleClass:"styleClass",position:"position",preventOpenDuplicates:"preventOpenDuplicates",preventDuplicates:"preventDuplicates",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},decls:3,vars:5,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose"]],template:function(e,n){1&e&&(l(0,"div",0,1),_(2,PG,1,8,"p-toastItem",2),c()),2&e&&(me(n.styleClass),p("ngClass","p-toast p-component p-toast-"+n.position)("ngStyle",n.style),a(2),p("ngForOf",n.messages))},directives:[FG,Oe,lt,at],styles:[".p-toast{position:fixed;width:25rem}.p-toast-message{overflow:hidden}.p-toast-message-content{display:flex;align-items:flex-start}.p-toast-message-text{flex:1 1 auto}.p-toast-top-right{top:20px;right:20px}.p-toast-top-left{top:20px;left:20px}.p-toast-bottom-left{bottom:20px;left:20px}.p-toast-bottom-right{bottom:20px;right:20px}.p-toast-top-center{top:20px;left:50%;transform:translate(-50%)}.p-toast-bottom-center{bottom:20px;left:50%;transform:translate(-50%)}.p-toast-center{left:50%;top:50%;min-width:20vw;transform:translate(-50%,-50%)}.p-toast-icon-close{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-toast-icon-close.p-link{cursor:pointer}\n"],encapsulation:2,data:{animation:[wi("toastAnimation",[Ot(":enter, :leave",[UA("@*",qA())])])]},changeDetection:0}),t})(),NG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn],Nt]}),t})(),HG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const qG=["rb"],UG=function(t,i,e){return{"p-radiobutton-label":!0,"p-radiobutton-label-active":t,"p-disabled":i,"p-radiobutton-label-focus":e}};function GG(t,i){if(1&t){const e=I();l(0,"label",4),C("click",function(s){return v(e),d().select(s)}),g(1),c()}if(2&t){const e=d(),n=F(3);me(e.labelStyleClass),p("ngClass",Rt(5,UG,n.checked,e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const zG=function(t,i,e){return{"p-radiobutton p-component":!0,"p-radiobutton-checked":t,"p-radiobutton-disabled":i,"p-radiobutton-focused":e}},jG=function(t,i,e){return{"p-radiobutton-box":!0,"p-highlight":t,"p-disabled":i,"p-focus":e}},$G={provide:dn,useExisting:Ue(()=>Td),multi:!0};let WG=(()=>{class t{constructor(){this.accessors=[]}add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return!!e[0].control&&e[0].control.root===n.control.control.root&&e[1].name===n.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Td=(()=>{class t{constructor(e,n,s){this.cd=e,this.injector=n,this.registry=s,this.onClick=new H,this.onFocus=new H,this.onBlur=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}ngOnInit(){this.control=this.injector.get(is),this.checkName(),this.registry.add(this.control,this)}handleClick(e,n,s){e.preventDefault(),!this.disabled&&(this.select(e),s&&n.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit(e))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}onChange(e){this.select(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}return t.\u0275fac=function(e){return new(e||t)(x(ot),x(In),x(WG))},t.\u0275cmp=G({type:t,selectors:[["p-radioButton"]],viewQuery:function(e,n){if(1&e&&j(qG,5),2&e){let s;V(s=B())&&(n.inputViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Ne([$G])],decls:7,vars:23,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","change","focus","blur"],["rb",""],[3,"ngClass","click"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("change",function(o){return n.onChange(o)})("focus",function(o){return n.onInputFocus(o)})("blur",function(o){return n.onInputBlur(o)}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.handleClick(o,u,!0)}),k(5,"span",5),c()(),_(6,GG,2,9,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Rt(15,zG,n.checked,n.disabled,n.focused)),a(2),p("checked",n.checked)("disabled",n.disabled),ne("id",n.inputId)("name",n.name)("value",n.value)("tabindex",n.tabindex)("aria-checked",n.checked)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledBy),a(2),p("ngClass",Rt(19,jG,n.checked,n.disabled,n.focused)),a(2),p("ngIf",n.label))},directives:[lt,Oe,Q],encapsulation:2,changeDetection:0}),t})(),KG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function QG(t,i){if(1&t&&(l(0,"div",5),g(1),c()),2&t){const e=d(2);Hn("display",null!=e.value&&0!==e.value?"flex":"none"),a(1),$e("",e.value,"",e.unit,"")}}function JG(t,i){if(1&t&&(l(0,"div",3),_(1,QG,2,4,"div",4),c()),2&t){const e=d();Hn("width",e.value+"%"),a(1),p("ngIf",e.showValue)}}function YG(t,i){1&t&&(l(0,"div",6),k(1,"div",7),c())}const ZG=function(t,i){return{"p-progressbar p-component":!0,"p-progressbar-determinate":t,"p-progressbar-indeterminate":i}};let XG=(()=>{class t{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,JG,2,3,"div",1),_(2,YG,2,0,"div",2),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",We(7,ZG,"determinate"===n.mode,"indeterminate"===n.mode)),ne("aria-valuenow",n.value),a(1),p("ngIf","determinate"===n.mode),a(1),p("ngIf","indeterminate"===n.mode))},directives:[lt,Oe,Q],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const tz=["container"],nz=["content"],iz=["xBar"],sz=["yBar"];function rz(t,i){1&t&&Y(0)}const oz=["*"];let az=(()=>{class t{constructor(e,n,s){this.el=e,this.zone=n,this.cd=s,this.timeoutFrame=r=>setTimeout(r,0)}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{this.moveBar(),this.moveBar=this.moveBar.bind(this),this.onXBarMouseDown=this.onXBarMouseDown.bind(this),this.onYBarMouseDown=this.onYBarMouseDown.bind(this),this.onDocumentMouseMove=this.onDocumentMouseMove.bind(this),this.onDocumentMouseUp=this.onDocumentMouseUp.bind(this),window.addEventListener("resize",this.moveBar),this.contentViewChild.nativeElement.addEventListener("scroll",this.moveBar),this.contentViewChild.nativeElement.addEventListener("mouseenter",this.moveBar),this.xBarViewChild.nativeElement.addEventListener("mousedown",this.onXBarMouseDown),this.yBarViewChild.nativeElement.addEventListener("mousedown",this.onYBarMouseDown),this.calculateContainerHeight(),this.initialized=!0})}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}calculateContainerHeight(){let e=this.containerViewChild.nativeElement,n=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,r=getComputedStyle(e),o=getComputedStyle(s),u=L.getHeight(e)-parseInt(o.height,10);"none"!=r["max-height"]&&0==u&&(e.style.height=n.offsetHeight+parseInt(o.height,10)>parseInt(r["max-height"],10)?r["max-height"]:n.offsetHeight+parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth)+"px")}moveBar(){let e=this.containerViewChild.nativeElement,n=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,r=n.scrollWidth,o=n.clientWidth,u=-1*(e.clientHeight-s.clientHeight);this.scrollXRatio=o/r;let h=this.yBarViewChild.nativeElement,b=n.scrollHeight,y=n.clientHeight,w=-1*(e.clientWidth-h.clientWidth);this.scrollYRatio=y/b,this.requestAnimationFrame(()=>{if(this.scrollXRatio>=1)L.addClass(s,"p-scrollpanel-hidden");else{L.removeClass(s,"p-scrollpanel-hidden");const M=Math.max(100*this.scrollXRatio,10);s.style.cssText="width:"+M+"%; left:"+n.scrollLeft*(100-M)/(r-o)+"%;bottom:"+u+"px;"}if(this.scrollYRatio>=1)L.addClass(h,"p-scrollpanel-hidden");else{L.removeClass(h,"p-scrollpanel-hidden");const M=Math.max(100*this.scrollYRatio,10);h.style.cssText="height:"+M+"%; top: calc("+n.scrollTop*(100-M)/(b-y)+"% - "+s.clientHeight+"px);right:"+w+"px;"}}),this.cd.markForCheck()}onYBarMouseDown(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,L.addClass(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}onXBarMouseDown(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,L.addClass(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}onDocumentMouseMove(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}onMouseMoveForXBar(e){let n=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollLeft+=n/this.scrollXRatio})}onMouseMoveForYBar(e){let n=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollTop+=n/this.scrollYRatio})}scrollTop(e){let n=this.contentViewChild.nativeElement.scrollHeight-this.contentViewChild.nativeElement.clientHeight;this.contentViewChild.nativeElement.scrollTop=e=e>n?n:e>0?e:0}onDocumentMouseUp(e){L.removeClass(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.removeClass(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}requestAnimationFrame(e){(window.requestAnimationFrame||this.timeoutFrame)(e)}ngOnDestroy(){this.initialized&&(window.removeEventListener("resize",this.moveBar),this.contentViewChild.nativeElement.removeEventListener("scroll",this.moveBar),this.contentViewChild.nativeElement.removeEventListener("mouseenter",this.moveBar),this.xBarViewChild.nativeElement.removeEventListener("mousedown",this.onXBarMouseDown),this.yBarViewChild.nativeElement.removeEventListener("mousedown",this.onYBarMouseDown))}refresh(){this.moveBar()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-scrollPanel"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(tz,5),j(nz,5),j(iz,5),j(sz,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.contentViewChild=s.first),V(s=B())&&(n.xBarViewChild=s.first),V(s=B())&&(n.yBarViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass"},ngContentSelectors:oz,decls:11,vars:5,consts:[[3,"ngClass","ngStyle"],["container",""],[1,"p-scrollpanel-wrapper"],[1,"p-scrollpanel-content"],["content",""],[4,"ngTemplateOutlet"],[1,"p-scrollpanel-bar","p-scrollpanel-bar-x"],["xBar",""],[1,"p-scrollpanel-bar","p-scrollpanel-bar-y"],["yBar",""]],template:function(e,n){1&e&&(yn(),l(0,"div",0,1)(2,"div",2)(3,"div",3,4),St(5),_(6,rz,1,0,"ng-container",5),c()(),k(7,"div",6,7)(9,"div",8,9),c()),2&e&&(me(n.styleClass),p("ngClass","p-scrollpanel p-component")("ngStyle",n.style),a(6),p("ngTemplateOutlet",n.contentTemplate))},directives:[Oe,lt,Lt],styles:[".p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;z-index:1;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;z-index:2;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;user-select:none}\n"],encapsulation:2,changeDetection:0}),t})(),lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const cz=["content"],uz=["navbar"],dz=["inkbar"],pz=["prevBtn"],hz=["nextBtn"];function mz(t,i){if(1&t){const e=I();l(0,"button",11,12),C("click",function(){return v(e),d().navBackward()}),k(2,"span",13),c()}}function fz(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function gz(t,i){if(1&t&&(l(0,"span",24),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function _z(t,i){1&t&&k(0,"span",25),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function bz(t,i){if(1&t&&(ce(0),_(1,fz,1,2,"span",20),_(2,gz,2,1,"span",21),_(3,_z,1,1,"ng-template",null,22,we),ue()),2&t){const e=F(4),n=d(2).$implicit;a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function vz(t,i){1&t&&Y(0)}const $2=function(t,i){return{$implicit:t,index:i}};function Cz(t,i){if(1&t){const e=I();l(0,"a",17),C("click",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)})("keydown.enter",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)}),_(1,bz,5,3,"ng-container",18),_(2,vz,1,0,"ng-container",19),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d();p("target",n.target),ne("href",n.url,Xt)("tabindex",n.disabled?null:"0")("title",n.title)("id",n.id),a(1),p("ngIf",!r.itemTemplate),a(1),p("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(8,$2,n,s))}}function yz(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function wz(t,i){if(1&t&&(l(0,"span",24),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function Tz(t,i){1&t&&k(0,"span",25),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function Sz(t,i){if(1&t&&(ce(0),_(1,yz,1,2,"span",20),_(2,wz,2,1,"span",21),_(3,Tz,1,1,"ng-template",null,27,we),ue()),2&t){const e=F(4),n=d(2).$implicit;a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function xz(t,i){1&t&&Y(0)}const Dz=function(){return{exact:!1}};function Mz(t,i){if(1&t){const e=I();l(0,"a",26),C("click",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)})("keydown.enter",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)}),_(1,Sz,5,3,"ng-container",18),_(2,xz,1,0,"ng-container",19),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d();p("routerLink",n.routerLink)("queryParams",n.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.routerLinkActiveOptions||A(17,Dz))("target",n.target)("fragment",n.fragment)("queryParamsHandling",n.queryParamsHandling)("preserveFragment",n.preserveFragment)("skipLocationChange",n.skipLocationChange)("replaceUrl",n.replaceUrl)("state",n.state),ne("tabindex",n.disabled?null:"0")("title",n.title)("id",n.id),a(1),p("ngIf",!r.itemTemplate),a(1),p("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(18,$2,n,s))}}const kz=function(t,i,e){return{"p-tabmenuitem":!0,"p-disabled":t,"p-highlight":i,"p-hidden":e}};function Iz(t,i){if(1&t&&(l(0,"li",14),_(1,Cz,3,11,"a",15),_(2,Mz,3,21,"a",16),c()),2&t){const e=i.$implicit,n=d();me(e.styleClass),p("ngStyle",e.style)("ngClass",Rt(9,kz,e.disabled,n.isActive(e),!1===e.visible))("tooltipOptions",e.tooltipOptions),ne("aria-selected",n.isActive(e))("aria-expanded",n.isActive(e)),a(1),p("ngIf",!e.routerLink),a(1),p("ngIf",e.routerLink)}}function Ez(t,i){if(1&t){const e=I();l(0,"button",28,29),C("click",function(){return v(e),d().navForward()}),k(2,"span",30),c()}}const Rz=function(t){return{"p-tabmenu p-component":!0,"p-tabmenu-scrollable":t}};let W2=(()=>{class t{constructor(e,n,s){this.router=e,this.route=n,this.cd=s,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.itemTemplate=e.template})}ngAfterViewInit(){this.updateInkBar()}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}isActive(e){if(e.routerLink){let n=Array.isArray(e.routerLink)?e.routerLink:[e.routerLink];return this.router.isActive(this.router.createUrlTree(n,{relativeTo:this.route}).toString(),!1)}return e===this.activeItem}itemClick(e,n){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),this.activeItem=n,this.tabChanged=!0)}updateInkBar(){let e=L.findSingle(this.navbar.nativeElement,"li.p-highlight");e&&(this.inkbar.nativeElement.style.width=L.getWidth(e)+"px",this.inkbar.nativeElement.style.left=L.getOffset(e).left-L.getOffset(this.navbar.nativeElement).left+"px")}getVisibleButtonWidths(){var e,n;return[null===(e=this.prevBtn)||void 0===e?void 0:e.nativeElement,null===(n=this.nextBtn)||void 0===n?void 0:n.nativeElement].reduce((s,r)=>r?s+L.getWidth(r):s,0)}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:n,scrollWidth:s}=e,r=L.getWidth(e);this.backwardIsDisabled=0===n,this.forwardIsDisabled=parseInt(n)===s-r}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}navBackward(){const e=this.content.nativeElement,n=L.getWidth(e)-this.getVisibleButtonWidths(),s=e.scrollLeft-n;e.scrollLeft=s<=0?0:s}navForward(){const e=this.content.nativeElement,n=L.getWidth(e)-this.getVisibleButtonWidths(),s=e.scrollLeft+n,r=e.scrollWidth-n;e.scrollLeft=s>=r?r:s}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-tabMenu"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(cz,5),j(uz,5),j(dz,5),j(pz,5),j(hz,5)),2&e){let s;V(s=B())&&(n.content=s.first),V(s=B())&&(n.navbar=s.first),V(s=B())&&(n.inkbar=s.first),V(s=B())&&(n.prevBtn=s.first),V(s=B())&&(n.nextBtn=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",activeItem:"activeItem",scrollable:"scrollable",popup:"popup",style:"style",styleClass:"styleClass"},decls:11,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabmenu-nav-container"],["class","p-tabmenu-nav-prev p-tabmenu-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabmenu-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabmenu-nav","p-reset"],["navbar",""],["role","tab","pTooltip","",3,"ngStyle","class","ngClass","tooltipOptions",4,"ngFor","ngForOf"],[1,"p-tabmenu-ink-bar"],["inkbar",""],["class","p-tabmenu-nav-next p-tabmenu-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],["type","button","pRipple","",1,"p-tabmenu-nav-prev","p-tabmenu-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","tab","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],["class","p-menuitem-link","role","presentation","pRipple","",3,"target","click","keydown.enter",4,"ngIf"],["role","presentation","class","p-menuitem-link","pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","click","keydown.enter",4,"ngIf"],["role","presentation","pRipple","",1,"p-menuitem-link",3,"target","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-menuitem-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],["role","presentation","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","click","keydown.enter"],["htmlRouteLabel",""],["type","button","pRipple","",1,"p-tabmenu-nav-next","p-tabmenu-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1),_(2,mz,3,0,"button",2),l(3,"div",3,4),C("scroll",function(r){return n.onScroll(r)}),l(5,"ul",5,6),_(7,Iz,3,13,"li",7),k(8,"li",8,9),c()(),_(10,Ez,3,0,"button",10),c()()),2&e&&(me(n.styleClass),p("ngClass",z(7,Rz,n.scrollable))("ngStyle",n.style),a(2),p("ngIf",n.scrollable&&!n.backwardIsDisabled),a(5),p("ngForOf",n.model),a(3),p("ngIf",n.scrollable&&!n.forwardIsDisabled))},directives:[Oe,lt,Q,vt,at,Jt,Lt,Ho,gd],styles:[".p-tabmenu-nav-container{position:relative}.p-tabmenu-scrollable .p-tabmenu-nav-container{overflow:hidden}.p-tabmenu-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabmenu-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabmenu-nav-prev{left:0}.p-tabmenu-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabmenu-nav{display:flex;margin:0;padding:0;list-style-type:none;flex-wrap:nowrap}.p-tabmenu-nav a{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabmenu-nav a:focus{z-index:1}.p-tabmenu-nav .p-menuitem-text{line-height:1;white-space:nowrap}.p-tabmenu-ink-bar{display:none;z-index:1}.p-tabmenu-nav-content::-webkit-scrollbar{display:none}\n"],encapsulation:2,changeDetection:0}),t})(),Lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,Nt,gn,ai],On,Nt,ai]}),t})();function Oz(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d();a(1),S(e.label)}}function Az(t,i){1&t&&Y(0)}const K2=function(t){return{height:t}},Pz=function(t,i){return{"p-highlight":t,"p-disabled":i}},Fz=function(t){return{"p-highlight":t}},Q2=function(t){return{"pi pi-check":t}},Rl=function(t){return{$implicit:t}},Nz=["container"],Vz=["filterInput"],Bz=["in"];function Hz(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),S(e.valuesAsString||"empty")}}function qz(t,i){if(1&t){const e=I();l(0,"span",18),C("click",function(s){v(e);const r=d().$implicit;return d(3).removeChip(r,s)}),c()}}function Uz(t,i){if(1&t&&(l(0,"div",14,15)(2,"span",16),g(3),c(),_(4,qz,1,0,"span",17),c()),2&t){const e=i.$implicit,n=d(3);a(3),S(n.findLabelByValue(e)),a(1),p("ngIf",!n.disabled)}}function Gz(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),S(e.placeholder||e.defaultLabel||"empty")}}function zz(t,i){if(1&t&&(ce(0),_(1,Uz,5,2,"div",13),_(2,Gz,2,1,"ng-container",7),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.value),a(1),p("ngIf",!e.value||0===e.value.length)}}function jz(t,i){if(1&t&&(ce(0),_(1,Hz,2,1,"ng-container",7),_(2,zz,3,2,"ng-container",7),ue()),2&t){const e=d();a(1),p("ngIf","comma"===e.display),a(1),p("ngIf","chip"===e.display)}}function $z(t,i){1&t&&Y(0)}function Wz(t,i){if(1&t){const e=I();l(0,"i",19),C("click",function(s){return v(e),d().clear(s)}),c()}}function Kz(t,i){1&t&&Y(0)}const Qz=function(t){return{"p-checkbox-disabled":t}},Jz=function(t,i,e){return{"p-highlight":t,"p-focus":i,"p-disabled":e}};function Yz(t,i){if(1&t){const e=I();l(0,"div",32)(1,"div",2)(2,"input",33),C("focus",function(){return v(e),d(3).onHeaderCheckboxFocus()})("blur",function(){return v(e),d(3).onHeaderCheckboxBlur()})("keydown.space",function(s){return v(e),d(3).toggleAll(s)}),c()(),l(3,"div",34),C("click",function(s){return v(e),d(3).toggleAll(s)}),k(4,"span",35),c()()}if(2&t){const e=d(3);p("ngClass",z(6,Qz,e.disabled||e.toggleAllDisabled)),a(2),p("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),a(1),p("ngClass",Rt(8,Jz,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),ne("aria-checked",e.allChecked),a(1),p("ngClass",z(12,Q2,e.allChecked))}}function Zz(t,i){if(1&t){const e=I();l(0,"div",36)(1,"input",37,38),C("input",function(s){return v(e),d(3).onFilterInputChange(s)}),c(),k(3,"span",39),c()}if(2&t){const e=d(3);a(1),p("value",e.filterValue||"")("disabled",e.disabled),ne("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function Xz(t,i){if(1&t){const e=I();l(0,"div",26),St(1),_(2,Kz,1,0,"ng-container",27),_(3,Yz,5,14,"div",28),_(4,Zz,4,5,"div",29),l(5,"button",30),C("click",function(s){return v(e),d(2).close(s)}),k(6,"span",31),c()()}if(2&t){const e=d(2);a(2),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",e.showToggleAll&&!e.selectionLimit),a(1),p("ngIf",e.filter)}}function ej(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(3);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function tj(t,i){1&t&&Y(0)}function nj(t,i){1&t&&Y(0)}function ij(t,i){if(1&t&&(l(0,"li",41),_(1,ej,2,1,"span",7),_(2,tj,1,0,"ng-container",8),c(),_(3,nj,1,0,"ng-container",8)),2&t){const e=i.$implicit;d(2);const n=F(7),s=d();a(1),p("ngIf",!s.groupTemplate),a(1),p("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",z(5,Rl,e)),a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",z(7,Rl,s.getOptionGroupChildren(e)))}}function sj(t,i){if(1&t&&(ce(0),_(1,ij,4,9,"ng-template",40),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.optionsToRender)}}function rj(t,i){1&t&&Y(0)}function oj(t,i){if(1&t&&(ce(0),_(1,rj,1,0,"ng-container",8),ue()),2&t){d();const e=F(7),n=d();a(1),p("ngTemplateOutlet",e)("ngTemplateOutletContext",z(2,Rl,n.optionsToRender))}}function aj(t,i){if(1&t){const e=I();l(0,"p-multiSelectItem",45),C("onClick",function(s){return v(e),d(4).onOptionClick(s)})("onKeydown",function(s){return v(e),d(4).onOptionKeydown(s)}),c()}if(2&t){const e=i.$implicit,n=d(4);p("option",e)("selected",n.isSelected(e))("label",n.getOptionLabel(e))("disabled",n.isOptionDisabled(e))("template",n.itemTemplate)}}function lj(t,i){if(1&t&&(ce(0),_(1,aj,1,5,"ng-template",40),ue()),2&t){const e=d().$implicit;a(1),p("ngForOf",e)}}function cj(t,i){if(1&t){const e=I();ce(0),l(1,"p-multiSelectItem",50),C("onClick",function(s){return v(e),d(5).onOptionClick(s)})("onKeydown",function(s){return v(e),d(5).onOptionKeydown(s)}),c(),ue()}if(2&t){const e=i.$implicit,n=d(5);a(1),p("option",e)("selected",n.isSelected(e))("label",n.getOptionLabel(e))("disabled",n.isOptionDisabled(e))("template",n.itemTemplate)("itemSize",n.itemSize)}}function uj(t,i){if(1&t&&(l(0,"cdk-virtual-scroll-viewport",47,48),_(2,cj,2,6,"ng-container",49),c()),2&t){const e=d(2).$implicit,n=d(2);p("ngStyle",z(3,K2,n.scrollHeight))("itemSize",n.itemSize),a(2),p("cdkVirtualForOf",e)}}function dj(t,i){if(1&t&&_(0,uj,3,5,"cdk-virtual-scroll-viewport",46),2&t){const e=d(3);p("ngIf",e.virtualScroll&&!e.emptyOptions)}}function pj(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(4);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function hj(t,i){1&t&&Y(0,null,52)}function mj(t,i){if(1&t&&(l(0,"li",51),_(1,pj,2,1,"ng-container",42),_(2,hj,2,0,"ng-container",27),c()),2&t){const e=d(3);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function fj(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(4);a(1),T(" ",e.emptyMessageLabel," ")}}function gj(t,i){1&t&&Y(0,null,53)}function _j(t,i){if(1&t&&(l(0,"li",51),_(1,fj,2,1,"ng-container",42),_(2,gj,2,0,"ng-container",27),c()),2&t){const e=d(3);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function bj(t,i){if(1&t&&(_(0,lj,2,1,"ng-container",42),_(1,dj,1,1,"ng-template",null,43,we),_(3,mj,3,3,"li",44),_(4,_j,3,3,"li",44)),2&t){const e=F(2),n=d(2);p("ngIf",!n.virtualScroll)("ngIfElse",e),a(3),p("ngIf",n.hasFilter()&&n.emptyOptions),a(1),p("ngIf",!n.hasFilter()&&n.emptyOptions)}}function vj(t,i){1&t&&Y(0)}function Cj(t,i){if(1&t&&(l(0,"div",54),St(1,1),_(2,vj,1,0,"ng-container",27),c()),2&t){const e=d(2);a(2),p("ngTemplateOutlet",e.footerTemplate)}}const yj=function(){return["p-multiselect-panel p-component"]},wj=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},Tj=function(t){return{value:"visible",params:t}},Sj=function(t){return{"p-multiselect-virtualscroll":t}};function xj(t,i){if(1&t){const e=I();l(0,"div",20),C("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)})("keydown",function(s){return v(e),d().onKeydown(s)})("click",function(s){return v(e),d().onOverlayClick(s)}),_(1,Xz,7,3,"div",21),l(2,"div",22)(3,"ul",23),_(4,sj,2,1,"ng-container",7),_(5,oj,2,4,"ng-container",7),_(6,bj,5,4,"ng-template",null,24,we),c()(),_(8,Cj,3,1,"div",25),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngClass",A(12,yj))("@overlayAnimation",z(16,Tj,We(13,wj,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),a(1),p("ngIf",e.showHeader),a(1),Hn("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),a(1),p("ngClass",z(18,Sj,e.virtualScroll)),a(1),p("ngIf",e.group),a(1),p("ngIf",!e.group),a(3),p("ngIf",e.footerFacet||e.footerTemplate)}}const Dj=[[["p-header"]],[["p-footer"]]],Mj=function(t,i,e,n){return{"p-multiselect p-component":!0,"p-multiselect-open":t,"p-multiselect-chip":i,"p-focus":e,"p-disabled":n}},kj=function(t,i){return{"p-placeholder":t,"p-multiselect-label-empty":i}},Ij=function(){return{"p-multiselect-trigger":!0}},Ej=["p-header","p-footer"],Rj={provide:dn,useExisting:Ue(()=>J2),multi:!0};let Lj=(()=>{class t{constructor(){this.onClick=new H,this.onKeydown=new H}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}onOptionKeydown(e){this.onKeydown.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick",onKeydown:"onKeydown"},decls:6,vars:20,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","click","keydown"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"li",0),C("click",function(r){return n.onOptionClick(r)})("keydown",function(r){return n.onOptionKeydown(r)}),l(1,"div",1)(2,"div",2),k(3,"span",3),c()(),_(4,Oz,2,1,"span",4),_(5,Az,1,0,"ng-container",5),c()),2&e&&(p("ngStyle",z(9,K2,n.itemSize+"px"))("ngClass",We(11,Pz,n.selected,n.disabled)),ne("aria-label",n.label)("tabindex",n.disabled?null:"0"),a(2),p("ngClass",z(14,Fz,n.selected)),a(1),p("ngClass",z(16,Q2,n.selected)),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(18,Rl,n.option)))},directives:[vt,lt,Oe,Q,Lt],encapsulation:2}),t})(),J2=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.filterService=r,this.config=o,this.overlayService=u,this.filter=!0,this.displaySelectedLabel=!0,this.maxSelectedLabels=3,this.selectedItemsLabel="ellipsis",this.showToggleAll=!0,this.emptyFilterMessage="",this.emptyMessage="",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.showHeader=!0,this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.display="comma",this.autocomplete="on",this.showClear=!1,this.onChange=new H,this.onFilter=new H,this.onFocus=new H,this.onBlur=new H,this.onClick=new H,this.onClear=new H,this.onPanelShow=new H,this.onPanelHide=new H,this.scrollHeight="200px",this.onModelChange=()=>{},this.onModelTouched=()=>{}}set defaultLabel(e){this._defaultLabel=e,this.updateLabel()}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e,this.updateLabel()}get placeholder(){return this._placeholder}get options(){return this._options}set options(e){this._options=e,this.updateLabel()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.updateLabel()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.alignOverlay(),this.filtered=!1)}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}isOptionDisabled(e){return(this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled)||this.maxSelectionLimitReached&&!this.isSelected(e)}writeValue(e){this.value=e,this.updateLabel(),this.updateFilledState(),this.checkSelectionLimit(),this.cd.markForCheck()}checkSelectionLimit(){this.maxSelectionLimitReached=!(!this.selectionLimit||!this.value||this.value.length!==this.selectionLimit)}updateFilledState(){this.filled=this.value&&this.value.length>0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e){let n=e.option;if(this.isOptionDisabled(n))return;let s=this.getOptionValue(n),r=this.findSelectionIndex(s);-1!=r?(this.value=this.value.filter((o,u)=>u!=r),this.selectionLimit&&(this.maxSelectionLimitReached=!1)):((!this.selectionLimit||!this.value||this.value.length{if(this.group){let r=this.getOptionGroupChildren(s);r&&r.forEach(o=>{let u=this.isOptionDisabled(o);(!u||u&&this.isSelected(o))&&n.push(this.getOptionValue(o))})}else{let r=this.isOptionDisabled(s);(!r||r&&this.isSelected(s))&&n.push(this.getOptionValue(s))}}),this.value=n}uncheckAll(){let n=[];this.optionsToRender.forEach(s=>{this.group?s.items&&s.items.forEach(r=>{this.isOptionDisabled(r)&&this.isSelected(r)&&n.push(this.getOptionValue(r))}):this.isOptionDisabled(s)&&this.isSelected(s)&&n.push(this.getOptionValue(s))}),this.value=n}show(){this.overlayVisible||(this.overlayVisible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,this.appendOverlay(),this.autoZIndex&>.set("overlay",this.overlay,this.baseZIndex+this.config.zIndex.overlay),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();break;case"void":this.onOverlayHide()}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):L.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=L.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}alignOverlay(){this.overlay&&(this.appendTo?L.absolutePosition(this.overlay,this.containerViewChild.nativeElement):L.relativePosition(this.overlay,this.containerViewChild.nativeElement))}hide(){this.overlayVisible=!1,this.unbindDocumentClickListener(),this.resetFilterOnHide&&(this.filterInputChild.nativeElement.value="",this._filterValue=null,this._filteredOptions=null),this.onPanelHide.emit(),this.cd.markForCheck()}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateLabel(),this.updateFilledState(),this.onClear.emit(),this.onModelChange(this.value),e.stopPropagation()}onMouseclick(e,n){this.disabled||this.readonly||e.target.isSameNode(this.accessibleViewChild.nativeElement)||(this.onClick.emit(e),!this.isOverlayClick(e)&&!L.hasClass(e.target,"p-multiselect-token-icon")&&(this.overlayVisible?this.hide():(n.focus(),this.show())))}removeChip(e,n){this.value=this.value.filter(s=>!Z.equals(s,e,this.dataKey)),this.onModelChange(this.value),this.checkSelectionLimit(),this.onChange.emit({originalEvent:n,value:this.value,itemValue:e}),this.updateLabel(),this.updateFilledState()}isOverlayClick(e){let n=e.target;return!!this.overlay&&(this.overlay.isSameNode(n)||this.overlay.contains(n))}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.el.nativeElement.contains(e.target)||this.isOverlayClick(e))}onInputFocus(e){this.focus=!0,this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focus=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onOptionKeydown(e){if(!this.readonly)switch(e.originalEvent.which){case 40:var n=this.findNextItem(e.originalEvent.target.parentElement);n&&n.focus(),e.originalEvent.preventDefault();break;case 38:var s=this.findPrevItem(e.originalEvent.target.parentElement);s&&s.focus(),e.originalEvent.preventDefault();break;case 13:this.onOptionClick(e),e.originalEvent.preventDefault();break;case 9:this.hide()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n.children[0],"p-disabled")||L.isHidden(n.children[0])||L.hasClass(n,"p-multiselect-item-group")?this.findNextItem(n):n.children[0]:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n.children[0],"p-disabled")||L.isHidden(n.children[0])||L.hasClass(n,"p-multiselect-item-group")?this.findPrevItem(n):n.children[0]:null}onKeydown(e){switch(e.which){case 40:!this.overlayVisible&&e.altKey&&(this.show(),e.preventDefault());break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.hide()}}updateLabel(){if(this.value&&this.options&&this.value.length&&this.displaySelectedLabel){let e="";for(let n=0;n0&&(e+=", "),e+=s)}if(this.value.length<=this.maxSelectedLabels||"ellipsis"===this.selectedItemsLabel)this.valuesAsString=e;else{let n=/{(.*?)}/;this.valuesAsString=n.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(n)[0],this.value.length+""):this.selectedItemsLabel}}else this.valuesAsString=this.placeholder||this.defaultLabel}findLabelByValue(e){if(this.group){let n=null;for(let s=0;s0}onFilterInputChange(e){this._filterValue=e.target.value,this.activateFilter(),this.onFilter.emit({originalEvent:e,filter:this._filterValue}),this.cd.detectChanges(),this.alignOverlay()}activateFilter(){if(this.hasFilter()&&this._options){let e=(this.filterBy||this.optionLabel||"label").split(",");if(this.group){let n=[];for(let s of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(s),e,this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&n.push(Object.assign(Object.assign({},s),{[this.optionGroupChildren]:r}))}this._filteredOptions=n}else this._filteredOptions=this.filterService.filter(this.options,e,this._filterValue,this.filterMatchMode,this.filterLocale)}else this._filteredOptions=null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",n=>{!this.preventDocumentDefault&&this.isOutsideClicked(n)&&this.hide(),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){L.isAndroid()||this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&>.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(hl),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-multiSelect"]],contentQueries:function(e,n,s){if(1&e&&(st(s,fl,5),st(s,Oo,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Nz,5),j(Vz,5),j(Bz,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.filterInputChild=s.first),V(s=B())&&(n.accessibleViewChild=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focus||n.overlayVisible)("p-multiselect-clearable",n.showClear&&!n.disabled)},inputs:{style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",label:"label",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",filterBy:"filterBy",virtualScroll:"virtualScroll",itemSize:"itemSize",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",scrollHeight:"scrollHeight",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide"},features:[Ne([Rj])],ngContentSelectors:Ej,decls:13,vars:34,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","readonly","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[1,"p-multiselect-label",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-multiselect-clear-icon pi pi-times",3,"click",4,"ngIf"],[3,"ngClass"],[1,"p-multiselect-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","keydown","click",4,"ngIf"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],["class","p-multiselect-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-multiselect-token-icon","pi","pi-times-circle",3,"click"],[1,"p-multiselect-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","keydown","click"],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["itemslist",""],["class","p-multiselect-footer",4,"ngIf"],[1,"p-multiselect-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link",3,"click"],[1,"p-multiselect-close-icon","pi","pi-times"],[1,"p-checkbox","p-component",3,"ngClass"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-multiselect-filter-container"],["type","text","role","textbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input"],["filterInput",""],[1,"p-multiselect-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-multiselect-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],["class","p-multiselect-empty-message",4,"ngIf"],[3,"option","selected","label","disabled","template","onClick","onKeydown"],[3,"ngStyle","itemSize",4,"ngIf"],[3,"ngStyle","itemSize"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[3,"option","selected","label","disabled","template","itemSize","onClick","onKeydown"],[1,"p-multiselect-empty-message"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(e,n){if(1&e){const s=I();yn(Dj),l(0,"div",0,1),C("click",function(o){v(s);const u=F(4);return n.onMouseclick(o,u)}),l(2,"div",2)(3,"input",3,4),C("focus",function(o){return n.onInputFocus(o)})("blur",function(o){return n.onInputBlur(o)})("keydown",function(o){return n.onKeydown(o)}),c()(),l(5,"div",5)(6,"div",6),_(7,jz,3,2,"ng-container",7),_(8,$z,1,0,"ng-container",8),c(),_(9,Wz,1,0,"i",9),c(),l(10,"div",10),k(11,"span",11),c(),_(12,xj,9,20,"div",12),c()}2&e&&(me(n.styleClass),p("ngClass",_i(23,Mj,n.overlayVisible,"chip"===n.display,n.focus,n.disabled))("ngStyle",n.style),a(3),p("disabled",n.disabled),ne("label",n.label)("id",n.inputId)("name",n.name)("tabindex",n.tabindex)("aria-expanded",n.overlayVisible)("aria-labelledby",n.ariaLabelledBy),a(2),p("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass),a(1),p("ngClass",We(28,kj,n.valuesAsString===(n.defaultLabel||n.placeholder),!(null!=n.valuesAsString&&0!==n.valuesAsString.length||null!=n.placeholder&&0!==n.placeholder.length))),a(1),p("ngIf",!n.selectedItemsTemplate),a(1),p("ngTemplateOutlet",n.selectedItemsTemplate)("ngTemplateOutletContext",z(31,Rl,n.value)),a(1),p("ngIf",null!=n.value&&n.filled&&!n.disabled&&n.showClear),a(1),p("ngClass",A(33,Ij)),a(1),p("ngClass",n.dropdownIcon),a(1),p("ngIf",n.overlayVisible))},directives:[Lj,Po,Oe,lt,Jt,Q,at,Lt,vt,Qf,Jf],styles:[".p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect .p-multiselect-panel{min-width:100%}.p-multiselect-panel{position:absolute;top:0;left:0}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),Oj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,Fo,ai,gn],Nt,Fo]}),t})();const Aj=["sublist"],Pj=function(t){return{"p-hidden":t}};function Fj(t,i){if(1&t&&k(0,"li",5),2&t){const e=d().$implicit;p("ngClass",z(1,Pj,!1===e.visible))}}function Nj(t,i){if(1&t&&k(0,"span",16),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function Vj(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function Bj(t,i){1&t&&k(0,"span",18),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function Hj(t,i){1&t&&k(0,"span",19)}const Y2=function(t){return{"p-disabled":t}};function qj(t,i){if(1&t){const e=I();l(0,"a",11),C("keydown",function(s){return v(e),d(3).onItemKeyDown(s)})("click",function(s){v(e),d();const r=F(1),o=d().$implicit;return d().itemClick(s,o,r)}),_(1,Nj,1,2,"span",12),_(2,Vj,2,1,"span",13),_(3,Bj,1,1,"ng-template",null,14,we),_(5,Hj,1,0,"span",15),c()}if(2&t){const e=F(4),n=d(2).$implicit,s=d();p("target",n.target)("ngClass",z(10,Y2,n.disabled)),ne("href",n.url,Xt)("title",n.title)("id",n.id)("tabindex",n.disabled||!s.isActive?null:"0"),a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e),a(3),p("ngIf",n.items)}}function Uj(t,i){if(1&t&&k(0,"span",16),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function Gj(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function zj(t,i){1&t&&k(0,"span",18),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function jj(t,i){1&t&&k(0,"span",22)}const $j=function(){return{exact:!1}};function Wj(t,i){if(1&t){const e=I();l(0,"a",20),C("keydown",function(s){return v(e),d(3).onItemKeyDown(s)})("click",function(s){v(e),d();const r=F(1),o=d().$implicit;return d().itemClick(s,o,r)}),_(1,Uj,1,2,"span",12),_(2,Gj,2,1,"span",13),_(3,zj,1,1,"ng-template",null,14,we),_(5,jj,1,0,"span",21),c()}if(2&t){const e=F(4),n=d(2).$implicit,s=d();p("routerLink",n.routerLink)("queryParams",n.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.routerLinkActiveOptions||A(20,$j))("href",n.url,Xt)("target",n.target)("ngClass",z(21,Y2,n.disabled))("fragment",n.fragment)("queryParamsHandling",n.queryParamsHandling)("preserveFragment",n.preserveFragment)("skipLocationChange",n.skipLocationChange)("replaceUrl",n.replaceUrl)("state",n.state),ne("title",n.title)("id",n.id)("tabindex",n.disabled||!s.isActive?null:"0"),a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e),a(3),p("ngIf",n.items)}}function Kj(t,i){if(1&t&&k(0,"p-slideMenuSub",23),2&t){const e=d(2).$implicit,n=d();p("item",e)("index",n.index+1)("menuWidth",n.menuWidth)}}const Qj=function(t,i){return{"p-menuitem":!0,"p-menuitem-active":t,"p-hidden":i}};function Jj(t,i){if(1&t&&(l(0,"li",6,7),_(2,qj,6,12,"a",8),_(3,Wj,6,23,"a",9),_(4,Kj,1,3,"p-slideMenuSub",10),c()),2&t){const e=F(1),n=d().$implicit,s=d();me(n.styleClass),p("ngClass",We(8,Qj,e==s.activeItem,!1===n.visible))("tooltipOptions",n.tooltipOptions)("ngStyle",n.style),a(2),p("ngIf",!n.routerLink),a(1),p("ngIf",n.routerLink),a(1),p("ngIf",n.items)}}function Yj(t,i){if(1&t&&(_(0,Fj,1,3,"li",3),_(1,Jj,5,11,"li",4)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}const Zj=function(t,i,e){return{"p-slidemenu-rootlist":t,"p-submenu-list":i,"p-active-submenu":e}},Xj=["container"],e$=["backward"],t$=["slideMenuContent"],n$=function(t){return{"p-slidemenu p-component":!0,"p-slidemenu-overlay":t}},i$=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},s$=function(t){return{value:"visible",params:t}};function r$(t,i){if(1&t){const e=I();l(0,"div",1,2),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)}),l(2,"div",3)(3,"div",4,5),k(5,"p-slideMenuSub",6),c(),l(6,"a",7,8),C("keydown.enter",function(s){return v(e),d().onBackwardKeydown(s)})("keydown.space",function(s){return v(e),d().onBackwardKeydown(s)})("click",function(){return v(e),d().goBack()}),k(8,"span",9),l(9,"span"),g(10),c()()()()}if(2&t){const e=d();me(e.styleClass),p("ngClass",z(18,n$,e.popup))("ngStyle",e.style)("@overlayAnimation",z(23,s$,We(20,i$,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0!==e.popup),a(2),Hn("height",e.left?e.viewportHeight+"px":"auto")("width",e.menuWidth+"px"),a(3),p("item",e.model)("index",0)("menuWidth",e.menuWidth)("effectDuration",e.effectDuration)("easing",e.easing),a(1),Hn("display",e.left?"block":"none"),a(4),S(e.backLabel)}}let o$=(()=>{class t{constructor(e){this.backLabel="Back",this.easing="ease-out",this.slideMenu=e}itemClick(e,n,s){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),n.items&&!this.slideMenu.animating&&(this.slideMenu.left-=this.slideMenu.menuWidth,this.activeItem=s,this.slideMenu.animating=!0,setTimeout(()=>this.slideMenu.animating=!1,this.effectDuration)),!n.items&&this.slideMenu.popup&&this.slideMenu.hide())}focusNextList(e){if(!this.slideMenu.animating){let n=L.getFocusableElements(e);n&&n.length>0&&n[0].focus(),this.unbindTransitionEndListener()}}onItemKeyDown(e){let n=e.currentTarget.parentElement;switch(e.code){case"Space":case"Enter":n&&!L.hasClass(n,"p-disabled")&&(n.children[0].click(),this.transitionEndListener=this.focusNextList.bind(this,n),this.sublistViewChild.nativeElement.addEventListener("transitionend",this.transitionEndListener)),e.preventDefault()}}unbindTransitionEndListener(){this.transitionEndListener&&this.sublistViewChild&&(this.sublistViewChild.nativeElement.removeEventListener("transitionend",this.transitionEndListener),this.transitionEndListener=null)}ngOnDestroy(){this.activeItem=null,this.unbindTransitionEndListener()}get isActive(){return-this.slideMenu.left==this.index*this.menuWidth}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>Z2)))},t.\u0275cmp=G({type:t,selectors:[["p-slideMenuSub"]],viewQuery:function(e,n){if(1&e&&j(Aj,5),2&e){let s;V(s=B())&&(n.sublistViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{item:"item",root:"root",backLabel:"backLabel",menuWidth:"menuWidth",effectDuration:"effectDuration",easing:"easing",index:"index"},decls:3,vars:16,consts:[[3,"ngClass"],["sublist",""],["ngFor","",3,"ngForOf"],["class","p-menu-separator",3,"ngClass",4,"ngIf"],["pTooltip","",3,"ngClass","tooltipOptions","class","ngStyle",4,"ngIf"],[1,"p-menu-separator",3,"ngClass"],["pTooltip","",3,"ngClass","tooltipOptions","ngStyle"],["listitem",""],["class","p-menuitem-link",3,"target","ngClass","keydown","click",4,"ngIf"],["class","p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","href","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click",4,"ngIf"],["class","p-submenu",3,"item","index","menuWidth",4,"ngIf"],[1,"p-menuitem-link",3,"target","ngClass","keydown","click"],["class","p-menuitem-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlRouteLabel",""],["class","p-submenu-icon pi pi-fw pi-angle-right",4,"ngIf"],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],[1,"p-submenu-icon","pi","pi-fw","pi-angle-right"],[1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","href","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click"],["class","p-submenu-icon pi pi-fw pi-caret-right",4,"ngIf"],[1,"p-submenu-icon","pi","pi-fw","pi-caret-right"],[1,"p-submenu",3,"item","index","menuWidth"]],template:function(e,n){1&e&&(l(0,"ul",0,1),_(2,Yj,2,2,"ng-template",2),c()),2&e&&(Hn("width",n.menuWidth,"px")("left",n.root?n.slideMenu.left:n.slideMenu.menuWidth,"px")("transition-property",n.root?"left":"none")("transition-duration",n.effectDuration+"ms")("transition-timing-function",n.easing),p("ngClass",Rt(12,Zj,n.root,!n.root,n.isActive)),a(2),p("ngForOf",n.root?n.item:n.item.items))},directives:[t,Oe,at,Q,Jt,lt,Ho,gd],encapsulation:2}),t})(),Z2=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.cd=s,this.config=r,this.overlayService=o,this.menuWidth=190,this.viewportHeight=180,this.effectDuration=250,this.easing="ease-out",this.backLabel="Back",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H,this.left=0,this.animating=!1}ngAfterViewChecked(){!this.viewportUpdated&&!this.popup&&this.containerViewChild&&(this.updateViewPort(),this.viewportUpdated=!0)}set container(e){this.containerViewChild=e}set backward(e){this.backwardViewChild=e}set slideMenuContent(e){this.slideMenuContentViewChild=e}updateViewPort(){this.slideMenuContentViewChild.nativeElement.style.height=this.viewportHeight-L.getHiddenElementOuterHeight(this.backwardViewChild.nativeElement)+"px"}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.visible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck()}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.updateViewPort(),this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),L.absolutePosition(this.containerViewChild.nativeElement,this.target),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.onOverlayHide(),this.onHide.emit({})}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.containerViewChild.nativeElement):L.appendChild(this.containerViewChild.nativeElement,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.containerViewChild.nativeElement)}moveOnTop(){this.autoZIndex&>.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.cd.markForCheck()}onWindowResize(){this.hide()}goBack(){this.left+=this.menuWidth}onBackwardKeydown(e){this.goBack(),this.left||setTimeout(()=>{let n=L.getFocusableElements(this.el.nativeElement);n&&n.length>0&&n[0].focus()},1),e.preventDefault()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",()=>{this.preventDocumentDefault||(this.hide(),this.cd.detectChanges()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.left=0,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.restoreOverlayAppend(),this.onOverlayHide())}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-slideMenu"]],viewQuery:function(e,n){if(1&e&&(j(Xj,5),j(e$,5),j(t$,5)),2&e){let s;V(s=B())&&(n.container=s.first),V(s=B())&&(n.backward=s.first),V(s=B())&&(n.slideMenuContent=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",menuWidth:"menuWidth",viewportHeight:"viewportHeight",effectDuration:"effectDuration",easing:"easing",backLabel:"backLabel",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],[1,"p-slidemenu-wrapper"],[1,"p-slidemenu-content"],["slideMenuContent",""],["root","root",3,"item","index","menuWidth","effectDuration","easing"],["tabindex","0",1,"p-slidemenu-backward","p-menuitem-link",3,"keydown.enter","keydown.space","click"],["backward",""],[1,"p-slidemenu-backward-icon","pi","pi-fw","pi-caret-left"]],template:function(e,n){1&e&&_(0,r$,11,25,"div",0),2&e&&p("ngIf",!n.popup||n.visible)},directives:[o$,Q,Oe,lt],styles:[".p-slidemenu{width:12.5rem}.p-slidemenu.p-slidemenu-overlay{position:absolute;top:0;left:0}.p-slidemenu ul{list-style:none;margin:0;padding:0}.p-slidemenu .p-slidemenu-rootlist{position:absolute;top:0}.p-slidemenu .p-submenu-list{display:none;position:absolute;top:0;width:12.5rem}.p-slidemenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden}.p-slidemenu .p-menuitem-icon,.p-slidemenu .p-menuitem-text{vertical-align:middle}.p-slidemenu .p-menuitem{position:relative}.p-slidemenu .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-slidemenu .p-slidemenu-wrapper{position:relative}.p-slidemenu .p-slidemenu-content{overflow-x:hidden;overflow-y:auto;position:relative}.p-slidemenu-backward{position:absolute;bottom:0;width:100%;cursor:pointer;display:none}.p-slidemenu-backward .p-slidemenu-backward-icon,.p-slidemenu-backward span{vertical-align:middle}.p-slidemenu .p-menuitem-active{position:static}.p-slidemenu .p-menuitem-active>.p-submenu>.p-submenu-list{display:block}.p-slidemenu ul:not(.p-active-submenu)>.p-menuitem:not(.p-menuitem-active),.p-slidemenu .p-active-submenu>.p-menuitem-active>.p-submenu>.p-submenu-list{display:none}.p-slidemenu .p-active-submenu>.p-menuitem-active~.p-menuitem{display:block}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),a$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,ai],On,ai]}),t})(),X2=(()=>{class t{constructor(e,n,s,r){this.el=e,this.ngModel=n,this.control=s,this.cd=r,this.onResize=new H}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(e){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}onFocus(e){this.autoResize&&this.resize(e)}onBlur(e){this.autoResize&&this.resize(e)}resize(e){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(_e,8),x(is,8),x(ot))},t.\u0275dir=le({type:t,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(e,n){1&e&&C("input",function(r){return n.onInput(r)})("focus",function(r){return n.onFocus(r)})("blur",function(r){return n.onBlur(r)}),2&e&&ii("p-filled",n.filled)("p-inputtextarea-resizable",n.autoResize)},inputs:{autoResize:"autoResize"},outputs:{onResize:"onResize"}}),t})(),l$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),c$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[eN,gl,cT,h5,C5,$6,C7,T7,Yu,B7,Zu,CB,d9,b9,R9,B9,W9,K9,gn,eq,tq,uq,DG,NG,HG,ai,KG,ez,lz,Lz,Oj,a$,l$]}),t})();const u$=["pMenuItemContent",""];function d$(t,i){if(1&t&&k(0,"span",6),2&t){const e=d(2);me(e.item.iconClass),p("ngClass",e.item.icon)("ngStyle",e.item.iconStyle)}}function p$(t,i){if(1&t&&(l(0,"span",7),g(1),c()),2&t){const e=d(2);a(1),S(e.item.label)}}function h$(t,i){1&t&&k(0,"span",8),2&t&&p("innerHTML",d(2).item.label,Ht)}const eS=function(t){return{"p-disabled":t}};function m$(t,i){if(1&t){const e=I();l(0,"a",2),C("keydown",function(s){return v(e),d().onItemKeyDown(s)})("click",function(s){v(e);const r=d();return r.menu.itemClick(s,r.item)}),_(1,d$,1,4,"span",3),_(2,p$,2,1,"span",4),_(3,h$,1,1,"ng-template",null,5,we),c()}if(2&t){const e=F(4),n=d();p("target",n.item.target)("ngClass",z(11,eS,n.item.disabled))("target",n.item.target),ne("href",n.item.url||null,Xt)("tabindex",n.item.disabled?null:"0")("data-automationid",n.item.automationId)("title",n.item.title)("id",n.item.id),a(1),p("ngIf",n.item.icon),a(1),p("ngIf",!1!==n.item.escape)("ngIfElse",e)}}function f$(t,i){1&t&&k(0,"span",12),2&t&&p("ngClass",d(2).item.icon)}function g$(t,i){if(1&t&&(l(0,"span",7),g(1),c()),2&t){const e=d(2);a(1),S(e.item.label)}}function _$(t,i){1&t&&k(0,"span",8),2&t&&p("innerHTML",d(2).item.label,Ht)}const b$=function(){return{exact:!1}};function v$(t,i){if(1&t){const e=I();l(0,"a",9),C("keydown",function(s){return v(e),d().onItemKeyDown(s)})("click",function(s){v(e);const r=d();return r.menu.itemClick(s,r.item)}),_(1,f$,1,1,"span",10),_(2,g$,2,1,"span",4),_(3,_$,1,1,"ng-template",null,11,we),c()}if(2&t){const e=F(4),n=d();p("routerLink",n.item.routerLink)("queryParams",n.item.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.item.routerLinkActiveOptions||A(19,b$))("target",n.item.target)("ngClass",z(20,eS,n.item.disabled))("fragment",n.item.fragment)("queryParamsHandling",n.item.queryParamsHandling)("preserveFragment",n.item.preserveFragment)("skipLocationChange",n.item.skipLocationChange)("replaceUrl",n.item.replaceUrl)("state",n.item.state),ne("data-automationid",n.item.automationId)("id",n.item.id)("tabindex",n.item.disabled?null:"0")("title",n.item.title),a(1),p("ngIf",n.item.icon),a(1),p("ngIf",!1!==n.item.escape)("ngIfElse",e)}}const C$=["container"],Go=function(t){return{"p-hidden":t}};function y$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit;p("ngClass",z(1,Go,!1===e.visible))}}function w$(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d(2).$implicit;a(1),S(e.label)}}function T$(t,i){1&t&&k(0,"span",12),2&t&&p("innerHTML",d(2).$implicit.label,Ht)}function S$(t,i){if(1&t&&(l(0,"li",9),_(1,w$,2,1,"span",10),_(2,T$,1,1,"ng-template",null,11,we),c()),2&t){const e=F(3),n=d().$implicit;p("ngClass",z(5,Go,!1===n.visible))("tooltipOptions",n.tooltipOptions),ne("data-automationid",n.automationId),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function x$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit,n=d().$implicit;p("ngClass",z(1,Go,!1===e.visible||!1===n.visible))}}function D$(t,i){if(1&t&&k(0,"li",14),2&t){const e=d().$implicit,n=d().$implicit;me(e.styleClass),p("pMenuItemContent",e)("ngClass",z(6,Go,!1===e.visible||!1===n.visible))("ngStyle",e.style)("tooltipOptions",e.tooltipOptions)}}function M$(t,i){if(1&t&&(_(0,x$,1,3,"li",6),_(1,D$,1,8,"li",13)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}function k$(t,i){if(1&t&&(_(0,y$,1,3,"li",6),_(1,S$,4,7,"li",7),_(2,M$,2,2,"ng-template",5)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator),a(1),p("ngForOf",e.items)}}function I$(t,i){1&t&&_(0,k$,3,3,"ng-template",5),2&t&&p("ngForOf",d(2).model)}function E$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit;p("ngClass",z(1,Go,!1===e.visible))}}function R$(t,i){if(1&t&&k(0,"li",14),2&t){const e=d().$implicit;me(e.styleClass),p("pMenuItemContent",e)("ngClass",z(6,Go,!1===e.visible))("ngStyle",e.style)("tooltipOptions",e.tooltipOptions)}}function L$(t,i){if(1&t&&(_(0,E$,1,3,"li",6),_(1,R$,1,8,"li",13)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}function O$(t,i){1&t&&_(0,L$,2,2,"ng-template",5),2&t&&p("ngForOf",d(2).model)}const A$=function(t){return{"p-menu p-component":!0,"p-menu-overlay":t}},P$=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},F$=function(t){return{value:"visible",params:t}};function N$(t,i){if(1&t){const e=I();l(0,"div",1,2),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)}),l(2,"ul",3),_(3,I$,1,1,null,4),_(4,O$,1,1,null,4),c()()}if(2&t){const e=d();me(e.styleClass),p("ngClass",z(8,A$,e.popup))("ngStyle",e.style)("@overlayAnimation",z(13,F$,We(10,P$,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0!==e.popup),a(3),p("ngIf",e.hasSubMenu()),a(1),p("ngIf",!e.hasSubMenu())}}let V$=(()=>{class t{constructor(e){this.menu=e}onItemKeyDown(e){let n=e.currentTarget.parentElement;switch(e.code){case"ArrowDown":var s=this.findNextItem(n);s&&s.children[0].focus(),e.preventDefault();break;case"ArrowUp":var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case"Space":case"Enter":n&&!L.hasClass(n,"p-disabled")&&n.children[0].click(),e.preventDefault()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-disabled")||!L.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-disabled")||!L.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>tS)))},t.\u0275cmp=G({type:t,selectors:[["","pMenuItemContent",""]],hostAttrs:[1,"p-element"],inputs:{item:["pMenuItemContent","item"]},attrs:u$,decls:2,vars:2,consts:[["class","p-menuitem-link","role","menuitem",3,"target","ngClass","keydown","click",4,"ngIf"],["class","p-menuitem-link","role","menuitem","pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click",4,"ngIf"],["role","menuitem",1,"p-menuitem-link",3,"target","ngClass","keydown","click"],["class","p-menuitem-icon",3,"ngClass","class","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],["role","menuitem","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click"],["class","p-menuitem-icon",3,"ngClass",4,"ngIf"],["htmlRouteLabel",""],[1,"p-menuitem-icon",3,"ngClass"]],template:function(e,n){1&e&&(_(0,m$,5,13,"a",0),_(1,v$,5,22,"a",1)),2&e&&(p("ngIf",!n.item.routerLink),a(1),p("ngIf",n.item.routerLink))},directives:[Q,Oe,lt,Ho,vt,gd],encapsulation:2}),t})(),tS=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.cd=s,this.config=r,this.overlayService=o,this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.relativeAlign=e.relativeAlign,this.visible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.onOverlayHide(),this.onHide.emit({})}}onOverlayAnimationEnd(e){"void"===e.toState&&this.autoZIndex&>.clear(e.element)}alignOverlay(){this.relativeAlign?L.relativePosition(this.container,this.target):L.absolutePosition(this.container,this.target)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):L.appendChild(this.container,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}moveOnTop(){this.autoZIndex&>.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.relativeAlign=!1,this.cd.markForCheck()}onWindowResize(){this.hide()}itemClick(e,n){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),this.popup&&this.hide())}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",()=>{this.preventDocumentDefault||this.hide(),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&>.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide())}hasSubMenu(){if(this.model)for(var e of this.model)if(e.items)return!0;return!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-menu"]],viewQuery:function(e,n){if(1&e&&j(C$,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],["role","menu",1,"p-menu-list","p-reset"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["class","p-menu-separator","role","separator",3,"ngClass",4,"ngIf"],["class","p-submenu-header","pTooltip","","role","none",3,"ngClass","tooltipOptions",4,"ngIf"],["role","separator",1,"p-menu-separator",3,"ngClass"],["pTooltip","","role","none",1,"p-submenu-header",3,"ngClass","tooltipOptions"],[4,"ngIf","ngIfElse"],["htmlSubmenuLabel",""],[3,"innerHTML"],["class","p-menuitem","pTooltip","","role","none",3,"pMenuItemContent","ngClass","ngStyle","class","tooltipOptions",4,"ngIf"],["pTooltip","","role","none",1,"p-menuitem",3,"pMenuItemContent","ngClass","ngStyle","tooltipOptions"]],template:function(e,n){1&e&&_(0,N$,5,15,"div",0),2&e&&p("ngIf",!n.popup||n.visible)},directives:[V$,Q,Oe,lt,at,Jt],styles:[".p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),B$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,gn,ai],On,ai]}),t})(),zo=(()=>{class t{constructor(e){this.httpClient=e}GetDatabaseStatus(){return this.httpClient.get("/Config/GetDatabaseStatus")}SetDatabaseCredentials(e){return this.httpClient.post("/Config/SetDatabaseCredentials",e)}GetCountries(){return this.httpClient.get("/Config/GetCountries")}GetLanguages(){return this.httpClient.get("/Config/GetLanguages")}GetIPAddresses(e){let n=(new ye).set("Protocol",e);return this.httpClient.get("/Config/GetIPAddresses",{params:n})}GetSystemEvents(e){let n=new ye;return e&&n.set("Host",e),this.httpClient.get("/Config/GetSystemEvents",{params:n})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ut=(()=>{class t{constructor(e){this.httpClient=e}AddStorageGroupDir(e){return this.httpClient.post("/Myth/AddStorageGroupDir",e)}BackupDatabase(){return this.httpClient.post("/Myth/BackupDatabase",{body:void 0})}CheckDatabase(e){return this.httpClient.post("/Myth/CheckDatabase",e)}DelayShutdown(){return this.httpClient.post("Myth/DelayShutdown",{body:void 0})}GetBackendInfo(){return this.httpClient.get("/Myth/GetBackendInfo")}GetConnectionInfo(e){let n=(new ye).set("Pin",e);return this.httpClient.get("/Myth/GetConnectionInfo",{params:n})}GetFrontends(e){let n=(new ye).set("OnLine",e);return this.httpClient.get("/Myth/GetFrontends",{params:n})}GetHostName(){return this.httpClient.get("/Myth/GetHostName")}GetHosts(){return this.httpClient.get("/Myth/GetHosts")}GetKeys(){return this.httpClient.get("/Myth/GetKeys")}GetSetting(e){let n=(new ye).set("HostName",e.HostName).set("Key",e.Key).set("Default",e.Default?e.Default:"");return this.httpClient.get("/Myth/GetSetting",{params:n})}GetSettingList(e){let n=(new ye).set("HostName",e);return this.httpClient.get("/Myth/GetSettingList",{params:n})}GetStorageGroupDirs(e){return void 0===e||void 0===e.GroupName&&void 0===e.HostName?this.httpClient.get("/Myth/GetStorageGroupDirs"):this.httpClient.post("/Myth/GetStorageGroupDirs",e)}GetDirListing(e){let n=(new ye).set("DirName",e);return this.httpClient.get("/Myth/GetDirListing",{params:n})}GetTimeZone(){return this.httpClient.get("/Myth/GetTimeZone")}ManageDigestUser(e){return this.httpClient.post("/Myth/ManageDigestUser",e)}ManageUrlProtection(e){return this.httpClient.post("/Myth/ManageUrlProtection",e)}ProfileDelete(){return this.httpClient.post("/Myth/ProfileDelete",{body:void 0})}ProfileSubmit(){return this.httpClient.post("/Myth/ProfileSubmit",{body:void 0})}ProfileText(){return this.httpClient.get("/Myth/ProfileText")}ProfileURL(){return this.httpClient.get("/Myth/ProfileURL")}ProfileUpdated(){return this.httpClient.get("/Myth/ProfileUpdated")}PutSetting(e){return this.httpClient.post("/Myth/PutSetting",e)}DeleteSetting(e){return this.httpClient.post("/Myth/DeleteSetting",e)}RemoveStorageGroupDir(e){return this.httpClient.post("/Myth/RemoveStorageGroupDir",e)}SetConnectionInfo(e){return this.httpClient.post("/Myth/SetConnectionInfo",e)}TestDBSettings(e){return this.httpClient.post("/Myth/TestDBSettings",e)}ManageScheduler(e){return this.httpClient.post("/Myth/ManageScheduler",e)}Shutdown(e){return this.httpClient.post("/Myth/Shutdown",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Sd=(()=>{class t{constructor(e,n){this.configService=e,this.mythService=n,this.m_wizardData={Country:{Code:"",Country:"",NativeCountry:"",Image:""},Language:{Code:"",Language:"",NativeLanguage:"",Image:""},Database:{Host:"localhost",Port:3306,UserName:"mythtv",Password:"mythtv",Ping:!1,Name:"mythconverg",Type:"QMYSQL",LocalHostName:"my-unique-identifier-goes-here",LocalEnabled:!1,DoTest:!0,WOLEnabled:!1,WOLReconnect:0,WOLRetry:0,WOLCommand:""},DatabaseStatus:{DatabaseStatus:{Host:"",Port:0,UserName:"",Password:"",Ping:!1,Name:"",Type:"",LocalHostName:"",LocalEnabled:!1,Connected:!1,HaveDatabase:!1,SchemaVersion:0,WOLEnabled:!1,WOLReconnect:0,WOLRetry:0,WOLCommand:""}}},this.m_topElement=null,this.m_hostName="",this.m_languageSetting="",this.m_languages=[],this.m_countrySetting="",this.m_countries=[],this.fullMenu=[],this.dbSetupMenu=[],this.wizardItems=[],this.mythService.GetHostName().subscribe(s=>{this.m_hostName=s.String})}ngOnInit(){}Init(){this.initDatabaseStatus(),this.initLanguages()}getWizardData(){return this.Init(),this.m_wizardData}initDatabaseStatus(){this.dbPromise=new Promise((e,n)=>{this.configService.GetDatabaseStatus().subscribe(s=>{this.m_wizardData.DatabaseStatus=s,this.m_wizardData.Database.Host=s.DatabaseStatus.Host,this.m_wizardData.Database.Port=s.DatabaseStatus.Port,this.m_wizardData.Database.UserName=s.DatabaseStatus.UserName,this.m_wizardData.Database.Password=s.DatabaseStatus.Password,this.m_wizardData.Database.Name=s.DatabaseStatus.Name,this.m_wizardData.Database.LocalEnabled=s.DatabaseStatus.LocalEnabled,this.m_wizardData.Database.LocalHostName=s.DatabaseStatus.LocalHostName,this.m_wizardData.Database.WOLEnabled=s.DatabaseStatus.WOLEnabled,this.m_wizardData.Database.WOLReconnect=s.DatabaseStatus.WOLReconnect,this.m_wizardData.Database.WOLRetry=s.DatabaseStatus.WOLRetry,this.m_wizardData.Database.WOLCommand=s.DatabaseStatus.WOLCommand,e(!0)},s=>{console.log("Failed to get database status",s.statusText),n(!0)})})}initLanguages(){this.configService.GetCountries().subscribe(e=>{this.m_countries=e.CountryList.Countries,this.initCountry()}),this.configService.GetLanguages().subscribe(e=>{this.m_languages=e.LanguageList.Languages,this.initLanguage()})}initCountry(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"Country",Default:"US"}).subscribe(e=>{this.m_wizardData.Country=this.findCountryByCode(e.String)})}findCountryByCode(e){for(var n=0;n{this.m_wizardData.Language=this.findLanguageByCode(e.String)})}findLanguageByCode(e){for(var n=0;n{this.m_wizardData.DatabaseStatus=e},e=>{console.log("Failed to get database status",e.statusText)})}}return t.\u0275fac=function(e){return new(e||t)(K(zo),K(Ut))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),De=(()=>{class t{constructor(e,n){this.mythService=e,this.translate=n,this.m_hostName="",this.m_initialized=!1,this.requesterForm=null,this.m_HostAddressData={successCount:0,errorCount:0,thisHostName:this.m_hostName,BackendServerPort:6543,BackendStatusPort:6544,SecurityPin:"0000",AllowConnFromAll:!1,ListenOnAllIps:!0,BackendServerIP:"127.0.0.1",BackendServerIP6:"::1",AllowLinkLocal:!0,BackendServerAddr:"",IsMasterBackend:!0,MasterServerName:this.m_hostName},this.HostAddressObs={next:s=>{s.bool?this.m_HostAddressData.successCount++:(this.m_HostAddressData.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty())},error:s=>{console.error(s),this.m_HostAddressData.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty()}},this.JobQCommandsObs={next:s=>{s.bool?this.m_JobQCommands.successCount++:(this.m_JobQCommands.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty())},error:s=>{console.error(s),this.m_JobQCommands.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty()}},this.currentForm=null,this.schedulingEnabled=!0,this.isDatabaseIgnored=!1,this.DBTimezoneSupport=!1,this.pageType=""}Init(){this.m_initialized=!0}getHostAddressData(){return this.mythService.GetHostName().subscribe({next:e=>{this.m_hostName=e.String,this.m_HostAddressData.thisHostName=this.m_hostName,this.m_HostAddressData.MasterServerName=this.m_hostName,this.getHostSettings()},error:()=>this.m_HostAddressData.errorCount++}),this.m_HostAddressData}getHostSettings(){this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerPort",Default:"6543"}).subscribe({next:e=>this.m_HostAddressData.BackendServerPort=Number(e.String),error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendStatusPort",Default:"6544"}).subscribe({next:e=>this.m_HostAddressData.BackendStatusPort=Number(e.String),error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"SecurityPin",Default:"0000"}).subscribe({next:e=>this.m_HostAddressData.SecurityPin=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"AllowConnFromAll",Default:"0"}).subscribe({next:e=>this.m_HostAddressData.AllowConnFromAll="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"ListenOnAllIps",Default:"1"}).subscribe({next:e=>this.m_HostAddressData.ListenOnAllIps="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerIP"}).subscribe({next:e=>this.m_HostAddressData.BackendServerIP=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerIP6"}).subscribe({next:e=>this.m_HostAddressData.BackendServerIP6=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"UseLinkLocal"}).subscribe({next:e=>this.m_HostAddressData.AllowLinkLocal="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerAddr"}).subscribe({next:e=>this.m_HostAddressData.BackendServerAddr=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Default:this.m_hostName}).subscribe({next:e=>{this.m_HostAddressData.MasterServerName=e.String,this.m_HostAddressData.IsMasterBackend=this.m_HostAddressData.MasterServerName==this.m_hostName},error:()=>this.m_HostAddressData.errorCount++})}saveHostAddressData(e){this.requesterForm=e,this.m_HostAddressData.successCount=0,this.m_HostAddressData.errorCount=0,this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerPort",Value:String(this.m_HostAddressData.BackendServerPort)}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendStatusPort",Value:String(this.m_HostAddressData.BackendStatusPort)}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"SecurityPin",Value:this.m_HostAddressData.SecurityPin}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"AllowConnFromAll",Value:this.m_HostAddressData.AllowConnFromAll?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"ListenOnAllIps",Value:this.m_HostAddressData.ListenOnAllIps?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerIP",Value:this.m_HostAddressData.BackendServerIP}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerIP6",Value:this.m_HostAddressData.BackendServerIP6}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"AllowLinkLocal",Value:this.m_HostAddressData.AllowLinkLocal?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerAddr",Value:this.m_HostAddressData.BackendServerAddr}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Value:this.m_HostAddressData.MasterServerName}).subscribe(this.HostAddressObs)}getLocaleData(){return this.m_LocaleData={successCount:0,errorCount:0,TVFormat:"PAL",VbiFormat:"None",FreqTable:"us-bcast"},this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"TVFormat"}).subscribe({next:e=>this.m_LocaleData.TVFormat=e.String,error:()=>this.m_LocaleData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"VbiFormat"}).subscribe({next:e=>this.m_LocaleData.VbiFormat=e.String,error:()=>this.m_LocaleData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"FreqTable"}).subscribe({next:e=>this.m_LocaleData.FreqTable=e.String,error:()=>this.m_LocaleData.errorCount++}),this.m_LocaleData}getSetupData(){return this.getHostAddressData(),this.getLocaleData(),this.m_setupData={General:{HostAddress:this.m_HostAddressData,Locale:this.m_LocaleData}},this.m_setupData}parseTime(e,n){let s=n.split(":");e.setHours(Number(s[0])),e.setMinutes(Number(s[1]))}formatTime(e){let n=e.getHours(),s=e.getMinutes(),r="";return n<10&&(r+="0"),r+=String(n),r+=":",s<10&&(r+="0"),r+=String(s),r}getJobQCommands(){if("object"==typeof this.m_JobQCommands)return this.m_JobQCommands;this.m_JobQCommands={successCount:0,errorCount:0,UserJobDesc:[],UserJob:[]};for(let e=0;e<4;e++){let n=e+1;this.translate.get("settings.services.job_default",{num:n}).subscribe(s=>this.m_JobQCommands.UserJobDesc[e]=s),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+n,Default:""}).subscribe({next:s=>{s.String&&s.String.length>0&&(this.m_JobQCommands.UserJobDesc[e]=s.String)},error:()=>this.m_JobQCommands.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJob"+n,Default:""}).subscribe({next:s=>this.m_JobQCommands.UserJob[e]=s.String,error:()=>this.m_JobQCommands.errorCount++})}return this.m_JobQCommands}saveJobQCommands(e){this.requesterForm=e,this.m_JobQCommands.successCount=0,this.m_JobQCommands.errorCount=0;for(let n=0;n<4;n++){let s=n+1;this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+s,Value:this.m_JobQCommands.UserJobDesc[n]}).subscribe(this.JobQCommandsObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UserJob"+s,Value:this.m_JobQCommands.UserJob[n]}).subscribe(this.JobQCommandsObs)}}getCurrentForm(){return this.currentForm}setCurrentForm(e){this.currentForm=e}}return t.\u0275fac=function(e){return new(e||t)(K(Ut),K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),jo=(()=>{class t{constructor(e){this.httpClient=e}AddDontRecordSchedule(e){return this.httpClient.post("/Dvr/AddDontRecordSchedule",e)}AddRecordSchedule(e){return this.httpClient.post("/Dvr/AddRecordSchedule",e)}UpdateRecordSchedule(e){return this.httpClient.post("/Dvr/UpdateRecordSchedule",e)}RemoveRecordSchedule(e){return this.httpClient.post("/Dvr/RemoveRecordSchedule",{RecordId:e})}AddRecordedCredits(e){return this.httpClient.post("/Dvr/AddRecordedCredits",e)}AddRecordedProgram(e){return this.httpClient.post("/Dvr/AddRecordedProgram",e)}AllowReRecord(e){return this.httpClient.post("/Dvr/AllowReRecord",{RecordedId:e})}DeleteRecording(e){return this.httpClient.post("/Dvr/DeleteRecording",e)}UnDeleteRecording(e){return this.httpClient.post("/Dvr/UnDeleteRecording",e)}UpdateRecordedMetadata(e){return this.httpClient.post("/Dvr/UpdateRecordedMetadata",e)}DisableRecordSchedule(e){return this.httpClient.post("/Dvr/DisableRecordSchedule",{RecordId:e})}DupInToDescription(e){let n=(new ye).set("DupIn",e);return this.httpClient.get("/Dvr/DupInToDescription",{params:n})}DupInToString(e){let n=(new ye).set("DupIn",e);return this.httpClient.get("/Dvr/DupInToString",{params:n})}DupMethodToDescription(e){let n=(new ye).set("DupMethod",e);return this.httpClient.get("/Dvr/DupMethodToDescription",{params:n})}DupMethodToString(e){let n=(new ye).set("DupMethod",e);return this.httpClient.get("/Dvr/DupMethodToString",{params:n})}EnableRecordSchedule(e){return this.httpClient.post("/Dvr/EnableRecordSchedule",e)}GetConflictList(e){let n=(new ye).set("StartIndex",e.StartIndex).set("Count",e.Count).set("RecordId",e.RecordId);return this.httpClient.get("/Dvr/GetConflictList",{params:n})}GetEncoderList(){return this.httpClient.get("/Dvr/GetEncoderList")}GetExpiringList(e){let n=(new ye).set("StartIndex",e.StartIndex).set("Count",e.Count);return this.httpClient.get("/Dvr/GetExpiringList",{params:n})}GetInputList(){return this.httpClient.get("/Dvr/GetInputList")}GetLastPlayPos(e){let n=(new ye).set("RecordedId",e.RecordedId).set("ChanId",e.ChanId).set("StartTime",e.StartTime).set("OffsetType",e.OffsetType);return this.httpClient.get("/Dvr/GetLastPlayPos",{params:n})}GetOldRecordedList(e){let n=(new ye).set("Descending",e.Descending).set("StartIndex",e.StartIndex).set("Count",e.Count).set("StartTime",e.StartTime).set("EndTime",e.EndTime).set("Title",e.Title).set("SeriesId",e.SeriesId).set("RecordId",e.RecordId).set("Sort",e.Sort);return this.httpClient.get("/Dvr/GetOldRecordedList",{params:n})}GetPlayGroupList(){return this.httpClient.get("/Dvr/GetPlayGroupList")}GetProgramCategories(e){return(new ye).set("OnlyRecorded",e),this.httpClient.get("/Dvr/GetProgramCategories")}GetRecGroupList(){return this.httpClient.get("/Dvr/GetRecGroupList")}GetRecRuleFilterList(){return this.httpClient.get("/Dvr/GetRecRuleFilterList")}GetRecStorageGroupList(){return this.httpClient.get("/Dvr/GetRecStorageGroupList")}GetRecordSchedule(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordSchedule",{params:n})}GetRecordScheduleList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordScheduleList",{params:n})}GetRecorded(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecorded",{params:n})}GetRecordedList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordedList",{params:n})}GetUpcomingList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetUpcomingList",{params:n})}RecStatusToString(e){let n=(new ye).set("RecStatus",e);return this.httpClient.get("/Dvr/RecStatusToString",{params:n})}ManageJobQueue(e){return this.httpClient.post("/Dvr/ManageJobQueue",e)}StopRecording(e){return this.httpClient.post("/Dvr/StopRecording",{RecordedId:e})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function H$(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-button",10),C("onClick",function(){return v(e),d().disableSched()}),m(3,"translate"),c()(),l(4,"div",9),g(5),m(6,"translate"),c()()}2&t&&(a(2),D("label",f(3,2,"settings.main.enableupdates_label")),a(3),S(f(6,4,"settings.main.enableupdates_desc")))}function q$(t,i){1&t&&(l(0,"div",9)(1,"div",12),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.main.restart_desc")))}function U$(t,i){1&t&&(l(0,"div",9),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"settings.main.slave_enabled"),""))}function G$(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-button",10),C("onClick",function(){return v(e),d().restart()}),m(3,"translate"),c()(),_(4,q$,4,3,"div",11),_(5,U$,3,3,"div",11),c()}if(2&t){const e=d();a(2),D("label",f(3,3,"settings.main.restart_label")),a(2),p("ngIf",!e.masterServerName||!e.hostName||e.masterServerName==e.hostName),a(1),p("ngIf",e.masterServerName&&e.hostName&&e.masterServerName!=e.hostName)}}const z$=function(t,i,e){return{Title:t,StartTime:i,Status:e}};function j$(t,i){if(1&t&&(l(0,"small",13),g(1),m(2,"translate"),c()),2&t){const e=d();a(1),T(" ",Dt(2,1,"settings.main.upcomingrec",Rt(4,z$,e.upComing[0].Title,e.recStartTime,e.recStatusDesc))," ")}}function $$(t,i){1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"p"),g(5),m(6,"translate"),c()()),2&t&&(a(2),T("",f(3,2,"settings.main.slave_instructions")," "),a(3),T("",f(6,4,"settings.main.slave_warning")," "))}function W$(t,i){1&t&&k(0,"p-progressSpinner")}function K$(t,i){1&t&&(k(0,"p-message",14),m(1,"translate")),2&t&&D("text",f(1,1,"settings.main.restarting"))}function Q$(t,i){1&t&&(k(0,"p-message",15),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}let J$=(()=>{class t{constructor(e,n,s,r){this.mythService=e,this.setupService=n,this.dvrService=s,this.wizardService=r,this.errorCount=0,this.retryCount=0,this.upComing=[],this.recStatusDesc="",this.recStartTime="",this.ready=!1,this.delay=0,this.busy=!1,this.hostName="",this.masterServerName="",this.getBackendInfo(),this.refreshInfo()}refreshInfo(){setTimeout(()=>{this.getBackendInfo(),this.refreshInfo()},12e4)}getBackendInfo(){0==this.retryCount&&(this.errorCount=0),this.ready=!1,this.recStatusDesc="",this.recStartTime="",this.upComing=[],this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Default:this.hostName}).subscribe({next:n=>{this.masterServerName=n.String},error:()=>this.errorCount++})},error:()=>this.errorCount++}),this.mythService.GetBackendInfo().subscribe({next:e=>{this.setupService.schedulingEnabled=e.BackendInfo.Env.SchedulingEnabled,this.setupService.isDatabaseIgnored=e.BackendInfo.Env.IsDatabaseIgnored,this.setupService.DBTimezoneSupport=e.BackendInfo.Env.DBTimezoneSupport,this.wizardService.wizardItems=this.setupService.isDatabaseIgnored?this.wizardService.dbSetupMenu:this.wizardService.fullMenu,this.wizardService.getWizardData(),this.retryCount>0&&this.errorCount>0?(this.retryCount=0,this.errorCount=0):this.retryCount>0&&0==this.errorCount&&setTimeout(()=>this.getBackendInfo(),2e3),0==this.retryCount&&(setTimeout(()=>this.getUpcoming(),this.delay),this.delay=0)},error:()=>{this.setupService.schedulingEnabled=!0,this.errorCount++,this.errorCountthis.getBackendInfo(),2e3):this.retryCount=0}})}getUpcoming(){this.errorCount=0,this.dvrService.GetUpcomingList({Count:1}).subscribe({next:e=>{if(this.upComing=e.ProgramList.Programs,this.ready=!0,this.upComing.length>0){this.dvrService.RecStatusToString(this.upComing[0].Recording.Status).subscribe({next:s=>this.recStatusDesc=s.String,error:()=>this.errorCount++});var n=new Date(this.upComing[0].Recording.StartTs);this.recStartTime=n.toLocaleString()}},error:()=>this.errorCount++})}disableSched(){this.mythService.ManageScheduler({Disable:!0}).subscribe({next:e=>this.getBackendInfo(),error:()=>this.errorCount++})}restart(){this.mythService.Shutdown({Restart:!0}).subscribe({next:e=>{e.bool?(this.retryCount=12,this.getBackendInfo()):this.errorCount++},error:()=>this.errorCount++}),this.delay=5e3}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(De),x(jo),x(Sd))},t.\u0275cmp=G({type:t,selectors:[["app-backend-warning"]],decls:13,vars:7,consts:[[1,"block","card","w-full"],[1,"block"],[1,"m-5"],["class","flex",4,"ngIf"],["class","pb-0 m-0",4,"ngIf"],[4,"ngIf"],["severity","info",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],[1,"flex"],[1,"flex","align-items-center"],["icon","pi pi-save","iconPos","left",1,"pr-5","pb-1","pt-0","m-0",3,"label","onClick"],["class","flex align-items-center",4,"ngIf"],[1,"text-pink-500"],[1,"pb-0","m-0"],["severity","info",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1)(2,"p-card",2),_(3,H$,7,6,"div",3),_(4,G$,6,5,"div",3),l(5,"div"),_(6,j$,3,8,"small",4),c(),_(7,$$,7,6,"div",5),l(8,"div"),_(9,W$,1,0,"p-progressSpinner",5),_(10,K$,2,3,"p-message",6),l(11,"p"),_(12,Q$,2,3,"p-message",7),c()()()()()),2&e&&(a(3),p("ngIf",n.setupService.schedulingEnabled&&0==n.retryCount),a(1),p("ngIf",!n.setupService.schedulingEnabled&&0==n.retryCount),a(2),p("ngIf",n.upComing.length>0),a(1),p("ngIf",n.masterServerName&&n.hostName&&n.masterServerName!=n.hostName&&0==n.retryCount),a(2),p("ngIf",n.retryCount>0),a(1),p("ngIf",n.retryCount>0),a(2),p("ngIf",!n.setupService.isDatabaseIgnored&&n.errorCount>0&&0==n.retryCount))},directives:[Pe,Q,ve,Uo,qe],pipes:[de],styles:[""]}),t})();const Y$=["top"];let nS=(()=>{class t{constructor(e,n,s){this.wizardService=e,this.setupService=n,this.translate=s,this.fullMenu=[],this.dbSetupMenu=[],this.activeIndex=0,n.pageType="S"}ngOnInit(){this.translate.get("setupwizard.steps.selectlanguage").subscribe(e=>{this.fullMenu=[{label:this.translate.instant("setupwizard.steps.dbsetup"),routerLink:"dbsetup"},{label:this.translate.instant("setupwizard.steps.selectlanguage"),routerLink:"selectlanguage"},{label:this.translate.instant("setupwizard.steps.general"),routerLink:"general"},{label:this.translate.instant("setupwizard.steps.capture_cards"),routerLink:"capture-cards"},{label:this.translate.instant("setupwizard.steps.recording_profiles"),routerLink:"recording-profiles"},{label:this.translate.instant("setupwizard.steps.video_sources"),routerLink:"video-sources"},{label:this.translate.instant("setupwizard.steps.input_connections"),routerLink:"input-connections"},{label:this.translate.instant("setupwizard.steps.channel_editor"),routerLink:"channel-editor"},{label:this.translate.instant("setupwizard.steps.storage_groups"),routerLink:"storage-groups"},{label:this.translate.instant("setupwizard.steps.system_events"),routerLink:"system-events"}],this.wizardService.fullMenu=this.fullMenu,this.activeItem=this.fullMenu[0],this.dbSetupMenu=[this.fullMenu[0]],this.wizardService.dbSetupMenu=this.dbSetupMenu,this.wizardService.wizardItems=this.wizardService.fullMenu})}ngAfterViewInit(){this.wizardService.m_topElement=this.topElement}}return t.\u0275fac=function(e){return new(e||t)(x(Sd),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-settings"]],viewQuery:function(e,n){if(1&e&&j(Y$,5),2&e){let s;V(s=B())&&(n.topElement=s.first)}},decls:17,vars:12,consts:[["top",""],[1,"content-section","implementation"],[1,"card"],[1,"flex","flex-row"],["pButton","","pRipple","","icon","pi pi-angle-double-left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-11"],[3,"model","activeItem","scrollable"],["menu",""],["pButton","","pRipple","","icon","pi pi-angle-double-right",1,"p-button-text","p-button-primary",3,"pTooltip","click"]],template:function(e,n){if(1&e){const s=I();k(0,"span",null,0),l(2,"div",1)(3,"h1"),g(4),m(5,"translate"),c(),l(6,"div",2)(7,"div",3)(8,"button",4),C("click",function(){return v(s),F(12).navBackward()}),m(9,"translate"),c(),l(10,"div",5),k(11,"p-tabMenu",6,7),c(),l(13,"button",8),C("click",function(){return v(s),F(12).navForward()}),m(14,"translate"),c()()(),k(15,"app-backend-warning")(16,"router-outlet"),c()}2&e&&(a(4),S(f(5,6,"settings.main.title")),a(4),D("pTooltip",f(9,8,"dashboard.scrolltabsleft")),a(3),p("model",n.wizardService.wizardItems)("activeItem",n.activeItem)("scrollable",!1),a(2),D("pTooltip",f(14,10,"dashboard.scrolltabsright")))},directives:[Ln,vt,Jt,W2,J$,Ml],pipes:[de],styles:['.warning[_ngcontent-%COMP%]{color:#cc8925;background-color:#fff2e2}.connected[_ngcontent-%COMP%]{color:#1ea97c;background-color:#e4f8f0}.medium-width[_ngcontent-%COMP%]{width:"600"}']}),t})();function Z$(t,i){if(1&t){const e=I();l(0,"div"),k(1,"h1"),l(2,"div",1)(3,"button",2),C("click",function(){return v(e),F(7).navBackward()}),m(4,"translate"),c(),l(5,"div",3),k(6,"p-tabMenu",4,5),c(),l(8,"button",6),C("click",function(){return v(e),F(7).navForward()}),m(9,"translate"),c()(),k(10,"router-outlet"),c()}if(2&t){const e=d();a(3),D("pTooltip",f(4,5,"dashboard.scrolltabsleft")),a(3),p("model",e.fullMenu)("activeItem",e.activeItem)("scrollable",!1),a(2),D("pTooltip",f(9,7,"dashboard.scrolltabsright"))}}let iS=(()=>{class t{constructor(e,n){this.translate=e,this.setupService=n,this.translateDone=!1,this.fullMenu=[{label:"dashboard.backendStatus",routerLink:"status"},{label:"dashboard.channeleditor",routerLink:"channel-editor"},{label:"dashboard.programguide",routerLink:"program-guide"},{label:"dashboard.recordings.heading",routerLink:"recordings"},{label:"dashboard.upcoming.heading",routerLink:"upcoming"},{label:"dashboard.recrules.heading",routerLink:"recrules"},{label:"dashboard.videos.heading",routerLink:"videos"}],this.activeItem=this.fullMenu[0],n.pageType="D",this.fullMenu.forEach(s=>{s.label&&this.translate.get(s.label).subscribe(r=>{s.label=r,this.translateDone=!0})})}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-dashboard"]],decls:1,vars:1,consts:[[4,"ngIf"],[1,"flex","flex-row"],["pButton","","pRipple","","icon","pi pi-angle-double-left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-11"],[3,"model","activeItem","scrollable"],["menu",""],["pButton","","pRipple","","icon","pi pi-angle-double-right",1,"p-button-text","p-button-primary",3,"pTooltip","click"]],template:function(e,n){1&e&&_(0,Z$,11,9,"div",0),2&e&&p("ngIf",n.translateDone)},directives:[Q,Ln,vt,Jt,W2,Ml],pipes:[de],styles:["[_nghost-%COMP%] .dark-panel.p-panel .p-panel-header{background:#c0c0c0}"]}),t})(),zi=(()=>{class t{constructor(){}canDeactivate(e,n,s,r){return!e.canDeactivate||e.canDeactivate()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const X$=[{path:"dashboard",component:iS},{path:"setupwizard",component:nS}];let eW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[zi],imports:[[On.forRoot(X$)],On]}),t})(),tW=(()=>{class t{constructor(e,n){this.http=e,this.document=n}switchTheme(e){let n=this.document.getElementById("app-theme");n&&(n.href="assets/themes/"+e)}getThemes(){return this.http.get("assets/themes/themes.json").toPromise().then(e=>e.data).then(e=>e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi),K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ll=(()=>{class t{constructor(e){this.translate=e,this.m_showSidebar=!0,this.recStatusText={Pending:"",Failing:"",MissedFuture:"",Tuning:"",Failed:"",TunerBusy:"",LowDiskSpace:"",Cancelled:"",Missed:"",Aborted:"",Recorded:"",Recording:"",WillRecord:"",Unknown:"",DontRecord:"",PreviousRecording:"",CurrentRecording:"",EarlierShowing:"",TooManyRecordings:"",NotListed:"",Conflict:"",LaterShowing:"",Repeat:"",Inactive:"",NeverRecord:"",Offline:""},this.getTranslations()}getTranslations(){for(const[e,n]of Object.entries(this.recStatusText))this.translate.get("data.recstatus."+e).subscribe(s=>{Object.defineProperty(this.recStatusText,e,{value:s})})}toggleShowSidebar(){this.m_showSidebar=!this.m_showSidebar}showSidebar(e){this.m_showSidebar=e}}return t.\u0275fac=function(e){return new(e||t)(K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function nW(t,i){if(1&t&&(l(0,"div"),k(1,"img",26),c()),2&t){const e=d(2);a(1),Bn("src","images/themes/",e.m_selectedTheme.Image,"",Xt)}}function iW(t,i){if(1&t&&(l(0,"div"),k(1,"img",27),c()),2&t){const e=d(2);a(1),Bn("src","images/locale/",e.m_selectedLanguage.Image,"",Xt)}}function sW(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"a",9),C("click",function(){return v(e),d().toggleShowSidebar()}),k(3,"i",10)(4,"span",11),c(),k(5,"img",12),l(6,"div",13)(7,"h1"),g(8),m(9,"translate"),c()()(),l(10,"div",14)(11,"button",15),C("click",function(){return v(e),d().showTopBar=!1}),m(12,"translate"),c()(),l(13,"div",16)(14,"a",17),C("click",function(){return v(e),d().toggleShowNavbar()}),k(15,"i",18)(16,"span",11),c(),l(17,"ul",19)(18,"li",20)(19,"a",21),C("click",function(s){return v(e),d(),F(5).toggle(s)}),m(20,"translate"),_(21,nW,2,1,"div",22),l(22,"span",23),g(23),m(24,"translate"),c(),k(25,"span",24),c()(),l(26,"li",20)(27,"a",25),C("click",function(s){return v(e),d(),F(8).toggle(s)}),m(28,"translate"),_(29,iW,2,1,"div",22),l(30,"span",23),g(31),m(32,"translate"),c(),k(33,"span",24),c()()()()()}if(2&t){const e=d();a(8),S(f(9,9,"navbar.mainheading")),a(3),D("pTooltip",f(12,11,"navbar.hide")),a(6),p("hidden",e.m_showNavbar),a(2),D("pTooltip",f(20,13,"navbar.switchTheme")),a(2),p("ngIf",e.m_selectedTheme),a(2),S(f(24,15,"navbar.switchTheme")),a(4),D("pTooltip",f(28,17,"navbar.changeLanguage")),a(2),p("ngIf",e.m_selectedLanguage),a(2),S(f(32,19,"navbar.changeLanguage"))}}function rW(t,i){if(1&t){const e=I();l(0,"div",28)(1,"button",29),C("click",function(){return v(e),d().showTopBar=!0}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"navbar.show")))}function oW(t,i){if(1&t&&(l(0,"tr",33)(1,"td",34)(2,"span",35),g(3),c()()()),2&t){const e=i.$implicit;a(3),S(e.Category)}}function aW(t,i){if(1&t){const e=I();l(0,"tr",36),C("click",function(){const r=v(e).$implicit;return d(2).changeTheme(r)}),l(1,"td",37),k(2,"img",38),c(),l(3,"td"),g(4),c()()}if(2&t){const n=i.$implicit;p("pSelectableRow",i.$implicit),a(2),Bn("src","images/themes/",n.Image,"",Xt),p("alt",n.image),a(2),S(n.Name)}}function lW(t,i){1&t&&(l(0,"p-table",30),_(1,oW,4,1,"ng-template",31),_(2,aW,5,4,"ng-template",32),c()),2&t&&p("value",d().m_themes$)("paginator",!1)("scrollable",!0)}function cW(t,i){if(1&t){const e=I();l(0,"tr",36),C("click",function(){const r=v(e).$implicit,o=d(2);return F(8).hide(),o.changeLanguage(r)}),l(1,"td",37),k(2,"img",38),c(),l(3,"td")(4,"pre")(5,"span",40),g(6),c(),k(7,"br"),g(8),c()()()}if(2&t){const n=i.$implicit;p("pSelectableRow",i.$implicit),a(2),Bn("src","images/locale/",n.Image,"",Xt),p("alt",n.image),a(4),S(n.Language),a(2),T("",n.NativeLanguage," ")}}function uW(t,i){1&t&&(l(0,"p-table",39),_(1,cW,9,5,"ng-template",32),c()),2&t&&p("value",d().m_languages)("paginator",!1)("scrollable",!0)}const dW=function(){return{width:"350px"}},pW=function(){return{width:"450px"}};let hW=(()=>{class t{constructor(e,n,s,r,o,u,h){this.themeService=e,this.configService=n,this.translateService=s,this.primeconfigService=r,this.dataService=o,this.mythService=u,this.router=h,this.m_showNavbar=!0,this.showTopBar=!0,this.m_devMode=function zR(){return ZC=!0,YC}(),this.m_haveDatabase=!0,this.themeService.getThemes().then(b=>{this.m_themes$=b,this.m_selectedTheme=this.findThemeByName(localStorage.getItem("Theme")||"Indigo Light"),this.themeService.switchTheme(this.m_selectedTheme.CSS)}),this.configService.GetLanguages().subscribe(b=>{this.m_languages=b.LanguageList.Languages,this.m_selectedLanguage=this.findLanguageByCode(localStorage.getItem("Language")||"en_US")}),this.mythService.GetBackendInfo().subscribe(b=>{var y=this.router.url;b.BackendInfo.Env.IsDatabaseIgnored||!b.BackendInfo.Env.SchedulingEnabled&&!y.startsWith("/setupwizard/")?h.navigate(["setupwizard/dbsetup"]):"/"==y&&h.navigate(["dashboard/status"])})}ngOnInit(){}findThemeByName(e){for(var n=0;nthis.primeconfigService.setTranslation(n))}toggleShowNavbar(){this.m_showNavbar=!this.m_showNavbar}toggleShowSidebar(){this.dataService.toggleShowSidebar()}}return t.\u0275fac=function(e){return new(e||t)(x(tW),x(zo),x(Le),x(zn),x(Ll),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-navbar"]],decls:10,vars:10,consts:[[1,"flex","flex-column","relative","flex-auto"],["class","toolbar flex justify-content-between align-items-center pm-8 surface-section relative lg:static surface-border","style","height: 80px;",4,"ngIf","ngIfElse"],["hidden",""],[3,"showCloseIcon"],["themePanel",""],["pTemplate",""],["languagePanel",""],[1,"toolbar","flex","justify-content-between","align-items-center","pm-8","surface-section","relative","lg:static","surface-border",2,"height","80px"],[1,"toolbar","flex","align-items-left","flex-shrink-0",2,"height","80px"],["pRipple","",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-3","lg:hidden","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"click"],[1,"pi","pi-bars","mr-1","lg:ml-1","text-base","lg:text-xl"],["ng","","serve","",1,"p-ink"],["src","images/mythtv.png","alt","Image","height","80",1,"py-2","pl-1"],[1,"hidden","md:inline-flex"],[1,"toolbar","flex","flex-grow-1","align-items-end",2,"height","80px"],["pButton","","pRipple","","icon","pi pi-angle-up",1,"p-button-text","lg:col-offset-3","p-button-secondary",3,"pTooltip","click"],[1,"pr-2","toolbar",2,"height","80px"],["pRipple","",1,"toolbar","p-ripple","p-element","my-2","mx-2","flex","align-items-center","cursor-pointer","p-3","md:hidden","md:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",2,"height","80px",3,"click"],[1,"pi","pi-ellipsis-v","mr-1","md:mr-0","text-base","md:text-xl"],[1,"toolbar","list-none","p-0","m-0","md:flex","md:align-items-center","select-none","md:flex-row","surface-section","border-1","md:border-none","surface-border","right-0","top-100","z-2","shadow-2","md:shadow-none","absolute","md:static",3,"hidden"],[1,"toolbar",2,"height","80px"],["pRipple","","tooltipPosition","bottom",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-2","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"pTooltip","click"],[4,"ngIf"],[1,"font-medium","inline","md:hidden"],[1,"p-ink"],["pRipple","","tooltipPosition","bottom",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"pTooltip","click"],[1,"mr-2","lg:mr-0",2,"width","32px","height","32px",3,"src"],[1,"mr-2","lg:mr-0",2,"width","32px",3,"src"],[1,"toolbar","block","flex","flex-grow-1","justify-content-center","align-items-end",2,"height","2rem"],["pButton","","pRipple","","icon","pi pi-angle-down",1,"p-button-text","p-button-secondary",3,"pTooltip","click"],["selectionMode","single","sortField","Name","sortMode","single","scrollHeight","500px","rowGroupMode","subheader","groupRowsBy","Category","responsiveLayout","scroll",3,"value","paginator","scrollable"],["pTemplate","groupheader"],["pTemplate","body"],["pRowGroupHeader",""],["colspan","2"],[1,"font-bold","ml-2"],[3,"pSelectableRow","click"],[2,"max-width","80px"],[1,"theme-image",3,"src","alt"],["selectionMode","single","sortField","NativeLanguage","sortMode","single","scrollHeight","500px","responsiveLayout","scroll",3,"value","paginator","scrollable"],[1,"font-bold"]],template:function(e,n){if(1&e&&(l(0,"div",0),_(1,sW,34,21,"div",1),_(2,rW,3,3,"ng-template",null,2,we),c(),l(4,"p-overlayPanel",3,4),_(6,lW,3,3,"ng-template",5),c(),l(7,"p-overlayPanel",3,6),_(9,uW,2,3,"ng-template",5),c()),2&e){const s=F(3);a(1),p("ngIf",n.showTopBar)("ngIfElse",s),a(3),q(A(8,dW)),p("showCloseIcon",!0),a(3),q(A(9,pW)),p("showCloseIcon",!0)}},directives:[Q,vt,Ln,Jt,V9,ie,xn,yG,wG],pipes:[de],styles:[".toolbar[_ngcontent-%COMP%]{background-color:#000;color:#4682b4}.theme-image[_ngcontent-%COMP%]{width:50px}"]}),t})(),mW=(()=>{class t{constructor(e){this.dataService=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Ll))},t.\u0275cmp=G({type:t,selectors:[["app-sidenav"]],decls:32,vars:25,consts:[[1,"navbar","flex","relative","lg:static","surface-ground"],["id","sidebar",1,"bg-gray-900","lg:block","flex-shrink-0","absolute","lg:static","left-0","top-0","z-2","border-gray-800","w-18rem","lg:w-5rem","select-none",3,"hidden"],[1,"flex","flex-column","h-full"],[1,"mt-1","select-none"],[1,"list-none","p-3","lg:py-3","lg:px-2","m-0"],[3,"routerLink","pTooltip","tooltipDisabled","click"],["pRipple","",1,"p-ripple","p-element","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-gray-300","hover:text-white","transition-duration-150","transition-colors"],[1,"pi","pi-home","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"font-medium","inline","lg:hidden"],[1,"p-ink"],["pRipple","",1,"p-element","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-gray-300","hover:text-white","transition-duration-150","transition-colors"],[1,"pi","pi-cog","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"pi","pi-map","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"contentarea","px-0","lg:px-3","w-full"]],template:function(e,n){1&e&&(ce(0),l(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"ul",4)(6,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(7,"translate"),l(8,"a",6),k(9,"i",7),l(10,"span",8),g(11),m(12,"translate"),c(),k(13,"span",9),c()(),l(14,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(15,"translate"),l(16,"a",10),k(17,"i",11),l(18,"span",8),g(19),m(20,"translate"),c(),k(21,"span",9),c()(),l(22,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(23,"translate"),l(24,"a",10),k(25,"i",12),l(26,"span",8),g(27),m(28,"translate"),c(),k(29,"span",9),c()()()()()(),l(30,"div",13),k(31,"router-outlet"),c()(),ue()),2&e&&(a(2),p("hidden",n.dataService.m_showSidebar),a(4),D("pTooltip",f(7,13,"navbar.dashboard")),p("routerLink","dashboard/status")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(12,15,"navbar.dashboard")),a(3),D("pTooltip",f(15,17,"navbar.backendSetup")),p("routerLink","setupwizard/dbsetup")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(20,19,"navbar.backendSetup")),a(3),D("pTooltip",f(23,21,"dashboard.programguide")),p("routerLink","dashboard/program-guide")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(28,23,"dashboard.programguide")))},directives:[fd,Jt,vt,Ml],pipes:[de],styles:[".sidebar[_ngcontent-%COMP%]{width:70px;height:100%;margin:0}.navbar[_ngcontent-%COMP%]{min-height:calc(100vh - 85px);max-height:calc(100vh - 85px)}.contentarea[_ngcontent-%COMP%]{overflow:scroll;height:calc(100vh - 85px)}"]}),t})(),fW=(()=>{class t{constructor(e,n){this.config=e,this.translate=n,this.title="MythTV Backend",n.setDefaultLang("en_US"),n.use(localStorage.getItem("Language")||"en_US"),n.get("primeng").subscribe(s=>this.config.setTranslation(s)),this.config.ripple=!0}}return t.\u0275fac=function(e){return new(e||t)(x(zn),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-root"]],decls:2,vars:0,template:function(e,n){1&e&&k(0,"app-navbar")(1,"app-sidenav")},directives:[hW,mW],styles:[""]}),t})();const gW=["langform"],_W=["countryrow"],bW=["languagerow"];function vW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.localSetup")," ")}function CW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.countryAndLanguage")," ")}function yW(t,i){1&t&&(l(0,"h2"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"setupwizard.selectCountry")))}function wW(t,i){if(1&t&&(l(0,"div",18,19),k(2,"img",20),l(3,"pre")(4,"span",21),g(5),c(),g(6),c()()),2&t){const e=i.$implicit;ne("id",e.Code),a(2),Bn("src","images/locale/",e.Image,"",Xt),a(3),S(e.Country),a(1),$e("",null!==e.NativeCountry?" - "+e.NativeCountry:""," (",e.Code,")")}}function TW(t,i){if(1&t&&(l(0,"div",22),k(1,"p-message",23),m(2,"translate"),c()),2&t){const e=d(2);a(1),La("text","",f(2,2,"setupwizard.selectedCountry")," ",e.m_wizardData.Country.Country,"")}}function SW(t,i){1&t&&(l(0,"div",22),k(1,"p-message",24),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.noCountry")))}function xW(t,i){1&t&&(l(0,"h2"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"setupwizard.selectLanguage")))}function DW(t,i){if(1&t&&(l(0,"div",18,25),k(2,"img",20),l(3,"pre")(4,"span",21),g(5),c(),g(6),c()()),2&t){const e=i.$implicit;ne("id",e.Code),a(2),Bn("src","images/locale/",e.Image,"",Xt),a(3),S(e.Language),a(1),$e(" - ",e.NativeLanguage," (",e.Code,")")}}function MW(t,i){if(1&t&&(l(0,"div",22),k(1,"p-message",23),m(2,"translate"),c()),2&t){const e=d(2);a(1),La("text","",f(2,2,"setupwizard.selectedLanguage")," ",e.m_wizardData.Language.NativeLanguage,"")}}function kW(t,i){1&t&&(l(0,"div",22),k(1,"p-message",26),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.noLanguage")))}const sS=function(){return{"max-height":"460px","min-height":"460px"}};function IW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-listbox",10),C("ngModelChange",function(s){return v(e),d().m_wizardData.Country=s}),_(3,yW,3,3,"ng-template",11),_(4,wW,7,5,"ng-template",12),c(),_(5,TW,3,4,"div",13),_(6,SW,3,3,"ng-template",null,14,we),c(),l(8,"div",15)(9,"p-listbox",16),C("ngModelChange",function(s){return v(e),d().m_wizardData.Language=s}),_(10,xW,3,3,"ng-template",11),_(11,DW,7,5,"ng-template",12),c(),_(12,MW,3,4,"div",13),_(13,kW,3,3,"ng-template",null,17,we),c()()}if(2&t){const e=F(7),n=F(14),s=d();a(2),p("options",s.m_countries)("ngModel",s.m_wizardData.Country)("multiple",!1)("filter",!0)("listStyle",A(14,sS)),a(3),p("ngIf",""!=s.m_wizardData.Country.Code)("ngIfElse",e),a(4),p("options",s.m_languages)("ngModel",s.m_wizardData.Language)("multiple",!1)("filter",!0)("listStyle",A(15,sS)),a(3),p("ngIf",""!=s.m_wizardData.Language.Code)("ngIfElse",n)}}function EW(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function RW(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function LW(t,i){if(1&t){const e=I();l(0,"div",27)(1,"div",28),_(2,EW,2,3,"p-message",29),_(3,RW,2,3,"p-message",30),c(),l(4,"p-button",31),C("onClick",function(){v(e);const s=d(),r=F(2);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c(),l(6,"p-button",32),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/dbsetup"])}),m(7,"translate"),c(),l(8,"p-button",33),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/general"])}),m(9,"translate"),c()()}if(2&t){const e=d(),n=F(2);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,7,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled),a(2),D("label",f(7,9,"common.back")),a(2),D("label",f(9,11,"common.next")),p("disabled",""==e.m_wizardData.Country.Code||""==e.m_wizardData.Language.Code)}}let OW=(()=>{class t{constructor(e,n,s,r,o,u){this.router=e,this.translate=n,this.setupService=s,this.configService=r,this.wizardService=o,this.mythService=u,this.m_countries=[],this.m_languages=[],this.successCount=0,this.errorCount=0,this.expectedCount=0,this.warningText="settings.common.warning",this.saveObserver={next:h=>{h.bool?(this.successCount++,this.successCount>=this.expectedCount&&localStorage.setItem("Language",this.m_wizardData.Language.Code),this.translate.use(this.m_wizardData.Language.Code)):(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:h=>{console.error(h),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.translate.get(this.warningText).subscribe(h=>{this.warningText=h})}ngOnInit(){this.configService.GetLanguages().subscribe(e=>this.m_languages=e.LanguageList.Languages),this.configService.GetCountries().subscribe(e=>this.m_countries=e.CountryList.Countries),this.m_wizardData=this.wizardService.getWizardData(),setTimeout(()=>this.scrollIntoView(),1e3)}ngAfterViewInit(){}scrollIntoView(){if(""!=this.m_wizardData.Country.Code){const e=this.countryRowElement.find(n=>n.nativeElement.getAttribute("id")===this.m_wizardData.Country.Code);e?e.nativeElement.scrollIntoView({behavior:"instant",inline:"start",block:"center"}):console.log("Failed to find element by ID")}if(""!=this.m_wizardData.Language.Code){const e=this.languageRowElement.find(n=>n.nativeElement.getAttribute("id")===this.m_wizardData.Language.Code);e&&e.nativeElement.scrollIntoView({behavior:"instant",inline:"start",block:"center"})}null!=this.wizardService.m_topElement&&this.wizardService.m_topElement.nativeElement.scrollIntoView({behavior:"instant",block:"start"})}saveForm(){this.successCount=0,this.errorCount=0,this.expectedCount=2,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"Country",Value:this.m_wizardData.Country.Code}).subscribe(this.saveObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"Language",Value:this.m_wizardData.Language.Code}).subscribe(this.saveObserver)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Le),x(De),x(zo),x(Sd),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-selectlanguage"]],viewQuery:function(e,n){if(1&e&&(j(gW,5),j(_W,5,Re),j(bW,5,Re)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.countryRowElement=s),V(s=B())&&(n.languageRowElement=s)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:8,vars:0,consts:[[1,"wizard-content","m-0","md:m-3"],["name","langform",1,"mx-0","md:mx-3"],["langform","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid","m-0","md:m-3"],[1,"col-12","md:col-6","pt-2"],["optionLabel","Country","name","countries",3,"options","ngModel","multiple","filter","listStyle","ngModelChange"],["pTemplate","header"],["pTemplate","item"],["class","pt-5",4,"ngIf","ngIfElse"],["noCountry",""],[1,"col-12","md:col-6"],["optionLabel","Language","name","languages",3,"options","ngModel","multiple","filter","listStyle","ngModelChange"],["noLanguage",""],[1,"language-item"],["countryrow",""],[1,"pr-3",2,"width","70px",3,"src"],[1,"font-bold"],[1,"pt-5"],["severity","success",3,"text"],["severity","error",3,"text"],["languagerow",""],["severity","error",1,"pt-2",3,"text"],[1,"grid","nogutter","m-5"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["icon","pi pi-angle-left","iconPos","left",1,"pr-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",3,"label","disabled","onClick"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"form",1,2)(3,"p-card",3),_(4,vW,2,3,"ng-template",4),_(5,CW,2,3,"ng-template",5),_(6,IW,15,16,"ng-template",6),_(7,LW,10,13,"ng-template",7),c()()())},directives:[ze,Ge,He,Pe,ie,ws,Te,_e,Q,qe,ve],pipes:[de],styles:[".language-item{display:flex;align-items:center}@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();class AW{constructor(i,e){this._document=e;const n=this._textarea=this._document.createElement("textarea"),s=n.style;s.position="fixed",s.top=s.opacity="0",s.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,this._document.body.appendChild(n)}copy(){const i=this._textarea;let e=!1;try{if(i){const n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),e=this._document.execCommand("copy"),n&&n.focus()}}catch(n){}return e}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let rS=(()=>{class t{constructor(e){this._document=e}copy(e){const n=this.beginCopy(e),s=n.copy();return n.destroy(),s}beginCopy(e){return new AW(e,this._document)}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const PW=["databaseForm"];function FW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.databaseSetup")," ")}function NW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.enterDBLoginDetails")," ")}function VW(t,i){1&t&&(l(0,"div")(1,"small",42),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.IPorAddressRequired")))}function BW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function HW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.userRequired")))}function qW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.passwordRequired")))}function UW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.databaseNameRequired")))}function GW(t,i){if(1&t){const e=I();l(0,"div",30)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"input",45,46),C("ngModelChange",function(s){return v(e),d(2).database.LocalHostName=s}),c(),l(6,"small",47),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"setupwizard.LocalHostName_label")),a(2),p("ngModel",e.database.LocalHostName),a(3),S(f(8,5,"setupwizard.LocalHostName_desc"))}}function zW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"label",48),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",49),C("ngModelChange",function(s){return v(e),d(2).database.WOLReconnect=s}),c(),l(5,"small",32),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),T(" ",f(3,8,"settings.vsource.WOLReconnect_label")," "),a(2),p("ngModel",e.database.WOLReconnect)("min",0)("max",60)("step",1)("useGrouping",!1)("showButtons",!0),a(2),T(" ",f(7,10,"settings.vsource.WOLReconnect_desc")," ")}}function jW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"label",50),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",51),C("ngModelChange",function(s){return v(e),d(2).database.WOLRetry=s}),c(),l(5,"small",32),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),T(" ",f(3,8,"settings.vsource.WOLRetry_label")," "),a(2),p("ngModel",e.database.WOLRetry)("min",1)("max",10)("step",1)("useGrouping",!1)("showButtons",!0),a(2),T(" ",f(7,10,"settings.vsource.WOLRetry_desc")," ")}}function $W(t,i){if(1&t){const e=I();l(0,"div",30)(1,"label",52),g(2),m(3,"translate"),c(),l(4,"input",53,54),C("ngModelChange",function(s){return v(e),d(2).database.WOLCommand=s}),c(),l(6,"small",55),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"setupwizard.WOLCommand_label")),a(2),p("ngModel",e.database.WOLCommand),a(3),S(f(8,5,"setupwizard.WOLCommand_desc"))}}function WW(t,i){1&t&&(l(0,"div"),k(1,"p-message",56),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.connectedToDatabase")))}function KW(t,i){1&t&&(l(0,"div",57,39),k(2,"p-message",58),m(3,"translate"),c()),2&t&&(a(2),D("text",f(3,1,"setupwizard.notConnectedToDatabase")))}const oS=function(t){return{Name:t}};function QW(t,i){if(1&t&&(l(0,"div"),k(1,"p-message",56),m(2,"translate"),c()),2&t){const e=d(2);a(1),D("text",Dt(2,1,"setupwizard.dbsetup.havedb",z(4,oS,e.m_wizardData.Database.Name)))}}function JW(t,i){if(1&t&&(l(0,"div",59,40),k(2,"p-message",60),m(3,"translate"),c()),2&t){const e=d(2);a(2),D("text",Dt(3,1,"setupwizard.dbsetup.havenotdb",z(4,oS,e.m_wizardData.Database.Name)))}}const YW=function(t){return{SchemaVersion:t}};function ZW(t,i){if(1&t&&(l(0,"div"),k(1,"p-message",61),m(2,"translate"),c()),2&t){const e=d(2);a(1),D("text",Dt(2,1,"setupwizard.dbsetup.schemaver",z(4,YW,e.m_wizardData.DatabaseStatus.DatabaseStatus.SchemaVersion)))}}function XW(t,i){1&t&&(l(0,"div",62,40),k(2,"p-message",63),m(3,"translate"),c()),2&t&&(a(2),D("text",f(3,1,"setupwizard.databaseSchemaUnknown")))}function eK(t,i){if(1&t){const e=I();l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"div",68)(5,"div",69),g(6," Sql Server Type: "),c(),l(7,"div",70)(8,"p-radioButton",71),C("ngModelChange",function(s){return v(e),d(3).dbtype=s})("ngModelChange",function(){return v(e),d(3).setCommandList()}),c(),l(9,"label",72),g(10,"MySql"),c()(),l(11,"div",73)(12,"p-radioButton",74),C("ngModelChange",function(s){return v(e),d(3).dbtype=s})("ngModelChange",function(){return v(e),d(3).setCommandList()}),c(),l(13,"label",75),g(14,"MariaDB"),c()()(),l(15,"table",76)(16,"tr")(17,"td",65),g(18),c(),l(19,"td",66)(20,"button",67),C("click",function(){v(e);const s=d(3);return s.copyToclipboard(s.commandlist)}),m(21,"translate"),c()()()(),l(22,"p"),g(23),m(24,"translate"),c(),l(25,"table")(26,"tr")(27,"td",65),g(28),c(),l(29,"td",66)(30,"button",67),C("click",function(){v(e);const s=d(3);return s.copyToclipboard(s.mySqlCommand)}),m(31,"translate"),c()()()()()}if(2&t){const e=d(3);a(2),T(" ",f(3,8,"setupwizard.sqlinstructions")," "),a(6),p("ngModel",e.dbtype),a(4),p("ngModel",e.dbtype),a(6),T(" ",e.commandlist," "),a(2),D("pTooltip",f(21,10,"settings.common.clipboard_tooltip")),a(3),S(f(24,12,"setupwizard.runcommand")),a(5),T(" ",e.mySqlCommand," "),a(2),D("pTooltip",f(31,14,"settings.common.clipboard_tooltip"))}}function tK(t,i){if(1&t){const e=I();l(0,"div")(1,"h2"),g(2),m(3,"translate"),c(),_(4,eK,32,16,"div",13),l(5,"p",64),g(6),m(7,"translate"),c(),l(8,"table")(9,"tr")(10,"td",65),g(11),c(),l(12,"td",66)(13,"button",67),C("click",function(){v(e);const s=d(2);return s.copyToclipboard(s.tzCommand)}),m(14,"translate"),c()()()(),l(15,"p"),g(16),m(17,"translate"),c(),l(18,"p"),g(19),m(20,"translate"),c(),l(21,"p"),g(22),m(23,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"common.instructions")),a(2),p("ngIf",e.connectionFail),a(2),S(f(7,10,"setupwizard.tztables")),a(5),T(" ",e.tzCommand," "),a(2),D("pTooltip",f(14,12,"settings.common.clipboard_tooltip")),a(3),T("",f(17,14,"setupwizard.ignoremessages")," "),a(3),S(f(20,16,"setupwizard.savethis")),a(3),S(f(23,18,"setupwizard.restartbe"))}}const nK=function(t){return{"is-invalid":t}};function iK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"label",9),g(3),m(4,"translate"),c(),l(5,"input",10,11),C("ngModelChange",function(s){return v(e),d().database.Host=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c(),_(10,VW,4,3,"div",13),c(),l(11,"div",8)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"input",15,16),C("ngModelChange",function(s){return v(e),d().database.Port=s}),c(),l(17,"small",17),g(18),m(19,"translate"),c(),_(20,BW,4,3,"div",13),c(),l(21,"div",8)(22,"label",18),g(23),m(24,"translate"),c(),l(25,"input",19,20),C("ngModelChange",function(s){return v(e),d().database.UserName=s}),c(),l(27,"small",21),g(28),m(29,"translate"),c(),_(30,HW,4,3,"div",13),c(),l(31,"div",8)(32,"label",22),g(33),m(34,"translate"),c(),l(35,"input",23,24),C("ngModelChange",function(s){return v(e),d().database.Password=s}),c(),l(37,"small",25),g(38),m(39,"translate"),c(),_(40,qW,4,3,"div",13),c(),l(41,"div",8)(42,"label",26),g(43),m(44,"translate"),c(),l(45,"input",27,28),C("ngModelChange",function(s){return v(e),d().database.Name=s}),c(),l(47,"small",29),g(48),m(49,"translate"),c(),_(50,UW,4,3,"div",13),c(),l(51,"div",30)(52,"p-checkbox",31),C("ngModelChange",function(s){return v(e),d().database.LocalEnabled=s}),m(53,"translate"),c(),l(54,"small",32),g(55),m(56,"translate"),c()(),_(57,GW,9,7,"div",33),l(58,"div",30)(59,"p-checkbox",34),C("ngModelChange",function(s){return v(e),d().database.WOLEnabled=s}),m(60,"translate"),c(),l(61,"small",32),g(62),m(63,"translate"),c()(),_(64,zW,8,12,"div",35),_(65,jW,8,12,"div",35),_(66,$W,9,7,"div",33),c(),l(67,"div")(68,"p-button",36),C("click",function(){return v(e),d().saveForm(!1)}),m(69,"translate"),c()(),l(70,"div",37),_(71,WW,3,3,"div",38),_(72,KW,4,3,"ng-template",null,39,we),_(74,QW,3,6,"div",38),_(75,JW,4,6,"ng-template",null,40,we),_(77,ZW,3,6,"div",38),_(78,XW,4,3,"ng-template",null,41,we),c(),_(80,tK,24,20,"div",13)}if(2&t){const e=F(6),n=F(16),s=F(26),r=F(36),o=F(46),u=F(73),h=F(76),b=F(79),y=d(),w=F(2);a(3),S(f(4,42,"setupwizard.MySQLServerIP")),a(2),p("ngModel",y.database.Host)("ngClass",z(72,nK,e.invalid)),a(3),S(f(9,44,"setupwizard.ipaddress_help")),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),S(f(14,46,"setupwizard.MySQLServerPort")),a(2),p("ngModel",y.database.Port),a(3),S(f(19,48,"setupwizard.port_help")),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(3),S(f(24,50,"setupwizard.MySQLUser")),a(2),p("ngModel",y.database.UserName),a(3),S(f(29,52,"setupwizard.user_help")),a(2),p("ngIf",s.invalid&&(s.dirty||s.touched)),a(3),S(f(34,54,"setupwizard.MySQLPassword")),a(2),p("ngModel",y.database.Password),a(3),S(f(39,56,"setupwizard.password_help")),a(2),p("ngIf",r.invalid&&(r.dirty||r.touched)),a(3),S(f(44,58,"setupwizard.MySQLDatabaseName")),a(2),p("ngModel",y.database.Name),a(3),S(f(49,60,"setupwizard.dbname_help")),a(2),p("ngIf",o.invalid&&(o.dirty||o.touched)),a(2),D("label",f(53,62,"setupwizard.LocalEnabled_label")),p("ngModel",y.database.LocalEnabled)("binary",!0),a(3),T(" ",f(56,64,"setupwizard.LocalEnabled_desc")," "),a(2),p("ngIf",y.database.LocalEnabled),a(2),D("label",f(60,66,"setupwizard.WOLEnabled_label")),p("ngModel",y.database.WOLEnabled)("binary",!0),a(3),T(" ",f(63,68,"setupwizard.WOLEnabled_desc")," "),a(2),p("ngIf",y.database.WOLEnabled),a(1),p("ngIf",y.database.WOLEnabled),a(1),p("ngIf",y.database.WOLEnabled),a(2),D("label",f(69,70,"setupwizard.testConnection")),p("disabled",null==w.invalid||w.invalid),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.Connected)("ngIfElse",u),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.HaveDatabase)("ngIfElse",h),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.Connected&&y.m_wizardData.DatabaseStatus.DatabaseStatus.HaveDatabase)("ngIfElse",b),a(3),p("ngIf",y.setupService.isDatabaseIgnored)}}function sK(t,i){1&t&&(k(0,"p-message",83),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function rK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function oK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"setupwizard.connectionfail"))}function aK(t,i){if(1&t){const e=I();l(0,"div",77)(1,"div",78),_(2,sK,2,3,"p-message",79),_(3,rK,2,3,"p-message",80),_(4,oK,2,3,"p-message",80),c(),l(5,"p-button",81),C("onClick",function(){v(e);const s=d(),r=F(2);return s.saveForm(!0),r.form.markAsPristine()}),m(6,"translate"),c(),l(7,"p-button",82),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/selectlanguage"])}),m(8,"translate"),c()()}if(2&t){const e=d(),n=F(2);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),p("ngIf",e.connectionFail),a(1),D("label",f(6,7,"common.save")),p("disabled",(!n.dirty||e.setupService.schedulingEnabled)&&!e.setupService.isDatabaseIgnored),a(2),D("label",f(8,9,"common.next")),p("disabled",e.setupService.isDatabaseIgnored)}}let lK=(()=>{class t{constructor(e,n,s,r,o,u,h,b){this.router=e,this.configService=n,this.mythService=s,this.wizardService=r,this.translate=o,this.messageService=u,this.setupService=h,this.clipboard=b,this.successCount=0,this.errorCount=0,this.expectedCount=2,this.connectionFail=!1,this.commandlist="",this.mySqlCommand="sudo mysql -u root < setup.sql",this.tzCommand="mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root mysql",this.dbtype="MySQL",this.msg_testconnection="setupwizard.testConnection",this.msg_connectionsuccess="setupwizard.connectionsuccess",this.msg_connectionfail="setupwizard.connectionfail",this.warningText="settings.common.warning",this.saveObserver={next:y=>{y.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:y=>{console.error(y),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.translate.get(this.msg_testconnection).subscribe(y=>this.msg_testconnection=y),this.translate.get(this.msg_connectionsuccess).subscribe(y=>this.msg_connectionsuccess=y),this.translate.get(this.msg_connectionfail).subscribe(y=>this.msg_connectionfail=y),this.translate.get(this.warningText).subscribe(y=>this.warningText=y)}ngOnInit(){this.wizardService.initDatabaseStatus(),this.m_wizardData=this.wizardService.getWizardData(),this.database=Object.assign({},this.m_wizardData.Database),this.wizardService.dbPromise.then(()=>{this.database=Object.assign({},this.m_wizardData.Database)},()=>this.errorCount++)}copyToclipboard(e){this.clipboard.copy(e)}saveForm(e){this.successCount=0,this.errorCount=0,this.expectedCount=1,this.connectionFail=!1;const n={HostName:this.database.Host,UserName:this.database.UserName,Password:this.database.Password,DBName:this.database.Name,dbPort:this.database.Port};this.commandlist="",this.mythService.TestDBSettings(n).subscribe(s=>{s.bool?e?this.configService.SetDatabaseCredentials(this.database).subscribe(this.saveObserver):this.messageService.add({severity:"success",life:5e3,summary:this.msg_testconnection,detail:this.msg_connectionsuccess}):(this.messageService.add({severity:"error",life:5e3,summary:this.msg_testconnection,detail:this.msg_connectionfail}),this.connectionFail=!0,this.setCommandList())})}setCommandList(){let e="";"MySQL"==this.dbtype&&(e="WITH mysql_native_password"),this.commandlist=`CREATE DATABASE IF NOT EXISTS ${this.database.Name};\nCREATE USER IF NOT EXISTS '${this.database.UserName}'@'localhost' IDENTIFIED ${e} by '${this.database.Password}';\nCREATE USER IF NOT EXISTS '${this.database.UserName}'@'%' IDENTIFIED ${e} by '${this.database.Password}';\nGRANT ALL ON ${this.database.Name}.* TO '${this.database.UserName}'@'localhost';\nGRANT ALL ON ${this.database.Name}.* TO '${this.database.UserName}'@'%';`}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(zo),x(Ut),x(Sd),x(Le),x(ys),x(De),x(rS))},t.\u0275cmp=G({type:t,selectors:[["app-dbsetup"]],viewQuery:function(e,n){if(1&e&&j(PW,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},features:[Ne([ys])],decls:8,vars:0,consts:[["name","databaseForm",1,"mx-0","md:mx-3"],["databaseForm","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"formgrid","grid","form-group"],[1,"field","col-12","md:col-6"],["for","ipaddress",1,"label","block"],["pInputText","","id","ipaddress","type","text","aria-describedby","ipaddress-help","name","hostname","placeholder","Ex. 127.0.0.1 or localhost","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngClass","ngModelChange"],["host","ngModel"],["id","ipaddress-help"],[4,"ngIf"],["for","port",1,"label","block"],["pInputText","","id","port","type","number","aria-describedby","port-help","name","port","placeholder","Ex. 3306","min","0","max","65536",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["port","ngModel"],["id","port-help"],["for","user",1,"label","block"],["pInputText","","id","user","type","text","aria-describedby","user-help","name","user","placeholder","Ex. mythtv","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["user","ngModel"],["id","user-help"],["for","password",1,"label","block"],["pInputText","","id","password","type","text","aria-describedby","password-help","name","password","placeholder","Ex. mythtv","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["password","ngModel"],["id","password-help"],["for","dbname",1,"label","block"],["pInputText","","id","dbname","type","text","aria-describedby","dbname-help","name","dbname","placeholder","Ex. mythconverg","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["dbname","ngModel"],["id","dbname-help"],[1,"field","col-12"],["name","LocalEnabled",1,"mb-2","w-full","label","block",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["class","field col-12",4,"ngIf"],["name","WOLEnabled",1,"mb-2","w-full","label","block",3,"ngModel","binary","label","ngModelChange"],["class","field col-12 md:col-6",4,"ngIf"],["type","button",1,"mr-1","p-button-raised","p-button-secondary",3,"label","disabled","click"],[1,"pt-4",2,"display","flex"],[4,"ngIf","ngIfElse"],["notconnected",""],["nodatabase",""],["noschema",""],["id","address-help",1,"p-error","block"],[1,"p-error","block"],["for","LocalHostName",1,"label","block"],["pInputText","","id","LocalHostName","type","text","aria-describedby","LocalHostName-help","name","LocalHostName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["LocalHostName","ngModel"],["id","LocalHostName-help"],["for","WOLReconnect",1,"label","block"],["name","WOLReconnect","id","WOLReconnect",3,"ngModel","min","max","step","useGrouping","showButtons","ngModelChange"],["for","WOLRetry",1,"label","block"],["name","WOLRetry","id","WOLRetry",3,"ngModel","min","max","step","useGrouping","showButtons","ngModelChange"],["for","WOLCommand",1,"label","block"],["pInputText","","id","WOLCommand","type","text","aria-describedby","WOLCommand-help","name","WOLCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["WOLCommand","ngModel"],["id","WOLCommand-help"],["severity","success",1,"pr-2",3,"text"],[1,"pr-2","notconnected"],["severity","error",1,"",3,"text"],[1,"pr-2","nodatabase"],["severity","error",3,"text"],["severity","info",1,"pr-2",3,"text"],[1,"pr-2","noschema"],["severity","info",3,"text"],[1,""],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-copy",1,"p-button-rounded","p-button-text",3,"pTooltip","click"],[1,"flex","pb-3"],[1,"flex-none","flex","align-items-center","label","block","pr-5"],[1,"flex-none","flex","align-items-center","pr-5"],["name","dbtype","value","MySQL","inputId","mysql",3,"ngModel","ngModelChange"],["for","mysql"],[1,"flex-none","flex","align-items-center"],["name","dbtype","value","MariaDB","inputId","mariadb",3,"ngModel","ngModelChange"],["for","mariadb"],[2,"white-space","pre-line"],[1,"grid","nogutter","m-5"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"pr-3",3,"label","disabled","onClick"],["severity","success",3,"text"]],template:function(e,n){1&e&&(k(0,"p-toast"),l(1,"form",0,1)(3,"p-card",2),_(4,FW,2,3,"ng-template",3),_(5,NW,2,3,"ng-template",4),_(6,iK,81,74,"ng-template",5),_(7,aK,9,11,"ng-template",6),c()())},directives:[wd,ze,Ge,He,Pe,ie,Ye,ll,Te,_e,Oe,Q,xu,Su,Tu,rn,dt,ve,qe,Td,Ln,vt,Jt],pipes:[de],styles:[".is-invalid{border-color:red}@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const cK=["hostaddress"];function uK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.hostaddress.title")," ")}function dK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.hostaddress.subtitle")," ")}function pK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function hK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function mK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"settings.hostaddress.pin_reqd")," "))}function fK(t,i){1&t&&(l(0,"div")(1,"small",52),g(2,"IPv4 address"),c()())}function gK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2,"IPv6 address"),c()())}function _K(t,i){if(1&t){const e=I();l(0,"div")(1,"div",9)(2,"label",41),g(3),m(4,"translate"),c(),l(5,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.BackendServerIP=s}),c(),l(7,"small",44),g(8),m(9,"translate"),c(),_(10,fK,3,0,"div",14),c(),l(11,"div",9)(12,"label",45),g(13),m(14,"translate"),c(),l(15,"p-dropdown",46,47),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.BackendServerIP6=s}),c(),l(17,"small",48),g(18),m(19,"translate"),c(),_(20,gK,3,0,"div",14),c(),l(21,"div",9)(22,"p-checkbox",49,50),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.AllowLinkLocal=s}),m(24,"translate"),c(),l(25,"small",51),g(26),m(27,"translate"),c()()()}if(2&t){const e=F(6),n=F(16),s=d(2);a(3),S(f(4,14,"settings.hostaddress.ipv4_label")),a(2),p("options",s.m_IPsV4)("ngModel",s.m_HostAddressData.BackendServerIP),a(3),T(" ",f(9,16,"settings.hostaddress.ipv4_desc")," "),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),T(" ",f(14,18,"settings.hostaddress.ipv6_label")," "),a(2),p("options",s.m_IPsV6)("ngModel",s.m_HostAddressData.BackendServerIP6),a(3),T(" ",f(19,20,"settings.hostaddress.ipv6_desc")," "),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(2),D("label",f(24,22,"settings.hostaddress.listenlinklocal_label")),p("ngModel",s.m_HostAddressData.AllowLinkLocal)("binary",!0),a(4),T(" ",f(27,24,"settings.hostaddress.listenlinklocal_desc")," ")}}function bK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2,"Primary IP address / DNS name is required"),c()())}function vK(t,i){1&t&&(l(0,"div")(1,"small",53),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"settings.hostaddress.ismaster_hint")," "))}function CK(t,i){1&t&&(l(0,"div")(1,"small",54),g(2,"Hostname of master backend is required"),c()())}const aS=function(t){return{"is-invalid":t}};function yK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5),m(6,"translate"),c(),l(7,"input",11,12),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendServerPort=s}),c(),l(9,"small",13),g(10),m(11,"translate"),c(),_(12,pK,4,3,"div",14),c(),l(13,"div",9)(14,"label",15),g(15),m(16,"translate"),c(),l(17,"input",16,17),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendStatusPort=s}),c(),l(19,"small",18),g(20),m(21,"translate"),c(),_(22,hK,4,3,"div",14),c()(),l(23,"p-fieldset",8),m(24,"translate"),l(25,"div",9)(26,"label",19),g(27),m(28,"translate"),c(),l(29,"input",20,21),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.SecurityPin=s}),c(),l(31,"small",22),g(32),m(33,"translate"),c(),_(34,mK,4,3,"div",14),c()(),l(35,"p-fieldset",8),m(36,"translate"),l(37,"div",9)(38,"p-checkbox",23,24),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.AllowConnFromAll=s}),m(40,"translate"),c(),l(41,"small",22),k(42,"div",25),m(43,"translate"),c()()(),l(44,"p-fieldset",8),m(45,"translate"),l(46,"div",9)(47,"p-checkbox",26,27),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.ListenOnAllIps=s}),m(49,"translate"),c(),l(50,"small",28),g(51),m(52,"translate"),c()(),_(53,_K,28,26,"div",14),c(),l(54,"p-fieldset",8),m(55,"translate"),l(56,"div",9)(57,"div",9)(58,"label",29),g(59),m(60,"translate"),c(),l(61,"p-dropdown",30,31),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendServerAddr=s}),c(),l(63,"small",32),g(64),m(65,"translate"),c()(),_(66,bK,3,0,"div",14),c()(),l(67,"p-fieldset",8),m(68,"translate"),l(69,"div",9)(70,"p-checkbox",33,34),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.IsMasterBackend=s})("onChange",function(){return v(e),d().setMaster()}),m(72,"translate"),c(),l(73,"small",35),g(74),m(75,"translate"),c(),_(76,vK,4,3,"div",14),c(),l(77,"div",9)(78,"label",36),g(79),m(80,"translate"),c(),l(81,"input",37,38),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.MasterServerName=s}),c(),l(83,"small",39),k(84,"div",25),m(85,"translate"),c(),_(86,CK,3,0,"div",14),c()()()}if(2&t){const e=F(8),n=F(18),s=F(30),r=F(62),o=F(82),u=d();a(1),D("legend",f(2,44,"settings.hostaddress.panel.ports")),a(4),T(" ",f(6,46,"settings.hostaddress.backendport_label")," "),a(2),p("ngModel",u.m_HostAddressData.BackendServerPort)("ngClass",z(88,aS,e.invalid)),a(3),T(" ",f(11,48,"settings.hostaddress.backendport_desc")," "),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),T(" ",f(16,50,"settings.hostaddress.statusport_label")," "),a(2),p("ngModel",u.m_HostAddressData.BackendStatusPort)("ngClass",z(90,aS,n.invalid)),a(3),S(f(21,52,"settings.hostaddress.statusport_desc")),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(1),D("legend",f(24,54,"settings.hostaddress.panel.pin")),a(4),T(" ",f(28,56,"settings.hostaddress.pin_label")," "),a(2),p("ngModel",u.m_HostAddressData.SecurityPin),a(3),T(" ",f(33,58,"settings.hostaddress.pin_desc")," "),a(2),p("ngIf",s.invalid&&(s.dirty||s.touched)),a(1),D("legend",f(36,60,"settings.hostaddress.panel.allowconn")),a(3),D("label",f(40,62,"settings.hostaddress.allowconn_label")),p("ngModel",u.m_HostAddressData.AllowConnFromAll)("binary",!0),a(4),p("innerHTML",f(43,64,"settings.hostaddress.allowconn_desc"),Ht),a(2),D("legend",f(45,66,"settings.hostaddress.panel.iplisten")),a(3),D("label",f(49,68,"settings.hostaddress.listenall_label")),p("ngModel",u.m_HostAddressData.ListenOnAllIps)("binary",!0),a(4),T(" ",f(52,70,"settings.hostaddress.listenall_desc")," "),a(2),p("ngIf",!u.m_HostAddressData.ListenOnAllIps),a(1),D("legend",f(55,72,"settings.hostaddress.panel.primaryadd")),a(5),T(" ",f(60,74,"settings.hostaddress.primaryip_label")," "),a(2),p("options",u.m_IPsAll)("ngModel",u.m_HostAddressData.BackendServerAddr)("editable",!0),a(3),T(" ",f(65,76,"settings.hostaddress.primaryip_desc")," "),a(2),p("ngIf",r.invalid&&(r.dirty||r.touched)),a(1),D("legend",f(68,78,"settings.hostaddress.panel.masterbe")),a(3),D("label",f(72,80,"settings.hostaddress.ismaster_label")),p("ngModel",u.m_HostAddressData.IsMasterBackend)("binary",!0),a(4),T(" ",f(75,82,"settings.hostaddress.ismaster_desc")," "),a(2),p("ngIf",u.m_showChangeHint),a(3),S(f(80,84,"settings.hostaddress.master_label")),a(2),p("ngModel",u.m_HostAddressData.MasterServerName),a(3),p("innerHTML",f(85,86,"settings.hostaddress.master_desc"),Ht),a(2),p("ngIf",o.invalid&&(o.dirty||o.touched))}}function wK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function TK(t,i){1&t&&(k(0,"p-message",61),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function SK(t,i){if(1&t){const e=I();l(0,"div",55)(1,"div",56),_(2,wK,2,3,"p-message",57),_(3,TK,2,3,"p-message",58),c(),l(4,"p-button",59),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.m_HostAddressData.successCount>0&&0==e.m_HostAddressData.errorCount&&!n.dirty),a(1),p("ngIf",e.m_HostAddressData.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let xK=(()=>{class t{constructor(e,n){this.setupService=e,this.configService=n,this.m_IsMasterBackend=!1,this.m_showChangeHint=!1,this.m_HostAddressData=this.setupService.getHostAddressData(),setTimeout(()=>n.GetIPAddresses("All").subscribe(s=>this.m_IPsAll=s.IPAddresses),500),n.GetIPAddresses("IPv4").subscribe(s=>this.m_IPsV4=s.IPAddresses),n.GetIPAddresses("IPv6").subscribe(s=>this.m_IPsV6=s.IPAddresses)}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}setMaster(){void 0===this.m_savedMaster&&(this.m_savedMaster=this.m_HostAddressData.MasterServerName),this.m_HostAddressData.IsMasterBackend?(this.m_HostAddressData.MasterServerName=this.m_HostAddressData.thisHostName,this.m_showChangeHint=!1):this.m_HostAddressData.MasterServerName==this.m_savedMaster?this.m_showChangeHint=!0:this.m_HostAddressData.MasterServerName=this.m_savedMaster}saveForm(){console.log("save form clicked"),this.setupService.saveHostAddressData(this.currentForm)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(zo))},t.\u0275cmp=G({type:t,selectors:[["app-host-address"]],viewQuery:function(e,n){if(1&e&&j(cK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","hostaddress",1,"mx-0","md:mx-3"],["hostaddress","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend"],[1,"form-group","field"],["for","backendserverport",1,"label","block"],["pInputText","","id","backendserverport","type","number","name","backendserverport","placeholder","Ex. 6543","required","","min","0","max","65536",1,"mb-2","form-control","w-10rem",3,"ngModel","ngClass","ngModelChange"],["backendserverport","ngModel"],["id","backendserverport-help",1,"block"],[4,"ngIf"],["for","backendstatusport",1,"label","block"],["pInputText","","id","backendstatusport","type","number","name","backendstatusport","placeholder","Ex. 6544","required","","min","0","max","65536",1,"mb-2","form-control","w-10rem",3,"ngModel","ngClass","ngModelChange"],["backendstatusport","ngModel"],["id","backendstatusport-help",1,"block"],["for","securitypin",1,"label","block"],["pInputText","","id","securitypin","type","text","name","securitypin","placeholder","Ex. 1234","required","",1,"mb-2","form-control","w-10rem",3,"ngModel","ngModelChange"],["securitypin","ngModel"],["id","securitypin-help",1,"block"],["inputId","AllowConnFromAll","name","AllowConnFromAll",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AllowConnFromAll","ngModel"],[3,"innerHTML"],["inputId","ListenOnAllIps","name","ListenOnAllIps",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["ListenOnAllIps","ngModel"],["id","ListenOnAllIps-help",1,"block"],["for","BackendServerAddr",1,"label","block","w-full"],["name","BackendServerAddr","aria-describedby","BackendServerAddr-help",1,"block","mb-2","w-full",3,"options","ngModel","editable","ngModelChange"],["BackendServerAddr","ngModel"],["id","BackendServerAddr-help",1,"block","w-full"],["inputId","IsMasterBackend","name","IsMasterBackend",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange","onChange"],["IsMasterBackend","ngModel"],["id","IsMasterBackend-help",1,"block"],["for","MasterServerName",1,"label","block"],["pInputText","","id","MasterServerName","type","text","name","MasterServerName","placeholder","Ex. masterbe","disabled","disabled",1,"mb-2","form-control","w-15rem","read-only",3,"ngModel","ngModelChange"],["MasterServerName","ngModel"],["id","MasterServerName-help",1,"block"],[1,"p-error","block"],["for","BackendServerIP",1,"label","block"],["name","BackendServerIP","aria-describedby","BackendServerIP-help",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["BackendServerIP","ngModel"],["id","BackendServerIP-help",1,"block"],["for","BackendServerIP6",1,"label","block"],["name","BackendServerIP6","aria-describedby","BackendServerIP6-help",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["BackendServerIP6","ngModel"],["id","BackendServerIP6-help",1,"block"],["inputId","AllowLinkLocal","name","AllowLinkLocal",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AllowLinkLocal","ngModel"],["id","AllowLinkLocal-help",1,"block"],["id","LocalServerIP-help",1,"p-error","block"],["id","IsMasterBackend-help",1,"p-error","block"],["id","MasterServerName-help",1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,uK,2,3,"ng-template",3),_(4,dK,2,3,"ng-template",4),_(5,yK,87,92,"ng-template",5),_(6,SK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,xu,Su,Tu,Ye,ll,Te,_e,Oe,Q,rn,Vt,qe,ve],pipes:[de],styles:["[_nghost-%COMP%] .p-dropdown{width:18rem}.read-only[_ngcontent-%COMP%]{opacity:1;background-color:#e0e0e0;border-style:solid;height:2rem}"]}),t})();const DK=["locale"];function MK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.locale.title")," ")}function kK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.locale.subtitle")," ")}function IK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5,"TV Format"),c(),l(6,"p-dropdown",11),C("ngModelChange",function(s){return v(e),d().TVFormat=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-dropdown",14),C("ngModelChange",function(s){return v(e),d().VbiFormat=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()(),l(18,"p-fieldset",8),m(19,"translate"),l(20,"div",9)(21,"label",16),g(22),m(23,"translate"),c(),l(24,"p-dropdown",17),C("ngModelChange",function(s){return v(e),d().FreqTable=s}),c(),l(25,"small",18),g(26),m(27,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,13,"settings.locale.tvformat_label")),a(5),p("options",e.m_TVFormats)("ngModel",e.TVFormat),a(2),T(" ",f(9,15,"settings.locale.tvformat_desc")," "),a(4),S(f(13,17,"settings.locale.vbiformat_label")),a(2),p("options",e.m_vbiFormats)("ngModel",e.VbiFormat),a(2),T(" ",f(17,19,"settings.locale.vbiformat_desc")," "),a(2),D("legend",f(19,21,"settings.locale.freqtable_label")),a(4),S(f(23,23,"settings.locale.channfreq_label")),a(2),p("options",e.m_FreqTables)("ngModel",e.FreqTable),a(2),T(" ",f(27,25,"settings.locale.channfreq_desc")," ")}}function EK(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function RK(t,i){1&t&&(k(0,"p-message",25),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function LK(t,i){if(1&t){const e=I();l(0,"div",19)(1,"div",20),_(2,EK,2,3,"p-message",21),_(3,RK,2,3,"p-message",22),c(),l(4,"p-button",23),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}const OK=function(){return{width:"100%"}};let AK=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.TVFormat="PAL",this.VbiFormat="None",this.FreqTable="us-bcast",this.LocaleObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.m_TVFormats=["NTSC","NTSC-JP","PAL","PAL-60","PAL-BG","PAL-DK","PAL-D","PAL-I","PAL-M","PAL-N","PAL-NC","SECAM","SECAM-D","DECAM-DK"],this.m_vbiFormats=["None","PAL teletext","NTSC closed caption"],this.m_FreqTables=["us-bcast","us-cable","us-cable-hrc","us-cable-irc","japan-bcast","japan-cable","europe-west","europe-east","italy","newzealand","australia","ireland","france","china-bcast","southafrica","argentina","australia-optus","singapore","malaysia","israel-hot-matav","try-all"],this.getLocaleData()}getLocaleData(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"TVFormat"}).subscribe({next:e=>this.TVFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"VbiFormat"}).subscribe({next:e=>this.VbiFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"FreqTable"}).subscribe({next:e=>this.FreqTable=e.String,error:()=>this.errorCount++})}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"TVFormat",Value:this.TVFormat}).subscribe(this.LocaleObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"VbiFormat",Value:this.VbiFormat}).subscribe(this.LocaleObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"FreqTable",Value:this.FreqTable}).subscribe(this.LocaleObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-locale"]],viewQuery:function(e,n){if(1&e&&j(DK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:3,consts:[["name","locale",1,"ml-3","mr-3",3,"ngSubmit"],["locale","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","TV Formats"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend"],[1,"form-group","field"],["for","tvformat",1,"label","block"],["name","tvformat","aria-describedby","tvformat-help",1,"w-full","mb-2",3,"options","ngModel","ngModelChange"],["id","tvformat-help",1,"block","mt-2"],["for","vbiformat",1,"label","block"],["name","vbiformat","aria-describedby","vbiformat-help",1,"mb-5","w-full",3,"options","ngModel","ngModelChange"],["id","vbiformat-help",1,"block","mt-2"],["for","freqtable",1,"label","block"],["name","freqtable",1,"mb-2","w-full",3,"options","ngModel","ngModelChange"],["id","freqtable-help",1,"block","pt-2"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),C("ngSubmit",function(){return n.saveForm()}),l(2,"p-card",2),_(3,MK,2,3,"ng-template",3),_(4,kK,2,3,"ng-template",4),_(5,IK,28,27,"ng-template",5),_(6,LK,6,6,"ng-template",6),c()()),2&e&&(a(2),q(A(2,OK)))},directives:[ze,Ge,He,Pe,ie,Ui,Vt,Te,_e,Q,qe,ve],pipes:[de],styles:["[_nghost-%COMP%] .p-dropdown{width:18rem}"]}),t})();const PK=["miscsettings"];function FK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.misc.title")," ")}function NK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.misc.subtitle")," ")}function VK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().MasterBackendOverride=s}),m(5,"translate"),c(),l(6,"small",11),g(7),m(8,"translate"),c()(),l(9,"div",9)(10,"p-checkbox",12),C("ngModelChange",function(s){return v(e),d().DeletesFollowLinks=s}),m(11,"translate"),c(),l(12,"small",11),g(13),m(14,"translate"),c()(),l(15,"div",9)(16,"p-checkbox",13),C("ngModelChange",function(s){return v(e),d().TruncateDeletesSlowly=s}),m(17,"translate"),c(),l(18,"small",11),g(19),m(20,"translate"),c()(),l(21,"div",9)(22,"label",14),g(23),m(24,"translate"),c(),l(25,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().HDRingbufferSize=s}),c(),l(26,"small",11),g(27),m(28,"translate"),c()(),l(29,"div",9)(30,"label",16),g(31),m(32,"translate"),c(),l(33,"p-dropdown",17),C("ngModelChange",function(s){return v(e),d().StorageScheduler=s}),c(),l(34,"small",11),g(35),m(36,"translate"),c()()(),l(37,"p-fieldset",8),m(38,"translate"),l(39,"div",9)(40,"label",18),g(41),m(42,"translate"),c(),l(43,"p-dropdown",19),C("ngModelChange",function(s){return v(e),d().UPNPWmpSource=s}),c(),l(44,"small",11),g(45),m(46,"translate"),c()()(),l(47,"div",20)(48,"div",9)(49,"label",21),g(50),m(51,"translate"),c(),l(52,"input",22),C("ngModelChange",function(s){return v(e),d().MiscStatusScript=s}),c(),l(53,"small",11),g(54),m(55,"translate"),l(56,"a",23),g(57,"Miscellaneous Status Information"),c()()(),l(58,"div",9)(59,"p-checkbox",24),C("ngModelChange",function(s){return v(e),d().DisableAutomaticBackup=s}),m(60,"translate"),c(),l(61,"small",11),g(62),m(63,"translate"),c()(),l(64,"div",9)(65,"p-checkbox",25),C("ngModelChange",function(s){return v(e),d().DisableFirewireReset=s}),m(66,"translate"),c(),l(67,"small",11),g(68),m(69,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,44,"settings.misc.panel_filemgmt")),p("toggleable",!0)("collapsed",!0),a(3),D("label",f(5,46,"settings.misc.mbo_label")),p("ngModel",e.MasterBackendOverride)("binary",!0),a(3),T(" ",f(8,48,"settings.misc.mbo_desc")," "),a(3),D("label",f(11,50,"settings.misc.follow_label")),p("ngModel",e.DeletesFollowLinks)("binary",!0),a(3),T(" ",f(14,52,"settings.misc.follow_desc")," "),a(3),D("label",f(17,54,"settings.misc.slowly_label")),p("ngModel",e.TruncateDeletesSlowly)("binary",!0),a(3),T(" ",f(20,56,"settings.misc.slowly_desc")," "),a(4),S(f(24,58,"settings.misc.ringbuf_label")),a(2),p("ngModel",e.HDRingbufferSize)("showButtons",!0)("min",4700)("max",94e3)("step",4700),a(2),T(" ",f(28,60,"settings.misc.ringbuf_desc")," "),a(4),S(f(32,62,"settings.misc.sg_label")),a(2),p("options",e.soptions)("ngModel",e.StorageScheduler),a(2),T(" ",f(36,64,"settings.misc.sg_desc")," "),a(2),D("legend",f(38,66,"settings.misc.panel_upnp")),p("toggleable",!0)("collapsed",!0),a(4),S(f(42,68,"settings.misc.upnp_label")),a(2),p("options",e.uoptions)("ngModel",e.UPNPWmpSource),a(2),T(" ",f(46,70,"settings.misc.upnp_desc")," "),a(5),S(f(51,72,"settings.misc.statapp_label")),a(2),p("ngModel",e.MiscStatusScript),a(2),T(" ",f(55,74,"settings.misc.statapp_desc")," "),a(5),D("label",f(60,76,"settings.misc.disback_label")),p("ngModel",e.DisableAutomaticBackup)("binary",!0),a(3),T(" ",f(63,78,"settings.misc.disback_desc")," "),a(3),D("label",f(66,80,"settings.misc.disfwr_label")),p("ngModel",e.DisableFirewireReset)("binary",!0),a(3),T(" ",f(69,82,"settings.misc.disfwr_desc")," ")}}function BK(t,i){1&t&&(k(0,"p-message",31),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function HK(t,i){1&t&&(k(0,"p-message",32),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function qK(t,i){if(1&t){const e=I();l(0,"div",26)(1,"div",27),_(2,BK,2,3,"p-message",28),_(3,HK,2,3,"p-message",29),c(),l(4,"p-button",30),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0&&!n.dirty),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let UK=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.mythService=s,this.successCount=0,this.errorCount=0,this.MasterBackendOverride=!1,this.DeletesFollowLinks=!1,this.TruncateDeletesSlowly=!1,this.HDRingbufferSize=9400,this.StorageScheduler="BalancedFreeSpace",this.UPNPWmpSource="0",this.MiscStatusScript="",this.DisableAutomaticBackup=!1,this.DisableFirewireReset=!1,this.hostName="",this.soptions=[{name:"settings.misc.sg_balfree",code:"BalancedFreeSpace"},{name:"settings.misc.sg_balpercent",code:"BalancedPercFreeSpace"},{name:"settings.misc.bal_io",code:"BalancedDiskIO"},{name:"settings.misc.sg_combination",code:"Combination"}],this.uoptions=[{name:"settings.misc.upnp_recs",code:"0"},{name:"settings.misc.upnp_videos",code:"1"}],this.miscObserver={next:r=>{r.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},n.get(this.soptions[0].name).subscribe(r=>this.soptions[0].name=r),n.get(this.soptions[1].name).subscribe(r=>this.soptions[1].name=r),n.get(this.soptions[2].name).subscribe(r=>this.soptions[2].name=r),n.get(this.soptions[3].name).subscribe(r=>this.soptions[3].name=r),n.get(this.uoptions[0].name).subscribe(r=>this.uoptions[0].name=r),n.get(this.uoptions[1].name).subscribe(r=>this.uoptions[1].name=r),this.mythService.GetHostName().subscribe({next:r=>{this.hostName=r.String,this.getMiscellaneousData()},error:()=>this.errorCount++})}getMiscellaneousData(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterBackendOverride",Default:"0"}).subscribe({next:e=>this.MasterBackendOverride="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"DeletesFollowLinks",Default:"0"}).subscribe({next:e=>this.DeletesFollowLinks="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"TruncateDeletesSlowly",Default:"0"}).subscribe({next:e=>this.TruncateDeletesSlowly="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"HDRingbufferSize",Default:"9400"}).subscribe({next:e=>this.HDRingbufferSize=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"StorageScheduler",Default:"BalancedFreeSpace"}).subscribe({next:e=>this.StorageScheduler=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UPNPWmpSource",Default:"0"}).subscribe({next:e=>this.UPNPWmpSource=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"MiscStatusScript",Default:""}).subscribe({next:e=>this.MiscStatusScript=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"DisableAutomaticBackup",Default:"0"}).subscribe({next:e=>this.DisableAutomaticBackup="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"DisableFirewireReset",Default:"0"}).subscribe({next:e=>this.DisableFirewireReset="1"==e.String,error:()=>this.errorCount++})}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MasterBackendOverride",Value:this.MasterBackendOverride?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"DeletesFollowLinks",Value:this.DeletesFollowLinks?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"TruncateDeletesSlowly",Value:this.TruncateDeletesSlowly?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"HDRingbufferSize",Value:String(this.HDRingbufferSize)}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"StorageScheduler",Value:this.StorageScheduler}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UPNPWmpSource",Value:this.UPNPWmpSource}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"MiscStatusScript",Value:this.MiscStatusScript}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"DisableAutomaticBackup",Value:this.DisableAutomaticBackup?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"DisableFirewireReset",Value:this.DisableFirewireReset?"1":"0"}).subscribe(this.miscObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-misc-settings"]],viewQuery:function(e,n){if(1&e&&j(PK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","miscsettings",1,"ml-3","mr-3"],["miscsettings","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],[1,"form-group","field"],["name","MasterBackendOverride",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["name","DeletesFollowLinks",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["name","TruncateDeletesSlowly",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["for","HDRingbufferSize",1,"label","block"],["name","HDRingbufferSize","id","HDRingbufferSize",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","StorageScheduler",1,"label","block"],["optionLabel","name","optionValue","code","name","StorageScheduler",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["for","UPNPWmpSource",1,"label","block"],["optionLabel","name","optionValue","code","name","UPNPWmpSource",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],[1,"mb-4","w-full"],["for","MiscStatusScript",1,"label","block"],["pInputText","","id","MiscStatusScript","name","MiscStatusScript",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["href","http://www.mythtv.org/wiki/Miscellaneous_Status_Information","target","_blank"],["name","DisableAutomaticBackup",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["name","DisableFirewireReset",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,FK,2,3,"ng-template",3),_(4,NK,2,3,"ng-template",4),_(5,VK,70,84,"ng-template",5),_(6,qK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,rn,Te,_e,dt,Vt,Ye,Q,qe,ve],pipes:[de],styles:["a[_ngcontent-%COMP%]:link, a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:active{background-color:#fff}"]}),t})();const GK=["eitscanopt"];function zK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.eit.title")," ")}function jK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.eit.subtitle")," ")}function $K(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().EITTransportTimeout=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().EITCrawIdleStart=s}),c(),l(15,"small",12),g(16),m(17,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,14,"settings.eit.timeout_label")),a(2),p("ngModel",e.EITTransportTimeout)("showButtons",!0)("min",1)("max",15)("step",1),a(2),T(" ",f(9,16,"settings.eit.timeout_desc")," "),a(4),S(f(13,18,"settings.eit.crawl_label")),a(2),p("ngModel",e.EITCrawIdleStart)("showButtons",!0)("min",30)("max",7200)("step",30),a(2),T(" ",f(17,20,"settings.eit.crawl_desc")," ")}}function WK(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function KK(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function QK(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,WK,2,3,"p-message",17),_(3,KK,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let JK=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.EITTransportTimeout=5,this.EITCrawIdleStart=60,this.eitObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getEITScanner()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getEITScanner(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"EITTransportTimeout",Default:"5"}).subscribe({next:e=>this.EITTransportTimeout=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"EITCrawIdleStart",Default:"60"}).subscribe({next:e=>this.EITCrawIdleStart=Number(e.String),error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"EITTransportTimeout",Value:String(this.EITTransportTimeout)}).subscribe(this.eitObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"EITCrawIdleStart",Value:String(this.EITCrawIdleStart)}).subscribe(this.eitObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-eit-scanner"]],viewQuery:function(e,n){if(1&e&&j(GK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","eitscanopt",1,"ml-3","mr-3"],["eitscanopt","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","EITTransportTimeout",1,"label","block"],["name","EITTransportTimeout","id","EITTransportTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","EITCrawIdleStart",1,"label","block"],["name","EITCrawIdleStart","id","EITCrawIdleStart",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,zK,2,3,"ng-template",3),_(4,jK,2,3,"ng-template",4),_(5,$K,18,22,"ng-template",5),_(6,QK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,dt,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const YK=["shutwakeopt"];function ZK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.shutwake.title")," ")}function XK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.shutwake.subtitle")," ")}function eQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"input",11),C("ngModelChange",function(s){return v(e),d().startupCommand=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"p-checkbox",13),C("ngModelChange",function(s){return v(e),d().blockSDWUwithoutClient=s}),m(12,"translate"),c(),l(13,"small",12),g(14),m(15,"translate"),c()(),l(16,"div",9)(17,"label",14),g(18),m(19,"translate"),c(),l(20,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().idleTimeoutSecs=s}),c(),l(21,"small",12),g(22),m(23,"translate"),c()(),l(24,"div",9)(25,"label",16),g(26),m(27,"translate"),c(),l(28,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().idleWaitForRecordingTime=s}),c(),l(29,"small",12),g(30),m(31,"translate"),c()(),l(32,"div",9)(33,"label",18),g(34),m(35,"translate"),c(),l(36,"p-inputNumber",19),C("ngModelChange",function(s){return v(e),d().StartupSecsBeforeRecording=s}),c(),l(37,"small",12),g(38),m(39,"translate"),c()(),l(40,"div",9)(41,"label",20),g(42),m(43,"translate"),c(),l(44,"input",21),C("ngModelChange",function(s){return v(e),d().WakeupTimeFormat=s}),c(),l(45,"small",12),g(46),m(47,"translate"),c()(),l(48,"div",9)(49,"label",22),g(50),m(51,"translate"),c(),l(52,"input",23),C("ngModelChange",function(s){return v(e),d().SetWakeuptimeCommand=s}),c(),l(53,"small",12),g(54),m(55,"translate"),c()(),l(56,"div",9)(57,"label",24),g(58),m(59,"translate"),c(),l(60,"input",25),C("ngModelChange",function(s){return v(e),d().ServerHaltCommand=s}),c(),l(61,"small",12),g(62),m(63,"translate"),c()(),l(64,"div",9)(65,"label",26),g(66),m(67,"translate"),c(),l(68,"input",27),C("ngModelChange",function(s){return v(e),d().preSDWUCheckCommand=s}),c(),l(69,"small",12),g(70),m(71,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,40,"settings.shutwake.startcmd_label")),a(2),p("ngModel",e.startupCommand),a(2),T(" ",f(9,42,"settings.shutwake.startcmd_desc")," "),a(3),D("label",f(12,44,"settings.shutwake.block_label")),p("ngModel",e.blockSDWUwithoutClient)("binary",!0),a(3),T(" ",f(15,46,"settings.shutwake.block_desc")," "),a(4),T("",f(19,48,"settings.shutwake.idletime_label"),"}"),a(2),p("ngModel",e.idleTimeoutSecs)("showButtons",!0)("min",0)("max",1200)("step",5),a(2),T(" ",f(23,50,"settings.shutwake.idletime_desc")," "),a(4),S(f(27,52,"settings.shutwake.maxwait_label")),a(2),p("ngModel",e.idleWaitForRecordingTime)("showButtons",!0)("min",0)("max",300)("step",1),a(2),T(" ",f(31,54,"settings.shutwake.maxwait_desc")," "),a(4),S(f(35,56,"settings.shutwake.startbefore_label")),a(2),p("ngModel",e.StartupSecsBeforeRecording)("showButtons",!0)("min",0)("max",300)("step",1),a(2),T(" ",f(39,58,"settings.shutwake.startbefore_desc")," "),a(4),S(f(43,60,"settings.shutwake.timeformat_label")),a(2),p("ngModel",e.WakeupTimeFormat),a(2),T(" ",f(47,62,"settings.shutwake.timeformat_desc")," "),a(4),S(f(51,64,"settings.shutwake.timecmd_label")),a(2),p("ngModel",e.SetWakeuptimeCommand),a(2),T(" ",f(55,66,"settings.shutwake.timecmd_desc")," "),a(4),S(f(59,68,"settings.shutwake.serverhalt_label")),a(2),p("ngModel",e.ServerHaltCommand),a(2),T(" ",f(63,70,"settings.shutwake.serverhalt_desc")," "),a(4),S(f(67,72,"settings.shutwake.preshut_label")),a(2),p("ngModel",e.preSDWUCheckCommand),a(2),T(" ",f(71,74,"settings.shutwake.preshut_desc")," ")}}function tQ(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nQ(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function iQ(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,tQ,2,3,"p-message",30),_(3,nQ,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let sQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.startupCommand="",this.blockSDWUwithoutClient=!0,this.idleTimeoutSecs=0,this.idleWaitForRecordingTime=15,this.StartupSecsBeforeRecording=120,this.WakeupTimeFormat="hh =mm yyyy-MM-dd",this.SetWakeuptimeCommand="",this.ServerHaltCommand="sudo /sbin/halt -p",this.preSDWUCheckCommand="",this.swObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getShutWake()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getShutWake(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"startupCommand",Default:""}).subscribe({next:e=>this.startupCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"blockSDWUwithoutClient",Default:"1"}).subscribe({next:e=>this.blockSDWUwithoutClient="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"idleTimeoutSecs",Default:"0"}).subscribe({next:e=>this.idleTimeoutSecs=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"idleWaitForRecordingTime",Default:""}).subscribe({next:e=>this.idleWaitForRecordingTime=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"StartupSecsBeforeRecording",Default:"120"}).subscribe({next:e=>this.StartupSecsBeforeRecording=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WakeupTimeFormat",Default:"hh:mm yyyy-MM-dd"}).subscribe({next:e=>this.WakeupTimeFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"SetWakeuptimeCommand",Default:""}).subscribe({next:e=>this.SetWakeuptimeCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"ServerHaltCommand",Default:"sudo /sbin/halt -p"}).subscribe({next:e=>this.ServerHaltCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"preSDWUCheckCommand",Default:""}).subscribe({next:e=>this.preSDWUCheckCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"startupCommand",Value:this.startupCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"blockSDWUwithoutClient",Value:this.blockSDWUwithoutClient?"1":"0"}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"idleTimeoutSecs",Value:String(this.idleTimeoutSecs)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"idleWaitForRecordingTime",Value:String(this.idleWaitForRecordingTime)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"StartupSecsBeforeRecording",Value:String(this.StartupSecsBeforeRecording)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WakeupTimeFormat",Value:this.WakeupTimeFormat}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"SetWakeuptimeCommand",Value:this.SetWakeuptimeCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"ServerHaltCommand",Value:this.ServerHaltCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"preSDWUCheckCommand",Value:this.preSDWUCheckCommand}).subscribe(this.swObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-shutdown-wakeup"]],viewQuery:function(e,n){if(1&e&&j(YK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","shutwakeopt",1,"ml-3","mr-3"],["shutwakeopt","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","startupCommand",1,"label","block"],["pInputText","","id","startupCommand","name","startupCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"block"],["inputId","blockSDWUwithoutClient","name","blockSDWUwithoutClient",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["for","idleTimeoutSecs",1,"label","block"],["name","idleTimeoutSecs","id","idleTimeoutSecs",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","idleWaitForRecordingTime",1,"label","block"],["name","idleWaitForRecordingTime","id","idleWaitForRecordingTime",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","StartupSecsBeforeRecording",1,"label","block"],["name","StartupSecsBeforeRecording","id","StartupSecsBeforeRecording",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","WakeupTimeFormat",1,"label","block"],["pInputText","","id","WakeupTimeFormat","name","WakeupTimeFormat",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","SetWakeuptimeCommand",1,"label","block"],["pInputText","","id","SetWakeuptimeCommand","name","SetWakeuptimeCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","ServerHaltCommand",1,"label","block"],["pInputText","","id","ServerHaltCommand","name","ServerHaltCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","preSDWUCheckCommand",1,"label","block"],["pInputText","","id","preSDWUCheckCommand","name","preSDWUCheckCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,ZK,2,3,"ng-template",3),_(4,XK,2,3,"ng-template",4),_(5,eQ,72,76,"ng-template",5),_(6,iQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,rn,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const rQ=["backendwakeup"];function oQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendwake.title")," ")}function aQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendwake.subtitle")," ")}function lQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5),m(6,"translate"),c(),l(7,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().WOLbackendReconnectWaitTime=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",9)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().WOLbackendConnectRetry=s}),c(),l(16,"small",12),g(17),m(18,"translate"),c()(),l(19,"div",9)(20,"label",15),g(21),m(22,"translate"),c(),l(23,"input",16),C("ngModelChange",function(s){return v(e),d().WOLbackendCommand=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()()(),l(27,"p-fieldset",8),m(28,"translate"),l(29,"div",9)(30,"label",17),g(31),m(32,"translate"),c(),l(33,"input",18),C("ngModelChange",function(s){return v(e),d().SleepCommand=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",9)(38,"label",19),g(39),m(40,"translate"),c(),l(41,"input",20),C("ngModelChange",function(s){return v(e),d().WakeUpCommand=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,29,"settings.backendwake.master.title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(6,31,"settings.backendwake.master.delay_label")),a(2),p("ngModel",e.WOLbackendReconnectWaitTime)("showButtons",!0)("min",0)("max",1200)("step",5),a(2),T(" ",f(10,33,"settings.backendwake.master.delay_desc")," "),a(4),S(f(14,35,"settings.backendwake.master.attempts_label")),a(2),p("ngModel",e.WOLbackendConnectRetry)("showButtons",!0)("min",1)("max",60)("step",1),a(2),T(" ",f(18,37,"settings.backendwake.master.attempts_desc")," "),a(4),S(f(22,39,"settings.backendwake.master.cmd_label")),a(2),p("ngModel",e.WOLbackendCommand),a(2),T(" ",f(26,41,"settings.backendwake.master.cmd_desc")," "),a(2),D("legend",f(28,43,"settings.backendwake.slave.title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(32,45,"settings.backendwake.slave.sleep_label")),a(2),p("ngModel",e.SleepCommand),a(2),T(" ",f(36,47,"settings.backendwake.slave.sleep_desc")," "),a(4),S(f(40,49,"settings.backendwake.slave.wake_label")),a(2),p("ngModel",e.WakeUpCommand),a(2),T(" ",f(44,51,"settings.backendwake.slave.wake_desc")," ")}}function cQ(t,i){1&t&&(k(0,"p-message",26),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function uQ(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function dQ(t,i){if(1&t){const e=I();l(0,"div",21)(1,"div",22),_(2,cQ,2,3,"p-message",23),_(3,uQ,2,3,"p-message",24),c(),l(4,"p-button",25),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let pQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.hostName="",this.successCount=0,this.errorCount=0,this.WOLbackendReconnectWaitTime=0,this.WOLbackendConnectRetry=5,this.WOLbackendCommand="",this.SleepCommand="",this.WakeUpCommand="",this.bewObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getBackendWake(){this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.getSettings()},error:()=>this.errorCount++})}getSettings(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendReconnectWaitTime",Default:"0"}).subscribe({next:e=>this.WOLbackendReconnectWaitTime=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendConnectRetry",Default:"5"}).subscribe({next:e=>this.WOLbackendConnectRetry=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendCommand",Default:""}).subscribe({next:e=>this.WOLbackendCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"SleepCommand",Default:""}).subscribe({next:e=>this.SleepCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"WakeUpCommand",Default:""}).subscribe({next:e=>this.WakeUpCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendReconnectWaitTime",Value:String(this.WOLbackendReconnectWaitTime)}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendConnectRetry",Value:String(this.WOLbackendConnectRetry)}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendCommand",Value:this.WOLbackendCommand}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"SleepCommand",Value:this.SleepCommand}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"WakeUpCommand",Value:this.WakeUpCommand}).subscribe(this.bewObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-backend-wakeup"]],viewQuery:function(e,n){if(1&e&&j(rQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","backendwakeup",1,"ml-3","mr-3"],["backendwakeup","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],[1,"form-group","field"],["for","WOLbackendReconnectWaitTime",1,"label","block"],["name","WOLbackendReconnectWaitTime","id","WOLbackendReconnectWaitTime",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","WOLbackendConnectRetry",1,"label","block"],["name","WOLbackendConnectRetry","id","WOLbackendConnectRetry",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","WOLbackendCommand",1,"label","block"],["pInputText","","id","WOLbackendCommand","name","WOLbackendCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","SleepCommand",1,"label","block"],["pInputText","","id","SleepCommand","name","SleepCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","WakeUpCommand",1,"label","block"],["pInputText","","id","WakeUpCommand","name","WakeUpCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,oQ,2,3,"ng-template",3),_(4,aQ,2,3,"ng-template",4),_(5,lQ,45,53,"ng-template",5),_(6,dQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,dt,Te,_e,Ye,Q,qe,ve],pipes:[de],styles:[""]}),t})();const hQ=["backendcontrol"];function mQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendctrl.title")," ")}function fQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendctrl.subtitle")," ")}function gQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"input",11,12),C("ngModelChange",function(s){return v(e),d().BackendStopCommand=s}),c(),l(8,"small",13),g(9),m(10,"translate"),c()(),l(11,"div",9)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"input",15,12),C("ngModelChange",function(s){return v(e),d().BackendStartCommand=s}),c(),l(17,"small",13),g(18),m(19,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,6,"settings.backendctrl.stop_label")),a(2),p("ngModel",e.BackendStopCommand),a(3),T(" ",f(10,8,"settings.backendctrl.stop_desc")," "),a(4),S(f(14,10,"settings.backendctrl.start_label")),a(2),p("ngModel",e.BackendStartCommand),a(3),T(" ",f(19,12,"settings.backendctrl.start_desc")," ")}}function _Q(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function bQ(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function vQ(t,i){if(1&t){const e=I();l(0,"div",16)(1,"div",17),_(2,_Q,2,3,"p-message",18),_(3,bQ,2,3,"p-message",19),c(),l(4,"p-button",20),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let CQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.BackendStopCommand="killall mythbackend",this.BackendStartCommand="mythbackend",this.becObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getBackendControl(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"BackendStopCommand",Default:"killall mythbackend"}).subscribe({next:e=>this.BackendStopCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"BackendStartCommand",Default:"mythbackend"}).subscribe({next:e=>this.BackendStartCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"BackendStopCommand",Value:this.BackendStopCommand}).subscribe(this.becObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"BackendStartCommand",Value:this.BackendStartCommand}).subscribe(this.becObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-backend-control"]],viewQuery:function(e,n){if(1&e&&j(hQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","backendcontrol",1,"ml-3","mr-3"],["backendcontrol","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","BackendStopCommand",1,"label","block"],["pInputText","","id","BackendStopCommand","name","BackendStopCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["MiscStatusScript","ngModel"],[1,"block"],["for","BackendStartCommand",1,"label","block"],["pInputText","","id","BackendStartCommand","name","BackendStartCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,mQ,2,3,"ng-template",3),_(4,fQ,2,3,"ng-template",4),_(5,gQ,20,14,"ng-template",5),_(6,vQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const yQ=["jobqbackend"],wQ=["JobQueueWindowStartHT"],TQ=["JobQueueWindowEndHT"];function SQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqbackend.title")," ")}function xQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqbackend.subtitle")," ")}function DQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().JobQueueMaxSimultaneousJobs=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().JobQueueCheckFrequency=s}),c(),l(15,"small",12),g(16),m(17,"translate"),c()(),l(18,"div",9)(19,"label",15),g(20),m(21,"translate"),c(),l(22,"p-calendar",16,17),C("ngModelChange",function(s){return v(e),d().JobQueueWindowStart=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()(),l(27,"div",9)(28,"label",18),g(29),m(30,"translate"),c(),l(31,"p-calendar",19,20),C("ngModelChange",function(s){return v(e),d().JobQueueWindowEnd=s}),c(),l(33,"small",12),g(34),m(35,"translate"),c()(),l(36,"div",9)(37,"label",21),g(38),m(39,"translate"),c(),l(40,"p-dropdown",22),C("ngModelChange",function(s){return v(e),d().JobQueueCPU=s}),c(),l(41,"small",12),g(42),m(43,"translate"),c()(),l(44,"div",9)(45,"p-checkbox",23),C("ngModelChange",function(s){return v(e),d().JobAllowMetadata=s}),m(46,"translate"),c(),l(47,"small",12),g(48),m(49,"translate"),c()(),l(50,"div",9)(51,"p-checkbox",24),C("ngModelChange",function(s){return v(e),d().JobAllowCommFlag=s}),m(52,"translate"),c(),l(53,"small",12),g(54),m(55,"translate"),c()(),l(56,"div",9)(57,"p-checkbox",25),C("ngModelChange",function(s){return v(e),d().JobAllowTranscode=s}),m(58,"translate"),c(),l(59,"small",12),g(60),m(61,"translate"),c()(),l(62,"div",9)(63,"p-checkbox",26),C("ngModelChange",function(s){return v(e),d().JobAllowPreview=s}),m(64,"translate"),c(),l(65,"small",12),g(66),m(67,"translate"),c()(),l(68,"div",9)(69,"p-checkbox",27),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob1=s}),c(),l(70,"small",12),g(71),m(72,"translate"),c()(),l(73,"div",9)(74,"p-checkbox",28),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob2=s}),c(),l(75,"small",12),g(76),m(77,"translate"),c()(),l(78,"div",9)(79,"p-checkbox",29),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob3=s}),c(),l(80,"small",12),g(81),m(82,"translate"),c()(),l(83,"div",9)(84,"p-checkbox",30),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob4=s}),c(),l(85,"small",12),g(86),m(87,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,60,"settings.jobqbackend.maxjobs_label")),a(2),p("ngModel",e.JobQueueMaxSimultaneousJobs)("showButtons",!0)("min",1)("max",10)("step",1),a(2),T(" ",f(9,62,"settings.jobqbackend.maxjobs_desc")," "),a(4),S(f(13,64,"settings.jobqbackend.freq_label")),a(2),p("ngModel",e.JobQueueCheckFrequency)("showButtons",!0)("min",5)("max",300)("step",5),a(2),T(" ",f(17,66,"settings.jobqbackend.freq_desc")," "),a(4),S(f(21,68,"settings.jobqbackend.start_label")),a(2),p("ngModel",e.JobQueueWindowStart)("timeOnly",!0)("readonlyInput",!0),a(3),T(" ",f(26,70,"settings.jobqbackend.start_desc")," "),a(4),S(f(30,72,"settings.jobqbackend.end_label")),a(2),p("ngModel",e.JobQueueWindowEnd)("timeOnly",!0)("readonlyInput",!0),a(3),T(" ",f(35,74,"settings.jobqbackend.end_desc")," "),a(4),S(f(39,76,"settings.jobqbackend.cpu_label")),a(2),p("options",e.cpuOptions)("ngModel",e.JobQueueCPU),a(2),T(" ",f(43,78,"settings.jobqbackend.cpu_desc")," "),a(3),D("label",f(46,80,"settings.jobqbackend.meta_label")),p("ngModel",e.JobAllowMetadata)("binary",!0),a(3),T(" ",f(49,82,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(52,84,"settings.jobqbackend.comm_label")),p("ngModel",e.JobAllowCommFlag)("binary",!0),a(3),T(" ",f(55,86,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(58,88,"settings.jobqbackend.trans_label")),p("ngModel",e.JobAllowTranscode)("binary",!0),a(3),T(" ",f(61,90,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(64,92,"settings.jobqbackend.preview_label")),p("ngModel",e.JobAllowPreview)("binary",!0),a(3),T(" ",f(67,94,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[0]),p("ngModel",e.JobAllowUserJob1)("binary",!0),a(2),T(" ",f(72,96,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[1]),p("ngModel",e.JobAllowUserJob2)("binary",!0),a(2),T(" ",f(77,98,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[2]),p("ngModel",e.JobAllowUserJob3)("binary",!0),a(2),T(" ",f(82,100,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[3]),p("ngModel",e.JobAllowUserJob4)("binary",!0),a(2),T(" ",f(87,102,"settings.jobqbackend.allow_desc")," ")}}function MQ(t,i){1&t&&(k(0,"p-message",36),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function kQ(t,i){1&t&&(k(0,"p-message",37),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function IQ(t,i){if(1&t){const e=I();l(0,"div",31)(1,"div",32),_(2,MQ,2,3,"p-message",33),_(3,kQ,2,3,"p-message",34),c(),l(4,"p-button",35),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let EQ=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.mythService=s,this.successCount=0,this.errorCount=0,this.hostName="",this.JobQueueMaxSimultaneousJobs=1,this.JobQueueCheckFrequency=60,this.JobQueueWindowStart=new Date(0),this.JobQueueWindowStartHT$=new Je,this.JobQueueWindowEnd=new Date(0),this.JobQueueWindowEndHT$=new Je,this.JobQueueCPU="0",this.JobAllowMetadata=!0,this.JobAllowCommFlag=!0,this.JobAllowTranscode=!0,this.JobAllowPreview=!0,this.JobAllowUserJob1=!1,this.JobAllowUserJob2=!1,this.JobAllowUserJob3=!1,this.JobAllowUserJob4=!1,this.cpuOptions=[{name:"settings.jobqbackend.cpu_low",code:"0"},{name:"settings.jobqbackend.cpu_med",code:"1"},{name:"settings.jobqbackend.cpu_high",code:"2"}],this.jqbObserver={next:r=>{r.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getJobQBackend(),this.JobQueueWindowStartHT$.subscribe({complete:()=>this.JobQueueWindowStartHT.updateInputfield()}),this.JobQueueWindowEndHT$.subscribe({complete:()=>this.JobQueueWindowEndHT.updateInputfield()}),this.JobQCmds=this.setupService.getJobQCommands(),n.get(this.cpuOptions[0].name).subscribe(r=>this.cpuOptions[0].name=r),n.get(this.cpuOptions[1].name).subscribe(r=>this.cpuOptions[1].name=r),n.get(this.cpuOptions[2].name).subscribe(r=>this.cpuOptions[2].name=r)}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getJobQBackend(){this.successCount=0,this.errorCount=0,this.setupService.parseTime(this.JobQueueWindowStart,"00:00"),this.setupService.parseTime(this.JobQueueWindowEnd,"23:59"),this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.getSettings()},error:()=>this.errorCount++})}getSettings(){this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueMaxSimultaneousJobs",Default:"1"}).subscribe({next:e=>this.JobQueueMaxSimultaneousJobs=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueCheckFrequency",Default:"60"}).subscribe({next:e=>this.JobQueueCheckFrequency=Number(e.String),error:()=>this.errorCount++}),this.JobQueueWindowStartHT$=this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueWindowStart",Default:"00:00"}),this.JobQueueWindowStartHT$.subscribe({next:e=>this.setupService.parseTime(this.JobQueueWindowStart,e.String),error:()=>this.errorCount++}),this.JobQueueWindowEndHT$=this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueWindowEnd",Default:"23:59"}),this.JobQueueWindowEndHT$.subscribe({next:e=>this.setupService.parseTime(this.JobQueueWindowEnd,e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueCPU",Default:"0"}).subscribe({next:e=>this.JobQueueCPU=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowMetadata",Default:"1"}).subscribe({next:e=>this.JobAllowMetadata="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowCommFlag",Default:"1"}).subscribe({next:e=>this.JobAllowCommFlag="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowTranscode",Default:"1"}).subscribe({next:e=>this.JobAllowTranscode="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowPreview",Default:"1"}).subscribe({next:e=>this.JobAllowPreview="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob1",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob1="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob2",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob2="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob3",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob3="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob4",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob4="1"==e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueMaxSimultaneousJobs",Value:String(this.JobQueueMaxSimultaneousJobs)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueCheckFrequency",Value:String(this.JobQueueCheckFrequency)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueWindowStart",Value:this.setupService.formatTime(this.JobQueueWindowStart)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueWindowEnd",Value:this.setupService.formatTime(this.JobQueueWindowEnd)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueCPU",Value:this.JobQueueCPU}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowMetadata",Value:this.JobAllowMetadata?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowCommFlag",Value:this.JobAllowCommFlag?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowTranscode",Value:this.JobAllowTranscode?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowPreview",Value:this.JobAllowPreview?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob1",Value:this.JobAllowUserJob1?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob2",Value:this.JobAllowUserJob2?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob3",Value:this.JobAllowUserJob3?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob4",Value:this.JobAllowUserJob4?"1":"0"}).subscribe(this.jqbObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-backend"]],viewQuery:function(e,n){if(1&e&&(j(yQ,5),j(wQ,5),j(TQ,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.JobQueueWindowStartHT=s.first),V(s=B())&&(n.JobQueueWindowEndHT=s.first)}},decls:7,vars:0,consts:[["name","jobqbackend",1,"ml-3","mr-3"],["jobqbackend","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","JobQueueMaxSimultaneousJobs",1,"label","block"],["name","JobQueueMaxSimultaneousJobs","id","JobQueueMaxSimultaneousJobs",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","JobQueueCheckFrequency",1,"label","block"],["name","JobQueueCheckFrequency","id","JobQueueCheckFrequency",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","JobQueueWindowStart",1,"label","block"],["name","JobQueueWindowStart","id","JobQueueWindowStart","ngControl","JobQueueWindowStart",3,"ngModel","timeOnly","readonlyInput","ngModelChange"],["JobQueueWindowStartHT",""],["for","JobQueueWindowEnd",1,"label","block"],["name","JobQueueWindowEnd","id","JobQueueWindowEnd","ngControl","JobQueueWindowEnd",3,"ngModel","timeOnly","readonlyInput","ngModelChange"],["JobQueueWindowEndHT",""],["for","JobQueueCPU",1,"label","block"],["optionLabel","name","optionValue","code","name","JobQueueCPU",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["inputId","JobAllowMetadata","name","JobAllowMetadata",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowCommFlag","name","JobAllowCommFlag",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowTranscode","name","JobAllowTranscode",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowPreview","name","JobAllowPreview",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob1","name","JobAllowUserJob1",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob2","name","JobAllowUserJob2",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob3","name","JobAllowUserJob3",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob4","name","JobAllowUserJob4",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,SQ,2,3,"ng-template",3),_(4,xQ,2,3,"ng-template",4),_(5,DQ,88,104,"ng-template",5),_(6,IQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,dt,Te,_e,xr,Vt,rn,Q,qe,ve],pipes:[de],styles:[""]}),t})();const RQ=["jobqglobal"];function LQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqglobal.title")," ")}function OQ(t,i){}function AQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().JobsRunOnRecordHost=s}),m(4,"translate"),c(),l(5,"small",11),g(6),m(7,"translate"),c()(),l(8,"div",9)(9,"p-checkbox",12),C("ngModelChange",function(s){return v(e),d().AutoCommflagWhileRecording=s}),m(10,"translate"),c(),l(11,"small",11),g(12),m(13,"translate"),c()(),l(14,"div",9)(15,"label",13),g(16),m(17,"translate"),c(),l(18,"input",14),C("ngModelChange",function(s){return v(e),d().JobQueueCommFlagCommand=s}),c(),l(19,"small",11),g(20),m(21,"translate"),c()(),l(22,"div",9)(23,"label",15),g(24),m(25,"translate"),c(),l(26,"input",16),C("ngModelChange",function(s){return v(e),d().JobQueueTranscodeCommand=s}),c(),l(27,"small",11),g(28),m(29,"translate"),c()(),l(30,"div",9)(31,"p-checkbox",17),C("ngModelChange",function(s){return v(e),d().AutoTranscodeBeforeAutoCommflag=s}),m(32,"translate"),c(),l(33,"small",11),g(34),m(35,"translate"),c()(),l(36,"div",9)(37,"p-checkbox",18),C("ngModelChange",function(s){return v(e),d().SaveTranscoding=s}),m(38,"translate"),c(),l(39,"small",11),g(40),m(41,"translate"),c()()()()}if(2&t){const e=d();a(3),D("label",f(4,22,"settings.jobqglobal.runonrechost_label")),p("ngModel",e.JobsRunOnRecordHost)("binary",!0),a(3),T(" ",f(7,24,"settings.jobqglobal.runonrechost_desc")," "),a(3),D("label",f(10,26,"settings.jobqglobal.startcomm_label")),p("ngModel",e.AutoCommflagWhileRecording)("binary",!0),a(3),T(" ",f(13,28,"settings.jobqglobal.startcomm_desc")," "),a(4),S(f(17,30,"settings.jobqglobal.commcmd_label")),a(2),p("ngModel",e.JobQueueCommFlagCommand),a(2),T(" ",f(21,32,"settings.jobqglobal.commcmd_desc")," "),a(4),S(f(25,34,"settings.jobqglobal.transcmd_label")),a(2),p("ngModel",e.JobQueueTranscodeCommand),a(2),T(" ",f(29,36,"settings.jobqglobal.transcmd_desc")," "),a(3),D("label",f(32,38,"settings.jobqglobal.transfirst_label")),p("ngModel",e.AutoTranscodeBeforeAutoCommflag)("binary",!0),a(3),T(" ",f(35,40,"settings.jobqglobal.transfirst_desc")," "),a(3),D("label",f(38,42,"settings.jobqglobal.transsave_label")),p("ngModel",e.SaveTranscoding)("binary",!0),a(3),T(" ",f(41,44,"settings.jobqglobal.transsave_desc")," ")}}function PQ(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function FQ(t,i){1&t&&(k(0,"p-message",25),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function NQ(t,i){if(1&t){const e=I();l(0,"div",19)(1,"div",20),_(2,PQ,2,3,"p-message",21),_(3,FQ,2,3,"p-message",22),c(),l(4,"p-button",23),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let VQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.JobsRunOnRecordHost=!1,this.AutoCommflagWhileRecording=!1,this.JobQueueCommFlagCommand="mythcommflag",this.JobQueueTranscodeCommand="mythtranscode",this.AutoTranscodeBeforeAutoCommflag=!1,this.SaveTranscoding=!1,this.JobQGlobalObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getJobQGlobal()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getJobQGlobal(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobsRunOnRecordHost",Default:"0"}).subscribe({next:e=>this.JobsRunOnRecordHost="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"AutoCommflagWhileRecording",Default:"0"}).subscribe({next:e=>this.AutoCommflagWhileRecording="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobQueueCommFlagCommand",Default:"mythcommflag"}).subscribe({next:e=>this.JobQueueCommFlagCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobQueueTranscodeCommand",Default:"mythtranscode"}).subscribe({next:e=>this.JobQueueTranscodeCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"AutoTranscodeBeforeAutoCommflag",Default:"0"}).subscribe({next:e=>this.AutoTranscodeBeforeAutoCommflag="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"SaveTranscoding",Default:"0"}).subscribe({next:e=>this.SaveTranscoding="1"==e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobsRunOnRecordHost",Value:this.JobsRunOnRecordHost?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"AutoCommflagWhileRecording",Value:this.AutoCommflagWhileRecording?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobQueueCommFlagCommand",Value:this.JobQueueCommFlagCommand}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobQueueTranscodeCommand",Value:this.JobQueueTranscodeCommand}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"AutoTranscodeBeforeAutoCommflag",Value:this.AutoTranscodeBeforeAutoCommflag?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"SaveTranscoding",Value:this.SaveTranscoding?"1":"0"}).subscribe(this.JobQGlobalObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-global"]],viewQuery:function(e,n){if(1&e&&j(RQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","jobqglobal",1,"ml-3","mr-3"],["jobqglobal","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["inputId","JobsRunOnRecordHost","name","JobsRunOnRecordHost",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["inputId","AutoCommflagWhileRecording","name","AutoCommflagWhileRecording",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["for","JobQueueCommFlagCommand",1,"label","block"],["pInputText","","id","JobQueueCommFlagCommand","name","JobQueueCommFlagCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","JobQueueTranscodeCommand",1,"label","block"],["pInputText","","id","JobQueueTranscodeCommand","name","JobQueueTranscodeCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["inputId","AutoTranscodeBeforeAutoCommflag","name","AutoTranscodeBeforeAutoCommflag",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","SaveTranscoding","name","SaveTranscoding",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,LQ,2,3,"ng-template",3),_(4,OQ,0,0,"ng-template",4),_(5,AQ,42,46,"ng-template",5),_(6,NQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,rn,Te,_e,Ye,Q,qe,ve],pipes:[de],styles:[""]}),t})();const BQ=["jobqcommands"];function HQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqcommands.title")," ")}function qQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqcommands.subtitle")," ")}const lS=function(t){return{num:t}};function UQ(t,i){if(1&t){const e=I();l(0,"div")(1,"div",10)(2,"label",11),k(3,"div",12),c(),l(4,"input",13,14),C("ngModelChange",function(s){const o=v(e).$implicit;return d(2).JobQCommandsData.UserJobDesc[o]=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()(),l(9,"div",10)(10,"label",11),k(11,"div",12),c(),l(12,"input",13,16),C("ngModelChange",function(s){const o=v(e).$implicit;return d(2).JobQCommandsData.UserJob[o]=s}),c(),l(14,"small",15),g(15),m(16,"translate"),c()()()}if(2&t){const e=i.$implicit,n=d(2);a(2),Bn("for","UserJobDesc",e,""),a(1),p("translate","settings.jobqcommands.job_label")("translateParams",z(18,lS,e+1)),a(1),Bn("id","UserJobDesc",e,"")("name","UserJobDesc",e,""),p("ngModel",n.JobQCommandsData.UserJobDesc[e]),a(3),T(" ",f(8,14,"settings.jobqcommands.job_desc")," "),a(3),Bn("for","UserJob",e,""),a(1),p("translate","settings.jobqcommands.command_label")("translateParams",z(20,lS,e+1)),a(1),Bn("id","UserJob",e,"")("name","UserJob",e,""),p("ngModel",n.JobQCommandsData.UserJob[e]),a(3),T(" ",f(16,16,"settings.jobqcommands.command_desc")," ")}}function GQ(t,i){if(1&t&&(l(0,"div",7)(1,"div",8),_(2,UQ,17,22,"div",9),c()()),2&t){const e=d();a(2),p("ngForOf",e.items)}}function zQ(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function jQ(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function $Q(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,zQ,2,3,"p-message",19),_(3,jQ,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.JobQCommandsData.successCount>0&&0==e.JobQCommandsData.errorCount&&!n.dirty),a(1),p("ngIf",e.JobQCommandsData.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let WQ=(()=>{class t{constructor(e){this.setupService=e,this.items=[0,1,2,3],this.JobQCommandsData=this.setupService.getJobQCommands()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.setupService.saveJobQCommands(this.currentForm)}}return t.\u0275fac=function(e){return new(e||t)(x(De))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-commands"]],viewQuery:function(e,n){if(1&e&&j(BQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","jobqcommands",1,"ml-3","mr-3"],["jobqcommands","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[4,"ngFor","ngForOf"],[1,"form-group","field"],[1,"label","block",3,"for"],[3,"translate","translateParams"],["pInputText","",1,"mb-2","form-control","w-full",3,"id","ngModel","name","ngModelChange"],["UserJobDesc{{item}}","ngModel"],[1,"block"],["UserJob{{item}}","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,HQ,2,3,"ng-template",3),_(4,qQ,2,3,"ng-template",4),_(5,GQ,3,1,"ng-template",5),_(6,$Q,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,at,hu,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const KQ=["epgdownload"];function QQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.epgdownload.title")," ")}function JQ(t,i){}function YQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().MythFillEnabled=s}),m(4,"translate"),c(),l(5,"small",11),g(6),m(7,"translate"),c()()()()}if(2&t){const e=d();a(3),D("label",f(4,4,"settings.epgdownload.enabled_label")),p("ngModel",e.MythFillEnabled)("binary",!0),a(3),T(" ",f(7,6,"settings.epgdownload.enabled_desc")," ")}}function ZQ(t,i){1&t&&(k(0,"p-message",17),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function XQ(t,i){1&t&&(k(0,"p-message",18),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function eJ(t,i){if(1&t){const e=I();l(0,"div",12)(1,"div",13),_(2,ZQ,2,3,"p-message",14),_(3,XQ,2,3,"p-message",15),c(),l(4,"p-button",16),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let tJ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.MythFillEnabled=!0,this.EpgDownloadObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getEpgDownload()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getEpgDownload(){this.successCount=0,this.errorCount=0,this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MythFillEnabled",Default:"1"}).subscribe({next:e=>this.MythFillEnabled="1"==e.String,error:()=>this.errorCount++})}saveForm(){console.log("save form clicked"),this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MythFillEnabled",Value:this.MythFillEnabled?"1":"0"}).subscribe(this.EpgDownloadObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-epg-downloading"]],viewQuery:function(e,n){if(1&e&&j(KQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","epgdownload",1,"ml-3","mr-3"],["epgdownload","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["inputId","MythFillEnabled","name","MythFillEnabled",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,QQ,2,3,"ng-template",3),_(4,JQ,0,0,"ng-template",4),_(5,YQ,8,8,"ng-template",5),_(6,eJ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,rn,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();function nJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[0],"")}}function iJ(t,i){1&t&&k(0,"app-host-address")}function sJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[1],"")}}function rJ(t,i){1&t&&k(0,"app-locale")}function oJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[2],"")}}function aJ(t,i){1&t&&k(0,"app-misc-settings")}function lJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[3],"")}}function cJ(t,i){1&t&&k(0,"app-eit-scanner")}function uJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[4],"")}}function dJ(t,i){1&t&&k(0,"app-shutdown-wakeup")}function pJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[5],"")}}function hJ(t,i){1&t&&k(0,"app-backend-wakeup")}function mJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[6],"")}}function fJ(t,i){1&t&&k(0,"app-backend-control")}function gJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[7],"")}}function _J(t,i){1&t&&k(0,"app-jobqueue-backend")}function bJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[8],"")}}function vJ(t,i){1&t&&k(0,"app-jobqueue-global")}function CJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[9],"")}}function yJ(t,i){1&t&&k(0,"app-jobqueue-commands")}function wJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[10],"")}}function TJ(t,i){1&t&&k(0,"app-epg-downloading")}let SJ=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.router=s,this.m_showHelp=!1,this.currentTab=-1,this.dirtyMessages=["","","","","","","","","","","","","","","",""],this.forms=[,,,,,,,,,,,,,,,,],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.setupService.setCurrentForm(null),n.get(this.dirtyText).subscribe(r=>this.dirtyText=r),n.get(this.warningText).subscribe(r=>this.warningText=r)}ngOnInit(){}onTabOpen(e){this.showDirty(),void 0===this.forms[e.index]&&(this.forms[e.index]=this.setupService.getCurrentForm()),this.currentTab=e.index,console.log("onTabOpen"),console.log(e),this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty()}showDirty(){-1!=this.currentTab&&(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}showHelp(){this.m_showHelp=!0}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(e=>e.length>0))||this.confirm(this.warningText)}onWindowClose(e){(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n.length>0))&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-general-settings"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:54,vars:42,consts:[[1,"col-12","w-full","p-0",3,"onClose","onOpen"],[3,"header"],["pTemplate","header"],["pTemplate","content"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"p-card")(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",0),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),l(5,"p-accordionTab",1),m(6,"translate"),_(7,nJ,2,1,"ng-template",2),_(8,iJ,1,0,"ng-template",3),c(),l(9,"p-accordionTab",1),m(10,"translate"),_(11,sJ,2,1,"ng-template",2),_(12,rJ,1,0,"ng-template",3),c(),l(13,"p-accordionTab",1),m(14,"translate"),_(15,oJ,2,1,"ng-template",2),_(16,aJ,1,0,"ng-template",3),c(),l(17,"p-accordionTab",1),m(18,"translate"),_(19,lJ,2,1,"ng-template",2),_(20,cJ,1,0,"ng-template",3),c(),l(21,"p-accordionTab",1),m(22,"translate"),_(23,uJ,2,1,"ng-template",2),_(24,dJ,1,0,"ng-template",3),c(),l(25,"p-accordionTab",1),m(26,"translate"),_(27,pJ,2,1,"ng-template",2),_(28,hJ,1,0,"ng-template",3),c(),l(29,"p-accordionTab",1),m(30,"translate"),_(31,mJ,2,1,"ng-template",2),_(32,fJ,1,0,"ng-template",3),c(),l(33,"p-accordionTab",1),m(34,"translate"),_(35,gJ,2,1,"ng-template",2),_(36,_J,1,0,"ng-template",3),c(),l(37,"p-accordionTab",1),m(38,"translate"),_(39,bJ,2,1,"ng-template",2),_(40,vJ,1,0,"ng-template",3),c(),l(41,"p-accordionTab",1),m(42,"translate"),_(43,CJ,2,1,"ng-template",2),_(44,yJ,1,0,"ng-template",3),c(),l(45,"p-accordionTab",1),m(46,"translate"),_(47,wJ,2,1,"ng-template",2),_(48,TJ,1,0,"ng-template",3),c()(),l(49,"div",4)(50,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/selectlanguage"])}),m(51,"translate"),c(),l(52,"p-button",6),C("onClick",function(){return n.router.navigate(["setupwizard/capture-cards"])}),m(53,"translate"),c()()()),2&e&&(a(2),S(f(3,14,"settings.general.title")),a(3),D("header",f(6,16,"settings.hostaddress.title")),a(4),D("header",f(10,18,"settings.locale.title")),a(4),D("header",f(14,20,"settings.misc.title")),a(4),D("header",f(18,22,"settings.eit.title")),a(4),D("header",f(22,24,"settings.shutwake.title")),a(4),D("header",f(26,26,"settings.backendwake.title")),a(4),D("header",f(30,28,"settings.backendctrl.title")),a(4),D("header",f(34,30,"settings.jobqbackend.title")),a(4),D("header",f(38,32,"settings.jobqglobal.title")),a(4),D("header",f(42,34,"settings.jobqcommands.title")),a(4),D("header",f(46,36,"settings.epgdownload.title")),a(5),D("label",f(51,38,"common.back")),a(2),D("label",f(53,40,"common.next")))},directives:[Pe,Ks,Ws,ie,xK,AK,UK,JK,sQ,pQ,CQ,EQ,VQ,WQ,tJ,ve],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})(),Gt=(()=>{class t{constructor(e){this.httpClient=e,this.diseqcTypes=[{description:"Switch",type:"switch",inactive:!1},{description:"Rotor",type:"rotor",inactive:!1},{description:"Unicable",type:"scr",inactive:!1},{description:"LNB",type:"lnb",inactive:!1}]}GetCaptureCardList(e,n){let s=(new ye).set("HostName",e).set("CardType",n);return this.httpClient.get("/Capture/GetCaptureCardList",{params:s})}GetCardTypeList(){return this.httpClient.get("/Capture/GetCardTypeList",{})}UpdateCaptureCard(e,n,s){return this.httpClient.post("/Capture/UpdateCaptureCard",{Cardid:e,Setting:n,Value:s})}DeleteCaptureCard(e){return this.httpClient.post("/Capture/RemoveCardInput",{CardInputId:e})}AddCaptureCard(e){return this.httpClient.post("/Capture/AddCaptureCard",e)}GetCaptureDeviceList(e){let n=(new ye).set("CardType",e);return this.httpClient.get("/Capture/GetCaptureDeviceList",{params:n})}GetDiseqcTreeList(){return this.httpClient.get("/Capture/GetDiseqcTreeList",{})}AddDiseqcTree(e){return this.httpClient.post("/Capture/AddDiseqcTree",e)}UpdateDiseqcTree(e){return this.httpClient.post("/Capture/UpdateDiseqcTree",e)}DeleteDiseqcTree(e){return this.httpClient.post("/Capture/RemoveDiseqcTree",{DiseqcId:e})}GetDiseqcConfigList(){return this.httpClient.get("/Capture/GetDiseqcConfigList",{})}AddDiseqcConfig(e){return this.httpClient.post("/Capture/AddDiseqcConfig",e)}DeleteDiseqcConfig(e){return console.log(e),this.httpClient.post("/Capture/RemoveDiseqcConfig",{CardId:e})}GetInputGroupList(){return this.httpClient.get("/Capture/GetUserInputGroupList",{})}SetInputMaxRecordings(e,n){return this.httpClient.post("/Capture/SetInputMaxRecordings",{InputId:e,Max:n})}AddUserInputGroup(e){return this.httpClient.post("/Capture/AddUserInputGroup",{Name:e})}LinkInputGroup(e,n){return this.httpClient.post("/Capture/LinkInputGroup",{InputId:e,InputGroupId:n})}UnlinkInputGroup(e,n){return this.httpClient.post("/Capture/UnlinkInputGroup",{InputId:e,InputGroupId:n})}GetRecProfileGroupList(e,n,s){let r=(new ye).set("GroupId",e).set("ProfileId",n).set("OnlyInUse",s);return this.httpClient.get("/Capture/GetRecProfileGroupList",{params:r})}AddRecProfile(e,n,s,r){return this.httpClient.post("/Capture/AddRecProfile",{GroupId:e,ProfileName:n,VideoCodec:s,AudioCodec:r})}DeleteRecProfile(e){return this.httpClient.post("/Capture/DeleteRecProfile",{ProfileId:e})}UpdateRecProfile(e,n,s){return this.httpClient.post("/Capture/UpdateRecProfile",{ProfileId:e,VideoCodec:n,AudioCodec:s})}UpdateRecProfileParam(e,n,s){return this.httpClient.post("/Capture/UpdateRecProfileParam",{ProfileId:e,Name:n,Value:s})}GetCardSubType(e){let n=(new ye).set("cardid",e);return this.httpClient.get("/Capture/GetCardSubType",{params:n})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xJ(t,i){if(1&t){const e=I();l(0,"p-button",14),C("onClick",function(){return v(e),d().displayModal=!1}),m(1,"translate"),c(),l(2,"p-button",15),C("onClick",function(){return v(e),d().newCard()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",""==e.selectedCardType.CardType)}}function DJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){return v(e),d().displayDeleteAllonHost=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){return v(e),d().deleteAllOnHost()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function MJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){return v(e),d().displayDeleteAll=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){return v(e),d().deleteAllOnAllHosts()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function kJ(t,i){1&t&&(l(0,"div",18),k(1,"br")(2,"p-message",19),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function IJ(t,i){1&t&&(l(0,"div",18),k(1,"br")(2,"p-message",20),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function EJ(t,i){if(1&t&&(l(0,"div",24)(1,"div",25),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d().index,n=d();a(2),yo(" ",n.m_CaptureCardsFiltered[e].CardType," ",n.m_CaptureCardsFiltered[e].VideoDevice," (",n.m_CaptureCardsFiltered[e].DisplayName,") "),a(2),T("\xa0",n.dirtyMessages[e],"")}}function RJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function LJ(t,i){if(1&t&&k(0,"app-ceton",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function OJ(t,i){if(1&t&&k(0,"app-dvb",32),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)("diseqcTreeList",n.diseqcTreeList)("parent",n)}}function AJ(t,i){if(1&t&&k(0,"app-external",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function PJ(t,i){if(1&t&&k(0,"app-hdhomerun",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function FJ(t,i){if(1&t&&k(0,"app-iptv",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function NJ(t,i){if(1&t&&k(0,"app-import",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function VJ(t,i){if(1&t&&k(0,"app-demo",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function BJ(t,i){if(1&t&&k(0,"app-v4l2",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function HJ(t,i){if(1&t&&k(0,"app-hdpvr",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function qJ(t,i){if(1&t&&k(0,"app-satip",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function UJ(t,i){if(1&t&&k(0,"app-vbox",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function GJ(t,i){if(1&t&&k(0,"app-firewire",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function zJ(t,i){1&t&&(l(0,"div"),k(1,"br"),g(2,"Not Supported "),c())}const xd=function(){return{width:"50vw"}},jJ=function(t,i,e){return{CardType:t,VideoDevice:i,DisplayName:e}};function $J(t,i){if(1&t){const e=I();l(0,"p-button",26),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",2),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,RJ,4,6,"ng-template",4),c(),l(11,"div",27),_(12,LJ,1,2,"app-ceton",28),_(13,OJ,1,4,"app-dvb",29),_(14,AJ,1,2,"app-external",28),_(15,PJ,1,2,"app-hdhomerun",28),_(16,FJ,1,2,"app-iptv",28),_(17,NJ,1,2,"app-import",28),_(18,VJ,1,2,"app-demo",28),_(19,BJ,1,2,"app-v4l2",28),_(20,HJ,1,2,"app-hdpvr",28),_(21,qJ,1,2,"app-satip",28),_(22,UJ,1,2,"app-vbox",28),_(23,GJ,1,2,"app-firewire",28),_(24,zJ,3,0,"div",30),c()}if(2&t){const e=d().index,n=d();D("label",f(1,24,"settings.capture.delete_this")),p("disabled",!n.m_CaptureCardsFiltered[e].CardId||n.setupService.schedulingEnabled),a(2),q(A(33,xd)),D("header",f(3,26,"settings.capture.delete_this")),p("visible",n.displayDeleteThis[e])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,28,"settings.common.ru_sure")),a(3),S(Dt(9,30,"settings.capture.delete_details",Rt(34,jJ,n.m_CaptureCardsFiltered[e].CardType,n.m_CaptureCardsFiltered[e].VideoDevice,n.m_CaptureCardsFiltered[e].DisplayName))),a(3),p("ngSwitch",n.m_CaptureCardsFiltered[e].CardType),a(1),p("ngSwitchCase","CETON"),a(1),p("ngSwitchCase","DVB"),a(1),p("ngSwitchCase","EXTERNAL"),a(1),p("ngSwitchCase","HDHOMERUN"),a(1),p("ngSwitchCase","FREEBOX"),a(1),p("ngSwitchCase","IMPORT"),a(1),p("ngSwitchCase","DEMO"),a(1),p("ngSwitchCase","V4L2ENC"),a(1),p("ngSwitchCase","HDPVR"),a(1),p("ngSwitchCase","SATIP"),a(1),p("ngSwitchCase","VBOX"),a(1),p("ngSwitchCase","FIREWIRE")}}function WJ(t,i){if(1&t){const e=I();l(0,"p-accordionTab",21),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,EJ,5,4,"ng-template",22),_(2,$J,25,38,"ng-template",23),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}const KJ=function(){return{height:"50vh"}},cS=function(t){return{host:t}};let uS=(()=>{class t{constructor(e,n,s,r,o){this.mythService=e,this.router=n,this.captureCardService=s,this.setupService=r,this.translate=o,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.m_hostName="",this.displayModal=!1,this.selectedCardType={CardType:"",Description:""},this.displayDeleteAllonHost=!1,this.displayDeleteAll=!1,this.successCount=0,this.expectedCount=0,this.errorCount=0,this.deleteAll=!1,this.delObserver={next:u=>{u.bool?(this.successCount++,this.successCount==this.expectedCount&&(this.deleteAll?(this.loadCards(!0),this.deleteAll=!1):this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1))):(this.errorCount++,this.deletedTab=-1,this.deleteAll=!1)},error:u=>{console.error(u),this.errorCount++,this.deleteAll=!1}},this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(u=>{this.m_hostName=u.String,this.loadCards(!0)}),o.get(this.dirtyText).subscribe(u=>this.dirtyText=u),o.get(this.warningText).subscribe(u=>this.warningText=u),o.get(this.deletedText).subscribe(u=>this.deletedText=u),o.get(this.newText).subscribe(u=>this.newText=u),this.captureCardService.GetCardTypeList().subscribe(u=>{this.cardTypes=u.CardTypeList.CardTypes,this.cardTypes.forEach(h=>{h.Inactive=t.supportedCardTypes.indexOf(h.CardType)<0})})}loadCards(e){this.m_CaptureCardList$=this.captureCardService.GetCaptureCardList("",""),this.m_CaptureCardList$.subscribe(n=>{this.m_CaptureCardList=n,e&&this.filterCards()})}filterCards(){this.m_CaptureCardsFiltered=this.m_CaptureCardList.CaptureCardList.CaptureCards.filter(e=>0==e.ParentId&&e.HostName==this.m_hostName),this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[];for(let e=0;e{this.diseqcTreeList=e},error:e=>{console.log("GetDiseqcTreeList",e),this.errorCount++}})}onTabOpen(e){this.successCount+this.errorCount>=this.expectedCount&&(this.errorCount=0,this.successCount=0,this.expectedCount=0),this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:this.m_CaptureCardsFiltered[this.currentTab].CardId?"":this.newText)}newCard(){this.displayModal=!1;let e={CardType:this.selectedCardType.CardType,HostName:this.m_hostName,ChannelTimeout:3e3,SignalTimeout:1e3};switch(e.CardType){case"EXTERNAL":e.ChannelTimeout=2e4;break;case"FREEBOX":e.VideoDevice="http://mafreebox.freebox.fr/freeboxtv/playlist.m3u",e.ChannelTimeout=3e4;break;case"SATIP":e.DVBDiSEqCType=1}for(let n=0;n{s.ParentId==n&&(console.log("DeleteThis (parent):",s.CardId),this.expectedCount++,this.captureCardService.DeleteCaptureCard(s.CardId).subscribe(this.delObserver))}),this.m_CaptureCardsFiltered[e].DiSEqCId=0,console.log("DeleteThis:",n),this.expectedCount++,this.captureCardService.DeleteCaptureCard(n).subscribe(this.delObserver)}deleteAllOnHost(){if(!(this.successCount+this.errorCount{e.HostName!=this.m_hostName&&(e.DiSEqCId=0,console.log("DeleteThis (other host):",e.CardId),this.expectedCount++,this.captureCardService.DeleteCaptureCard(e.CardId).subscribe(this.delObserver))}))}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.supportedCardTypes=["CETON","DVB","EXTERNAL","HDHOMERUN","FREEBOX","IMPORT","DEMO","V4L2ENC","HDPVR","SATIP","VBOX","FIREWIRE"],t.\u0275fac=function(e){return new(e||t)(x(Ut),x(It),x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-capture-cards"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:42,vars:72,consts:[[1,"m-5"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["optionLabel","Description","optionDisabled","Inactive",3,"options","ngModel","listStyle","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","click"],["styleClass","p-button-danger","icon","pi pi-trash","iconPos","left",3,"label","disabled","click"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-11","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"ngSwitch"],[3,"card","cardList",4,"ngSwitchCase"],[3,"card","cardList","diseqcTreeList","parent",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"card","cardList"],[3,"card","cardList","diseqcTreeList","parent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayModal=!0}),m(5,"translate"),c(),l(6,"p-dialog",2),C("visibleChange",function(r){return n.displayModal=r}),m(7,"translate"),l(8,"p"),g(9),m(10,"translate"),c(),l(11,"p-listbox",3),C("ngModelChange",function(r){return n.selectedCardType=r})("onDblClick",function(){return n.newCard()}),c(),_(12,xJ,4,7,"ng-template",4),c(),g(13," \xa0 "),l(14,"p-button",5),C("click",function(){return n.displayDeleteAllonHost=!0}),m(15,"translate"),c(),l(16,"p-dialog",2),C("visibleChange",function(r){return n.displayDeleteAllonHost=r}),m(17,"translate"),l(18,"h2"),g(19),m(20,"translate"),c(),_(21,DJ,4,6,"ng-template",4),c(),g(22," \xa0 "),l(23,"p-button",6),C("click",function(){return n.displayDeleteAll=!0}),m(24,"translate"),c(),l(25,"p-dialog",2),C("visibleChange",function(r){return n.displayDeleteAll=r}),m(26,"translate"),l(27,"h2"),g(28),m(29,"translate"),c(),_(30,MJ,4,6,"ng-template",4),c(),k(31,"br"),l(32,"div",7),_(33,kJ,5,3,"div",8),_(34,IJ,5,3,"div",8),c(),l(35,"p-accordion",9),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(36,WJ,3,2,"p-accordionTab",10),c(),l(37,"div",11)(38,"p-button",12),C("onClick",function(){return n.router.navigate(["setupwizard/general"])}),m(39,"translate"),c(),l(40,"p-button",13),C("onClick",function(){return n.router.navigate(["setupwizard/recording-profiles"])}),m(41,"translate"),c()()()),2&e&&(a(2),S(f(3,38,"settings.capture.title")),a(2),D("label",f(5,40,"settings.capture.new_capture_card")),a(2),q(A(64,xd)),D("header",f(7,42,"settings.capture.new_capture_card")),p("visible",n.displayModal)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(10,44,"settings.capture.select_type")),a(2),p("options",n.cardTypes)("ngModel",n.selectedCardType)("listStyle",A(65,KJ)),a(3),D("label",Dt(15,46,"settings.capture.delete_on_host",z(66,cS,n.m_hostName))),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(68,xd)),D("header",Dt(17,49,"settings.capture.delete_on_host",z(69,cS,n.m_hostName))),p("visible",n.displayDeleteAllonHost)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(20,52,"settings.common.ru_sure")),a(4),D("label",f(24,54,"settings.capture.delete_all")),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(71,xd)),D("header",f(26,56,"settings.capture.delete_all_all")),p("visible",n.displayDeleteAll)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(29,58,"settings.common.ru_sure")),a(5),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.m_CaptureCardsFiltered),a(2),D("label",f(39,60,"common.back")),a(2),D("label",f(41,62,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();function QJ(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d();a(2),T(" ",n.Name," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function JJ(t,i){1&t&&_(0,QJ,5,2,"div",9),2&t&&p("ngIf",d(2).readyCount>0)}function YJ(t,i){if(1&t&&k(0,"app-profile-group",12),2&t){const e=d().$implicit,n=d();p("group",e)("parentComponent",n)}}function ZJ(t,i){if(1&t){const e=I();l(0,"p-accordionTab",6),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,JJ,1,1,"ng-template",7),_(2,YJ,1,2,"ng-template",8),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}let dS=(()=>{class t{constructor(e,n,s,r){this.captureCardService=e,this.router=n,this.translate=s,this.setupService=r,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.activeTab=[],this.readyCount=0,this.profileGroups=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.groups=[],this.setupService.setCurrentForm(null),this.loadGroups(),s.get(this.dirtyText).subscribe(o=>this.dirtyText=o),s.get(this.warningText).subscribe(o=>this.warningText=o)}loadGroups(){this.captureCardService.GetRecProfileGroupList(0,0,!0).subscribe(n=>{this.groups=n.RecProfileGroupList.RecProfileGroups,this.readyCount++})}ngOnInit(){}onTabOpen(e){this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.profileGroups[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.profileGroups[this.currentTab].allClean()?"":this.dirtyText)}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=!0;return this.profileGroups.forEach(n=>{n.allClean()||(e=!1)}),!!e||this.confirm(this.warningText)}onWindowClose(e){let n=!0;this.profileGroups.forEach(s=>{s.allClean()||(n=!1)}),n||(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(It),x(Le),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-recording-profiles"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:10,consts:[[1,"md:m-5"],[1,"col-12","w-full",3,"onOpen","onClose"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],["class","grid w-full",4,"ngIf"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"group","parentComponent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",1),C("onOpen",function(r){return n.onTabOpen(r)})("onClose",function(r){return n.onTabClose(r)}),_(5,ZJ,3,1,"p-accordionTab",2),c(),l(6,"div",3)(7,"p-button",4),C("onClick",function(){return n.router.navigate(["setupwizard/capture-cards"])}),m(8,"translate"),c(),l(9,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/video-sources"])}),m(10,"translate"),c()()()),2&e&&(a(2),S(f(3,4,"settings.rprofiles.title")),a(3),p("ngForOf",n.groups),a(2),D("label",f(8,6,"common.back")),a(2),D("label",f(10,8,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})(),Or=(()=>{class t{constructor(e){this.httpClient=e}AddDBChannel(e){return this.httpClient.post("/Channel/AddDBChannel",e)}UpdateDBChannel(e){return this.httpClient.post("/Channel/UpdateDBChannel",e)}AddVideoSource(e){return this.httpClient.post("/Channel/AddVideoSource",e)}FetchChannelsFromSource(e){let n=(new ye).set("SourceId",e.SourceId).set("CardId",e.CardId).set("WaitForFinish",e.WaitForFinish);return this.httpClient.get("/Channel/FetchChannelsFromSource",{params:n})}GetChannelInfo(e){let n=(new ye).set("ChanID",e);return this.httpClient.get("/Channel/GetChannelInfo",{params:n})}GetChannelInfoList(e){let n=new ye;return void 0!==e.SourceID&&(n=n.set("SourceID",e.SourceID)),void 0!==e.ChannelGroupID&&(n=n.set("ChannelGroupID",e.ChannelGroupID)),void 0!==e.StartIndex&&(n=n.set("StartIndex",e.StartIndex)),void 0!==e.Count&&(n=n.set("Count",e.Count)),void 0!==e.OnlyVisible&&(n=n.set("OnlyVisible",e.OnlyVisible)),void 0!==e.Details&&(n=n.set("Details",e.Details)),void 0!==e.OrderByName&&(n=n.set("OrderByName",e.OrderByName)),void 0!==e.GroupByCallsign&&(n=n.set("GroupByCallsign",e.GroupByCallsign)),void 0!==e.OnlyTunable&&(n=n.set("OnlyTunable",e.OnlyTunable)),this.httpClient.get("/Channel/GetChannelInfoList",{params:n})}GetDDLineupList(e){let n=(new ye).set("Source",e.Source).set("UserId",e.UserId).set("Password",e.Password);return this.httpClient.get("/Channel/GetDDLineupList",{params:n})}GetVideoMultiplex(e){let n=(new ye).set("MplexID",e);return this.httpClient.get("/Channel/GetVideoMultiplex",{params:n})}GetVideoMultiplexList(e){let n=(new ye).set("SourceID",e.SourceID);return e.StartIndex&&(n=n.set("StartIndex",e.StartIndex)),e.Count&&(n=n.set("Count",e.Count)),this.httpClient.get("/Channel/GetVideoMultiplexList",{params:n})}GetVideoSource(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetVideoSource",{params:n})}GetVideoSourceList(){return this.httpClient.get("/Channel/GetVideoSourceList")}GetXMLTVIdList(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetXMLTVIdList",{params:n})}GetAvailableChanid(){return this.httpClient.get("/Channel/GetAvailableChanid",{})}RemoveDBChannel(e){return this.httpClient.post("/Channel/RemoveDBChannel",{ChannelID:e})}RemoveVideoSource(e){return this.httpClient.post("/Channel/RemoveVideoSource",{SourceId:e})}UpdateVideoSource(e){return this.httpClient.post("/Channel/UpdateVideoSource",e)}GetGrabberList(){return this.httpClient.get("/Channel/GetGrabberList")}GetFreqTableList(){return this.httpClient.get("/Channel/GetFreqTableList")}GetCommMethodList(){return this.httpClient.get("/Channel/GetCommMethodList")}StartScan(e){return this.httpClient.post("/Channel/StartScan",e)}GetScanStatus(){return this.httpClient.get("/Channel/GetScanStatus")}StopScan(e){return this.httpClient.post("/Channel/StopScan",{Cardid:e})}GetScanList(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetScanList",{params:n})}SendScanDialogResponse(e){return this.httpClient.post("/Channel/SendScanDialogResponse",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const XJ=["vsourceform"],eY=["top"];function tY(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.vsource.item_title")," ")}function nY(t,i){}function iY(t,i){if(1&t&&(l(0,"div")(1,"small",34),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.work.errorMessage," ")}}const pS=function(){return{minWidth:"80%"}};function sY(t,i){if(1&t){const e=I();l(0,"p-dropdown",35,36),C("ngModelChange",function(s){return v(e),d(2).videoSource.Grabber=s})("onChange",function(){return v(e),d(2).checkName()}),c()}if(2&t){const e=d(2);q(A(5,pS)),p("options",e.grabberList.GrabberList.Grabbers)("ngModel",e.videoSource.Grabber)("editable",!1)}}function rY(t,i){if(1&t){const e=I();l(0,"div",10)(1,"label",37),g(2),m(3,"translate"),c(),l(4,"p"),g(5),m(6,"translate"),l(7,"a",38),g(8,"XMLTV"),c()(),l(9,"table")(10,"tr")(11,"td",39),g(12),c(),l(13,"td",40)(14,"button",41),C("click",function(){return v(e),d(2).copyConfigure()}),m(15,"translate"),c()()()()()}if(2&t){const e=d(2);a(2),T(" ",f(3,4,"settings.vsource.grabberconfig_label")," "),a(3),T(" ",f(6,6,"settings.vsource.grabberconfig_desc")," "),a(7),T(" ",e.configCommand," "),a(2),D("pTooltip",f(15,8,"settings.common.clipboard_tooltip"))}}function oY(t,i){if(1&t){const e=I();l(0,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).videoSource.FreqTable=s}),c()}if(2&t){const e=d(2);q(A(5,pS)),p("options",e.freqTableList.FreqTableList)("ngModel",e.videoSource.FreqTable)("editable",!1)}}function aY(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().videoSource.SourceName=s})("change",function(){return v(e),d().checkName()}),c(),_(8,iY,3,1,"div",14),l(9,"small",15),g(10),m(11,"translate"),c()(),l(12,"div",10)(13,"label",16),g(14),m(15,"translate"),c(),_(16,sY,2,6,"p-dropdown",17),l(17,"small",15),g(18),m(19,"translate"),c()(),_(20,rY,16,10,"div",18),l(21,"div",10)(22,"p-checkbox",19,20),C("ngModelChange",function(s){return v(e),d().videoSource.UseEIT=s}),m(24,"translate"),c(),l(25,"small",15),g(26),m(27,"translate"),c()(),l(28,"div",10)(29,"label",21),g(30),m(31,"translate"),c(),_(32,oY,2,6,"p-dropdown",22),l(33,"small",15),g(34),m(35,"translate"),c()(),l(36,"div",10)(37,"label",23),g(38),m(39,"translate"),c(),l(40,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().videoSource.ScanFrequency=s}),c(),l(41,"small",15),g(42),m(43,"translate"),c()(),l(44,"div",10)(45,"label",25),g(46),m(47,"translate"),c(),l(48,"p-inputNumber",26),C("ngModelChange",function(s){return v(e),d().videoSource.NITId=s}),c(),l(49,"small",15),g(50),m(51,"translate"),c()(),l(52,"div",10)(53,"label",27),g(54),m(55,"translate"),c(),l(56,"p-inputNumber",28),C("ngModelChange",function(s){return v(e),d().videoSource.BouquetId=s}),c(),l(57,"small",15),g(58),m(59,"translate"),l(60,"a",29),g(61,"DVB UK"),c()()(),l(62,"div",10)(63,"label",30),g(64),m(65,"translate"),c(),l(66,"p-inputNumber",31),C("ngModelChange",function(s){return v(e),d().videoSource.RegionId=s}),c(),l(67,"small",15),g(68),m(69,"translate"),l(70,"a",29),g(71,"DVB UK"),c()()(),l(72,"div",10)(73,"label",32),g(74),m(75,"translate"),c(),l(76,"p-inputNumber",33),C("ngModelChange",function(s){return v(e),d().videoSource.LCNOffset=s}),c(),l(77,"small",15),g(78),m(79,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,54,"settings.vsource.source_label")),a(2),p("ngModel",e.videoSource.SourceName)("disabled",e.videoSource.Id>0)("maxlength",50),a(2),p("ngIf",e.work.errorMessage),a(2),T(" ",f(11,56,"settings.vsource.source_desc")," "),a(4),T(" ",f(15,58,"settings.vsource.grabber_label")," "),a(2),p("ngIf",e.grabberList.GrabberList.Grabbers.length>0),a(2),T(" ",f(19,60,"settings.vsource.grabber_desc")," "),a(2),p("ngIf",e.configCommand.length>0),a(2),D("label",f(24,62,"settings.vsource.eit_label")),p("ngModel",e.videoSource.UseEIT)("binary",!0),a(4),T(" ",f(27,64,"settings.vsource.eit_desc")," "),a(4),T(" ",f(31,66,"settings.vsource.freqtable_label")," "),a(2),p("ngIf",e.freqTableList.FreqTableList.length>0),a(2),T(" ",f(35,68,"settings.vsource.freqtable_desc")," "),a(4),T(" ",f(39,70,"settings.vsource.scanfreq_label")," "),a(2),p("ngModel",e.videoSource.ScanFrequency)("min",0)("max",999999999),a(2),T(" ",f(43,72,"settings.vsource.scanfreq_desc")," "),a(4),T(" ",f(47,74,"settings.vsource.netid_label")," "),a(2),p("ngModel",e.videoSource.NITId)("showButtons",!0)("min",-1)("max",65535)("step",1)("useGrouping",!1),a(2),T(" ",f(51,76,"settings.vsource.netid_desc")," "),a(4),T(" ",f(55,78,"settings.vsource.bouquet_label")," "),a(2),p("ngModel",e.videoSource.BouquetId)("showButtons",!0)("min",0)("max",65535)("step",1)("useGrouping",!1),a(2),T(" ",f(59,80,"settings.vsource.bouquet_desc")," "),a(6),T(" ",f(65,82,"settings.vsource.region_label")," "),a(2),p("ngModel",e.videoSource.RegionId)("showButtons",!0)("min",0)("max",100)("step",1)("useGrouping",!1),a(2),T(" ",f(69,84,"settings.vsource.region_desc")," "),a(6),T(" ",f(75,86,"settings.vsource.lcnoffset_label")," "),a(2),p("ngModel",e.videoSource.LCNOffset)("showButtons",!0)("min",0)("max",2e4)("step",100)("useGrouping",!1),a(2),T(" ",f(79,88,"settings.vsource.lcnoffset_desc")," ")}}function lY(t,i){1&t&&(k(0,"p-message",49),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function cY(t,i){1&t&&(k(0,"p-message",50),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function uY(t,i){if(1&t){const e=I();l(0,"div",44)(1,"div",45),_(2,lY,2,3,"p-message",46),_(3,cY,2,3,"p-message",47),c(),l(4,"p-button",48),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.videoSource.SourceName||e.work.validateError||e.setupService.schedulingEnabled)}}let dY=(()=>{class t{constructor(e,n,s,r,o){this.channelService=e,this.translate=n,this.setupService=s,this.clipboard=r,this.mythService=o,this.grabberList={GrabberList:{Grabbers:[]}},this.freqTableList={FreqTableList:[]},this.work={successCount:0,errorCount:0,errorMessage:"",validateError:!1},this.messages={nameInUse:"settings.vsource.nameInUse",nameRequired:"settings.vsource.nameRequired"},this.configCommand="",this.saveObserver={next:u=>{u.bool?this.work.successCount++:!this.videoSource.Id&&u.int?(this.work.successCount++,this.videoSource.Id||(this.videoSource.Id=u.int)):(console.log("saveObserver error",u),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:u=>{console.log("saveObserver error",u),this.work.errorCount++,this.currentForm.form.markAsDirty()}},n.get(this.messages.nameInUse).subscribe(u=>this.messages.nameInUse=u),n.get(this.messages.nameRequired).subscribe(u=>this.messages.nameRequired=u)}ngOnInit(){this.channelService.GetGrabberList().subscribe(e=>{this.grabberList=e}),this.channelService.GetFreqTableList().subscribe(e=>{this.freqTableList=e}),this.mythService.GetBackendInfo().subscribe(e=>{this.backendInfo=e,this.setupConf()})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}copyConfigure(){this.clipboard.copy(this.configCommand)}checkName(){this.work.errorMessage="",this.work.validateError=!1,this.videoSource.SourceName=this.videoSource.SourceName.trim(),this.videoSourceList.VideoSourceList.VideoSources.find(n=>n.SourceName==this.videoSource.SourceName&&n.Id!=this.videoSource.Id)&&(this.work.errorMessage=this.messages.nameInUse,this.work.validateError=!0),""==this.videoSource.SourceName&&(this.work.errorMessage=this.messages.nameRequired,this.work.validateError=!0),this.setupConf()}setupConf(){this.configCommand="eitonly"==this.videoSource.Grabber||"/bin/true"==this.videoSource.Grabber||""==this.videoSource.Grabber||""==this.videoSource.SourceName||this.work.validateError?"":"sudo -u "+this.backendInfo.BackendInfo.Env.USER+" "+this.videoSource.Grabber+' --configure --config-file "'+this.backendInfo.BackendInfo.Env.MYTHCONFDIR+"/"+this.videoSource.SourceName+'.xmltv"'}saveForm(){if(this.work.successCount=0,this.work.errorCount=0,this.videoSource.Id){let e=this.videoSource;e.SourceID=this.videoSource.Id,this.channelService.UpdateVideoSource(e).subscribe(this.saveObserver)}else this.channelService.AddVideoSource(this.videoSource).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Or),x(Le),x(De),x(rS),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-vsource"]],viewQuery:function(e,n){if(1&e&&(j(XJ,5),j(eY,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{videoSource:"videoSource",videoSourceList:"videoSourceList"},decls:9,vars:0,consts:[["name","vsourceform",1,"ml-3","mr-3"],["vsourceform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","SourceName",1,"label","block"],["pInputText","","id","SourceName","name","SourceName",1,"mb-2","form-control","w-full",3,"ngModel","disabled","maxlength","ngModelChange","change"],["SourceName","ngModel"],[4,"ngIf"],[1,"block"],["for","Grabber",1,"label","block"],["optionLabel","DisplayName","optionValue","Program","name","Grabber",3,"options","ngModel","editable","style","ngModelChange","onChange",4,"ngIf"],["class","form-group field",4,"ngIf"],["inputId","UseEIT","name","UseEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","FreqTable",1,"label","block"],["name","FreqTable",3,"options","ngModel","editable","style","ngModelChange",4,"ngIf"],["for","ScanFrequency",1,"label","block"],["name","ScanFrequency","id","ScanFrequency",3,"ngModel","min","max","ngModelChange"],["for","NITId",1,"label","block"],["name","NITId","id","NITId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["for","BouquetId",1,"label","block"],["name","BouquetId","id","BouquetId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["href","https://www.mythtv.org/wiki/DVB_UK","target","_blank"],["for","RegionId",1,"label","block"],["name","RegionId","id","RegionId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["for","LCNOffset",1,"label","block"],["name","LCNOffset","id","LCNOffset",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],[1,"p-error","block"],["optionLabel","DisplayName","optionValue","Program","name","Grabber",3,"options","ngModel","editable","ngModelChange","onChange"],["Grabber","ngModel"],["for","configure",1,"label","block"],["href","http://www.mythtv.org/wiki/XMLTV","target","_blank"],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-copy",1,"p-button-rounded","p-button-text",3,"pTooltip","click"],["name","FreqTable",3,"options","ngModel","editable","ngModelChange"],["FreqTable","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,tY,2,3,"ng-template",4),_(6,nY,0,0,"ng-template",5),_(7,aY,80,90,"ng-template",6),_(8,uY,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,fn,Q,Vt,Ln,vt,Jt,rn,dt,qe,ve],pipes:[de],styles:["a[_ngcontent-%COMP%]:link, a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:active{background-color:#fff}"]}),t})();function pY(t,i){if(1&t){const e=I();l(0,"p-button",12),C("click",function(){return v(e),d().displayDeleteAll=!1}),m(1,"translate"),c(),l(2,"p-button",13),C("click",function(){return v(e),d().deleteAllSources()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function hY(t,i){1&t&&(l(0,"div",14),k(1,"br")(2,"p-message",15),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function mY(t,i){1&t&&(l(0,"div",14),k(1,"br")(2,"p-message",16),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function fY(t,i){if(1&t&&(l(0,"div",20)(1,"div",21),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d().index,n=d();a(2),$e(" ",n.videoSourceList.VideoSourceList.VideoSources[e].SourceName," (",n.videoSourceList.VideoSourceList.VideoSources[e].Grabber,") "),a(2),T("\xa0",n.dirtyMessages[e],"")}}function gY(t,i){if(1&t){const e=I();l(0,"p-button",12),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",13),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const hS=function(){return{width:"50vw"}},_Y=function(t,i){return{Grabber:t,DisplayName:i}};function bY(t,i){if(1&t){const e=I();l(0,"p-button",22),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",3),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,gY,4,6,"ng-template",4),c(),k(11,"app-vsource",23)}if(2&t){const e=d().index,n=d();D("label",f(1,13,"settings.vsource.delete_this")),p("disabled",!n.videoSourceList.VideoSourceList.VideoSources[e].Id||n.setupService.schedulingEnabled),a(2),q(A(22,hS)),D("header",f(3,15,"settings.vsource.delete_this")),p("visible",n.displayDeleteThis[e])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,17,"settings.common.ru_sure")),a(3),S(Dt(9,19,"settings.vsource.delete_details",We(23,_Y,n.videoSourceList.VideoSourceList.VideoSources[e].Grabber,n.videoSourceList.VideoSourceList.VideoSources[e].SourceName))),a(3),p("videoSource",n.videoSourceList.VideoSourceList.VideoSources[e])("videoSourceList",n.videoSourceList)}}function vY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",17),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,fY,5,3,"ng-template",18),_(2,bY,12,26,"ng-template",19),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}let CY=(()=>{class t{constructor(e,n,s,r){this.setupService=e,this.translate=n,this.channelService=s,this.router=r,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.successCount=0,this.expectedCount=0,this.errorCount=0,this.displayDeleteAll=!1,this.deleteAll=!1,this.videoSourceList={VideoSourceList:{VideoSources:[],AsOf:"",Version:"",ProtoVer:""}},this.delObserver={next:o=>{o.bool?(this.successCount++,this.successCount==this.expectedCount&&(this.deleteAll?(this.loadSources(),this.deleteAll=!1):this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1))):(this.errorCount++,this.deletedTab=-1,this.deleteAll=!1)},error:o=>{console.error(o),this.errorCount++,this.deleteAll=!1}},this.setupService.setCurrentForm(null),this.loadSources(),n.get(this.dirtyText).subscribe(o=>this.dirtyText=o),n.get(this.warningText).subscribe(o=>this.warningText=o),n.get(this.deletedText).subscribe(o=>this.deletedText=o),n.get(this.newText).subscribe(o=>this.newText=o)}loadSources(){this.channelService.GetVideoSourceList().subscribe(e=>{this.videoSourceList=e,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[];for(let n=0;n=this.expectedCount&&(this.errorCount=0,this.successCount=0,this.expectedCount=0),this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:this.videoSourceList.VideoSourceList.VideoSources[this.currentTab].Id?"":this.newText)}newSource(){for(let n=0;nn==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Or),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-video-sources"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:26,vars:32,consts:[[1,"m-5"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["styleClass","p-button-danger","icon","pi pi-trash","iconPos","left",3,"label","disabled","click"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"videoSource","videoSourceList"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.newSource()}),m(5,"translate"),c(),g(6," \xa0 "),l(7,"p-button",2),C("click",function(){return n.displayDeleteAll=!0}),m(8,"translate"),c(),l(9,"p-dialog",3),C("visibleChange",function(r){return n.displayDeleteAll=r}),m(10,"translate"),l(11,"h2"),g(12),m(13,"translate"),c(),_(14,pY,4,6,"ng-template",4),c(),k(15,"br"),l(16,"div",5),_(17,hY,5,3,"div",6),_(18,mY,5,3,"div",6),c(),l(19,"p-accordion",7),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(20,vY,3,2,"p-accordionTab",8),c(),l(21,"div",9)(22,"p-button",10),C("onClick",function(){return n.router.navigate(["setupwizard/recording-profiles"])}),m(23,"translate"),c(),l(24,"p-button",11),C("onClick",function(){return n.router.navigate(["setupwizard/input-connections"])}),m(25,"translate"),c()()()),2&e&&(a(2),S(f(3,17,"settings.vsource.title")),a(2),D("label",f(5,19,"settings.vsource.new_video_source")),a(3),D("label",f(8,21,"settings.vsource.delete_all")),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(31,hS)),D("header",f(10,23,"settings.vsource.delete_all")),p("visible",n.displayDeleteAll)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(13,25,"settings.common.ru_sure")),a(5),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.videoSourceList.VideoSourceList.VideoSources),a(2),D("label",f(23,27,"common.back")),a(2),D("label",f(25,29,"common.next")))},directives:[Pe,ve,Tn,ie,Q,qe,Ks,at,Ws,dY],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();function yY(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d();a(2),Ic(" ",n.CardType," ",n.VideoDevice," (",n.DisplayName,") => ",r.videoSourceLookup[n.SourceId].SourceName," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function wY(t,i){1&t&&_(0,yY,5,5,"div",9),2&t&&p("ngIf",d(2).readyCount>1)}function TY(t,i){if(1&t&&k(0,"app-iconnection",12),2&t){const e=d().index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)("videoSourceLookup",n.videoSourceLookup)("videoSourceList",n.videoSourceList)("parentComponent",n)}}function SY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",6),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,wY,1,1,"ng-template",7),_(2,TY,1,5,"ng-template",8),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}let mS=(()=>{class t{constructor(e,n,s,r,o,u){this.mythService=e,this.router=n,this.captureCardService=s,this.setupService=r,this.translate=o,this.channelService=u,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.activeTab=[],this.readyCount=0,this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.m_hostName="",this.m_CaptureCardsFiltered=[],this.videoSourceList={VideoSourceList:{VideoSources:[],AsOf:"",Version:"",ProtoVer:""}},this.videoSourceLookup=[],this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(h=>{this.m_hostName=h.String,this.loadCards(!0)}),this.loadSources(),o.get(this.dirtyText).subscribe(h=>this.dirtyText=h),o.get(this.warningText).subscribe(h=>this.warningText=h)}loadCards(e){this.m_CaptureCardList$=this.captureCardService.GetCaptureCardList("",""),this.m_CaptureCardList$.subscribe(n=>{this.m_CaptureCardList=n,e&&this.filterCards(),this.readyCount++})}filterCards(){this.m_CaptureCardsFiltered=this.m_CaptureCardList.CaptureCardList.CaptureCards.filter(e=>0==e.ParentId&&e.HostName==this.m_hostName),this.dirtyMessages=[],this.forms=[],this.activeTab=[];for(let e=0;e{this.videoSourceList=e,this.videoSourceList.VideoSourceList.VideoSources.unshift({Id:0,SourceName:"(None)",ScanFrequency:0}),this.videoSourceLookup=[],this.videoSourceList.VideoSourceList.VideoSources.forEach(n=>{this.videoSourceLookup[n.Id]=n}),this.readyCount++})}ngOnInit(){}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(It),x(Gt),x(De),x(Le),x(Or))},t.\u0275cmp=G({type:t,selectors:[["app-input-connections"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:10,consts:[[1,"m-5"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],["class","grid w-full",4,"ngIf"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"card","cardList","videoSourceLookup","videoSourceList","parentComponent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",1),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(5,SY,3,1,"p-accordionTab",2),c(),l(6,"div",3)(7,"p-button",4),C("onClick",function(){return n.router.navigate(["setupwizard/video-sources"])}),m(8,"translate"),c(),l(9,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/channel-editor"])}),m(10,"translate"),c()()()),2&e&&(a(2),S(f(3,4,"settings.iconnections.title")),a(3),p("ngForOf",n.m_CaptureCardsFiltered),a(2),D("label",f(8,6,"common.back")),a(2),D("label",f(10,8,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const xY=["sgroupform"],DY=function(t){return{name:t}};function MY(t,i){if(1&t&&k(0,"span",8),2&t){const e=d();p("translate","settings.sgroups.sgroup_title")("translateParams",z(2,DY,e.sgroup.LocalizedName))}}function kY(t,i){}function IY(t,i){1&t&&(l(0,"div")(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.sgroups.deleted_label")))}function EY(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",20),g(2),c(),l(3,"td",21)(4,"button",22),C("click",function(){const r=v(e).index;return d(2).editDirectory(r)}),c()(),l(5,"td",21)(6,"button",23),C("click",function(){const r=v(e).index;return d(2).deleteDirectory(r)}),c()(),l(7,"td"),_(8,IY,4,3,"div",24),c()()}if(2&t){const e=i.index,n=d(2);a(2),T(" ",n.editDirs[e]," "),a(2),p("disabled",!n.editDirs[e]),a(2),p("disabled",!n.editDirs[e]),a(2),p("ngIf",!n.editDirs[e])}}function RY(t,i){if(1&t){const e=I();l(0,"p-button",25),C("onClick",function(){return v(e),d(2).showEditDlg=!1}),m(1,"translate"),c(),l(2,"p-button",26),C("onClick",function(){v(e);const s=d(2);return s.editDirs[s.editDlgNum]=s.editDirName,s.showEditDlg=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.cancel")),a(2),D("label",f(3,4,"common.ok")))}const LY=function(){return{width:"50vw"}},OY=function(){return{height:"50vh"}};function AY(t,i){if(1&t){const e=I();l(0,"div",9)(1,"div",10)(2,"table"),_(3,EY,9,4,"tr",11),c(),l(4,"p-dialog",12),C("visibleChange",function(s){return v(e),d().showEditDlg=s}),m(5,"translate"),l(6,"div",13)(7,"label",14),g(8),m(9,"translate"),c(),l(10,"input",15,16),C("ngModelChange",function(s){return v(e),d().editDirName=s})("change",function(){return v(e),d().textChange()}),c()(),l(12,"p-listbox",17,18),C("ngModelChange",function(s){return v(e),d().selectedDir=s})("onClick",function(){return v(e),d().selectDir()}),c(),_(14,RY,4,6,"ng-template",7),c(),k(15,"br"),l(16,"p-button",19),C("onClick",function(){return v(e),d().addDirectory()}),m(17,"translate"),c()()()}if(2&t){const e=d();a(3),p("ngForOf",e.editDirs),a(1),q(A(20,LY)),D("header",f(5,14,"settings.sgroups.seldir_title")),p("visible",e.showEditDlg)("modal",!0)("draggable",!1)("resizable",!1),a(4),S(f(9,16,"settings.sgroups.dirname_label")),a(2),p("ngModel",e.editDirName),a(2),p("options",e.dirSelect)("ngModel",e.selectedDir)("listStyle",A(21,OY)),a(4),D("label",f(17,18,"settings.sgroups.adddir_button"))}}function PY(t,i){1&t&&(k(0,"p-message",32),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function FY(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function NY(t,i){if(1&t){const e=I();l(0,"div",27)(1,"div",28),_(2,PY,2,3,"p-message",29),_(3,FY,2,3,"p-message",30),c(),l(4,"p-button",31),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let VY=(()=>{class t{constructor(e,n,s){this.mythService=e,this.setupService=n,this.translate=s,this.successCount=0,this.errorCount=0,this.expectCount=0,this.showEditDlg=!1,this.editDlgNum=-1,this.editDirName="",this.editDirs=[],this.dirSelect=[],this.selectedDir="",this.upString="UP 1 LEVEL",this.saveObserver={next:r=>{r.bool?(this.successCount++,this.successCount==this.expectCount&&(this.sgroup.DirNames=this.editDirs.filter(o=>o.length>1))):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get("settings.sgroups.updir").subscribe(r=>this.upString="// ** "+r+" **")}ngOnInit(){this.editDirs=this.sgroup.DirNames.slice()}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}selectDir(){for(;"/"==this.editDirName.charAt(this.editDirName.length-1);)this.editDirName=this.editDirName.substring(0,this.editDirName.length-1);if(this.selectedDir.startsWith("//")){let e=this.editDirName.lastIndexOf("/");this.editDirName=this.editDirName.substring(0,e),0==this.editDirName.length&&(this.editDirName="/")}else this.editDirName=this.editDirName+"/"+this.selectedDir;this.fillDirList()}textChange(){this.fillDirList()}fillDirList(){0!=this.editDirName.indexOf("/")&&(this.editDirName="/"+this.editDirName),this.mythService.GetDirListing(this.editDirName).subscribe(e=>{"/"!=this.editDirName&&e.DirListing.unshift(this.upString),this.dirSelect=e.DirListing})}addDirectory(){this.editDirs.push("/"),this.editDirectory(this.editDirs.length-1)}editDirectory(e){this.editDirName=this.editDirs[e],this.editDlgNum=e,this.showEditDlg=!0,this.fillDirList()}deleteDirectory(e){this.editDirs[e]="",this.currentForm.form.markAsDirty()}saveForm(){this.successCount=0,this.errorCount=0,this.expectCount=0;for(let e=0;e{""!=e&&-1==this.sgroup.DirNames.indexOf(e)&&(this.mythService.AddStorageGroupDir({GroupName:this.sgroup.GroupName,DirName:e,HostName:this.hostName}).subscribe(this.saveObserver),this.expectCount++)}),this.sgroup.DirNames.forEach(e=>{-1==this.editDirs.indexOf(e)&&(this.mythService.RemoveStorageGroupDir({GroupName:this.sgroup.GroupName,DirName:e,HostName:this.hostName}).subscribe(this.saveObserver),this.expectCount++)})}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-sgroup"]],viewQuery:function(e,n){if(1&e&&j(xY,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{sgroup:"sgroup",hostName:"hostName"},decls:9,vars:0,consts:[["name","sgroupform",1,"ml-3","mr-3"],["sgroupform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[3,"translate","translateParams"],[1,"grid"],[1,"mb-4","w-full"],[4,"ngFor","ngForOf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],[1,"form-group","field"],["for","DirName",1,"label","block"],["pInputText","","id","DirName","name","DirName",1,"mb-2","form-control","w-full",2,"font-family","monospace",3,"ngModel","ngModelChange","change"],["DirName","ngModel"],["name","ListDirs",3,"options","ngModel","listStyle","ngModelChange","onClick"],["ListDirs","ngModel"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-pencil","pTooltip","Edit",1,"p-button-rounded","p-button-text",3,"disabled","click"],["pButton","","pRipple","","type","button","icon","pi pi-trash","pTooltip","Delete",1,"p-button-rounded","p-button-text",3,"disabled","click"],[4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","onClick"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,MY,1,4,"ng-template",4),_(6,kY,0,0,"ng-template",5),_(7,AY,18,22,"ng-template",6),_(8,NY,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,hu,at,Ln,vt,Jt,Q,Tn,Ye,Te,_e,ws,ve,qe],pipes:[de],styles:[""]}),t})();function BY(t,i){if(1&t){const e=I();l(0,"p-button",14),C("onClick",function(){return v(e),d().displayNewDlg=!1}),m(1,"translate"),c(),l(2,"p-button",15),C("onClick",function(){return v(e),d().newGroup()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",""==e.newGroupName)}}const HY=function(t){return{name:t}};function qY(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(2).index,n=d();p("translate","settings.sgroups.tab_create_title")("translateParams",z(2,HY,n.storageGroups[e].LocalizedName))}}function UY(t,i){if(1&t&&g(0),2&t){const e=d(2).index;T(" ",d().storageGroups[e].LocalizedName," ")}}function GY(t,i){if(1&t&&(l(0,"div",19)(1,"div",20),_(2,qY,1,4,"span",21),_(3,UY,1,1,"ng-template",null,22,we),l(5,"b"),g(6),c()()()),2&t){const e=F(4),n=d().index,s=d();a(2),p("ngIf",0==s.storageGroups[n].DirNames.length)("ngIfElse",e),a(4),T("\xa0",s.dirtyMessages[n],"")}}function zY(t,i){if(1&t&&k(0,"app-sgroup",24),2&t){const e=d().index,n=d();p("sgroup",n.storageGroups[e])("hostName",n.hostName)}}function jY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",16),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,GY,7,3,"ng-template",17),_(2,zY,1,2,"ng-template",18),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}const $Y=function(){return{width:"50vw"}};let WY=(()=>{class t{constructor(e,n,s,r){this.setupService=e,this.translate=n,this.mythService=s,this.router=r,this.forms=[],this.dirtyMessages=[],this.currentTab=-1,this.activeTab=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.hostName="",this.storageGroupDirs=[],this.storageGroups=[{GroupName:"Default",LocalizedName:"",DirNames:[]},{GroupName:"LiveTV",LocalizedName:"",DirNames:[]},{GroupName:"DB Backups",LocalizedName:"",DirNames:[]},{GroupName:"Videos",LocalizedName:"",DirNames:[]},{GroupName:"Trailers",LocalizedName:"",DirNames:[]},{GroupName:"Coverart",LocalizedName:"",DirNames:[]},{GroupName:"Fanart",LocalizedName:"",DirNames:[]},{GroupName:"Screenshots",LocalizedName:"",DirNames:[]},{GroupName:"Banners",LocalizedName:"",DirNames:[]},{GroupName:"Photographs",LocalizedName:"",DirNames:[]},{GroupName:"Music",LocalizedName:"",DirNames:[]},{GroupName:"MusicArt",LocalizedName:"",DirNames:[]}],this.displayNewDlg=!1,this.newGroupName="",this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(o=>{this.hostName=o.String,this.loadGroups()}),n.get(this.dirtyText).subscribe(o=>this.dirtyText=o),n.get(this.warningText).subscribe(o=>this.warningText=o),n.get(this.deletedText).subscribe(o=>this.deletedText=o),n.get(this.newText).subscribe(o=>this.newText=o),this.storageGroups.forEach(o=>n.get("settings.sgroups.special."+o.GroupName).subscribe(u=>o.LocalizedName=u))}loadGroups(){this.mythService.GetStorageGroupDirs({HostName:this.hostName}).subscribe(e=>{this.storageGroupDirs=e.StorageGroupDirList.StorageGroupDirs,this.storageGroupDirs.forEach(n=>{let s=this.storageGroups.find(r=>r.GroupName==n.GroupName);s?s.DirNames.push(n.DirName):this.storageGroups.push({GroupName:n.GroupName,LocalizedName:n.GroupName,DirNames:[n.DirName]})})})}ngOnInit(){}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}newGroup(){this.displayNewDlg=!1,!this.storageGroups.find(n=>n.GroupName==this.newGroupName)&&(this.storageGroups.push({GroupName:this.newGroupName,LocalizedName:this.newGroupName,DirNames:[]}),this.newGroupName="")}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-storage-groups"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:25,vars:24,consts:[[1,"m-5"],["label","New Storage Group","icon","pi pi-plus-circle","styleClass","p-button-plain",3,"onClick"],["header","New Storage Group",3,"visible","modal","draggable","resizable","visibleChange"],[1,"form-group","field"],["for","GroupName",1,"block"],["pInputText","","id","GroupName","name","GroupName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["GroupName","ngModel"],[1,"block"],["pTemplate","footer"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"translate","translateParams",4,"ngIf","ngIfElse"],["onlyName",""],[3,"translate","translateParams"],[3,"sgroup","hostName"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayNewDlg=!0}),c(),l(5,"p-dialog",2),C("visibleChange",function(r){return n.displayNewDlg=r}),l(6,"p"),g(7),m(8,"translate"),c(),l(9,"div",3)(10,"label",4),g(11),m(12,"translate"),c(),l(13,"input",5,6),C("ngModelChange",function(r){return n.newGroupName=r}),c(),k(15,"small",7),c(),_(16,BY,4,7,"ng-template",8),c(),k(17,"br"),l(18,"p-accordion",9),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(19,jY,3,1,"p-accordionTab",10),c(),l(20,"div",11)(21,"p-button",12),C("onClick",function(){return n.router.navigate(["setupwizard/channel-editor"])}),m(22,"translate"),c(),l(23,"p-button",13),C("onClick",function(){return n.router.navigate(["setupwizard/system-events"])}),m(24,"translate"),c()()()),2&e&&(a(2),S(f(3,13,"settings.sgroups.title")),a(3),q(A(23,$Y)),p("visible",n.displayNewDlg)("modal",!0)("draggable",!1)("resizable",!1),a(2),S(f(8,15,"settings.sgroups.name_prompt")),a(4),S(f(12,17,"settings.sgroups.name_label")),a(2),p("ngModel",n.newGroupName),a(6),p("ngForOf",n.storageGroups),a(2),D("label",f(22,19,"common.back")),a(2),D("label",f(24,21,"common.next")))},directives:[Pe,ve,Tn,Ye,Te,_e,ie,Ks,at,Ws,Q,hu,VY],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const KY=["eventsform"];function QY(t,i){if(1&t){const e=I();l(0,"div",9)(1,"div",10)(2,"label",11),g(3),c(),l(4,"input",12),C("ngModelChange",function(s){return v(e).$implicit.Value=s}),c()()()}if(2&t){const e=i.$implicit;a(2),D("for",e.Key),a(1),S(e.LocalizedName),a(1),D("id",e.Key),D("name",e.Key),p("ngModel",e.Value)}}function JY(t,i){if(1&t&&(l(0,"div",7),_(1,QY,5,5,"div",8),c()),2&t){const e=d();a(1),p("ngForOf",e.events)}}function YY(t,i){1&t&&(k(0,"p-message",18),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ZY(t,i){1&t&&(k(0,"p-message",19),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function XY(t,i){if(1&t){const e=I();l(0,"div",13)(1,"div",14),_(2,YY,2,3,"p-message",15),_(3,ZY,2,3,"p-message",16),c(),l(4,"p-button",17),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let eZ=(()=>{class t{constructor(e,n,s,r,o){this.configService=e,this.translate=n,this.setupService=s,this.mythService=r,this.router=o,this.hostName="",this.events=[],this.successCount=0,this.errorCount=0,this.expectedCount=0,this.warningText="settings.common.warning",this.kClearSettingValue="",this.jqbObserver={next:u=>{u.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:u=>{console.error(u),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.mythService.GetHostName().subscribe({next:u=>{this.hostName=u.String,this.configService.GetSystemEvents().subscribe(h=>{this.eventList=h,this.events=h.SystemEventList.SystemEvents})},error:()=>this.errorCount++}),this.translate.get(this.warningText).subscribe(u=>{this.warningText=u})}ngOnInit(){}saveForm(){this.successCount=0,this.errorCount=0,this.expectedCount=0,this.events.forEach(e=>{let n=e.Value.trim();n?this.mythService.PutSetting({HostName:this.hostName,Key:e.Key,Value:n}).subscribe(this.jqbObserver):this.mythService.DeleteSetting({HostName:this.hostName,Key:e.Key}).subscribe(this.jqbObserver),this.expectedCount++})}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(zo),x(Le),x(De),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-system-events"]],viewQuery:function(e,n){if(1&e&&j(KY,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:6,consts:[["name","eventsform",1,"ml-3","mr-3"],["eventsform","ngForm"],[1,"m-5"],["pTemplate","content"],["pTemplate","footer"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],[1,"grid"],["class","mb-4 w-full",4,"ngFor","ngForOf"],[1,"mb-4","w-full"],[1,"form-group","field"],[1,"label","block",3,"for"],["pInputText","",1,"mb-2","form-control","w-full",3,"id","ngModel","name","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"h2"),g(3),m(4,"translate"),c(),l(5,"p-card",2),_(6,JY,2,1,"ng-template",3),_(7,XY,6,6,"ng-template",4),c(),l(8,"div",5)(9,"p-button",6),C("onClick",function(){return n.router.navigate(["setupwizard/storage-groups"])}),m(10,"translate"),c()()()),2&e&&(a(3),S(f(4,2,"settings.sysevents.title")),a(6),D("label",f(10,4,"common.back")))},directives:[ze,Ge,He,Pe,ie,at,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const tZ=["chanform"];function nZ(t,i){if(1&t){const e=I();l(0,"button",53),C("click",function(){return v(e),d(2).openNew()}),m(1,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,2,"settings.chanedit.new_channel")),p("disabled","S"==e.setupService.pageType&&e.setupService.schedulingEnabled)}}function iZ(t,i){1&t&&g(0),2&t&&T(" ",i.$implicit," ")}function sZ(t,i){if(1&t){const e=I();l(0,"p-dropdown",68),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),_(2,iZ,1,1,"ng-template",69),c()}if(2&t){const e=i.$implicit,n=d(3);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.sourceNames)("showClear",!0)}}function rZ(t,i){if(1&t){const e=I();l(0,"p-button",70),C("onClick",function(){return v(e),d(3).deleteSourceRequest()}),m(1,"translate"),m(2,"translate"),c()}if(2&t){const e=d(3);D("pTooltip",f(1,3,"settings.chanedit.delete_source")),D("label",f(2,5,"common.delete")),p("disabled",e.setupService.schedulingEnabled)}}function oZ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.chanedit.delete_message")," ")}function aZ(t,i){1&t&&k(0,"button",71)}function lZ(t,i){if(1&t&&(l(0,"tr")(1,"th"),g(2),m(3,"translate"),l(4,"p-columnFilter",54),_(5,sZ,3,6,"ng-template",55),c(),_(6,rZ,3,7,"p-button",56),_(7,oZ,2,3,"ng-template",null,57,we),c()(),l(9,"tr")(10,"th",58),g(11,"\xa0"),c(),l(12,"th",59),g(13),m(14,"translate"),k(15,"p-sortIcon",60),c(),l(16,"th",61),g(17),m(18,"translate"),c(),l(19,"th",62),g(20),m(21,"translate"),c(),l(22,"th",63),g(23),m(24,"translate"),c(),l(25,"th",64),g(26),m(27,"translate"),k(28,"p-sortIcon",65),c(),l(29,"th",61),g(30),m(31,"translate"),c(),l(32,"th",62),g(33),m(34,"translate"),c(),l(35,"th",61),g(36),m(37,"translate"),c(),l(38,"th",61),k(39,"button",66),_(40,aZ,1,0,"button",67),c()()),2&t){const e=F(8),n=d(2);a(2),T("",f(3,13,"settings.chanedit.col_source"),": \xa0 "),a(2),p("showMenu",!1),a(2),p("ngIf","S"==n.setupService.pageType)("ngIfElse",e),a(7),T(" ",f(14,15,"settings.chanedit.col_channum")," "),a(4),S(f(18,17,"settings.chanedit.col_freqid")),a(3),S(f(21,19,"settings.chanedit.col_callsign")),a(3),S(f(24,21,"settings.chanedit.col_name")),a(3),T(" ",f(27,23,"settings.chanedit.col_source")," "),a(4),S(f(31,25,"settings.chanedit.col_priority")),a(3),S(f(34,27,"settings.chanedit.col_visibility")),a(3),S(f(37,29,"settings.chanedit.col_useeit")),a(4),p("ngIf","S"==n.setupService.pageType)}}function cZ(t,i){1&t&&k(0,"img",79),2&t&&D("src",d().$implicit.IconURL,Xt)}function uZ(t,i){1&t&&k(0,"img",80)}function dZ(t,i){if(1&t){const e=I();l(0,"button",81),C("click",function(){v(e);const s=d().$implicit;return d(2).deleteRequest(s)}),m(1,"translate"),c()}if(2&t){const e=d().$implicit,n=d(2);D("pTooltip",f(1,2,"settings.chanedit.deletechan")),p("disabled",e.ChanId<0||n.setupService.schedulingEnabled)}}const pZ=function(t){return{"line-through":t}};function hZ(t,i){if(1&t){const e=I();l(0,"tr",72)(1,"td",58),_(2,cZ,1,1,"img",73),_(3,uZ,1,0,"ng-template",null,74,we),c(),l(5,"td",75),g(6),c(),l(7,"td",61),g(8),c(),l(9,"td",62),g(10),c(),l(11,"td",63),g(12),c(),l(13,"td",76),g(14),c(),l(15,"td",61),g(16),c(),l(17,"td",62),g(18),c(),l(19,"td",61),g(20),c(),l(21,"td",61)(22,"button",77),C("click",function(){const r=v(e).$implicit;return d(2).editChannel(r)}),m(23,"translate"),c(),_(24,dZ,2,4,"button",78),c()()}if(2&t){const e=i.$implicit,n=F(4),s=d(2);p("ngClass",z(16,pZ,e.ChanId<0)),a(2),p("ngIf",e.IconURL)("ngIfElse",n),a(4),S(e.ChanNum),a(2),S(e.FrequencyId),a(2),S(e.CallSign),a(2),S(e.ChannelName),a(2),S(e.Source),a(2),S(e.RecPriority),a(2),S(s.getVisibility(e)),a(2),S(e.UseEIT?"Y":"N"),a(2),D("pTooltip",f(23,14,"settings.chanedit.editchan")),p("disabled",e.ChanId<0||"S"==s.setupService.pageType&&s.setupService.schedulingEnabled),a(2),p("ngIf","S"==s.setupService.pageType)}}function mZ(t,i){if(1&t){const e=I();l(0,"div",48)(1,"p-table",49),C("onFilter",function(s){return v(e),d().onFilter(s)}),_(2,nZ,2,4,"ng-template",50),_(3,lZ,41,31,"ng-template",51),_(4,hZ,25,18,"ng-template",52),c()()}if(2&t){const e=d();a(1),p("value",e.allChannels)("scrollable",!0)("rowHover",!0)}}function fZ(t,i){1&t&&k(0,"p-progressSpinner")}function gZ(t,i){1&t&&(k(0,"p-message",87),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function _Z(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function bZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,gZ,2,3,"p-message",83),_(2,_Z,2,3,"p-message",84),c(),l(3,"p-button",85),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",86),C("onClick",function(){return v(e),d().saveChannel()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(7);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.channel.ChannelName.trim()||""==e.channel.ChanNum.trim()||""==e.channel.CallSign.trim())}}function vZ(t,i){if(1&t){const e=I();l(0,"p-button",89),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",90),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}function CZ(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function yZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,CZ,2,3,"p-message",84),c(),l(2,"p-button",85),C("onClick",function(){v(e);const s=d(),r=F(7);return s.displayDelete=!1,r.form.markAsPristine()}),m(3,"translate"),c(),l(4,"p-button",91),C("onClick",function(){v(e);const s=d();return s.deleteChannel(s.channel)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"common.delete"))}}const wZ=function(t){return{Source:t}};function TZ(t,i){if(1&t&&(l(0,"p")(1,"b"),g(2),m(3,"translate"),c()()),2&t){const e=d();a(2),S(Dt(3,1,"settings.chanedit.delete_source_details",z(4,wZ,e.filterEvent.filters.Source.value)))}}function SZ(t,i){1&t&&(l(0,"p")(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.chanedit.delete_all_details")))}function xZ(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c()()),2&t){const e=d();a(2),yo(" ",f(3,3,"common.delete")," ",e.channel.ChanNum," ",e.channel.ChannelName,"")}}function DZ(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function MZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,DZ,2,3,"p-message",84),c(),l(2,"p-button",85),C("onClick",function(){v(e);const s=d(),r=F(7);return s.displayDeleteSource=!1,s.channelOperation=-1,r.form.markAsPristine()}),m(3,"translate"),c(),l(4,"p-button",92),C("onClick",function(){return v(e),d().deleteSource()}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,4,"common.cancel")),a(2),D("label",f(5,6,"common.delete")),p("disabled",e.working)}}const kZ=function(){return{height:"75vw",width:"50vw"}},Dd=function(){return{minWidth:"400px"}},IZ=function(t,i,e){return{ChanNum:t,ChannelName:i,Source:e}};let fS=(()=>{class t{constructor(e,n,s,r){this.channelService=e,this.translate=n,this.setupService=s,this.router=r,this.allChannels=[],this.videoSources=[],this.commMethods=[],this.sourceNames=[],this.tvFormats=[{value:"Default",prompt:"common.default"},{value:"NTSC",prompt:"NTSC"},{value:"NTSC-JP",prompt:"NTSC-JP"},{value:"PAL",prompt:"PAL"},{value:"PAL-60",prompt:"PAL-60"},{value:"PAL-BG",prompt:"PAL-BG"},{value:"PAL-DK",prompt:"PAL-DK"},{value:"PAL-D",prompt:"PAL-D"},{value:"PAL-I",prompt:"PAL-I"},{value:"PAL-M",prompt:"PAL-M"},{value:"PAL-N",prompt:"PAL-N"},{value:"PAL-NC",prompt:"PAL-NC"},{value:"SECAM",prompt:"SECAM"},{value:"SECAM-D",prompt:"SECAM-D"},{value:"SECAM-DK",prompt:"SECAM-DK"}],this.visibilities=[{value:"Always Visible",prompt:"settings.chanedit.always-visible"},{value:"Visible",prompt:"settings.chanedit.visible"},{value:"Not Visible",prompt:"settings.chanedit.not-visible"},{value:"Never Visible",prompt:"settings.chanedit.never-visible"}],this.headingNew="settings.chanedit.new_channel",this.headingEdit="settings.chanedit.title",this.warningText="settings.common.warning",this.deleteText="settings.common.ru_sure",this.unassignedText="settings.chanedit.unassigned",this.transDone=0,this.numTranslations=9,this.successCount=0,this.errorCount=0,this.displayChannelDlg=!1,this.dialogHeader="",this.displayUnsaved=!1,this.displayDelete=!1,this.displayDeleteSource=!1,this.working=!1,this.chansLoaded=!1,this.filterEvent={filters:{Source:{matchMode:"",value:""}}},this.channel=this.resetChannel(),this.channelOperation=0,this.saveObserver={next:o=>{if(o.bool)switch(console.log("saveObserver success",o),this.successCount++,this.currentForm.form.markAsPristine(),this.channelOperation){case 0:this.editingChannel&&(Object.assign(this.editingChannel,this.channel),this.editingChannel.Source=this.getSource(this.editingChannel));break;case 1:this.allChannels.push(this.channel);break;case-1:this.channel.ChanId=-99,this.displayDelete=!1,this.displayDeleteSource=!1,this.currentForm.form.markAsPristine();break;case-2:this.channel.ChanId=-99,this.deleteSource()}else console.log("saveObserver error",o),this.errorCount++,this.working=!1},error:o=>{console.log("saveObserver error",o),this.errorCount++,this.working=!1}},this.translate.get(this.unassignedText).subscribe(o=>{this.unassignedText=o,this.transDone++,this.loadLists()}),this.loadTranslations()}ngOnInit(){this.markPristine()}resetChannel(){return{ATSCMajorChan:0,ATSCMinorChan:0,CallSign:"",ChanFilters:"",ChanId:0,ChanNum:"",ChannelGroups:"",ChannelName:"",CommFree:!1,CommMethod:-1,DefaultAuth:"",ExtendedVisible:"Visible",FineTune:0,Format:"Default",FrequencyId:"",IconURL:"",InputId:0,Inputs:"",MplexId:0,Programs:[],RecPriority:0,ServiceId:0,ServiceType:0,SourceId:0,TimeOffset:0,UseEIT:!1,Visible:!0,XMLTVID:"",ChanSeq:0}}loadLists(){this.channelService.GetChannelInfoList({Details:!0}).subscribe(e=>{this.allChannels=e.ChannelInfoList.ChannelInfos,this.chansLoaded=!0,this.channelService.GetVideoSourceList().subscribe(n=>{this.videoSources=n.VideoSourceList.VideoSources,this.videoSources.unshift({Id:0,SourceName:this.unassignedText}),this.videoSources.forEach(s=>this.sourceNames.push(s.SourceName)),this.allChannels.forEach((s,r)=>{s.ChanSeq=r,s.Source=this.getSource(s)})})}),this.channelService.GetCommMethodList().subscribe(e=>this.commMethods=e.CommMethodList.CommMethods)}loadTranslations(){this.visibilities.forEach(e=>{this.translate.get(e.prompt).subscribe(n=>{e.prompt=n,this.transDone++})}),this.translate.get(this.headingNew).subscribe(e=>{this.headingNew=e,this.transDone++}),this.translate.get(this.headingEdit).subscribe(e=>{this.headingEdit=e,this.transDone++}),this.translate.get(this.warningText).subscribe(e=>{this.warningText=e,this.transDone++}),this.translate.get(this.deleteText).subscribe(e=>{this.deleteText=e,this.transDone++}),this.translate.get(this.tvFormats[0].prompt).subscribe(e=>{this.tvFormats[0].prompt=e,this.transDone++})}getSource(e){const n=this.videoSources.find(s=>e.SourceId==s.Id);return null!=n?n.SourceName:this.unassignedText}getVisibility(e){const n=this.visibilities.find(s=>e.ExtendedVisible==s.value);return null!=n?n.prompt:""}openNew(){this.successCount=0,this.errorCount=0,this.dialogHeader=this.headingNew,this.channel=this.resetChannel(),this.displayChannelDlg=!0,this.markPristine()}editChannel(e){this.editingChannel=e,this.successCount=0,this.errorCount=0,this.dialogHeader=this.headingEdit,this.channel=Object.assign({},e),this.displayChannelDlg=!0,this.markPristine()}saveChannel(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1;let e={CallSign:this.channel.CallSign,ChannelID:this.channel.ChanId,ChannelNumber:this.channel.ChanNum,ChannelName:this.channel.ChannelName,CommMethod:this.channel.CommMethod,ExtendedVisible:this.channel.ExtendedVisible,Format:this.channel.Format,FrequencyID:this.channel.FrequencyId,RecPriority:this.channel.RecPriority,ServiceID:this.channel.ServiceId,SourceID:this.channel.SourceId,TimeOffset:this.channel.TimeOffset,UseEIT:this.channel.UseEIT,XMLTVID:this.channel.XMLTVID};0==this.channel.ChanId?(this.channelOperation=1,this.channelService.GetAvailableChanid().subscribe(n=>{this.channel.ChanId=n.int,e.ChannelID=n.int,this.channelService.AddDBChannel(e).subscribe(this.saveObserver)})):(this.channelOperation=0,this.channelService.UpdateDBChannel(e).subscribe(this.saveObserver))}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayChannelDlg=!1,this.editingChannel=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayChannelDlg=!1,this.displayUnsaved=!1,this.editingChannel=void 0)}deleteRequest(e){this.channel=e,this.displayDelete=!0}deleteChannel(e,n){this.successCount=0,this.errorCount=0,this.channel=e,this.channelOperation=n?-2:-1,console.log("Delete Channel",e),this.channelService.RemoveDBChannel(e.ChanId).subscribe(this.saveObserver)}deleteSourceRequest(){this.channel=this.resetChannel(),this.displayDeleteSource=!0}deleteSource(){this.working=!0;const e=this.allChannels.find(n=>n.ChanId>0&&(!this.filterEvent.filters.Source.value||this.filterEvent.filters.Source.value==n.Source));e?this.deleteChannel(e,!0):(this.displayDelete=!1,this.displayDeleteSource=!1,this.currentForm.form.markAsPristine(),this.working=!1)}onFilter(e){this.filterEvent=e}markPristine(){setTimeout(()=>this.currentForm.form.markAsPristine(),200)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Or),x(Le),x(De),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-channel-editor"]],viewQuery:function(e,n){if(1&e&&j(tZ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:155,vars:180,consts:[["class","block card w-full","style","height: 90vh",4,"ngIf","ngIfElse"],["loading",""],["name","chanform",1,"ml-3","mr-3"],["chanform","ngForm"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","ChannelName",1,"label","block"],["pInputText","","id","ChannelName","name","ChannelName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ChannelName","ngModel"],[1,"block"],["for","ChanNum",1,"label","block"],["pInputText","","id","ChanNum","name","ChanNum",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ChanNum","ngModel"],["for","FrequencyId",1,"label","block"],["pInputText","","id","FrequencyId","name","FrequencyId",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrequencyId","ngModel"],["for","CallSign",1,"label","block"],["pInputText","","id","CallSign","name","CallSign",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["CallSign","ngModel"],["for","ExtendedVisible",1,"label","block"],["optionLabel","prompt","optionValue","value","name","ExtendedVisible",3,"options","ngModel","editable","maxlength","ngModelChange"],["ExtendedVisible","ngModel"],["for","ServiceId",1,"label","block"],["name","ServiceId","id","ServiceId",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","SourceId",1,"label","block"],["optionLabel","SourceName","optionValue","Id","name","SourceId",3,"options","ngModel","editable","maxlength","ngModelChange"],["SourceId","ngModel"],["for","Format",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Format",3,"options","ngModel","editable","maxlength","ngModelChange"],["Format","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","UseEIT","name","UseEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","XMLTVID",1,"label","block"],["pInputText","","id","XMLTVID","name","XMLTVID",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["XMLTVID","ngModel"],["for","TimeOffset",1,"label","block"],["name","TimeOffset","id","TimeOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","CommMethod",1,"label","block"],["optionLabel","LocalizedName","optionValue","CommMethod","name","CommMethod",3,"options","ngModel","editable","maxlength","ngModelChange"],["CommMethod","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],[3,"header","visible","modal","draggable","resizable","visibleChange"],[4,"ngIf","ngIfElse"],["all",""],[4,"ngIf"],[1,"block","card","w-full",2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover","onFilter"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","mr-2",3,"label","disabled","click"],["field","Source","matchMode","equals",3,"showMenu"],["pTemplate","filter"],["icon","pi pi-trash","styleClass","p-button-danger",3,"pTooltip","label","disabled","onClick",4,"ngIf","ngIfElse"],["explain",""],[2,"flex-basis","8%"],["pSortableColumn","ChanSeq",2,"flex-basis","9%"],["field","ChanSeq"],[2,"flex-basis","6%"],[2,"flex-basis","10%"],[2,"flex-basis","24%"],["pSortableColumn","Source",2,"flex-basis","16%"],["field","Source"],["pButton","","pRipple","","icon","pi pi-pencil","disabled","true",1,"p-button-text"],["pButton","","pRipple","","icon","pi pi-trash","class","p-button-text p-button-danger","disabled","true",4,"ngIf"],["name","filter",3,"ngModel","options","placeholder","showClear","onChange"],["pTemplate","item"],["icon","pi pi-trash","styleClass","p-button-danger",3,"pTooltip","label","disabled","onClick"],["pButton","","pRipple","","icon","pi pi-trash","disabled","true",1,"p-button-text","p-button-danger"],["height","40",3,"ngClass"],["height","32","width","42","style","background-color:#000000","onerror","this.height='0'",3,"src",4,"ngIf","ngIfElse"],["nullIcon",""],[2,"flex-basis","9%"],[2,"flex-basis","16%"],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text",3,"disabled","pTooltip","click"],["pButton","","pRipple","","icon","pi pi-trash","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","disabled","click",4,"ngIf"],["height","32","width","42","onerror","this.height='0'",2,"background-color","#000000",3,"src"],["height","32","width","42"],["pButton","","pRipple","","icon","pi pi-trash","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","disabled","click"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"disabled","label","onClick"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,mZ,5,3,"div",0),_(4,fZ,1,0,"ng-template",null,1,we),l(6,"form",2,3)(8,"p-dialog",4),C("visibleChange",function(r){return n.displayChannelDlg=r}),l(9,"div",5)(10,"label",6),g(11),m(12,"translate"),c(),l(13,"input",7,8),C("ngModelChange",function(r){return n.channel.ChannelName=r}),c(),l(15,"small",9),g(16),m(17,"translate"),c()(),l(18,"div",5)(19,"label",10),g(20),m(21,"translate"),c(),l(22,"input",11,12),C("ngModelChange",function(r){return n.channel.ChanNum=r}),c(),l(24,"small",9),g(25),m(26,"translate"),c()(),l(27,"div",5)(28,"label",13),g(29),m(30,"translate"),c(),l(31,"input",14,15),C("ngModelChange",function(r){return n.channel.FrequencyId=r}),c(),l(33,"small",9),g(34),m(35,"translate"),c()(),l(36,"div",5)(37,"label",16),g(38),m(39,"translate"),c(),l(40,"input",17,18),C("ngModelChange",function(r){return n.channel.CallSign=r}),c(),l(42,"small",9),g(43),m(44,"translate"),c()(),l(45,"div",5)(46,"label",19),g(47),m(48,"translate"),c(),l(49,"p-dropdown",20,21),C("ngModelChange",function(r){return n.channel.ExtendedVisible=r}),c(),l(51,"small",9),g(52),m(53,"translate"),c()(),l(54,"div",5)(55,"label",22),g(56),m(57,"translate"),c(),l(58,"p-inputNumber",23),C("ngModelChange",function(r){return n.channel.ServiceId=r}),c(),l(59,"small",9),g(60),m(61,"translate"),c()(),l(62,"div",5)(63,"label",24),g(64),m(65,"translate"),c(),l(66,"p-dropdown",25,26),C("ngModelChange",function(r){return n.channel.SourceId=r}),c(),l(68,"small",9),g(69),m(70,"translate"),c()(),l(71,"div",5)(72,"label",27),g(73),m(74,"translate"),c(),l(75,"p-dropdown",28,29),C("ngModelChange",function(r){return n.channel.Format=r}),c(),l(77,"small",9),g(78),m(79,"translate"),c()(),l(80,"div",5)(81,"label",30),g(82),m(83,"translate"),c(),l(84,"p-inputNumber",31),C("ngModelChange",function(r){return n.channel.RecPriority=r}),c(),l(85,"small",9),g(86),m(87,"translate"),c()(),l(88,"div",5)(89,"p-checkbox",32,33),C("ngModelChange",function(r){return n.channel.UseEIT=r}),m(91,"translate"),c(),l(92,"small",9),g(93),m(94,"translate"),c()(),l(95,"div",5)(96,"label",34),g(97),m(98,"translate"),c(),l(99,"input",35,36),C("ngModelChange",function(r){return n.channel.XMLTVID=r}),c(),l(101,"small",9),g(102),m(103,"translate"),c()(),l(104,"div",5)(105,"label",37),g(106),m(107,"translate"),c(),l(108,"p-inputNumber",38),C("ngModelChange",function(r){return n.channel.TimeOffset=r}),c(),l(109,"small",9),g(110),m(111,"translate"),c()(),l(112,"div",5)(113,"label",39),g(114),m(115,"translate"),c(),l(116,"p-dropdown",40,41),C("ngModelChange",function(r){return n.channel.CommMethod=r}),c(),l(118,"small",9),g(119),m(120,"translate"),c()(),k(121,"br")(122,"br")(123,"br")(124,"br")(125,"br")(126,"br")(127,"br")(128,"br"),_(129,bZ,7,9,"ng-template",42),c(),l(130,"p-dialog",43),C("visibleChange",function(r){return n.displayUnsaved=r}),m(131,"translate"),l(132,"p"),g(133),m(134,"translate"),c(),_(135,vZ,4,6,"ng-template",42),c(),l(136,"p-dialog",44),C("visibleChange",function(r){return n.displayDelete=r}),m(137,"translate"),l(138,"h2"),g(139),m(140,"translate"),c(),l(141,"p"),g(142),m(143,"translate"),c(),_(144,yZ,6,7,"ng-template",42),c(),l(145,"p-dialog",44),C("visibleChange",function(r){return n.displayDeleteSource=r}),m(146,"translate"),l(147,"h2"),g(148),m(149,"translate"),c(),_(150,TZ,4,6,"p",45),_(151,SZ,4,3,"ng-template",null,46,we),_(153,xZ,4,5,"div",47),_(154,MZ,6,8,"ng-template",42),c()()),2&e){const s=F(5),r=F(152);a(1),S(f(2,102,"settings.chanedit.title")),a(2),p("ngIf",n.chansLoaded&&n.transDone>=n.numTranslations)("ngIfElse",s),a(5),q(A(171,kZ)),D("header",n.dialogHeader),p("visible",n.displayChannelDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(3),S(f(12,104,"settings.chanedit.channame")),a(2),p("ngModel",n.channel.ChannelName),a(3),T(" ",f(17,106,"settings.chanedit.channame_desc")," "),a(4),S(f(21,108,"settings.chanedit.channum")),a(2),p("ngModel",n.channel.ChanNum),a(3),T(" ",f(26,110,"settings.chanedit.channum_desc")," "),a(4),S(f(30,112,"settings.chanedit.freqid")),a(2),p("ngModel",n.channel.FrequencyId),a(3),T(" ",f(35,114,"settings.chanedit.freqid_desc")," "),a(4),S(f(39,116,"settings.chanedit.callsign")),a(2),p("ngModel",n.channel.CallSign),a(3),T(" ",f(44,118,"settings.chanedit.callsign_desc")," "),a(4),S(f(48,120,"settings.chanedit.visible_label")),a(2),q(A(172,Dd)),p("options",n.visibilities)("ngModel",n.channel.ExtendedVisible)("editable",!1)("maxlength",0),a(3),T(" ",f(53,122,"settings.chanedit.visible_desc")," "),a(4),S(f(57,124,"settings.chanedit.serviceid_label")),a(2),p("ngModel",n.channel.ServiceId)("showButtons",!0)("min",-1)("max",65535)("step",1),a(2),T(" ",f(61,126,"settings.chanedit.serviceid_desc")," "),a(4),S(f(65,128,"settings.chanedit.source_label")),a(2),q(A(173,Dd)),p("options",n.videoSources)("ngModel",n.channel.SourceId)("editable",!1)("maxlength",0),a(3),T(" ",f(70,130,"settings.chanedit.source_desc")," "),a(4),S(f(74,132,"settings.chanedit.format_label")),a(2),q(A(174,Dd)),p("options",n.tvFormats)("ngModel",n.channel.Format)("editable",!1)("maxlength",0),a(3),T(" ",f(79,134,"settings.chanedit.format_desc")," "),a(4),S(f(83,136,"settings.chanedit.priority_label")),a(2),p("ngModel",n.channel.RecPriority)("showButtons",!0)("min",-99)("max",99)("step",1),a(2),T(" ",f(87,138,"settings.chanedit.priority_desc")," "),a(3),D("label",f(91,140,"settings.chanedit.eit_label")),p("ngModel",n.channel.UseEIT)("binary",!0),a(4),T(" ",f(94,142,"settings.chanedit.eit_desc")," "),a(4),S(f(98,144,"settings.chanedit.xmltvid_label")),a(2),p("ngModel",n.channel.XMLTVID),a(3),T(" ",f(103,146,"settings.chanedit.xmltvid_desc")," "),a(4),S(f(107,148,"settings.chanedit.timeoffset_label")),a(2),p("ngModel",n.channel.TimeOffset)("showButtons",!0)("min",-1440)("max",1440)("step",30),a(2),T(" ",f(111,150,"settings.chanedit.timeoffset_desc")," "),a(4),S(f(115,152,"settings.chanedit.commmethod_label")),a(2),q(A(175,Dd)),p("options",n.commMethods)("ngModel",n.channel.CommMethod)("editable",!1)("maxlength",0),a(3),T(" ",f(120,154,"settings.chanedit.commmethod_desc")," "),a(11),D("header",f(131,156,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(134,158,"common.unsaved_message")),a(3),D("header",f(137,160,"settings.chanedit.delete_this")),p("visible",n.displayDelete)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(140,162,"settings.common.ru_sure")),a(3),S(Dt(143,164,"settings.chanedit.delete_details",Rt(176,IZ,n.channel.ChanNum,n.channel.ChannelName,n.getSource(n.channel)))),a(3),D("header",f(146,167,"settings.chanedit.delete_source")),p("visible",n.displayDeleteSource)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(149,169,"settings.common.ru_sure")),a(2),p("ngIf",n.filterEvent.filters.Source.value)("ngIfElse",r),a(3),p("ngIf",0!=n.channel.ChanId)}},directives:[Q,xn,ie,Ln,vt,vg,Vt,Te,_e,ve,Jt,Cd,yd,Oe,Uo,ze,Ge,He,Tn,Ye,fn,dt,rn,qe],pipes:[de],styles:[""]}),t})(),EZ=(()=>{class t{constructor(e){this.router=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(It))},t.\u0275cmp=G({type:t,selectors:[["app-wiz-channeledit"]],decls:11,vars:6,consts:[[1,"m-5"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"p-card",0),k(1,"app-channel-editor")(2,"br")(3,"br")(4,"br")(5,"br"),l(6,"div",1)(7,"p-button",2),C("onClick",function(){return n.router.navigate(["setupwizard/input-connections"])}),m(8,"translate"),c(),l(9,"p-button",3),C("onClick",function(){return n.router.navigate(["setupwizard/storage-groups"])}),m(10,"translate"),c()()()),2&e&&(a(7),D("label",f(8,2,"common.back")),a(2),D("label",f(10,4,"common.next")))},directives:[Pe,fS,ve],pipes:[de],styles:[""]}),t})(),RZ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[On.forChild([{path:"setupwizard",component:nS,children:[{path:"selectlanguage",component:OW,canDeactivate:[zi]},{path:"dbsetup",component:lK,canDeactivate:[zi]},{path:"general",component:SJ,canDeactivate:[zi]},{path:"capture-cards",component:uS,canDeactivate:[zi]},{path:"recording-profiles",component:dS,canDeactivate:[zi]},{path:"video-sources",component:CY,canDeactivate:[zi]},{path:"input-connections",component:mS,canDeactivate:[zi]},{path:"channel-editor",component:EZ,canDeactivate:[zi]},{path:"storage-groups",component:WY,canDeactivate:[zi]},{path:"system-events",component:eZ,canDeactivate:[zi]}]}])],On]}),t})(),LZ=(()=>{class t{constructor(e){this.httpClient=e,this.startDate=new Date}toTime(e){return new Date(e).toISOString()}toStartTime(e){return this.toTime(e)}toEndTime(e){let n=new Date(e),s=new Date(n.getTime()+72e5);return this.toTime(s.toISOString())}toHalfHour(e){let n=new Date(e);return n.setMinutes(n.getMinutes()<30?0:30),n.setSeconds(0),n}AddToChannelGroup(e){return this.httpClient.post("/Guide/AddToChannelGroup",e)}GetCategoryList(){return this.httpClient.get("/Guide/GetCategoryList")}GetChannelGroupList(e){let n=(new ye).set("IncludeEmpty",e);return this.httpClient.get("/Guide/GetChannelGroupList",{params:n})}GetChannelIcon(e){let n=(new ye).set("ChanId",e.ChanId).set("Width",e.Width).set("Height",e.Height);return this.httpClient.get("/Guide/GetChannelIcon",{params:n})}GetProgramDetails(e){let n=(new ye).set("ChanId",e.ChanId).set("StartTime",e.StartTime);return this.httpClient.get("/Guide/GetProgramDetails",{params:n})}GetProgramGuide(e){e&&(this.startDate=e);let n=this.toHalfHour(this.startDate).toISOString(),s={StartTime:this.toStartTime(n),EndTime:this.toEndTime(n),Details:!0};return this.httpClient.post("/Guide/GetProgramGuide",s)}GetProgramList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Guide/GetProgramList",{params:n})}GetStoredSearches(e){let n=(new ye).set("Type",e);return this.httpClient.get("/Guide/GetStoredSearches",{params:n})}RemoveFromChannelGroup(e){return this.httpClient.post("/Guide/RemoveFromChannelGroup",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function OZ(t,i){if(1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t){const e=d(2);a(2),Ic(" ",f(3,4,"dashboard.guide.channel")," ",e.channel.ChanNum," ",e.channel.CallSign," ",e.channel.ChannelName,"")}}function AZ(t,i){1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"dashboard.guide.people_search")," "))}function PZ(t,i){1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"dashboard.guide.title_search")," "))}function FZ(t,i){if(1&t){const e=I();l(0,"div",12)(1,"input",13),C("ngModelChange",function(s){return v(e),d(2).searchValue=s}),c(),l(2,"button",14),C("click",function(){return v(e),d(2).titleSearch()}),m(3,"translate"),c(),l(4,"button",15),C("click",function(){return v(e),d(2).peopleSearch()}),m(5,"translate"),c()()}if(2&t){const e=d(2);a(1),p("ngModel",e.searchValue),a(1),D("pTooltip",f(3,3,"dashboard.guide.title_search")),a(2),D("pTooltip",f(5,5,"dashboard.guide.people_search"))}}function NZ(t,i){if(1&t){const e=I();l(0,"div",4)(1,"button",16),C("click",function(){return v(e),d(2).onGrid()}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"dashboard.guide.retgrid")))}const VZ=function(){return{width:"30px",height:"30px"}};function BZ(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,VZ)))}function HZ(t,i){if(1&t){const e=I();l(0,"div")(1,"button",17),C("click",function(){v(e);const s=d(3);return s.refreshing=!0,s.refresh()}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"common.refresh")))}const qZ=function(t,i){return[t,i]};function UZ(t,i){if(1&t&&_(0,HZ,3,3,"div",10),2&t){const e=d(2);p("ngIf",We(1,qZ,e.CHANNEL,e.GRID).indexOf(e.displayType)>-1)}}function GZ(t,i){}function zZ(t,i){if(1&t&&(ce(0),l(1,"div",27),k(2,"app-guide-timebar",28),c(),ue()),2&t){const e=d(4);a(2),p("guide",e)}}function jZ(t,i){if(1&t&&(ce(0),k(1,"app-guide-programentry",29),ue()),2&t){const e=d().$implicit,n=d().$implicit,s=d(3);a(1),p("program",e)("guideStartTime",s.m_programGuide.ProgramGuide.StartTime)("guideEndTime",s.m_programGuide.ProgramGuide.EndTime)("guideComponent",s)("channel",n)}}function $Z(t,i){if(1&t&&(ce(0),_(1,jZ,2,5,"ng-container",10),ue()),2&t){const e=i.$implicit,n=d(4);a(1),p("ngIf",!n.timeChange&&n.inDisplayWindow(e.StartTime,e.EndTime))}}function WZ(t,i){if(1&t&&(l(0,"div",21),_(1,zZ,3,1,"ng-container",10),l(2,"div",22)(3,"div",23),k(4,"app-guide-channelicon",24),c(),l(5,"div",25),_(6,$Z,2,1,"ng-container",26),c()()()),2&t){const e=i.$implicit,n=i.rowIndex,s=d(3);a(1),p("ngIf",n%5==0),a(3),p("channel",e)("guideComponent",s),a(2),p("ngForOf",e.Programs)}}function KZ(t,i){if(1&t&&(l(0,"div")(1,"p-dataView",18),_(2,GZ,0,0,"ng-template",19),_(3,WZ,7,4,"ng-template",20),c()()),2&t){const e=d(2);a(1),p("value",e.m_programGuide.ProgramGuide.Channels)("totalRecords",e.m_programGuide.ProgramGuide.TotalAvailable)}}function QZ(t,i){if(1&t&&(l(0,"div"),k(1,"app-programs",30),c()),2&t){const e=d(2);a(1),p("inter",e.inter)("programs",e.listPrograms)("usage","GUIDE")}}const Cg=function(t,i,e){return[t,i,e]};function JZ(t,i){if(1&t){const e=I();l(0,"div")(1,"div",3)(2,"div",4)(3,"p-calendar",5),C("ngModelChange",function(s){return v(e),d().m_pickerDate=s})("onClose",function(){return v(e),d().onDateChange()})("keyup.enter",function(){return v(e),d().onDateChange()})("onBlur",function(){return v(e),d().onDateChange()}),c()(),_(4,OZ,4,6,"div",6),_(5,AZ,4,3,"div",6),_(6,PZ,4,3,"div",6),_(7,FZ,6,7,"div",7),_(8,NZ,3,3,"div",8),l(9,"div",4),_(10,BZ,2,3,"div",0),_(11,UZ,1,4,"ng-template",null,9,we),c()(),_(13,KZ,4,2,"div",10),_(14,QZ,2,3,"div",10),c()}if(2&t){const e=F(12),n=d();a(3),p("ngModel",n.m_pickerDate)("showTime",!0)("stepMinute",30)("dateFormat","yy/mm/dd")("selectOtherMonths",!0)("showIcon",!0)("showOnFocus",!1)("showButtonBar",!0)("clearButtonStyleClass","hidden"),a(1),p("ngIf",n.displayType==n.CHANNEL),a(1),p("ngIf",n.displayType==n.PEOPLESEARCH),a(1),p("ngIf",n.displayType==n.TITLESEARCH),a(1),p("ngIf",Rt(18,Cg,n.GRID,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1),a(1),p("ngIf",Rt(22,Cg,n.CHANNEL,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1),a(2),p("ngIf",n.refreshing)("ngIfElse",e),a(3),p("ngIf",n.displayType==n.GRID),a(1),p("ngIf",Rt(26,Cg,n.CHANNEL,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1)}}function YZ(t,i){1&t&&k(0,"p-progressSpinner")}let gS=(()=>{class t{constructor(e,n){this.guideService=e,this.translate=n,this.m_startDate=new Date,this.m_pickerDate=new Date,this.m_endDate=new Date,this.m_channelData=[],this.m_channelTotal=10,this.m_rows=10,this.listPrograms=[],this.loaded=!1,this.refreshing=!1,this.timeChange=!1,this.inter={summaryComponent:this},this.GRID=1,this.CHANNEL=2,this.TITLESEARCH=3,this.PEOPLESEARCH=4,this.displayType=this.GRID,this.searchValue="",this.translate.onLangChange.subscribe(s=>{console.log("Event: language change, new language ("+s.lang+")"),this.switchLanguage(s.lang),this.fetchData()})}ngOnInit(){this.fetchData()}switchLanguage(e){this.translate.use(e)}fetchData(e){this.guideService.GetProgramGuide(e).subscribe(n=>{this.m_programGuide=n,this.m_startDate=new Date(n.ProgramGuide.StartTime),this.m_pickerDate=new Date(this.m_startDate),this.m_endDate=new Date(n.ProgramGuide.EndTime),this.m_channelData=n.ProgramGuide.Channels,this.m_channelTotal=n.ProgramGuide.TotalAvailable,this.loaded=!0,this.refreshing=!1,this.timeChange=!1})}fetchDetails(){let e=this.m_startDate.getTime(),s={Details:!0,StartTime:new Date(e+1e3).toISOString()};switch(this.displayType){case this.CHANNEL:s.ChanId=this.channel.ChanId;break;case this.TITLESEARCH:s.TitleFilter=this.searchValue,s.Count=1e3;break;case this.PEOPLESEARCH:s.PersonFilter=this.searchValue,s.Count=1e3}this.listPrograms=[],this.guideService.GetProgramList(s).subscribe(r=>{this.listPrograms=r.ProgramList.Programs,this.loaded=!0,this.refreshing=!1})}inDisplayWindow(e,n){let s=new Date(e),r=new Date(n),o=new Date(this.m_startDate),u=new Date(this.m_endDate);return!(r<=o||s>=u)&&s1&&(this.displayType=this.TITLESEARCH,this.refresh())}peopleSearch(){this.searchValue=this.searchValue.trim(),this.searchValue.length>1&&(this.displayType=this.PEOPLESEARCH,this.refresh())}}return t.\u0275fac=function(e){return new(e||t)(x(LZ),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-guide"]],decls:7,vars:6,consts:[[4,"ngIf","ngIfElse"],[3,"inter"],["loading",""],[1,"flex"],[1,"flex","align-items-center"],[3,"ngModel","showTime","stepMinute","dateFormat","selectOtherMonths","showIcon","showOnFocus","showButtonBar","clearButtonStyleClass","ngModelChange","onClose","keyup.enter","onBlur"],["class","flex align-items-center p-5",4,"ngIf"],["class","flex align-items-center pl-5",4,"ngIf"],["class","flex align-items-center",4,"ngIf"],["refreshBn",""],[4,"ngIf"],[1,"flex","align-items-center","p-5"],[1,"flex","align-items-center","pl-5"],["type","text","pInputText","","id","searchValue","name","searchValue","placeholder","Search",1,"text-xl",3,"ngModel","ngModelChange"],["pButton","","pRipple","","icon","pi pi-search",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-user",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-table",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",3,"pTooltip","click"],[3,"value","totalRecords"],["pTemplate","header","styleClass","timeHeader"],["pTemplate","listItem"],[1,"grid","col-12","p-3"],[1,"grid","flex-grow-1"],[1,"col-1"],[3,"channel","guideComponent"],[1,"col"],[4,"ngFor","ngForOf"],[1,"col-12"],[3,"guide"],[3,"program","guideStartTime","guideEndTime","guideComponent","channel"],[3,"inter","programs","usage"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,JZ,15,30,"div",0),k(4,"app-schedule",1),_(5,YZ,1,0,"ng-template",null,2,we)),2&e){const s=F(6);a(1),T("",f(2,4,"dashboard.programguide")," "),a(2),p("ngIf",n.loaded)("ngIfElse",s),a(1),p("inter",n.inter)}},styles:[".channelRow[_ngcontent-%COMP%]{display:block;grid-template-columns:90px auto;width:100%;height:82px;padding-bottom:2px}.programsBox[_ngcontent-%COMP%], .timebarbox[_ngcontent-%COMP%]{grid-template-columns:90px auto;grid-template-rows:28px;width:100%}"]}),t})();function ZZ(t,i){1&t&&k(0,"img",5),2&t&&D("src",d().channel.IconURL,Xt)}function XZ(t,i){1&t&&k(0,"img",6)}let eX=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-guide-channelicon"]],inputs:{channel:"channel",guideComponent:"guideComponent"},decls:8,vars:4,consts:[[1,"flex","flex-column","align-items-center","channelBox","cursor-pointer",3,"click"],[1,"channelIcon"],["height","57",3,"src",4,"ngIf","ngIfElse"],["nullIcon",""],[1,"channelText"],["height","57",3,"src"],["height","0","width","0"]],template:function(e,n){if(1&e&&(l(0,"div",0),C("click",function(){return n.guideComponent.onChannel(n.channel)}),l(1,"div",1),_(2,ZZ,1,1,"img",2),_(3,XZ,1,0,"ng-template",null,3,we),c(),l(5,"div",4)(6,"span"),g(7),c()()()),2&e){const s=F(4);a(2),p("ngIf",n.channel.IconURL)("ngIfElse",s),a(5),$e("",n.channel.ChanNum," ",n.channel.CallSign,"")}},directives:[Q],styles:[".channelBox[_ngcontent-%COMP%]{border-radius:10px;background:var(--surface-200);height:120px}.channelIcon[_ngcontent-%COMP%]{height:57px;max-width:86px;margin-top:10px;margin-bottom:3px;overflow:hidden;float:right}.channelText[_ngcontent-%COMP%]{clear:both;font-weight:700;text-align:-webkit-center;overflow:hidden;text-overflow:ellipsis;padding:0 3px}"]}),t})();function tX(t,i){if(1&t&&(l(0,"div")(1,"div",5),g(2),c()()),2&t){const e=d();a(2),S(e.program.SubTitle)}}const nX=function(){return["WillRecord","Recording"]};function iX(t,i){if(1&t&&(l(0,"div")(1,"div",6),g(2),c()()),2&t){const e=d();a(1),p("ngClass",A(2,nX).indexOf(e.program.Recording.StatusName)>-1?"bg-green-400":"bg-pink-400"),a(1),T(" ",e.dataService.recStatusText[e.program.Recording.StatusName],"")}}let sX=(()=>{class t{constructor(e){this.dataService=e,this.editSchedule=!1}ngOnInit(){}durationToWidth(){let e=new Date(this.program.StartTime),n=new Date(this.program.EndTime),s=new Date(this.guideStartTime),r=new Date(this.guideEndTime),h=er?r:n,y=r.getTime()-s.getTime();return(b.getTime()-h.getTime())/y*100}openDialog(){this.guideComponent.inter.sched&&this.guideComponent.inter.sched.open(this.program,this.channel)}}return t.\u0275fac=function(e){return new(e||t)(x(Ll))},t.\u0275cmp=G({type:t,selectors:[["app-guide-programentry"]],inputs:{program:"program",channel:"channel",guideStartTime:"guideStartTime",guideEndTime:"guideEndTime",guideComponent:"guideComponent"},decls:8,vars:6,consts:[[1,"programBox","cursor-pointer",3,"click"],[1,"programTitle"],[1,"programBody"],[4,"ngIf"],[1,"programDescription"],[1,"programSubtitle"],[1,"programSubtitle",3,"ngClass"]],template:function(e,n){1&e&&(l(0,"div",0),C("click",function(){return n.openDialog()}),l(1,"div",1),g(2),c(),l(3,"div",2),_(4,tX,3,1,"div",3),_(5,iX,3,3,"div",3),l(6,"div",4),g(7),c()()()),2&e&&(Hn("width",n.durationToWidth(),"%"),a(2),S(n.program.Title),a(2),p("ngIf",0!=n.program.SubTitle.length),a(1),p("ngIf",n.program.Recording),a(2),S(n.program.Description))},directives:[Q,Oe],styles:[".programBox[_ngcontent-%COMP%]{float:left;height:120px;padding:0 0 0 2px;color:var(--primary-color-text);background:var(--surface-200);border-radius:10px;overflow:hidden;text-overflow:ellipsis}.programTitle[_ngcontent-%COMP%]{padding:5px 8px 4px 7px;width:100%;height:28px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;z-index:4;position:relative;float:left;font-size:1.1em;white-space:nowrap;font-weight:700;overflow:hidden;text-overflow:ellipsis}.programBody[_ngcontent-%COMP%]{margin:3px 5px 4px;padding:0 0 0 2px;color:var(--text-color-secondary);height:45px;z-index:5}.programSubtitle[_ngcontent-%COMP%]{color:var(--text-color);position:relative;font-weight:700;margin-right:5px;line-height:15px;padding-top:2px;padding-bottom:3px}.programDescription[_ngcontent-%COMP%]{position:relative;z-index:1;line-height:15px}"]}),t})(),rX=(()=>{class t{constructor(e){this.translate=e}ngOnInit(){}segmentToStartTime(e){const n=18e5*e;return(new Date(this.guide.m_startDate.getTime()+n).toLocaleTimeString()+" ").replace(/:.. /," ")}pageLeft(){this.guide.m_pickerDate=new Date(this.guide.m_startDate.getTime()-72e5),this.guide.onDateChange()}pageRight(){this.guide.m_pickerDate=new Date(this.guide.m_startDate.getTime()+72e5),this.guide.onDateChange()}}return t.\u0275fac=function(e){return new(e||t)(x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-guide-timebar"]],inputs:{guide:"guide"},decls:21,vars:5,consts:[[1,"grid"],[1,"col-1","datebox"],[1,"col","segmentbox"],[1,"flex"],[1,"flex-none","cursor-pointer",3,"click"],[1,"flex-none"],[1,"flex-grow-1"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1),g(2),c(),l(3,"div",2)(4,"div",3)(5,"div",4),C("click",function(){return n.pageLeft()}),g(6,"<<"),c(),l(7,"div",5),g(8),c()()(),l(9,"div",2),g(10),c(),l(11,"div",2),g(12),c(),l(13,"div",2)(14,"div",3)(15,"div",5),g(16),c(),l(17,"div",6),g(18,"\xa0"),c(),l(19,"div",4),C("click",function(){return n.pageRight()}),g(20,">>"),c()()()()),2&e&&(a(2),S(n.guide.m_startDate.toLocaleDateString()),a(6),T("\xa0",n.segmentToStartTime(0),""),a(2),S(n.segmentToStartTime(1)),a(2),S(n.segmentToStartTime(2)),a(4),S(n.segmentToStartTime(3)))},styles:[".timebarbox[_ngcontent-%COMP%]{grid-template-columns:90px auto;grid-template-rows:28px;width:100%}.datebox[_ngcontent-%COMP%]{padding:5px 8px 4px 7px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);border-radius:10px}.segmentsbox[_ngcontent-%COMP%]{display:block;float:left;position:relative;height:100%;width:calc(100% - 91px)}.segmentbox[_ngcontent-%COMP%]{width:25%;padding:5px 8px 4px 7px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);height:auto;border-radius:10px}"]}),t})();function _S(t,i=zf){const n=function oX(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-i.now():Math.abs(t);return s=>s.lift(new aX(n,i))}class aX{constructor(i,e){this.delay=i,this.scheduler=e}call(i,e){return e.subscribe(new yg(i,this.delay,this.scheduler))}}class yg extends yt{constructor(i,e,n){super(i),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(i){const e=i.source,n=e.queue,s=i.scheduler,r=i.destination;for(;n.length>0&&n[0].time-s.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const o=Math.max(0,n[0].time-s.now());this.schedule(i,o)}else this.unsubscribe(),e.active=!1}_schedule(i){this.active=!0,this.destination.add(i.schedule(yg.dispatch,this.delay,{source:this,destination:this.destination,scheduler:i}))}scheduleNotification(i){if(!0===this.errored)return;const e=this.scheduler,n=new lX(e.now()+this.delay,i);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(i){this.scheduleNotification(Wn.createNext(i))}_error(i){this.errored=!0,this.queue=[],this.destination.error(i),this.unsubscribe()}_complete(){this.scheduleNotification(Wn.createComplete()),this.unsubscribe()}}class lX{constructor(i,e){this.time=i,this.notification=e}}const cX=["cetonform"],uX=["top"];function dX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.ceton.title")," ")}function pX(t,i){}function hX(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().work.ipAddress=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"input",16,13),C("ngModelChange",function(s){return v(e),d().work.tuner=s}),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",17),g(22),m(23,"translate"),c(),l(24,"input",18,19),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(26,"small",14),g(27),m(28,"translate"),c()(),l(29,"div",10)(30,"label",20),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(34,"small",14),g(35),m(36,"translate"),c()(),l(37,"div",10)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(42,"small",14),g(43),m(44,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,23,"settings.capture.ceton.ipaddress_label")),a(2),p("ngModel",e.work.ipAddress),a(3),T(" ",f(10,25,"settings.capture.ceton.ipaddress_desc")," "),a(4),S(f(14,27,"settings.capture.ceton.tuner_label")),a(2),p("ngModel",e.work.tuner),a(3),T(" ",f(19,29,"settings.capture.ceton.tuner_desc")," "),a(4),S(f(23,31,"settings.capture.ceton.deviceid_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(28,33,"settings.capture.ceton.deviceid_desc")," "),a(4),S(f(32,35,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(36,37,"settings.capture.sigtimeout_desc")," "),a(4),S(f(40,39,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(44,41,"settings.capture.tunetimeout_desc")," ")}}function mX(t,i){1&t&&(k(0,"p-message",29),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fX(t,i){1&t&&(k(0,"p-message",30),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gX(t,i){if(1&t){const e=I();l(0,"div",24)(1,"div",25),_(2,mX,2,3,"p-message",26),_(3,fX,2,3,"p-message",27),c(),l(4,"p-button",28),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _X=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={ipAddress:"",tuner:"",successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){if(this.card.VideoDevice){const e=this.card.VideoDevice.split("-");if(2==e.length){this.work.ipAddress=e[0];const n=e[1].split(".");2==n.length&&(this.work.tuner=n[1])}}}ngAfterViewInit(){this.currentForm.valueChanges.pipe(_S(50)).subscribe(()=>this.card.VideoDevice=this.work.ipAddress+"-RTP."+this.work.tuner),this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-ceton"]],viewQuery:function(e,n){if(1&e&&(j(cX,5),j(uX,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","cetonform",1,"ml-3","mr-3"],["cetonform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","ip",1,"label","block"],["pInputText","","id","ip","name","ip",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ipAddress","ngModel"],[1,"block"],["for","tuner",1,"label","block"],["pInputText","","id","tuner","name","tuner",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,dX,2,3,"ng-template",4),_(6,pX,0,0,"ng-template",5),_(7,hX,45,43,"ng-template",6),_(8,gX,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const bX=["dvbform"],vX=["top"];function CX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.dvb.title")," ")}function yX(t,i){}const wX=function(){return{minWidth:"80%"}};function TX(t,i){if(1&t){const e=I();l(0,"p-dropdown",43,44),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,wX)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function SX(t,i){if(1&t&&(l(0,"div")(1,"small",45),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.work.warningMessage," ")}}function xX(t,i){if(1&t){const e=I();l(0,"input",46,47),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function DX(t,i){if(1&t){const e=I();l(0,"p-dropdown",48,49),C("ngModelChange",function(s){return v(e),d(2).card.InputName=s}),c()}if(2&t){const e=d(2);p("options",e.currentDevice.InputNames)("ngModel",e.card.InputName)}}function MX(t,i){if(1&t){const e=I();l(0,"p-button",50),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function kX(t,i){if(1&t){const e=I();l(0,"p-button",51),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",52),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function IX(t,i){if(1&t){const e=I();l(0,"p-button",53),C("onClick",function(){v(e);const s=d(2);return s.setupRootTrees(),s.work.displayConnectDevice=!0}),m(1,"translate"),m(2,"translate"),c()}2&t&&(D("label",f(1,2,"settings.capture.dvb.satellite_connect")),D("pTooltip",f(2,4,"settings.capture.dvb.satellite_connect_tooltip")))}function EX(t,i){if(1&t){const e=I();l(0,"p-button",51),C("onClick",function(){return v(e),d(2).work.displayConnectDevice=!1}),m(1,"translate"),c(),l(2,"p-button",52),C("onClick",function(){return v(e),d(2).selectDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",!e.work.selectedDiseqcTree)}}function RX(t,i){if(1&t){const e=I();l(0,"p-button",54),C("onClick",function(){return v(e),d(2).canDeleteDiseqc()}),c()}}function LX(t,i){if(1&t){const e=I();l(0,"p-button",55),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",56),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function OX(t,i){if(1&t){const e=I();l(0,"p-button",57),C("onClick",function(){return v(e),d(2).work.displayDisconnect=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.satellite_disconnect"))}function AX(t,i){if(1&t){const e=I();l(0,"p-button",55),C("click",function(){return v(e),d(2).work.displayDisconnect=!1}),m(1,"translate"),c(),l(2,"p-button",56),C("click",function(){return v(e),d(2).unSelectDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function PX(t,i){1&t&&(k(0,"p-message",58),m(1,"translate")),2&t&&D("text",f(1,1,"settings.capture.dvb.satellite_disconnect_error"))}function FX(t,i){if(1&t){const e=I();l(0,"app-lnb",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function NX(t,i){if(1&t){const e=I();l(0,"app-rotor",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function VX(t,i){if(1&t){const e=I();l(0,"app-switch",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function BX(t,i){if(1&t){const e=I();l(0,"app-unicable",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}const Md=function(){return{width:"50vw"}};function HX(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,TX,2,7,"p-dropdown",12),_(7,SX,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,xX,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",17),g(21),m(22,"translate"),c(),_(23,DX,2,2,"p-dropdown",18),l(24,"small",14),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"label",19),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(32,"small",14),g(33),m(34,"translate"),c()(),l(35,"div",10)(36,"label",21),g(37),m(38,"translate"),c(),l(39,"p-inputNumber",22),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(40,"small",14),g(41),m(42,"translate"),c()(),l(43,"div",10)(44,"p-checkbox",23,24),C("ngModelChange",function(s){return v(e),d().card.DVBWaitForSeqStart=s}),m(46,"translate"),c(),l(47,"small",14),g(48),m(49,"translate"),c()(),l(50,"div",10)(51,"p-checkbox",25,26),C("ngModelChange",function(s){return v(e),d().card.DVBOnDemand=s}),m(53,"translate"),c(),l(54,"small",14),g(55),m(56,"translate"),c()(),l(57,"div",10)(58,"p-checkbox",27,28),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(60,"translate"),c(),l(61,"small",14),g(62),m(63,"translate"),c()(),l(64,"div",10)(65,"label",29),g(66),m(67,"translate"),c(),l(68,"p-inputNumber",30),C("ngModelChange",function(s){return v(e),d().card.DVBTuningDelay=s}),c(),l(69,"small",14),g(70),m(71,"translate"),c()()(),l(72,"p-fieldset",31),m(73,"translate"),_(74,MX,2,3,"p-button",32),l(75,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(76,"translate"),l(77,"label",34),g(78),m(79,"translate"),c(),l(80,"p-listbox",35),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(81,kX,4,7,"ng-template",7),c(),g(82," \xa0 "),_(83,IX,3,6,"p-button",36),l(84,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayConnectDevice=s}),m(85,"translate"),l(86,"label",37),g(87),m(88,"translate"),c(),l(89,"p-listbox",38),C("ngModelChange",function(s){return v(e),d().work.selectedDiseqcTree=s})("onDblClick",function(){return v(e),d().selectDiseqc()}),c(),_(90,EX,4,7,"ng-template",7),c(),_(91,RX,1,0,"p-button",39),l(92,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(93,"translate"),l(94,"h2"),g(95),m(96,"translate"),c(),l(97,"p"),g(98),m(99,"translate"),c(),_(100,LX,4,6,"ng-template",7),c(),g(101," \xa0 "),_(102,OX,2,3,"p-button",40),l(103,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayDisconnect=s}),m(104,"translate"),l(105,"h2"),g(106),m(107,"translate"),c(),l(108,"p"),g(109),m(110,"translate"),c(),_(111,AX,4,6,"ng-template",7),c(),_(112,PX,2,3,"p-message",41),_(113,FX,1,3,"app-lnb",42),_(114,NX,1,3,"app-rotor",42),_(115,VX,1,3,"app-switch",42),_(116,BX,1,3,"app-unicable",42),c()()}if(2&t){const e=d();a(4),S(f(5,93,"settings.capture.dvb.device_label")),a(2),p("ngIf",e.work.isReady),a(1),p("ngIf",e.work.warningMessage),a(2),T(" ",f(10,95,"settings.capture.device_desc")," "),a(4),S(f(14,97,"settings.capture.dvb.frontend_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(18,99,"settings.capture.frontend_desc")," "),a(4),S(f(22,101,"settings.capture.dvb.inputname_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(26,103,"settings.capture.inputname_desc")," "),a(4),S(f(30,105,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(34,107,"settings.capture.sigtimeout_desc")," "),a(4),S(f(38,109,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(42,111,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(46,113,"settings.capture.dvb.wait_label")),p("ngModel",e.card.DVBWaitForSeqStart)("binary",!0),a(4),T(" ",f(49,115,"settings.capture.dvb.wait_desc")," "),a(3),D("label",f(53,117,"settings.capture.dvb.ondemand_label")),p("ngModel",e.card.DVBOnDemand)("binary",!0),a(4),T(" ",f(56,119,"settings.capture.dvb.ondemand_desc")," "),a(3),D("label",f(60,121,"settings.capture.dvb.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(63,123,"settings.capture.dvb.eitscan_desc")," "),a(4),S(f(67,125,"settings.capture.dvb.tuningdelay_label")),a(2),p("ngModel",e.card.DVBTuningDelay)("showButtons",!0)("min",0)("max",2e3)("step",25),a(2),T(" ",f(71,127,"settings.capture.dvb.tuningdelay_desc")," "),a(2),D("legend",f(73,129,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcTree),a(1),q(A(151,Md)),D("header",f(76,131,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(79,133,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(3),p("ngIf",!e.diseqcTree),a(1),q(A(152,Md)),D("header",f(85,135,"settings.capture.dvb.satellite_connect")),p("visible",e.work.displayConnectDevice)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(88,137,"settings.capture.dvb.satellite_select")),a(2),p("options",e.diseqcRootTrees)("ngModel",e.work.selectedDiseqcTree),a(2),p("ngIf",e.diseqcTree),a(1),q(A(153,Md)),D("header",f(93,139,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(96,141,"settings.common.ru_sure")),a(3),S(f(99,143,"settings.capture.dvb.satellite_delete_desc")),a(4),p("ngIf",e.diseqcTree),a(1),q(A(154,Md)),D("header",f(104,145,"settings.capture.dvb.satellite_disconnect")),p("visible",e.work.displayDisconnect)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(107,147,"settings.common.ru_sure")),a(3),S(f(110,149,"settings.capture.dvb.satellite_disconnect_warning")),a(3),p("ngIf",e.work.diseqcError),a(1),p("ngIf",e.diseqcTree&&"lnb"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"rotor"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"switch"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"scr"==e.diseqcTree.Type)}}function qX(t,i){1&t&&(k(0,"p-message",64),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function UX(t,i){1&t&&(k(0,"p-message",58),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function GX(t,i){if(1&t){const e=I();l(0,"div",60)(1,"div",61),_(2,qX,2,3,"p-message",62),_(3,UX,2,3,"p-message",41),c(),l(4,"p-button",63),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let bS=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.work={InputName:"",successCount:0,errorCount:0,inputNames:[""],isReady:!1,warningMessage:"",displayNewDiseqc:!1,displayDeleteDiseqc:!1,displayConnectDevice:!1,displayDisconnect:!1,selectedDiseqcTree:0,diseqcError:!1},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.diseqcRootTrees=[],this.diseqcTree=void 0,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.selectedDiseqcType={description:"",type:"",inactive:!0},this.saveObserver={next:r=>{r.bool?(console.log("saveObserver success",r),this.work.successCount++):!this.card.CardId&&r.int?(console.log("saveObserver success",r),this.work.successCount++,this.card.CardId||(this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card),this.captureCardService.UpdateCaptureCard(this.card.CardId,"inputname",this.card.InputName).subscribe(this.saveObserver))):(console.log("saveObserver error",r),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.log("saveObserver error",r),this.work.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){null==this.card.DVBWaitForSeqStart&&(this.card.DVBWaitForSeqStart=!0),null==this.card.DVBOnDemand&&(this.card.DVBOnDemand=!0),null==this.card.DVBEITScan&&(this.card.DVBEITScan=!0),null==this.card.CardId&&(this.card.CardId=0),null==this.card.VideoDevice&&(this.card.VideoDevice=""),null==this.card.DiSEqCId&&(this.card.DiSEqCId=0),this.captureCardService.GetCaptureDeviceList("DVB").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}}),this.setupDiseqc()}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDiseqc(){this.diseqcTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.DiSEqCId==this.card.DiSEqCId),this.work.diseqcError=!1}newDiseqc(){this.work.displayNewDiseqc=!1,this.work.diseqcError=!1,this.diseqcTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setupRootTrees(){this.diseqcRootTrees=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.filter(e=>!e.ParentId)}selectDiseqc(){this.work.displayConnectDevice=!1,this.work.diseqcError=!1,this.card.DiSEqCId=this.work.selectedDiseqcTree,this.currentForm.form.markAsDirty(),this.setupDiseqc()}unSelectDiseqc(){this.work.displayDisconnect=!1,this.work.diseqcError=!1,this.card.DiSEqCId=0,this.currentForm.form.markAsDirty(),this.diseqcTree=void 0,this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe()}canDeleteDiseqc(){this.work.diseqcError=!1,this.cardList.CaptureCardList.CaptureCards.filter(n=>n.DiSEqCId==this.card.DiSEqCId).length>1?this.work.diseqcError=!0:this.work.displayDeleteDiseqc=!0}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.work.successCount=0,this.work.errorCount=0,this.diseqcTree&&this.diseqcTree.DiSEqCId&&(this.captureCardService.DeleteDiseqcTree(this.diseqcTree.DiSEqCId).subscribe({next:e=>{e.bool?this.work.successCount++:(this.work.errorCount++,console.log("DeleteDiseqcTree",e)),this.parent.loadDiseqc()},error:e=>{console.log("DeleteDiseqcTree",e),this.work.errorCount++}}),this.card.DiSEqCId=0,this.card.CardId&&(this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"DiSEqCId",String(this.card.DiSEqCId)).subscribe(this.saveObserver)}),this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe())),this.diseqcTree=void 0}setDiseqcObject(e){this.diseqcComponent=e}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.work.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.work.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.work.diseqcError=!1,this.diseqcTree&&this.diseqcComponent?this.diseqcComponent.saveForm(0,{next:e=>{var n;this.card.DiSEqCId&&e.bool&&this.card.DiSEqCId==(null===(n=this.diseqcTree)||void 0===n?void 0:n.DiSEqCId)?(this.work.successCount++,this.saveCard()):e.int&&this.diseqcTree?(this.card.DiSEqCId=e.int,this.diseqcTree.DiSEqCId=e.int,this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.push(this.diseqcTree),this.saveCard()):(console.log("saveForm",e),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:e=>{console.log("saveForm",e),this.work.errorCount++,this.currentForm.form.markAsDirty()},complete:()=>{}}):this.saveCard()}saveCard(){this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_wait_for_seqstart",this.card.DVBWaitForSeqStart?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_on_demand",this.card.DVBOnDemand?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_tuning_delay",String(this.card.DVBTuningDelay)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"inputname",this.card.InputName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"DiSEqCId",String(this.card.DiSEqCId)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-dvb"]],viewQuery:function(e,n){if(1&e&&(j(bX,5),j(vX,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList",diseqcTreeList:"diseqcTreeList",parent:"parent"},decls:9,vars:0,consts:[["name","dvbform",1,"ml-3","mr-3"],["dvbform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["for","InputName",1,"label","block"],["name","InputName",3,"options","ngModel","ngModelChange",4,"ngIf"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBWaitForSeqStart","name","DVBWaitForSeqStart",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBWaitForSeqStart","ngModel"],["inputId","DVBOnDemand","name","DVBOnDemand",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBOnDemand","ngModel"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["for","DVBTuningDelay",1,"label","block"],["name","DVBTuningDelay","id","DVBTuningDelay",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","pTooltip","onClick",4,"ngIf"],["for","diseqcRootTrees",1,"label","block"],["optionLabel","Description","name","diseqcRootTrees","optionValue","DiSEqCId",3,"options","ngModel","ngModelChange","onDblClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"onClick",4,"ngIf"],["icon","pi pi-minus-circle","styleClass","p-button-warning",3,"label","onClick",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],["name","InputName",3,"options","ngModel","ngModelChange"],["InputName","ngModel"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","pTooltip","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-minus-circle","styleClass","p-button-warning",3,"label","onClick"],["severity","error",3,"text"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,CX,2,3,"ng-template",4),_(6,yX,0,0,"ng-template",5),_(7,HX,117,155,"ng-template",6),_(8,GX,6,6,"ng-template",7),c()())},styles:[""]}),t})();const zX=["lnbform"];function jX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.lnb.title")," ")}function $X(t,i){}const vS=function(){return{minWidth:"80%"}};function WX(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-dropdown",14,15),C("ngModelChange",function(s){return v(e),d().currentPreset=s})("onChange",function(){return v(e),d().updatePreset()}),c(),l(17,"small",12),g(18),m(19,"translate"),c()(),l(20,"div",8)(21,"label",16),g(22),m(23,"translate"),c(),l(24,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(26,"small",12),g(27),m(28,"translate"),c()(),l(29,"div",8)(30,"label",19),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().work.LnbLofSwitch=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",21),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",22),C("ngModelChange",function(s){return v(e),d().work.LnbLofLo=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()(),l(45,"div",8)(46,"label",23),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().work.LnbLofHi=s}),c(),l(50,"small",12),g(51),m(52,"translate"),c()(),l(53,"div",8)(54,"p-checkbox",25,26),C("ngModelChange",function(s){return v(e),d().diseqcTree.LnbPolInv=s}),m(56,"translate"),c(),l(57,"small",12),g(58),m(59,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,43,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,45,"settings.capture.diseqc.lnb.preset_label")),a(2),q(A(69,vS)),p("options",e.lnbPresetList)("ngModel",e.currentPreset)("editable",!1)("maxlength",0)("scrollHeight","400px"),a(3),T(" ",f(19,47,"settings.capture.diseqc.lnb.preset_desc")," "),a(4),S(f(23,49,"settings.capture.diseqc.lnb.type_label")),a(2),q(A(70,vS)),p("options",e.lnbSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0)("disabled","custom"!=e.currentPreset.SubType),a(3),T(" ",f(28,51,"settings.capture.diseqc.lnb.type_desc")," "),a(4),S(f(32,53,"settings.capture.diseqc.lnb.lofswitch_label")),a(2),p("ngModel",e.work.LnbLofSwitch)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType||"voltage_tone"!=e.diseqcTree.SubType),a(2),T(" ",f(36,55,"settings.capture.diseqc.lnb.lofswitch_desc")," "),a(4),S(f(40,57,"settings.capture.diseqc.lnb.loflow_label")),a(2),p("ngModel",e.work.LnbLofLo)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType),a(2),T(" ",f(44,59,"settings.capture.diseqc.lnb.loflow_desc")," "),a(4),S(f(48,61,"settings.capture.diseqc.lnb.lofhigh_label")),a(2),p("ngModel",e.work.LnbLofHi)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType||!("voltage_tone"==e.diseqcTree.SubType||"bandstacked"==e.diseqcTree.SubType)),a(2),T(" ",f(52,63,"settings.capture.diseqc.lnb.lofhigh_desc")," "),a(3),D("label",f(56,65,"settings.capture.diseqc.lnb.reversed_label")),p("ngModel",e.diseqcTree.LnbPolInv)("binary",!0)("disabled","custom"!=e.currentPreset.SubType),a(4),T(" ",f(59,67,"settings.capture.diseqc.lnb.reversed_desc")," ")}}let kd=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.baseEvent=new H,this.work={LnbLofSwitch:0,LnbLofLo:0,LnbLofHi:0},this.lnbSubTypes=[{Name:"settings.capture.diseqc.subtype_legacy",SubType:"fixed"},{Name:"settings.capture.diseqc.subtype_standard",SubType:"voltage"},{Name:"settings.capture.diseqc.subtype_universal",SubType:"voltage_tone"},{Name:"settings.capture.diseqc.subtype_backstacked",SubType:"bandstacked"}],this.lnbPresetList=[{Name:"settings.capture.diseqc.lnbpreset_universal",SubType:"voltage_tone",LnbLofSwitch:11700,LnbLofLo:9750,LnbLofHi:10600,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_single",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:9750,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_circular",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:11250,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_Linear",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:10750,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_cband",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:5150,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_dishpro",SubType:"bandstacked",LnbLofSwitch:0,LnbLofLo:11250,LnbLofHi:14350,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_custom",SubType:"custom",LnbLofSwitch:0,LnbLofLo:0,LnbLofHi:0,LnbPolInv:!1}],this.setupDone=!1,this.lnbSubTypes.forEach(r=>s.get(r.Name).subscribe(o=>r.Name=o)),this.lnbPresetList.forEach(r=>s.get(r.Name).subscribe(o=>r.Name=o))}ngOnInit(){if(this.diseqcTree.DiSEqCId){let e;this.work.LnbLofSwitch=this.diseqcTree.LnbLofSwitch/1e3,this.work.LnbLofLo=this.diseqcTree.LnbLofLo/1e3,this.work.LnbLofHi=this.diseqcTree.LnbLofHi/1e3,e=this.lnbPresetList.find(n=>n.SubType==this.diseqcTree.SubType&&n.LnbLofSwitch==this.work.LnbLofSwitch&&n.LnbLofLo==this.work.LnbLofLo&&n.LnbLofHi==this.work.LnbLofHi&&n.LnbPolInv==this.diseqcTree.LnbPolInv),this.currentPreset=null==e?this.lnbPresetList[this.lnbPresetList.length-1]:e}else this.currentPreset=this.lnbPresetList[0],this.updatePreset()}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}updatePreset(){if("custom"!=this.currentPreset.SubType){let e=this.lnbSubTypes.find(n=>n.SubType==this.currentPreset.SubType);e&&(this.currentSubType=e,this.updateSubType()),this.work.LnbLofSwitch=this.currentPreset.LnbLofSwitch,this.work.LnbLofLo=this.currentPreset.LnbLofLo,this.work.LnbLofHi=this.currentPreset.LnbLofHi,this.diseqcTree.LnbPolInv=this.currentPreset.LnbPolInv}}updateSubType(){this.diseqcTree.SubType=this.currentSubType.SubType}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.LnbLofSwitch=1e3*this.work.LnbLofSwitch,this.diseqcTree.LnbLofLo=1e3*this.work.LnbLofLo,this.diseqcTree.LnbLofHi=1e3*this.work.LnbLofHi,this.diseqcTree.DiSEqCId?this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s)):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-lnb"]],viewQuery:function(e,n){if(1&e&&j(zX,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","lnbform",1,"ml-3","mr-3"],["lnbform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","LnbPreset",1,"label","block"],["optionLabel","Name","name","LnbPreset",3,"options","ngModel","editable","maxlength","scrollHeight","ngModelChange","onChange"],["LnbPreset","ngModel"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","disabled","ngModelChange","onChange"],["SubType","ngModel"],["for","LnbLofSwitch",1,"label","block"],["name","LnbLofSwitch","id","LnbLofSwitch","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["for","LnbLofLo",1,"label","block"],["name","LnbLofLo","id","LnbLofLo","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["for","LnbLofHi",1,"label","block"],["name","LnbLofHi","id","LnbLofHi","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["inputId","LnbPolInv","name","LnbPolInv",1,"label","mb-2","w-full",3,"ngModel","binary","label","disabled","ngModelChange"],["LnbPolInv","ngModel"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,jX,2,3,"ng-template",3),_(4,$X,0,0,"ng-template",4),_(5,WX,60,71,"ng-template",5),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Vt,fn,dt,rn],pipes:[de],styles:[""]}),t})();const KX=["rotorform"];function QX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.rotor.title")," ")}function JX(t,i){}function YX(t,i){1&t&&(l(0,"tr")(1,"th"),g(2,"Position #"),c(),l(3,"th"),g(4,"Angle (Degrees)"),c()())}function ZX(t,i){if(1&t){const e=I();l(0,"p-inputNumber",43),C("ngModelChange",function(s){return v(e),d().$implicit.Angle=s}),c()}2&t&&p("ngModel",d().$implicit.Angle)("min",-180)("max",180)("maxFractionDigits",5)}function XX(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d(2).$implicit;a(1),T("",e.Angle," (W)")}}function eee(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d(2).$implicit;a(1),T(" ",e.Angle," (E)")}}function tee(t,i){if(1&t&&(_(0,XX,2,1,"div",44),_(1,eee,2,1,"div",44)),2&t){const e=d().$implicit;p("ngIf",e.Angle<0),a(1),p("ngIf",null!=e.Angle&&e.Angle>=0)}}function nee(t,i){if(1&t&&(l(0,"tr")(1,"td"),g(2),c(),l(3,"td",40)(4,"p-cellEditor"),_(5,ZX,1,4,"ng-template",41),_(6,tee,2,2,"ng-template",42),c()()()),2&t){const e=i.$implicit;a(2),T(" ",e.Num," ")}}const CS=function(){return{width:"25rem"}};function iee(t,i){if(1&t&&(l(0,"div",8)(1,"label",36),g(2),m(3,"translate"),c(),l(4,"div")(5,"p-table",37),_(6,YX,5,0,"ng-template",38),_(7,nee,7,1,"ng-template",39),c()(),l(8,"small",12),g(9),m(10,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,6,"settings.capture.diseqc.rotor.positions_label")),a(2),q(A(10,CS)),a(1),p("value",e.rotorPositions)("scrollable",!0),a(4),T(" ",f(10,8,"settings.capture.diseqc.rotor.positions_desc")," ")}}function see(t,i){if(1&t){const e=I();l(0,"p-button",45),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function ree(t,i){if(1&t){const e=I();l(0,"p-button",46),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",47),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function oee(t,i){if(1&t){const e=I();l(0,"p-button",48),C("onClick",function(){return v(e),d(2).work.displayDeleteDiseqc=!0}),c()}2&t&&p("disabled",!d(2).diseqcSubTree)}function aee(t,i){if(1&t){const e=I();l(0,"p-button",49),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",50),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function lee(t,i){if(1&t){const e=I();l(0,"app-lnb",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function cee(t,i){if(1&t){const e=I();l(0,"app-rotor",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function uee(t,i){if(1&t){const e=I();l(0,"app-switch",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function dee(t,i){if(1&t){const e=I();l(0,"app-unicable",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}const pee=function(){return{minWidth:"80%"}},yS=function(){return{width:"50vw"}};function hee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(25,"small",12),g(26),m(27,"translate"),c()(),_(28,iee,11,11,"div",19),l(29,"div",8)(30,"label",20),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().diseqcTree.RotorLoSpeed=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().diseqcTree.RotorHiSpeed=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()(),l(45,"div",8)(46,"label",24),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().fields.Latitude=s}),c(),l(50,"small",12),g(51),m(52,"translate"),c()(),l(53,"div",8)(54,"label",26),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d().fields.Longitude=s}),c(),l(58,"small",12),g(59),m(60,"translate"),c()(),l(61,"p-fieldset",28),m(62,"translate"),_(63,see,2,3,"p-button",29),l(64,"p-dialog",30),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(65,"translate"),l(66,"label",31),g(67),m(68,"translate"),c(),l(69,"p-listbox",32),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(70,ree,4,7,"ng-template",33),c(),_(71,oee,1,1,"p-button",34),l(72,"p-dialog",30),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(73,"translate"),l(74,"h2"),g(75),m(76,"translate"),c(),l(77,"p"),g(78),m(79,"translate"),c(),_(80,aee,4,6,"ng-template",33),c(),_(81,lee,1,3,"app-lnb",35),_(82,cee,1,3,"app-rotor",35),_(83,uee,1,3,"app-switch",35),_(84,dee,1,3,"app-unicable",35),c()()()}if(2&t){const e=d();a(4),S(f(5,65,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,67,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,69,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(18,71,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),q(A(105,CS)),a(2),S(f(22,73,"settings.capture.diseqc.rotor.type_label")),a(2),q(A(106,pee)),p("options",e.rotorSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0),a(3),T(" ",f(27,75,"settings.capture.diseqc.rotor.type_desc")," "),a(2),p("ngIf","diseqc_1_2"==e.diseqcTree.SubType),a(3),S(f(32,77,"settings.capture.diseqc.rotor.lospeed_label")),a(2),p("ngModel",e.diseqcTree.RotorLoSpeed)("maxFractionDigits",5),a(2),T(" ",f(36,79,"settings.capture.diseqc.rotor.lospeed_desc")," "),a(4),S(f(40,81,"settings.capture.diseqc.rotor.hispeed_label")),a(2),p("ngModel",e.diseqcTree.RotorHiSpeed)("maxFractionDigits",5),a(2),T(" ",f(44,83,"settings.capture.diseqc.rotor.hispeed_desc")," "),a(4),S(f(48,85,"settings.capture.diseqc.rotor.latitude_label")),a(2),p("ngModel",e.fields.Latitude)("maxFractionDigits",5),a(2),T(" ",f(52,87,"settings.capture.diseqc.rotor.latitude_desc")," "),a(4),S(f(56,89,"settings.capture.diseqc.rotor.longitude_label")),a(2),p("ngModel",e.fields.Longitude)("maxFractionDigits",5),a(2),T(" ",f(60,91,"settings.capture.diseqc.rotor.longitude_desc")," "),a(2),D("legend",f(62,93,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcSubTree),a(1),q(A(107,yS)),D("header",f(65,95,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(68,97,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(2),p("ngIf",e.diseqcSubTree),a(1),q(A(108,yS)),D("header",f(73,99,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(76,101,"settings.common.ru_sure")),a(3),S(f(79,103,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",e.diseqcSubTree&&"lnb"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"rotor"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"switch"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"scr"==e.diseqcSubTree.Type)}}let Ol=(()=>{class t{constructor(e,n,s,r){this.captureCardService=e,this.setupService=n,this.translate=s,this.mythService=r,this.baseEvent=new H,this.rotorSubTypes=[{Name:"settings.capture.diseqc.subtype_diseqc_1_2",SubType:"diseqc_1_2"},{Name:"settings.capture.diseqc.subtype_diseqc_1_3",SubType:"diseqc_1_3"}],this.selectedDiseqcType={description:"",type:"",inactive:!0},this.rotorPositions=[],this.fields={Latitude:null,Longitude:null},this.work={displayNewDiseqc:!1,displayDeleteDiseqc:!1},this.setupDone=!1,this.rotorSubTypes.forEach(o=>s.get(o.Name).subscribe(u=>o.Name=u))}ngOnInit(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"latitude"}).subscribe({next:e=>{e.String.length>0&&(this.fields.Latitude=Number(e.String))},error:()=>this.dvbComponent.work.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"longitude"}).subscribe({next:e=>{e.String.length>0&&(this.fields.Longitude=Number(e.String))},error:()=>this.dvbComponent.work.errorCount++});for(let e=0;e<48;e++)this.rotorPositions.push({Num:e+1,Angle:null});if(this.diseqcTree.DiSEqCId?this.diseqcTree.RotorPositions.split(":").forEach(n=>{let s=n.split("=");if(2==s.length&&s[0].length>0&&s[1].length>0){let r=Number.parseInt(s[1])-1,o=Number.parseFloat(s[0]);r>-1&&r<48&&(this.rotorPositions[r].Angle=o)}}):(this.diseqcTree.RotorHiSpeed=2.5,this.diseqcTree.RotorLoSpeed=1.9,this.diseqcTree.SubType="diseqc_1_3",this.diseqcTree.CmdRepeat=1),this.diseqcTree.SubType){let e=this.rotorSubTypes.find(n=>n.SubType==this.diseqcTree.SubType);e&&(this.currentSubType=e)}this.diseqcSubTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.ParentId==this.diseqcTree.DiSEqCId)}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}updateSubType(){this.diseqcTree.SubType=this.currentSubType.SubType}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setDiseqcObject(e){this.diseqcSubComponent=e}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.dvbComponent.work.errorCount=0,this.diseqcSubTree&&this.diseqcSubTree.DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree.DiSEqCId).subscribe({next:e=>{e.bool||(console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++)},error:e=>{console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree=void 0)}saveForm(e,n){this.diseqcTree.ParentId=e,null!=this.fields.Latitude&&this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"latitude",Value:String(this.fields.Latitude)}).subscribe(this.dvbComponent.saveObserver),null!=this.fields.Longitude&&this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"longitude",Value:String(this.fields.Longitude)}).subscribe(this.dvbComponent.saveObserver),this.diseqcTree.RotorPositions="",this.rotorPositions.forEach(s=>{null!=s.Angle&&(this.diseqcTree.RotorPositions.length>0&&(this.diseqcTree.RotorPositions=this.diseqcTree.RotorPositions+":"),this.diseqcTree.RotorPositions=this.diseqcTree.RotorPositions+s.Angle+"="+s.Num)}),this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{error:s=>{n.error(s)}})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next(s),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{next:r=>{},error:r=>{n.error(r)}})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-rotor"]],viewQuery:function(e,n){if(1&e&&j(KX,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","rotorform",1,"ml-3","mr-3"],["rotorform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SubType","ngModel"],["class","form-group field",4,"ngIf"],["for","RotorLoSpeed",1,"label","block"],["name","RotorLoSpeed","id","RotorLoSpeed","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","RotorHiSpeed",1,"label","block"],["name","RotorHiSpeed","id","RotorHiSpeed","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","Latitude",1,"label","block"],["name","Latitude","id","Latitude","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","Longitude",1,"label","block"],["name","Longitude","id","Longitude","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["for","RotorPositions",1,"label","block"],["dataKey","Num","responsiveLayout","scroll","name","RotorPositions","styleClass","p-datatable-gridlines","scrollHeight","20rem",3,"value","scrollable"],["pTemplate","header"],["pTemplate","body"],["pEditableColumn",""],["pTemplate","input"],["pTemplate","output"],["name","Angle",3,"ngModel","min","max","maxFractionDigits","ngModelChange"],[4,"ngIf"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,QX,2,3,"ng-template",3),_(4,JX,0,0,"ng-template",4),_(5,hee,85,109,"ng-template",5),c()())},styles:[""]}),t})();const mee=["unicableform"];function fee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.unicable.title")," ")}function gee(t,i){}function _ee(t,i){if(1&t){const e=I();l(0,"p-button",30),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function bee(t,i){if(1&t){const e=I();l(0,"p-button",31),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",32),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function vee(t,i){if(1&t){const e=I();l(0,"p-button",33),C("onClick",function(){return v(e),d(2).work.displayDeleteDiseqc=!0}),c()}2&t&&p("disabled",!d(2).diseqcSubTree)}function Cee(t,i){if(1&t){const e=I();l(0,"p-button",34),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",35),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function yee(t,i){if(1&t){const e=I();l(0,"app-lnb",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function wee(t,i){if(1&t){const e=I();l(0,"app-rotor",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function Tee(t,i){if(1&t){const e=I();l(0,"app-switch",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function See(t,i){if(1&t){const e=I();l(0,"app-unicable",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}const wS=function(){return{width:"50vw"}};function xee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrUserband=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrFrequency=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()(),l(27,"div",8)(28,"label",18),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",19),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrPin=s}),c(),l(32,"small",12),g(33),m(34,"translate"),c()(),l(35,"div",8)(36,"label",20),g(37),m(38,"translate"),c(),l(39,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(40,"small",12),k(41,"div",15),m(42,"translate"),c()(),l(43,"p-fieldset",22),m(44,"translate"),_(45,_ee,2,3,"p-button",23),l(46,"p-dialog",24),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(47,"translate"),l(48,"label",25),g(49),m(50,"translate"),c(),l(51,"p-listbox",26),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(52,bee,4,7,"ng-template",27),c(),_(53,vee,1,1,"p-button",28),l(54,"p-dialog",24),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(55,"translate"),l(56,"h2"),g(57),m(58,"translate"),c(),l(59,"p"),g(60),m(61,"translate"),c(),_(62,Cee,4,6,"ng-template",27),c(),_(63,yee,1,3,"app-lnb",29),_(64,wee,1,3,"app-rotor",29),_(65,Tee,1,3,"app-switch",29),_(66,See,1,3,"app-unicable",29),c()()()}if(2&t){const e=d();a(4),S(f(5,55,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,57,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,59,"settings.capture.diseqc.unicable.userband_label")),a(2),p("ngModel",e.diseqcTree.ScrUserband)("showButtons",!0)("min",0)("max",7)("step",1),a(2),p("innerHTML",f(18,61,"settings.capture.diseqc.userband_desc"),Ht),a(4),S(f(22,63,"settings.capture.diseqc.unicable.frequency_label")),a(2),p("ngModel",e.diseqcTree.ScrFrequency)("useGrouping",!1),a(2),T(" ",f(26,65,"settings.capture.diseqc.unicable.frequency_desc")," "),a(4),S(f(30,67,"settings.capture.diseqc.unicable.pin_label")),a(2),p("ngModel",e.diseqcTree.ScrPin)("useGrouping",!1)("min",-1)("max",255),a(2),T(" ",f(34,69,"settings.capture.diseqc.unicable.pin_desc")," "),a(4),S(f(38,71,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(42,73,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),D("legend",f(44,75,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcSubTree),a(1),q(A(87,wS)),D("header",f(47,77,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(50,79,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(2),p("ngIf",e.diseqcSubTree),a(1),q(A(88,wS)),D("header",f(55,81,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(58,83,"settings.common.ru_sure")),a(3),S(f(61,85,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",e.diseqcSubTree&&"lnb"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"rotor"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"switch"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"scr"==e.diseqcSubTree.Type)}}let Al=(()=>{class t{constructor(e){this.captureCardService=e,this.selectedDiseqcType={description:"",type:"",inactive:!0},this.baseEvent=new H,this.work={displayNewDiseqc:!1,displayDeleteDiseqc:!1},this.setupDone=!1}ngOnInit(){this.diseqcTree.DiSEqCId||(this.diseqcTree.ScrUserband=0,this.diseqcTree.ScrFrequency=1210,this.diseqcTree.ScrPin=-1,this.diseqcTree.CmdRepeat=1),this.diseqcSubTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.ParentId==this.diseqcTree.DiSEqCId)}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setDiseqcObject(e){this.diseqcSubComponent=e}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.dvbComponent.work.errorCount=0,this.diseqcSubTree&&this.diseqcSubTree.DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree.DiSEqCId).subscribe({next:e=>{e.bool||(console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++)},error:e=>{console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree=void 0)}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{error:s=>{n.error(s)}})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{next:r=>{},error:r=>{n.error(r)}})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt))},t.\u0275cmp=G({type:t,selectors:[["app-unicable"]],viewQuery:function(e,n){if(1&e&&j(mee,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","unicableform",1,"ml-3","mr-3"],["unicableform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","ScrUserband",1,"label","block"],["name","ScrUserband","id","ScrUserband",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","ScrFrequency",1,"label","block"],["name","ScrFrequency","id","ScrFrequency","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","ngModelChange"],["for","ScrPin",1,"label","block"],["name","ScrPin","id","ScrPin","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","min","max","ngModelChange"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,fee,2,3,"ng-template",3),_(4,gee,0,0,"ng-template",4),_(5,xee,67,89,"ng-template",5),c()())},styles:[""]}),t})();const Dee=["switchform"];function Mee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.switch.title")," ")}function kee(t,i){}function Iee(t,i){1&t&&(l(0,"div")(1,"small",27),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.capture.diseqc.switchports_error")))}function Eee(t,i){if(1&t){const e=I();l(0,"p-button",33),C("onClick",function(){v(e);const s=d(2).index;return d(2).displayDeleteThis[s]=!0}),c()}2&t&&p("disabled",!d(2).$implicit)}function Ree(t,i){if(1&t){const e=I();l(0,"p-button",34),C("click",function(){v(e);const s=d(2).index;return d(2).displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",35),C("click",function(){v(e);const s=d(2).index;return d(2).deleteDiseqc(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function Lee(t,i){if(1&t){const e=I();l(0,"app-lnb",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Oee(t,i){if(1&t){const e=I();l(0,"app-rotor",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Aee(t,i){if(1&t){const e=I();l(0,"app-switch",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Pee(t,i){if(1&t){const e=I();l(0,"app-unicable",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}const TS=function(){return{width:"50vw"}};function Fee(t,i){if(1&t){const e=I();l(0,"p-fieldset",28),m(1,"translate"),_(2,Eee,1,1,"p-button",29),l(3,"p-dialog",30),C("visibleChange",function(s){v(e);const r=d().index;return d(2).displayDeleteThis[r]=s}),m(4,"translate"),l(5,"h2"),g(6),m(7,"translate"),c(),l(8,"p"),g(9),m(10,"translate"),c(),_(11,Ree,4,6,"ng-template",31),c(),_(12,Lee,1,3,"app-lnb",32),_(13,Oee,1,3,"app-rotor",32),_(14,Aee,1,3,"app-switch",32),_(15,Pee,1,3,"app-unicable",32),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);D("legend",f(1,17,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",n),a(1),q(A(25,TS)),D("header",f(4,19,"settings.capture.dvb.satellite_delete_header")),p("visible",r.displayDeleteThis[s])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(7,21,"settings.common.ru_sure")),a(3),S(f(10,23,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",n&&"lnb"==n.Type),a(1),p("ngIf",n&&"rotor"==n.Type),a(1),p("ngIf",n&&"switch"==n.Type),a(1),p("ngIf",n&&"scr"==n.Type)}}function Nee(t,i){if(1&t&&(l(0,"div"),_(1,Fee,16,26,"p-fieldset",26),c()),2&t){const e=i.$implicit;a(1),p("ngIf",e)}}function Vee(t,i){if(1&t){const e=I();l(0,"p-button",40),C("onClick",function(){return v(e),d(3).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",41),C("onClick",function(){return v(e),d(3).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(3);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function Bee(t,i){if(1&t){const e=I();l(0,"p-fieldset",28),m(1,"translate"),l(2,"p-button",37),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(3,"translate"),c(),l(4,"p-dialog",30),C("visibleChange",function(s){return v(e),d(2).work.displayNewDiseqc=s}),m(5,"translate"),l(6,"label",38),g(7),m(8,"translate"),c(),l(9,"p-listbox",39),C("ngModelChange",function(s){return v(e),d(2).selectedDiseqcType=s})("onDblClick",function(){return v(e),d(2).newDiseqc()}),c(),_(10,Vee,4,7,"ng-template",31),c()()}if(2&t){const e=d(2);D("legend",f(1,14,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!1),a(2),D("label",f(3,16,"settings.capture.dvb.newsatellite_button")),a(2),q(A(22,TS)),D("header",f(5,18,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),T(" ",f(8,20,"settings.capture.dvb.newsatellite_devtype")," "),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType)}}const Hee=function(){return{width:"25rem"}},qee=function(){return{minWidth:"80%"}};function Uee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(25,"small",12),g(26),m(27,"translate"),c()(),l(28,"div",8)(29,"label",19),g(30),m(31,"translate"),c(),l(32,"input",20,21),C("ngModelChange",function(s){return v(e),d().work.addressText=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().diseqcTree.SwitchPorts=s}),c(),l(42,"small",12),k(43,"div",15),m(44,"translate"),c(),_(45,Iee,4,3,"div",24),c(),_(46,Nee,2,1,"div",25),_(47,Bee,11,23,"p-fieldset",26),c()()}if(2&t){const e=d();a(4),S(f(5,35,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,37,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,39,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(18,41,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),q(A(55,Hee)),a(2),S(f(22,43,"settings.capture.diseqc.switch.type_label")),a(2),q(A(56,qee)),p("options",e.switchSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0),a(3),T(" ",f(27,45,"settings.capture.diseqc.switch.type_desc")," "),a(4),S(f(31,47,"settings.capture.diseqc.address_label")),a(2),p("ngModel",e.work.addressText)("disabled",!e.work.enableAddrAndPorts),a(3),T(" ",f(36,49,"settings.capture.diseqc.address_desc")," "),a(4),T(" ",f(40,51,"settings.capture.diseqc.switchports_label")," "),a(2),p("ngModel",e.diseqcTree.SwitchPorts)("showButtons",!0)("min",0)("max",255)("step",1)("disabled",!e.work.enableAddrAndPorts),a(2),p("innerHTML",f(44,53,"settings.capture.diseqc.switchports_desc"),Ht),a(2),p("ngIf",e.diseqcSubTreeCount>e.diseqcTree.SwitchPorts),a(1),p("ngForOf",e.diseqcSubTree),a(1),p("ngIf",e.diseqcSubTreeCount{class t{constructor(e,n){this.captureCardService=e,this.translate=n,this.diseqcSubComponent=[],this.baseEvent=new H,this.switchSubTypes=[{Name:"settings.capture.diseqc.switch.tone",SubType:"tone"},{Name:"settings.capture.diseqc.switch.voltage",SubType:"voltage"},{Name:"settings.capture.diseqc.switch.mini_diseqc",SubType:"mini_diseqc"},{Name:"settings.capture.diseqc.switch.diseqc",SubType:"diseqc"},{Name:"settings.capture.diseqc.switch.diseqc_uncom",SubType:"diseqc_uncom"},{Name:"settings.capture.diseqc.switch.legacy_sw21",SubType:"legacy_sw21"},{Name:"settings.capture.diseqc.switch.legacy_sw42",SubType:"legacy_sw42"},{Name:"settings.capture.diseqc.switch.legacy_sw64",SubType:"legacy_sw64"}],this.diseqcSubTree=[],this.diseqcSubTreeCount=0,this.work={addressText:"",displayNewDiseqc:!1,enableAddrAndPorts:!1},this.displayDeleteThis=[],this.selectedDiseqcType={description:"",type:"",inactive:!0},this.setupDone=!1,this.switchSubTypes.forEach(s=>n.get(s.Name).subscribe(r=>s.Name=r))}ngOnInit(){if(this.diseqcTree.DiSEqCId?this.work.addressText="0x"+this.diseqcTree.Address.toString(16):(this.diseqcTree.Address=16,this.work.addressText="0x10",this.diseqcTree.SwitchPorts=2,this.diseqcTree.SubType="tone",this.diseqcTree.CmdRepeat=1),this.diseqcTree.SubType){let e=this.switchSubTypes.find(n=>n.SubType==this.diseqcTree.SubType);e&&(this.currentSubType=e)}this.updateSubType(),this.displayDeleteThis=[],this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.forEach(e=>{e.ParentId==this.diseqcTree.DiSEqCId&&(this.diseqcSubTree.push(e),this.displayDeleteThis.push(!1),this.diseqcSubTreeCount++)})}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree.push({Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}),this.displayDeleteThis.push(!1),this.diseqcSubTreeCount++}setDiseqcObject(e){this.diseqcSubComponent.findIndex(s=>s===e)<0&&this.diseqcSubComponent.push(e),console.log("setDiseqcObject",this.diseqcSubComponent.length)}deleteDiseqc(e){this.displayDeleteThis[e]=!1,this.dvbComponent.work.errorCount=0,console.log("Delete",e),null!=this.diseqcSubTree[e]&&(this.diseqcSubTree[e].DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree[e].DiSEqCId).subscribe({next:n=>{n.bool||(console.log("DeleteDiseqcTree",n),this.dvbComponent.work.errorCount++)},error:n=>{console.log("DeleteDiseqcTree",n),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree[e]=null,this.diseqcSubTreeCount--))}updateSubType(){switch(this.diseqcTree.SubType=this.currentSubType.SubType,this.diseqcTree.SubType){case"tone":case"voltage":case"mini_diseqc":case"legacy_sw21":case"legacy_sw42":this.work.addressText="0x10",this.diseqcTree.SwitchPorts=2,this.work.enableAddrAndPorts=!1;break;case"legacy_sw64":this.work.addressText="0x10",this.diseqcTree.SwitchPorts=3,this.work.enableAddrAndPorts=!1;break;case"diseqc_uncom":case"diseqc":this.work.enableAddrAndPorts=!0}}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.Address=Number.parseInt(this.work.addressText),this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent.forEach(s=>{s&&s.saveForm(this.diseqcTree.DiSEqCId,{error:r=>{n.error(r)}})})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s),this.diseqcSubComponent.forEach(r=>{r&&r.saveForm(this.diseqcTree.DiSEqCId,{next:o=>{},error:o=>{n.error(o)}})})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-switch"]],viewQuery:function(e,n){if(1&e&&j(Dee,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","switchform",1,"ml-3","mr-3"],["switchform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SubType","ngModel"],["for","Address",1,"label","block"],["pInputText","","id","Address","name","Address",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["Address","ngModel"],["for","SwitchPorts",1,"label","block"],["name","SwitchPorts","id","SwitchPorts",3,"ngModel","showButtons","min","max","step","disabled","ngModelChange"],[4,"ngIf"],[4,"ngFor","ngForOf"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"p-error","block"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,Mee,2,3,"ng-template",3),_(4,kee,0,0,"ng-template",4),_(5,Uee,48,57,"ng-template",5),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Vt,fn,Q,at,Ui,ve,Tn,kd,Ol,t,Al,ws],pipes:[de],styles:[""]}),t})();const Gee=["externalform"],zee=["top"];function jee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.external.title")," ")}function $ee(t,i){}function Wee(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",16),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(16,"small",14),g(17),m(18,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,10,"settings.capture.external.command_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,12,"settings.capture.external.command_desc")," "),a(4),S(f(14,14,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(18,16,"settings.capture.tunetimeout_desc")," ")}}function Kee(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Qee(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Jee(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,Kee,2,3,"p-message",19),_(3,Qee,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Yee=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-external"]],viewQuery:function(e,n){if(1&e&&(j(Gee,5),j(zee,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","externalform",1,"ml-3","mr-3"],["externalform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,jee,2,3,"ng-template",4),_(6,$ee,0,0,"ng-template",5),_(7,Wee,19,18,"ng-template",6),_(8,Jee,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Zee=["hdhomerunform"],Xee=["top"];function ete(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.hdhomerun.title")," ")}function tte(t,i){}function nte(t,i){if(1&t){const e=I();l(0,"p-listbox",20,21),C("ngModelChange",function(s){return v(e),d(2).selectedDevices=s})("onChange",function(){return v(e),d(2).updateDevices()}),c()}if(2&t){const e=d(2);p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.selectedDevices)("checkbox",!0)("showToggleAll",!1)("multiple",!0)}}const ite=function(){return{width:"30rem"}};function ste(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"div"),_(7,nte,2,5,"p-listbox",12),l(8,"small",13),g(9),m(10,"translate"),c()()(),l(11,"div",10)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(16,"small",13),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(24,"small",13),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"p-checkbox",18,19),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(30,"translate"),c(),l(31,"small",13),g(32),m(33,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,23,"settings.capture.hdhomerun.device_label")),a(2),q(A(39,ite)),a(1),p("ngIf",e.work.isReady),a(2),T(" ",f(10,25,"settings.capture.hdhomerun.device_desc")," "),a(4),S(f(14,27,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(18,29,"settings.capture.sigtimeout_desc")," "),a(4),S(f(22,31,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(26,33,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(30,35,"settings.capture.hdhomerun.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(33,37,"settings.capture.dvb.eitscan_ldesc")," ")}}function rte(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ote(t,i){1&t&&(k(0,"p-message",28),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function ate(t,i){if(1&t){const e=I();l(0,"div",22)(1,"div",23),_(2,rte,2,3,"p-message",24),_(3,ote,2,3,"p-message",25),c(),l(4,"p-button",26),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let lte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={isReady:!1,successCount:0,errorCount:0},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.selectedDevices=[],this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){this.captureCardService.GetCaptureDeviceList("HDHOMERUN").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevices()},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevices(){this.card.VideoDevice&&this.card.VideoDevice.split(",").forEach(n=>{const s=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(r=>n==r.VideoDevice.split(" ")[0]);s&&this.selectedDevices.push(s)}),this.work.isReady=!0}updateDevices(){let e="",n=[];this.selectedDevices.forEach(s=>{n.push(s.VideoDevice.split(" ")[0]),this.card.SignalTimeout=s.SignalTimeout,this.card.ChannelTimeout=s.ChannelTimeout}),n.sort(),console.log(n),n.forEach(s=>{e&&(e+=","),e+=s}),this.card.VideoDevice=e}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-hdhomerun"]],viewQuery:function(e,n){if(1&e&&(j(Zee,5),j(Xee,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","hdhomerunform",1,"ml-3","mr-3"],["hdhomerunform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","checkbox","showToggleAll","multiple","ngModelChange","onChange",4,"ngIf"],[1,"block"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","checkbox","showToggleAll","multiple","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,ete,2,3,"ng-template",4),_(6,tte,0,0,"ng-template",5),_(7,ste,34,40,"ng-template",6),_(8,ate,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,ws,Te,_e,dt,rn,qe,ve],pipes:[de],styles:[""]}),t})();const cte=["iptvform"],ute=["top"];function dte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.iptv.title")," ")}function pte(t,i){}function hte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",16),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(16,"small",14),g(17),m(18,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,10,"settings.capture.iptv.url_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,12,"settings.capture.iptv.url_desc")," "),a(4),S(f(14,14,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(18,16,"settings.capture.tunetimeout_desc")," ")}}function mte(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fte(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gte(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,mte,2,3,"p-message",19),_(3,fte,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _te=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"}),this.card.CardId||new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.currentForm.form.markAsDirty()})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-iptv"]],viewQuery:function(e,n){if(1&e&&(j(cte,5),j(ute,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","iptvform",1,"ml-3","mr-3"],["iptvform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,dte,2,3,"ng-template",4),_(6,pte,0,0,"ng-template",5),_(7,hte,19,18,"ng-template",6),_(8,gte,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const bte=["importform"],vte=["top"];function Cte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.import.title")," ")}function yte(t,i){}function wte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,3,"settings.capture.import.file_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,5,"settings.capture.import.file_desc")," ")}}function Tte(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Ste(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function xte(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,Tte,2,3,"p-message",17),_(3,Ste,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Dte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-import"]],viewQuery:function(e,n){if(1&e&&(j(bte,5),j(vte,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","importform",1,"ml-3","mr-3"],["importform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Cte,2,3,"ng-template",4),_(6,yte,0,0,"ng-template",5),_(7,wte,11,7,"ng-template",6),_(8,xte,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Mte=["demoform"],kte=["top"];function Ite(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.demo.title")," ")}function Ete(t,i){}function Rte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,3,"settings.capture.import.file_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,5,"settings.capture.demo.file_desc")," ")}}function Lte(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Ote(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Ate(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,Lte,2,3,"p-message",17),_(3,Ote,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Pte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-demo"]],viewQuery:function(e,n){if(1&e&&(j(Mte,5),j(kte,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","demoform",1,"ml-3","mr-3"],["demoform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Ite,2,3,"ng-template",4),_(6,Ete,0,0,"ng-template",5),_(7,Rte,11,7,"ng-template",6),_(8,Ate,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Fte=["connform"];function Nte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.iconnection.title")," ")}function Vte(t,i){}function Bte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",45),C("ngModelChange",function(s){return v(e),d(3).work.switchPort=s}),c(),l(5,"small",16),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.iconnection.switchport_label")),a(2),p("ngModel",e.work.switchPort)("showButtons",!0)("min",1)("max",e.diseqcTree.SwitchPorts)("step",1),a(2),T(" ",f(7,9,"settings.iconnection.switchport_desc")," ")}}function Hte(t,i){if(1&t){const e=I();l(0,"div")(1,"div",12)(2,"label",46),g(3),m(4,"translate"),c(),l(5,"p-inputNumber",47),C("ngModelChange",function(s){return v(e),d(3).work.rotorDegrees=s}),c(),k(6,"br")(7,"br"),l(8,"div",48)(9,"p-radioButton",49),C("ngModelChange",function(s){return v(e),d(3).work.hemisphere=s}),c(),l(10,"label",50),g(11),m(12,"translate"),c()(),l(13,"div",48)(14,"p-radioButton",51),C("ngModelChange",function(s){return v(e),d(3).work.hemisphere=s}),c(),l(15,"label",52),g(16),m(17,"translate"),c()(),l(18,"small",16),g(19),m(20,"translate"),c()()()}if(2&t){const e=d(3);a(3),S(f(4,10,"settings.iconnection.longitude_label")),a(2),p("ngModel",e.work.rotorDegrees)("min",0)("max",180)("maxFractionDigits",4),a(4),p("ngModel",e.work.hemisphere),a(2),S(f(12,12,"settings.iconnection.longitude_east")),a(3),p("ngModel",e.work.hemisphere),a(2),S(f(17,14,"settings.iconnection.longitude_west")),a(3),T(" ",f(20,16,"settings.iconnection.longitude_desc")," ")}}function qte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",53),g(2),m(3,"translate"),c(),l(4,"div",48)(5,"p-radioButton",54),C("ngModelChange",function(s){return v(e),d(3).work.scrPort=s}),c(),l(6,"label",55),g(7),m(8,"translate"),c()(),l(9,"div",48)(10,"p-radioButton",56),C("ngModelChange",function(s){return v(e),d(3).work.scrPort=s}),c(),l(11,"label",57),g(12),m(13,"translate"),c()(),l(14,"small",16),g(15),m(16,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,6,"settings.iconnection.unicablepos_label")),a(3),p("ngModel",e.work.scrPort),a(2),S(f(8,8,"settings.iconnection.unicablepos_porta")),a(3),p("ngModel",e.work.scrPort),a(2),S(f(13,10,"settings.iconnection.unicablepos_portb")),a(3),T(" ",f(16,12,"settings.iconnection.unicablepos_desc")," ")}}function Ute(t,i){1&t&&(l(0,"div",41),_(1,Bte,8,11,"div",42),_(2,Hte,21,18,"div",43),_(3,qte,17,14,"div",42),c()),2&t&&(p("ngSwitch",d(2).diseqcTree.Type),a(1),p("ngSwitchCase","switch"),a(1),p("ngSwitchCase","rotor"),a(1),p("ngSwitchCase","scr"))}function Gte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",58),g(2),m(3,"translate"),c(),l(4,"input",59,60),C("ngModelChange",function(s){return v(e),d(2).card.InputName=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.delivery_label")),a(2),p("ngModel",e.card.InputName),a(3),T(" ",f(8,5,"settings.iconnection.delivery_desc")," ")}}function zte(t,i){if(1&t){const e=I();l(0,"p-dropdown",63,60),C("ngModelChange",function(s){return v(e),d(3).card.InputName=s}),c()}if(2&t){const e=d(3);p("options",e.currentDevice.InputNames)("ngModel",e.card.InputName)}}function jte(t,i){if(1&t&&(l(0,"div",12)(1,"label",61),g(2),m(3,"translate"),c(),_(4,zte,2,2,"p-dropdown",62),l(5,"small",16),g(6),m(7,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.input_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(7,5,"settings.capture.inputname_desc")," ")}}function $te(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",64),g(2),m(3,"translate"),c(),l(4,"input",65,66),C("ngModelChange",function(s){return v(e),d(2).card.ExternalCommand=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.externalcmd_label")),a(2),p("ngModel",e.card.ExternalCommand),a(3),T(" ",f(8,5,"settings.iconnection.externalcmd_desc")," ")}}function Wte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",67),g(2),m(3,"translate"),c(),l(4,"input",68,69),C("ngModelChange",function(s){return v(e),d(2).card.TuneChan=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.tunechan_label")),a(2),p("ngModel",e.card.TuneChan),a(3),T(" ",f(8,5,"settings.iconnection.tunechan_desc")," ")}}const Id=function(){return{minWidth:"400px"}};function Kte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",70),g(2),m(3,"translate"),c(),l(4,"p-dropdown",71,72),C("ngModelChange",function(s){return v(e),d(2).card.Quicktune=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.iconnection.quicktune_label")),a(2),q(A(12,Id)),p("options",e.quickTuneValues)("ngModel",e.card.Quicktune)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.iconnection.quicktune_desc")," ")}}function Qte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",73,74),C("ngModelChange",function(s){return v(e),d(2).card.DishnetEIT=s}),m(3,"translate"),c(),l(4,"small",16),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.iconnection.dishneteit_label")),p("ngModel",e.card.DishnetEIT)("binary",!0),a(4),T(" ",f(6,6,"settings.iconnection.dishneteit_desc")," ")}}function Jte(t,i){if(1&t&&(l(0,"p-fieldset",75),m(1,"translate"),k(2,"app-channelscan",76),c()),2&t){const e=d(2);D("legend",f(1,7,"settings.iconnection.scan_title")),p("collapsed",!0)("toggleable",!0),a(2),p("card",e.card)("cardList",e.cardList)("iconnection",e)("videoSourceLookup",e.videoSourceLookup)}}function Yte(t,i){if(1&t){const e=I();l(0,"p-button",77),C("click",function(){return v(e),d(2).work.fetchChannelsDialog=!1}),m(1,"translate"),c(),l(2,"p-button",78),C("click",function(){return v(e),d(2).fetchChannels()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const Zte=function(t){return{num:t}},Xte=function(){return{width:"50vw"}};function ene(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9),_(2,Ute,4,4,"div",10),_(3,Gte,9,7,"div",11),_(4,jte,8,7,"div",11),l(5,"div",12)(6,"label",13),g(7),m(8,"translate"),c(),l(9,"input",14,15),C("ngModelChange",function(s){return v(e),d().card.DisplayName=s}),c(),l(11,"small",16),g(12),m(13,"translate"),c()(),l(14,"div",12)(15,"label",17),g(16),m(17,"translate"),c(),l(18,"p-dropdown",18,19),C("ngModelChange",function(s){return v(e),d().card.SourceId=s})("onChange",function(){return v(e),d().fillChannelList()}),c(),l(20,"small",16),g(21),m(22,"translate"),c()(),_(23,$te,9,7,"div",11),_(24,Wte,9,7,"div",11),_(25,Kte,9,13,"div",11),_(26,Qte,7,8,"div",11),_(27,Jte,3,9,"p-fieldset",20),k(28,"br")(29,"br"),l(30,"div",12)(31,"div",8)(32,"div",21)(33,"p-button",22),C("onClick",function(){return v(e),d().work.fetchChannelsDialog=!0}),m(34,"translate"),c()(),l(35,"div",21),g(36),m(37,"translate"),c()(),l(38,"small",16),g(39),m(40,"translate"),c()(),l(41,"p-dialog",23),C("visibleChange",function(s){return v(e),d().work.fetchChannelsDialog=s}),l(42,"p"),g(43),m(44,"translate"),c(),l(45,"p"),g(46),m(47,"translate"),c(),_(48,Yte,4,6,"ng-template",7),c(),l(49,"div",12)(50,"label",24),g(51),m(52,"translate"),c(),l(53,"p-dropdown",25,26),C("ngModelChange",function(s){return v(e),d().card.StartChannel=s}),c(),l(55,"small",16),g(56),m(57,"translate"),c()(),l(58,"p-fieldset",27),m(59,"translate"),l(60,"div",12)(61,"label",28),g(62),m(63,"translate"),c(),l(64,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().card.RecLimit=s}),c(),l(65,"small",16),g(66),m(67,"translate"),c()(),l(68,"div",12)(69,"p-checkbox",30,31),C("ngModelChange",function(s){return v(e),d().card.SchedGroup=s}),m(71,"translate"),c(),l(72,"small",16),g(73),m(74,"translate"),c()(),l(75,"div",12)(76,"label",32),g(77),m(78,"translate"),c(),l(79,"p-inputNumber",33),C("ngModelChange",function(s){return v(e),d().card.RecPriority=s}),c(),l(80,"small",16),g(81),m(82,"translate"),c()(),l(83,"div",12)(84,"label",34),g(85),m(86,"translate"),c(),l(87,"p-inputNumber",35),C("ngModelChange",function(s){return v(e),d().card.SchedOrder=s}),c(),l(88,"small",16),g(89),m(90,"translate"),c()(),l(91,"div",12)(92,"label",36),g(93),m(94,"translate"),c(),l(95,"p-inputNumber",37),C("ngModelChange",function(s){return v(e),d().card.LiveTVOrder=s}),c(),l(96,"small",16),g(97),m(98,"translate"),c()(),l(99,"div",12)(100,"label",38),g(101),m(102,"translate"),c(),l(103,"p-dropdown",39,40),C("ngModelChange",function(s){return v(e),d().work.inputGroupName=s}),c(),l(105,"small",16),g(106),m(107,"translate"),c()()()()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.diseqcTree),a(1),p("ngIf","DVB"==e.card.CardType),a(1),p("ngIf","DVB"!=e.card.CardType),a(3),S(f(8,80,"settings.iconnection.displayname_label")),a(2),p("ngModel",e.card.DisplayName),a(3),T(" ",f(13,82,"settings.iconnection.displayname_desc")," "),a(4),S(f(17,84,"settings.iconnection.sourceid_label")),a(2),q(A(129,Id)),p("options",e.videoSourceList.VideoSourceList.VideoSources)("ngModel",e.card.SourceId)("editable",!1)("maxlength",0),a(3),T(" ",f(22,86,"settings.iconnection.sourceid_desc")," "),a(2),p("ngIf",e.work.isEncoder||e.work.isUnscanable),a(1),p("ngIf",e.work.showPresetTuner),a(1),p("ngIf",!e.work.isEncoder&&!e.work.isUnscanable),a(1),p("ngIf","DVB"==e.card.CardType),a(1),p("ngIf",!e.work.isUnscanable),a(6),D("label",f(34,88,"settings.iconnection.fetch.label")),p("disabled",!e.card.SourceId||n.dirty||1==e.work.fetchStatus||e.setupService.schedulingEnabled),a(3),T(" \xa0\xa0",Dt(37,90,e.fetchMessages[e.work.fetchStatus],z(130,Zte,e.work.fetchCount))," "),a(3),T(" ",f(40,93,"settings.iconnection.fetch.desc")," "),a(2),q(A(132,Xte)),p("visible",e.work.fetchChannelsDialog)("modal",!0)("draggable",!1)("resizable",!1),a(2),S(f(44,95,"settings.iconnection.fetch.warning")),a(3),S(f(47,97,"settings.common.ru_sure")),a(5),S(f(52,99,"settings.iconnection.startchan_label")),a(2),q(A(133,Id)),p("options",e.sourceChannels)("ngModel",e.card.StartChannel)("editable",!1),a(3),T(" ",f(57,101,"settings.iconnection.startchan_desc")," "),a(2),D("legend",f(59,103,"settings.iconnection.interact_title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(63,105,"settings.iconnection.maxrec_label")),a(2),p("ngModel",e.card.RecLimit)("showButtons",!0)("min",1)("max",10)("step",1),a(2),T(" ",f(67,107,"settings.iconnection.maxrec_desc")," "),a(3),D("label",f(71,109,"settings.iconnection.schedgrp_label")),p("ngModel",e.card.SchedGroup)("binary",!0),a(4),T(" ",f(74,111,"settings.iconnection.schedgrp_desc")," "),a(4),S(f(78,113,"settings.iconnection.recpri_label")),a(2),p("ngModel",e.card.RecPriority)("showButtons",!0)("min",-99)("max",99)("step",1),a(2),T(" ",f(82,115,"settings.iconnection.recpri_desc")," "),a(4),S(f(86,117,"settings.iconnection.schedorder_label")),a(2),p("ngModel",e.card.SchedOrder)("showButtons",!0)("min",0)("max",99)("step",1),a(2),T(" ",f(90,119,"settings.iconnection.schedorder_desc")," "),a(4),S(f(94,121,"settings.iconnection.liveorder_label")),a(2),p("ngModel",e.card.LiveTVOrder)("showButtons",!0)("min",0)("max",99)("step",1),a(2),T(" ",f(98,123,"settings.iconnection.liveorder_desc")," "),a(4),S(f(102,125,"settings.iconnection.inpgroup_label")),a(2),q(A(134,Id)),p("options",e.selectGroups)("ngModel",e.work.inputGroupName)("editable",!0),a(3),T(" ",f(107,127,"settings.iconnection.inpgroup_desc")," ")}}function tne(t,i){1&t&&(k(0,"p-message",84),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nne(t,i){1&t&&(k(0,"p-message",85),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function ine(t,i){if(1&t){const e=I();l(0,"div",79)(1,"div",80),_(2,tne,2,3,"p-message",81),_(3,nne,2,3,"p-message",82),c(),l(4,"p-button",83),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let SS=(()=>{class t{constructor(e,n,s,r){this.translate=e,this.channelService=n,this.captureCardService=s,this.setupService=r,this.allChannels=[],this.sourceChannels=[],this.inputGroups=[],this.selectGroups=[],this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:["MPEG2TS"]},this.work={successCount:0,errorCount:0,expectedCount:0,recLimitUpd:!1,reloadGroups:!1,isEncoder:!1,isUnscanable:!1,hasTuner:!1,showPresetTuner:!1,inputGroupName:"",orgInputGroupName:"",fetchChannelsDialog:!1,fetchStatus:0,fetchCount:0,switchPort:0,rotorDegrees:0,scrPort:"",hemisphere:1,isReady:!1},this.deviceFree=new ct,this.orgInputGroupIds=[],this.fetchMessages=["","settings.iconnection.fetch.inprog","settings.iconnection.fetch.complete","settings.iconnection.fetch.failed"],this.messages={devNotExist:"settings.capture.dvb.devNotExist"},this.preEncodedTypes=["DVB","FIREWIRE","HDHOMERUN","FREEBOX","IMPORT","DEMO","ASI","CETON","VBOX","SATIP"],this.unscanableTypes=["FIREWIRE","HDPVR","IMPORT","DEMO","GO7007","MJPEG"],this.hasTunerTypes=["DVB","HDHOMERUN","FREEBOX","CETON","VBOX","SATIP"],this.quickTuneValues=[{prompt:"settings.iconnection.quicktune.never",value:0},{prompt:"settings.iconnection.quicktune.livetv",value:1},{prompt:"settings.iconnection.quicktune.always",value:2}],this.saveObserver={next:o=>{o.bool?(console.log("saveObserver success",o),this.work.successCount++,this.work.recLimitUpd&&(this.work.successCount==this.work.expectedCount?this.captureCardService.SetInputMaxRecordings(this.card.CardId,this.card.RecLimit).subscribe(this.saveObserver):this.work.successCount==this.work.expectedCount+1&&(this.parentComponent.loadCards(!1),this.work.recLimitUpd=!1)),this.work.successCount==this.work.expectedCount&&this.work.reloadGroups&&(this.loadInputGroups(),this.work.reloadGroups=!1)):(console.log("saveObserver error",o),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:o=>{console.log("saveObserver error",o),this.work.errorCount++,this.currentForm.form.markAsDirty()}},this.quickTuneValues.forEach(o=>e.get(o.prompt).subscribe(u=>o.prompt=u)),this.loadChannels(),this.loadInputGroups()}loadChannels(){this.channelService.GetChannelInfoList({Details:!0}).subscribe(n=>{this.allChannels=n.ChannelInfoList.ChannelInfos,this.fillChannelList()})}loadInputGroups(){this.captureCardService.GetInputGroupList().subscribe(e=>{this.inputGroups=e.InputGroupList.InputGroups,this.inputGroups.forEach(n=>{if(Qu("user:")){const s=n.InputGroupName.substring(5);-1==this.selectGroups.findIndex(r=>s==r.InputGroupName)&&this.selectGroups.push({CardInputId:0,InputGroupId:n.InputGroupId,InputGroupName:s}),n.CardInputId==this.card.CardId&&(this.work.inputGroupName||(this.work.inputGroupName=s,this.work.orgInputGroupName=s),this.orgInputGroupIds.push(n.InputGroupId))}})})}ngOnInit(){this.work.isEncoder=this.preEncodedTypes.indexOf(this.card.CardType)<0,this.work.isUnscanable=this.unscanableTypes.indexOf(this.card.CardType)>=0,this.work.hasTuner=this.hasTunerTypes.indexOf(this.card.CardType)>=0,(this.work.isEncoder||this.work.isUnscanable)&&(this.work.hasTuner||"EXTERNAL"==this.card.CardType)&&(this.work.showPresetTuner=!0),"DVB"==this.card.CardType&&this.loadDiseqc(),setTimeout(()=>{this.card.DisplayName?this.currentForm.form.markAsPristine():(this.card.DisplayName="Input "+this.card.CardId,this.currentForm.form.markAsDirty())},100),this.captureCardService.GetCaptureDeviceList(this.card.CardType).subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice(),this.deviceFree.next(!0)},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}})}setupDevice(){if(this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:["MPEG2TS"]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName),this.currentDevice.InputNames.includes("MPEG2TS")||this.currentDevice.InputNames.push("MPEG2TS")),this.work.isReady=!0}loadDiseqc(){this.captureCardService.GetDiseqcTreeList().subscribe({next:e=>{this.diseqcTreeList=e,this.setupDiseqc()},error:e=>{console.log("GetDiseqcTreeList",e),this.work.errorCount++}})}setupDiseqc(){let e=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(n=>n.DiSEqCId==this.card.DiSEqCId);if(e)switch(this.diseqcTree=e,this.diseqcTree.Type){case"switch":case"rotor":case"scr":this.captureCardService.GetDiseqcConfigList().subscribe({next:n=>{let s=n.DiseqcConfigList.DiseqcConfigs.find(r=>r.CardId==this.card.CardId&&r.DiSEqCId==this.card.DiSEqCId);if(this.diseqcConfig=s||{CardId:this.card.CardId,DiSEqCId:this.card.DiSEqCId,Value:""},"switch"==this.diseqcTree.Type)this.work.switchPort=Number.parseInt(this.diseqcConfig.Value)-1,Number.isNaN(this.work.switchPort)&&(this.work.switchPort=0);else if("rotor"==this.diseqcTree.Type)this.work.rotorDegrees=Number.parseFloat(this.diseqcConfig.Value),Number.isNaN(this.work.rotorDegrees)&&(this.work.rotorDegrees=0),this.work.rotorDegrees<0?(this.work.hemisphere=-1,this.work.rotorDegrees=-this.work.rotorDegrees):this.work.hemisphere=1;else if("scr"==this.diseqcTree.Type)switch(this.diseqcConfig.Value){case"0":this.work.scrPort="A";break;case"1":this.work.scrPort="B";break;default:this.work.scrPort=""}},error:n=>{console.log("GetDiseqcTreeList",n),this.work.errorCount++}})}}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}fillChannelList(){this.sourceChannels=this.allChannels.filter(e=>e.SourceId==this.card.SourceId),this.sourceChannels.find(e=>e.ChanNum==this.card.StartChannel)||(this.card.StartChannel="")}fetchChannels(){this.work.fetchChannelsDialog=!1;let e={SourceId:this.card.SourceId,CardId:this.card.CardId,WaitForFinish:!0};this.work.fetchStatus=1,this.channelService.FetchChannelsFromSource(e).subscribe({next:n=>{this.work.fetchStatus=n.int>0?2:3,this.work.fetchCount=n.int,this.loadChannels()},error:n=>{console.log("fetchChannels",n),this.work.fetchStatus=3,this.work.fetchCount=0}})}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.work.expectedCount=0,this.work.inputGroupName!=this.work.orgInputGroupName?this.work.inputGroupName?this.captureCardService.AddUserInputGroup(this.work.inputGroupName).subscribe({next:n=>{this.saveCard(n.int)},error:n=>{console.log("saveForm error",n),this.work.errorCount++,this.currentForm.form.markAsDirty()}}):this.saveCard(-1):this.saveCard(0)}saveCard(e){0!=e&&(this.work.reloadGroups=!0);let n=0;if(this.work.recLimitUpd=!1,this.cardList.CaptureCardList.CaptureCards.forEach(s=>{(s.CardId==this.card.CardId||s.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(s.CardId,"inputname",s.InputName=this.card.InputName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"displayname",s.DisplayName=this.card.DisplayName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"sourceid",String(s.SourceId=this.card.SourceId)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"quicktune",String(s.Quicktune=this.card.Quicktune)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"dishnet_eit",(s.DishnetEIT=this.card.DishnetEIT)?"1":"0").subscribe(this.saveObserver),this.card.StartChannel&&(this.captureCardService.UpdateCaptureCard(s.CardId,"startchan",s.StartChannel=this.card.StartChannel).subscribe(this.saveObserver),this.work.expectedCount++),this.captureCardService.UpdateCaptureCard(s.CardId,"recpriority",String(s.RecPriority=this.card.RecPriority)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"livetvorder",String(s.LiveTVOrder=this.card.LiveTVOrder)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"reclimit",String(s.RecLimit=this.card.RecLimit)).subscribe(this.saveObserver),this.card.SchedGroup&&this.card.CardId!=s.CardId?(s.SchedGroup=!1,s.SchedOrder=0):(s.SchedGroup=this.card.SchedGroup,s.SchedOrder=this.card.SchedOrder),this.captureCardService.UpdateCaptureCard(s.CardId,"schedgroup",s.SchedGroup?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"schedorder",String(s.SchedOrder)).subscribe(this.saveObserver),this.work.expectedCount+=10,0!=e&&this.orgInputGroupIds.forEach(r=>{this.captureCardService.UnlinkInputGroup(s.CardId,r).subscribe(this.saveObserver),this.work.expectedCount++}),e>0&&(this.captureCardService.LinkInputGroup(s.CardId,e).subscribe(this.saveObserver),this.work.expectedCount++),n++)}),n!=this.card.RecLimit&&(this.work.recLimitUpd=!0),this.diseqcConfig){let s="";if("switch"==this.diseqcTree.Type)s=(this.work.switchPort-1).toString();else if("rotor"==this.diseqcTree.Type)s=(this.work.rotorDegrees*this.work.hemisphere).toString();else if("scr"==this.diseqcTree.Type)switch(this.work.scrPort){case"A":default:s="0";break;case"B":s="1"}s!=this.diseqcConfig.Value&&(this.diseqcConfig.Value=s,this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe(r=>{this.captureCardService.AddDiseqcConfig(this.diseqcConfig).subscribe(this.saveObserver)}))}}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Or),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-iconnection"]],viewQuery:function(e,n){if(1&e&&j(Fte,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{card:"card",cardList:"cardList",videoSourceLookup:"videoSourceLookup",videoSourceList:"videoSourceList",parentComponent:"parentComponent"},decls:9,vars:0,consts:[["name","connform",1,"ml-3","mr-3"],["connform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[3,"ngSwitch",4,"ngIf"],["class","form-group field",4,"ngIf"],[1,"form-group","field"],["for","DisplayName",1,"label","block"],["pInputText","","id","DisplayName","name","DisplayName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["DisplayName","ngModel"],[1,"block"],["for","SourceId",1,"label","block"],["optionLabel","SourceName","optionValue","Id","name","SourceId",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SourceId","ngModel"],["class","mb-4 w-full",3,"legend","collapsed","toggleable",4,"ngIf"],[2,"display","flex","align-items","center"],["icon","pi pi-download","iconPos","left",3,"label","disabled","onClick"],["header","Fetch Channels",3,"visible","modal","draggable","resizable","visibleChange"],["for","StartChannel",1,"label","block"],["placeholder","Select Item","optionLabel","ChanNum","optionValue","ChanNum","scrollHeight","400px","name","StartChannel",3,"options","ngModel","editable","ngModelChange"],["StartChannel","ngModel"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","RecLimit",1,"label","block"],["name","RecLimit","id","RecLimit",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","SchedGroup","name","SchedGroup",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBWaitForSeqStart","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","SchedOrder",1,"label","block"],["name","SchedOrder","id","SchedOrder",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","LiveTVOrder",1,"label","block"],["name","LiveTVOrder","id","LiveTVOrder",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","inputGroupName",1,"label","block"],["placeholder","Optional Group Name","optionLabel","InputGroupName","optionValue","InputGroupName","scrollHeight","400px","name","inputGroupName",3,"options","ngModel","editable","ngModelChange"],["inputGroupName","ngModel"],[3,"ngSwitch"],["class","form-group field",4,"ngSwitchCase"],[4,"ngSwitchCase"],["for","Port",1,"label","block"],["name","Port","id","Port",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Degrees",1,"label","block"],["name","Degrees","id","Degrees",3,"ngModel","min","max","maxFractionDigits","ngModelChange"],[1,"field-radiobutton"],["name","hemisphere","value","1","inputId","east",3,"ngModel","ngModelChange"],["for","east",1,"label","block"],["name","hemisphere","value","-1","inputId","west",3,"ngModel","ngModelChange"],["for","west",1,"label","block"],[1,"label","block"],["name","scrPort","value","A","inputId","portA",3,"ngModel","ngModelChange"],["for","portA",1,"label","block"],["name","scrPort","value","B","inputId","portB",3,"ngModel","ngModelChange"],["for","portB",1,"label","block"],["for","Delivery",1,"label","block"],["pInputText","","id","Delivery","name","Delivery","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["InputName","ngModel"],["for","InputName",1,"label","block"],["name","InputName",3,"options","ngModel","ngModelChange",4,"ngIf"],["name","InputName",3,"options","ngModel","ngModelChange"],["for","ExternalCommand",1,"label","block"],["pInputText","","id","ExternalCommand","name","ExternalCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ExternalCommand","ngModel"],["for","TuneChan",1,"label","block"],["pInputText","","id","TuneChan","name","TuneChan",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["TuneChan","ngModel"],["for","Quicktune",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Quicktune",3,"options","ngModel","editable","maxlength","ngModelChange"],["Quicktune","ngModel"],["inputId","DishnetEIT","name","DishnetEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DishnetEIT","ngModel"],[1,"mb-4","w-full",3,"legend","collapsed","toggleable"],[3,"card","cardList","iconnection","videoSourceLookup"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Nte,2,3,"ng-template",4),_(6,Vte,0,0,"ng-template",5),_(7,ene,108,135,"ng-template",6),_(8,ine,6,6,"ng-template",7),c()())},styles:[""]}),t})();function sne(t,i){if(1&t){const e=I();l(0,"p-button",10),C("onClick",function(){return v(e),d().displayNewDialog=!1}),m(1,"translate"),c(),l(2,"p-button",11),C("onClick",function(){return v(e),d().newProfile()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.rejectName())}}function rne(t,i){1&t&&(l(0,"div",12),k(1,"br")(2,"p-message",13),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function one(t,i){1&t&&(l(0,"div",12),k(1,"br")(2,"p-message",14),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function ane(t,i){if(1&t&&(l(0,"div",18)(1,"div",19),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d();a(2),T(" ",n.Name," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function lne(t,i){if(1&t){const e=I();l(0,"p-button",22),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",23),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const xS=function(){return{width:"50vw"}},cne=function(t,i){return{ProfileName:t,GroupName:i}};function une(t,i){if(1&t){const e=I();l(0,"p-button",20),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",2),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,lne,4,6,"ng-template",5),c(),k(11,"app-recprofile",21)}if(2&t){const e=d(),n=e.index,s=e.$implicit,r=d();D("label",f(1,14,"settings.rprofiles.delete_this")),p("disabled",!r.group.RecProfiles[n].Id||r.setupService.schedulingEnabled),a(2),q(A(23,xS)),D("header",f(3,16,"settings.rprofiles.delete_this")),p("visible",r.displayDeleteThis[n])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,18,"settings.common.ru_sure")),a(3),S(Dt(9,20,"settings.rprofiles.delete_details",We(24,cne,r.group.RecProfiles[n].Name,r.group.Name))),a(3),p("profile",s)("group",r.group)("parentComponent",r)}}function dne(t,i){if(1&t){const e=I();l(0,"p-accordionTab",15),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,ane,5,2,"ng-template",16),_(2,une,12,27,"ng-template",17),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}let DS=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.readyCount=0,this.displayNewDialog=!1,this.newProfileName="",this.successCount=0,this.expectedCount=0,this.errorCount=0,this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.delObserver={next:r=>{r.bool?(this.successCount++,this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1)):(this.errorCount++,this.deletedTab=-1)},error:r=>{console.error(r),this.errorCount++}},s.get(this.dirtyText).subscribe(r=>this.dirtyText=r),s.get(this.warningText).subscribe(r=>this.warningText=r),s.get(this.deletedText).subscribe(r=>this.deletedText=r),s.get(this.newText).subscribe(r=>this.newText=r)}ngOnInit(){let e=this.parentComponent.groups.findIndex(n=>n===this.group);this.parentComponent.profileGroups[e]=this}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab]&&this.forms[this.currentTab].dirty?this.dirtyText:this.group.RecProfiles[this.currentTab].Id?"":this.newText)}newProfile(){this.displayNewDialog=!1;for(let n=0;nn.Name==e)}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}allClean(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-profile-group"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},inputs:{group:"group",parentComponent:"parentComponent"},decls:19,vars:24,consts:[[1,"block","card","w-full"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pInputText","","id","Name","name","Name","autofocus","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Name","ngModel"],["pTemplate","footer"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"profile","group","parentComponent"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"h3"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayNewDialog=!0}),m(5,"translate"),c(),l(6,"p-dialog",2),C("visibleChange",function(r){return n.displayNewDialog=r}),m(7,"translate"),l(8,"p"),g(9),m(10,"translate"),c(),l(11,"input",3,4),C("ngModelChange",function(r){return n.newProfileName=r}),c(),_(13,sne,4,7,"ng-template",5),c(),l(14,"div",6),_(15,rne,5,3,"div",7),_(16,one,5,3,"div",7),c(),l(17,"p-accordion",8),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(18,dne,3,2,"p-accordionTab",9),c()()),2&e&&(a(2),$e("",f(3,15,"settings.rprofiles.grouptitle")," ",n.group.Name,""),a(2),D("label",f(5,17,"settings.rprofiles.new_profile")),a(2),q(A(23,xS)),D("header",f(7,19,"settings.rprofiles.new_profile")),p("visible",n.displayNewDialog)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(10,21,"settings.rprofiles.enter_profile_name")),a(2),p("ngModel",n.newProfileName),a(4),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.group.RecProfiles))},styles:[""]}),t})();const pne=["recprofform"],hne=["top"];function mne(t,i){if(1&t&&(g(0),m(1,"translate")),2&t){const e=d();$e(" ",f(1,2,"settings.rprofiles.proftitle")," ",e.profile.Name," ")}}function fne(t,i){}function gne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",13,14),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("autotranscode",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.rprofiles.autotranscode_label")),p("ngModel",e.profile.RecProfParams[e.findIx("autotranscode",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.autotranscode_desc")," ")}}function _ne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",16),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",17),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("width","480")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.rprofiles.width_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("width","480")].Value)("showButtons",!0)("min",160)("max",720)("step",16),a(2),T(" ",f(7,9,"settings.rprofiles.width_desc")," ")}}function bne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",18),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",19),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("height","480")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.rprofiles.height_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("height","480")].Value)("showButtons",!0)("min",160)("max",480)("step",16),a(2),T(" ",f(7,9,"settings.rprofiles.height_desc")," ")}}const xs=function(){return{minWidth:"400px"}};function vne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",20),g(2),m(3,"translate"),c(),l(4,"p-dropdown",21,22),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("recordingtype","all")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.rprofiles.recordingtype_label")),a(2),q(A(12,xs)),p("options",e.recordingtypeOptions)("ngModel",e.profile.RecProfParams[e.findIx("recordingtype","all")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.recordingtype_desc")," ")}}function Cne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",23,24),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("recordmpts",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.rprofiles.recordmpts_label")),p("ngModel",e.profile.RecProfParams[e.findIx("recordmpts",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.recordmpts_desc")," ")}}function yne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",26),g(2),m(3,"translate"),c(),l(4,"p-dropdown",27,28),C("ngModelChange",function(s){return v(e),d(3).profile.VideoCodec=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.videocodec_label")),a(2),q(A(9,xs)),p("options",e.params.Video)("ngModel",e.profile.VideoCodec)("editable",!1)("maxlength",0)}}function wne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",29),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",30),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpegquality","170")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpegquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpegquality","170")].Value)("showButtons",!0)("min",1)("max",255)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegquality_desc")," ")}}function Tne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",31),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",32),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpeglumafilter","0")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpeglumafilter_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpeglumafilter","0")].Value)("showButtons",!0)("min",0)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegfilter_desc")," ")}}function Sne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",33),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",34),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpegchromafilter","0")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpegchromafilter_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpegchromafilter","0")].Value)("showButtons",!0)("min",0)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegfilter_desc")," ")}}function xne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",35),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",36),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4bitrate","2200")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4bitrate","2200")].Value)("showButtons",!0)("min",100)("max",8e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4bitrate_desc")," ")}}function Dne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",37),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",38),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4maxquality","2")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4maxquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4maxquality","2")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function Mne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",39),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",40),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4minquality","15")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4minquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4minquality","15")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function kne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",42),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpegquality","100")].Value=s}),c(),k(5,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,6,"settings.rprofiles.hardwaremjpegquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpegquality","100")].Value)("showButtons",!0)("min",0)("max",100)("step",1)}}const MS=function(){return["1","2","4"]};function Ine(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",43),g(2),m(3,"translate"),c(),l(4,"p-dropdown",44,45),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpeghdecimation","2")].Value=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.hardwaremjpeghdecimation_label")),a(2),q(A(9,xs)),p("options",A(10,MS))("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpeghdecimation","2")].Value)("editable",!1)("maxlength",0)}}function Ene(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",46),g(2),m(3,"translate"),c(),l(4,"p-dropdown",47,48),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpegvdecimation","2")].Value=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.hardwaremjpegvdecimation_label")),a(2),q(A(9,xs)),p("options",A(10,MS))("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpegvdecimation","2")].Value)("editable",!1)("maxlength",0)}}function Rne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",49),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",50),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4qualdiff","3")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4qualdiff_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4qualdiff","3")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function Lne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",51),g(2),m(3,"translate"),c(),l(4,"p-dropdown",52,53),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2streamtype","2")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2streamtype_label")),a(2),q(A(12,xs)),p("options",e.streamTypeOptions)("ngModel",e.profile.RecProfParams[e.findIx("mpeg2streamtype","2")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2streamtype_desc")," ")}}const One=function(){return["Square","4:3","16:9","2.21:1"]};function Ane(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",54),g(2),m(3,"translate"),c(),l(4,"p-dropdown",55,56),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2aspectratio","Square")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2aspectratio_label")),a(2),q(A(12,xs)),p("options",A(13,One))("ngModel",e.profile.RecProfParams[e.findIx("mpeg2aspectratio","Square")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2aspectratio_desc")," ")}}function Pne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",57),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",58),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2bitrate","6000")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2bitrate","6000")].Value)("showButtons",!0)("min",1e3)("max",16e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2bitrate_desc")," ")}}function Fne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",59),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",60),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2maxbitrate","4500")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2maxbitrate","4500")].Value)("showButtons",!0)("min",1e3)("max",16e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Nne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",61),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",62),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("low_mpeg4avgbitrate","4500")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",63),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",64),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("low_mpeg4peakbitrate","6000")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.lowres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("low_mpeg4avgbitrate","4500")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("low_mpeg4peakbitrate","6000")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Vne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",65),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",66),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("medium_mpeg4avgbitrate","9000")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",67),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",68),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("medium_mpeg4peakbitrate","11000")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.medres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("medium_mpeg4avgbitrate","9000")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("medium_mpeg4peakbitrate","11000")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Bne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",69),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",70),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("high_mpeg4avgbitrate","13500")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",71),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",72),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("high_mpeg4peakbitrate","20200")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.highres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("high_mpeg4avgbitrate","13500")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("high_mpeg4peakbitrate","20200")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Hne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",73,74),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("scalebitrate",!0)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.scalebitrate_label")),p("ngModel",e.profile.RecProfParams[e.findIx("scalebitrate",!0)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.scalebitrate_desc")," ")}}function qne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",75,76),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionvhq",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionvhq_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionvhq",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionvhq_desc")," ")}}function Une(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",77,78),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4option4mv",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4option4mv_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4option4mv",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4option4mv_desc")," ")}}function Gne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",79,80),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionidct",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionidct_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionidct",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionidct_desc")," ")}}function zne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",81,82),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionime",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionime_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionime",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionime_desc")," ")}}function jne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",83),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",84),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("encodingthreadcount","1")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.encodingthreadcount_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("encodingthreadcount","1")].Value)("showButtons",!0)("min",1)("max",8)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.encodingthreadcount_desc")," ")}}function $ne(t,i){if(1&t&&(l(0,"p-fieldset",25),m(1,"translate"),_(2,yne,7,10,"div",10),_(3,wne,8,11,"div",10),_(4,Tne,8,11,"div",10),_(5,Sne,8,11,"div",10),_(6,xne,8,11,"div",10),_(7,Dne,8,11,"div",10),_(8,Mne,8,11,"div",10),_(9,kne,6,8,"div",10),_(10,Ine,7,11,"div",10),_(11,Ene,7,11,"div",10),_(12,Rne,8,11,"div",10),_(13,Lne,9,13,"div",10),_(14,Ane,9,14,"div",10),_(15,Pne,8,11,"div",10),_(16,Fne,8,11,"div",10),_(17,Nne,18,27,"p-fieldset",11),_(18,Vne,18,27,"p-fieldset",11),_(19,Bne,18,27,"p-fieldset",11),_(20,Hne,7,8,"div",10),_(21,qne,7,8,"div",10),_(22,Une,7,8,"div",10),_(23,Gne,7,8,"div",10),_(24,zne,7,8,"div",10),_(25,jne,8,11,"div",10),c()),2&t){const e=d(2);D("legend",f(1,27,"settings.rprofiles.video_label")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",e.params.Video.length>0),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2"==e.profile.VideoCodec||"MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec||"MPEG-2"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec||"MPEG-2"==e.profile.VideoCodec)}}function Wne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",85),g(2),m(3,"translate"),c(),l(4,"p-dropdown",86,87),C("ngModelChange",function(s){return v(e),d(3).profile.AudioCodec=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.audiocodec_label")),a(2),q(A(9,xs)),p("options",e.params.Audio)("ngModel",e.profile.AudioCodec)("editable",!1)("maxlength",0)}}function Kne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",88),g(2),m(3,"translate"),c(),l(4,"p-dropdown",89,90),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("samplerate","32000")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.samplerate_label")),a(2),q(A(12,xs)),p("options",e.samplerateOptions)("ngModel",e.profile.RecProfParams[e.findIx("samplerate","32000")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.samplerate_desc")," ")}}function Qne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",91),g(2),m(3,"translate"),c(),l(4,"p-dropdown",92,93),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2language","32000")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2language_label")),a(2),q(A(12,xs)),p("options",e.mpeg2languageOptions)("ngModel",e.profile.RecProfParams[e.findIx("mpeg2language","32000")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2language_desc")," ")}}function Jne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",94),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",95),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mp3quality","1")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mp3quality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mp3quality","1")].Value)("showButtons",!0)("min",1)("max",9)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mp3quality_desc")," ")}}function Yne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",96),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",97),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("volume","90")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.volume_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("volume","90")].Value)("showButtons",!0)("min",0)("max",100)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.volume_desc")," ")}}function Zne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",98),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",99),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2audvolume","90")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.volume_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2audvolume","90")].Value)("showButtons",!0)("min",0)("max",100)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2audvolume_desc")," ")}}function Xne(t,i){if(1&t&&(l(0,"p-fieldset",25),m(1,"translate"),_(2,Wne,7,10,"div",10),_(3,Kne,9,13,"div",10),_(4,Qne,9,13,"div",10),_(5,Jne,8,11,"div",10),_(6,Yne,8,11,"div",10),_(7,Zne,8,11,"div",10),c()),2&t){const e=d(2);D("legend",f(1,9,"settings.rprofiles.audio_label")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",e.params.Audio.length>0),a(1),p("ngIf","MP3"==e.profile.AudioCodec||"MPEG-2 Hardware Encoder"==e.profile.AudioCodec||"Uncompressed"==e.profile.AudioCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.AudioCodec),a(1),p("ngIf","MP3"==e.profile.AudioCodec),a(1),p("ngIf","MP3"==e.profile.AudioCodec||"Uncompressed"==e.profile.AudioCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.AudioCodec)}}function eie(t,i){if(1&t&&(l(0,"div",8)(1,"div",9),_(2,gne,7,8,"div",10),_(3,_ne,8,11,"div",10),_(4,bne,8,11,"div",10),_(5,vne,9,13,"div",10),_(6,Cne,7,8,"div",10),_(7,$ne,26,29,"p-fieldset",11),_(8,Xne,8,11,"p-fieldset",11),c()()),2&t){const e=d();a(2),p("ngIf",e.params.Param.includes("autotranscode")),a(1),p("ngIf",e.params.Param.includes("width")),a(1),p("ngIf",e.params.Param.includes("height")),a(1),p("ngIf",e.params.Param.includes("recordingtype")),a(1),p("ngIf",e.params.Param.includes("recordmpts")),a(1),p("ngIf",e.params.Video.length>0),a(1),p("ngIf",e.params.Audio.length>0)}}function tie(t,i){1&t&&(k(0,"p-message",105),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nie(t,i){1&t&&(k(0,"p-message",106),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function iie(t,i){if(1&t){const e=I();l(0,"div",100)(1,"div",101),_(2,tie,2,3,"p-message",102),_(3,nie,2,3,"p-message",103),c(),l(4,"p-button",104),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(1),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let sie=(()=>{class t{constructor(e,n,s){this.translate=e,this.captureCardService=n,this.setupService=s,this.successCount=0,this.errorCount=0,this.expectedCount=0,this.paramList=[{CardType:"V4L",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"MPEG",Param:["autotranscode","height","width"],Video:["MPEG-2 Hardware Encoder"],Audio:["MPEG-2 Hardware Encoder"]},{CardType:"MJPEG",Param:["autotranscode","height","width"],Video:["Hardware MJPEG"],Audio:["MP3","Uncompressed"]},{CardType:"HDTV",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"DVB",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"FIREWIRE",Param:["autotranscode"],Video:[],Audio:[]},{CardType:"GO7007",Param:["autotranscode","height","width"],Video:["MPEG-4","MPEG-2"],Audio:["MP3","Uncompressed"]},{CardType:"IMPORT",Param:["autotranscode"],Video:[],Audio:[]},{CardType:"FREEBOX",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"HDHOMERUN",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"CRC_IP",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"HDPVR",Param:["autotranscode"],Video:["MPEG-4 AVC Hardware Encoder"],Audio:["AC3 Hardware Encoder","AAC Hardware Encoder"]},{CardType:"ASI",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"OCUR",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"CETON",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"VBOX",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"SATIP",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"V4L2:uvcvideo",Param:["autotranscode","height","width"],Video:["V4L2:MPEG-2 Video"],Audio:["V4L2:MPEG-1/2 Layer II encoding"]},{CardType:"TRANSCODE",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]}],this.params={CardType:"",Param:[""],Video:[""],Audio:[""]},this.videoParamList=[{Codec:"RTjpeg",Param:["rtjpegquality","rtjpeglumafilter","rtjpegchromafilter"]},{Codec:"MPEG-4",Param:["mpeg4bitrate","mpeg4maxquality","mpeg4minquality","mpeg4qualdiff","scalebitrate","mpeg4optionvhq","mpeg4option4mv","mpeg4optionidct","mpeg4optionime","encodingthreadcount"]},{Codec:"MPEG-2",Param:["mpeg2bitrate","scalebitrate","encodingthreadcount"]},{Codec:"Hardware MJPEG",Param:["hardwaremjpegquality","hardwaremjpeghdecimation","hardwaremjpegvdecimation"]},{Codec:"MPEG-2 Hardware Encoder",Param:["mpeg2streamtype","mpeg2aspectratio","mpeg2bitrate","mpeg2maxbitrate"]},{Codec:"MPEG-4 AVC Hardware Encoder",Param:["low_mpeg4avgbitrate","low_mpeg4peakbitrate","medium_mpeg4avgbitrate","medium_mpeg4peakbitrate","high_mpeg4avgbitrate","high_mpeg4peakbitrate"]},{Codec:"V4L2:MPEG-2 Video",Param:[]}],this.audioParamList=[{Codec:"MP3",Param:["samplerate","mp3quality","volume"]},{Codec:"MPEG-2 Hardware Encoder",Param:["samplerate","mpeg2language","mpeg2audvolume"]},{Codec:"Uncompressed",Param:["samplerate","volume"]}],this.recordingtypeOptions=[{Name:"settings.rprofiles.rectype_normal",Value:"all"},{Name:"settings.rprofiles.rectype_tv",Value:"tv"},{Name:"settings.rprofiles.rectype_audio",Value:"audio"}],this.samplerateOptions=["32000","44100","48000"],this.streamTypeOptions=["MPEG-2 PS","MPEG-2 TS","MPEG-1 VCD","PES AV","PES V","PES A","DVD","DVD-Special 1","DVD-Special 2"],this.mpeg2languageOptions=[{Name:"settings.rprofiles.lang_main",Value:"0"},{Name:"settings.rprofiles.lang_sap",Value:"1"},{Name:"settings.rprofiles.lang_dual",Value:"2"}],this.saveObserver={next:r=>{this.profile.Id&&r.bool?this.successCount++:!this.profile.Id&&r.int?(this.successCount++,this.profile.Id=r.int,this.saveForm(2)):(console.log("saveObserver error",r),this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.log("saveObserver error",r),this.errorCount++,this.currentForm.form.markAsDirty()}},this.recordingtypeOptions.forEach(r=>{e.get(r.Name).subscribe(o=>r.Name=o)}),this.mpeg2languageOptions.forEach(r=>{e.get(r.Name).subscribe(o=>r.Name=o)})}ngOnInit(){let e=this.paramList.find(n=>n.CardType==this.group.CardType);e&&(this.params=e)}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}findIx(e,n){let s=this.profile.RecProfParams.findIndex(r=>r.Name==e);return-1==s?s=this.profile.RecProfParams.push({Name:e,Value:n})-1:"boolean"==typeof n&&"string"==typeof this.profile.RecProfParams[s].Value&&(this.profile.RecProfParams[s].Value="1"==this.profile.RecProfParams[s].Value),s}saveForm(e){switch(e){case 1:if(this.successCount=0,this.errorCount=0,this.expectedCount=0,this.profile.Id<=0)return this.captureCardService.AddRecProfile(this.group.Id,this.profile.Name,this.profile.VideoCodec,this.profile.AudioCodec).subscribe(this.saveObserver),void this.expectedCount++;this.captureCardService.UpdateRecProfile(this.profile.Id,this.profile.VideoCodec,this.profile.AudioCodec).subscribe(this.saveObserver),this.expectedCount++;case 2:this.saveParams(this.params.Param);let n=this.videoParamList.find(r=>r.Codec==this.profile.VideoCodec);n?this.saveParams(n.Param):(console.log("ERROR videoparams not found"),this.errorCount++,this.currentForm.form.markAsDirty());let s=this.audioParamList.find(r=>r.Codec==this.profile.AudioCodec);s?this.saveParams(s.Param):(console.log("ERROR audioparams not found"),this.errorCount++,this.currentForm.form.markAsDirty())}}saveParams(e){e.forEach(n=>{let s=this.profile.RecProfParams[this.findIx(n,"0")].Value;s="boolean"==typeof s?s?"1":"0":s.toString(),this.captureCardService.UpdateRecProfileParam(this.profile.Id,n,s).subscribe(this.saveObserver),this.expectedCount++})}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-recprofile"]],viewQuery:function(e,n){if(1&e&&(j(pne,5),j(hne,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{profile:"profile",group:"group",parentComponent:"parentComponent"},decls:9,vars:0,consts:[["name","recprofform",1,"ml-3","mr-3"],["recprofform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],["class","form-group field",4,"ngIf"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"form-group","field"],["inputId","autotranscode","name","autotranscode",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["autotranscode","ngModel"],[1,"block"],["for","width",1,"label","block"],["name","width","id","width",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","height",1,"label","block"],["name","height","id","height",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","recordingtype",1,"label","block"],["optionLabel","Name","optionValue","Value","name","recordingtype",3,"options","ngModel","editable","maxlength","ngModelChange"],["recordingtype","ngModel"],["inputId","recordmpts","name","recordmpts",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["recordmpts","ngModel"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","VideoCodec",1,"label","block"],["name","VideoCodec",3,"options","ngModel","editable","maxlength","ngModelChange"],["VideoCodec","ngModel"],["for","rtjpegquality",1,"label","block"],["name","rtjpegquality","id","rtjpegquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","rtjpeglumafilter",1,"label","block"],["name","rtjpeglumafilter","id","rtjpeglumafilter",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","rtjpegchromafilter",1,"label","block"],["name","rtjpegchromafilter","id","rtjpegchromafilter",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4bitrate",1,"label","block"],["name","mpeg4bitrate","id","mpeg4bitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4maxquality",1,"label","block"],["name","mpeg4maxquality","id","mpeg4maxquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4minquality",1,"label","block"],["name","mpeg4minquality","id","mpeg4minquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","hardwaremjpegquality",1,"label","block"],["name","hardwaremjpegquality","id","hardwaremjpegquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","hardwaremjpeghdecimation",1,"label","block"],["name","hardwaremjpeghdecimation",3,"options","ngModel","editable","maxlength","ngModelChange"],["hardwaremjpeghdecimation","ngModel"],["for","hardwaremjpegvdecimation",1,"label","block"],["name","hardwaremjpegvdecimation",3,"options","ngModel","editable","maxlength","ngModelChange"],["hardwaremjpegvdecimation","ngModel"],["for","mpeg4qualdiff",1,"label","block"],["name","mpeg4qualdiff","id","mpeg4qualdiff",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2streamtype",1,"label","block"],["name","mpeg2streamtype",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2streamtype","ngModel"],["for","mpeg2aspectratio",1,"label","block"],["name","mpeg2aspectratio",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2aspectratio","ngModel"],["for","mpeg2bitrate",1,"label","block"],["name","mpeg2bitrate","id","mpeg2bitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2maxbitrate",1,"label","block"],["name","mpeg2maxbitrate","id","mpeg2maxbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","low_mpeg4avgbitrate",1,"label","block"],["name","low_mpeg4avgbitrate","id","low_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","low_mpeg4peakbitrate",1,"label","block"],["name","low_mpeg4peakbitrate","id","low_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","medium_mpeg4avgbitrate",1,"label","block"],["name","medium_mpeg4avgbitrate","id","medium_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","medium_mpeg4peakbitrate",1,"label","block"],["name","medium_mpeg4peakbitrate","id","medium_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","high_mpeg4avgbitrate",1,"label","block"],["name","high_mpeg4avgbitrate","id","high_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","high_mpeg4peakbitrate",1,"label","block"],["name","high_mpeg4peakbitrate","id","high_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","scalebitrate","name","scalebitrate",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["scalebitrate","ngModel"],["inputId","mpeg4optionvhq","name","mpeg4optionvhq",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionvhq","ngModel"],["inputId","mpeg4option4mv","name","mpeg4option4mv",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4option4mv","ngModel"],["inputId","mpeg4optionidct","name","mpeg4optionidct",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionidct","ngModel"],["inputId","mpeg4optionime","name","mpeg4optionime",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionime","ngModel"],["for","encodingthreadcount",1,"label","block"],["name","encodingthreadcount","id","encodingthreadcount",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","AudioCodec",1,"label","block"],["name","AudioCodec",3,"options","ngModel","editable","maxlength","ngModelChange"],["AudioCodec","ngModel"],["for","samplerate",1,"label","block"],["name","samplerate",3,"options","ngModel","editable","maxlength","ngModelChange"],["samplerate","ngModel"],["for","mpeg2language",1,"label","block"],["optionLabel","Name","optionValue","Value","name","mpeg2language",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2language","ngModel"],["for","mp3quality",1,"label","block"],["name","mp3quality","id","mp3quality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","volume",1,"label","block"],["name","volume","id","volume",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2audvolume",1,"label","block"],["name","mpeg2audvolume","id","mpeg2audvolume",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,mne,2,4,"ng-template",4),_(6,fne,0,0,"ng-template",5),_(7,eie,9,7,"ng-template",6),_(8,iie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,rn,Te,_e,dt,Vt,fn,Ui,qe,ve],pipes:[de],styles:[""]}),t})();const rie=["v4l2form"],oie=["top"];function aie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.v4l2.title")," ")}function lie(t,i){}const cie=function(){return{minWidth:"80%"}};function uie(t,i){if(1&t){const e=I();l(0,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,cie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function die(t,i){if(1&t&&(l(0,"div")(1,"small",19),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function pie(t,i){if(1&t){const e=I();l(0,"input",20,21),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function hie(t,i){if(1&t&&(l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,uie,2,7,"p-dropdown",12),_(7,die,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,pie,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()()()()),2&t){const e=d();a(4),S(f(5,7,"settings.capture.v4l2.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,9,"settings.capture.device_desc")," "),a(4),S(f(14,11,"settings.capture.v4l2.frontend_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(18,13,"settings.capture.frontend_desc")," ")}}function mie(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fie(t,i){1&t&&(k(0,"p-message",28),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gie(t,i){if(1&t){const e=I();l(0,"div",22)(1,"div",23),_(2,mie,2,3,"p-message",24),_(3,fie,2,3,"p-message",25),c(),l(4,"p-button",26),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _ie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("V4L2ENC").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-v4l2"]],viewQuery:function(e,n){if(1&e&&(j(rie,5),j(oie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","v4l2form",1,"ml-3","mr-3"],["v4l2form","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,aie,2,3,"ng-template",4),_(6,lie,0,0,"ng-template",5),_(7,hie,19,15,"ng-template",6),_(8,gie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,qe,ve],pipes:[de],styles:[""]}),t})();const bie=["hdpvrform"],vie=["top"];function Cie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.hdpvr.title")," ")}function yie(t,i){}const kS=function(){return{minWidth:"80%"}};function wie(t,i){if(1&t){const e=I();l(0,"p-dropdown",21,22),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,kS)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Tie(t,i){if(1&t&&(l(0,"div")(1,"small",23),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Sie(t,i){if(1&t){const e=I();l(0,"input",24,25),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function xie(t,i){if(1&t){const e=I();l(0,"p-dropdown",26,27),C("ngModelChange",function(s){return v(e),d(2).card.AudioDevice=s}),c()}if(2&t){const e=d(2);q(A(6,kS)),p("options",e.currentDevice.AudioDevices)("ngModel",e.card.AudioDevice)("editable",!1)("maxlength",0)}}function Die(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,wie,2,7,"p-dropdown",12),_(7,Tie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,Sie,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",17),g(21),m(22,"translate"),c(),_(23,xie,2,7,"p-dropdown",18),l(24,"small",14),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"label",19),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(32,"small",14),g(33),m(34,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,17,"settings.capture.v4l2.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,19,"settings.capture.device_desc")," "),a(4),S(f(14,21,"settings.capture.v4l2.frontend_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(18,23,"settings.capture.frontend_desc")," "),a(4),S(f(22,25,"settings.capture.hdpvr.audiodevice_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(26,27,"settings.capture.hdpvr.audiodevice_desc")," "),a(4),S(f(30,29,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(34,31,"settings.capture.tunetimeout_desc")," ")}}function Mie(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function kie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Iie(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,Mie,2,3,"p-message",30),_(3,kie,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Eie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("HDPVR").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.AudioDevice="",this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"audiodevice",String(this.card.AudioDevice)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-hdpvr"]],viewQuery:function(e,n){if(1&e&&(j(bie,5),j(vie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","hdpvrform",1,"ml-3","mr-3"],["dvbform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["for","AudioDevice",1,"label","block"],["name","AudioDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange",4,"ngIf"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],["name","AudioDevice",3,"options","ngModel","editable","maxlength","ngModelChange"],["AudioDevice","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Cie,2,3,"ng-template",4),_(6,yie,0,0,"ng-template",5),_(7,Die,35,33,"ng-template",6),_(8,Iie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,qe,ve],pipes:[de],styles:[""]}),t})();const Rie=["satipform"],Lie=["top"];function Oie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.satip.title")," ")}function Aie(t,i){}const Pie=function(){return{minWidth:"83%"}};function Fie(t,i){if(1&t){const e=I();l(0,"p-dropdown",25,26),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Pie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Nie(t,i){if(1&t&&(l(0,"div")(1,"small",27),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Vie(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,Fie,2,7,"p-dropdown",12),_(7,Nie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"div",16),g(16),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",15),g(22),m(23,"translate"),c(),l(24,"div",16),g(25),c(),l(26,"small",14),g(27),m(28,"translate"),c()(),l(29,"div",10)(30,"label",15),g(31),m(32,"translate"),c(),l(33,"div",16),g(34),c(),l(35,"small",14),g(36),m(37,"translate"),c()(),l(38,"div",10)(39,"label",15),g(40),m(41,"translate"),c(),l(42,"div",16),g(43),c(),l(44,"small",14),g(45),m(46,"translate"),c()(),l(47,"div",10)(48,"label",17),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",18),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(52,"small",14),g(53),m(54,"translate"),c()(),l(55,"div",10)(56,"label",19),g(57),m(58,"translate"),c(),l(59,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(60,"small",14),g(61),m(62,"translate"),c()(),l(63,"div",10)(64,"p-checkbox",21,22),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(66,"translate"),c(),l(67,"small",14),g(68),m(69,"translate"),c()(),l(70,"div",10)(71,"label",23),g(72),m(73,"translate"),c(),l(74,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().card.DVBDiSEqCType=s}),c(),l(75,"small",14),g(76),m(77,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.satip.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,43,"settings.capture.satip.device_desc")," "),a(4),S(f(14,45,"settings.capture.satip.friendly_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(2),T(" ",f(19,47,"settings.capture.satip.friendly_desc")," "),a(4),S(f(23,49,"settings.capture.satip.tunertype_label")),a(3),T(" ",e.currentDevice.TunerType," \xa0 "),a(2),T(" ",f(28,51,"settings.capture.tunertype_desc")," "),a(4),S(f(32,53,"settings.capture.satip.tunerindex_label")),a(3),T(" ",e.currentDevice.TunerNumber," \xa0 "),a(2),T(" ",f(37,55,"settings.capture.tunerindex_desc")," "),a(4),S(f(41,57,"settings.capture.satip.deviceid_label")),a(3),T(" ",e.card.VideoDevice," \xa0 "),a(2),T(" ",f(46,59,"settings.capture.deviceid_desc")," "),a(4),S(f(50,61,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(54,63,"settings.capture.sigtimeout_desc")," "),a(4),S(f(58,65,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(62,67,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(66,69,"settings.capture.dvb.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(69,71,"settings.capture.dvb.eitscan_desc")," "),a(4),S(f(73,73,"settings.capture.satip.diseqcpos_label")),a(2),p("ngModel",e.card.DVBDiSEqCType)("showButtons",!0)("min",1)("max",255)("step",1),a(2),T(" ",f(77,75,"settings.capture.satip.diseqcpos_desc")," ")}}function Bie(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Hie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function qie(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,Bie,2,3,"p-message",30),_(3,Hie,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Uie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("SATIP").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",VideoDevicePrompt:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,Description:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_diseqc_type",String(this.card.DVBDiSEqCType)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-satip"]],viewQuery:function(e,n){if(1&e&&(j(Rie,5),j(Lie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","satipform",1,"ml-3","mr-3"],["satipform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevicePrompt","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["for","DVBDiSEqCType",1,"label","block"],["name","DVBDiSEqCType","id","DVBDiSEqCType",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevicePrompt","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Oie,2,3,"ng-template",4),_(6,Aie,0,0,"ng-template",5),_(7,Vie,78,77,"ng-template",6),_(8,qie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,dt,rn,qe,ve],pipes:[de],styles:[""]}),t})();const Gie=["vboxform"],zie=["top"];function jie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.vbox.title")," ")}function $ie(t,i){}const Wie=function(){return{minWidth:"83%"}};function Kie(t,i){if(1&t){const e=I();l(0,"p-dropdown",26,27),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Wie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Qie(t,i){if(1&t&&(l(0,"div")(1,"small",28),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Jie(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,Kie,2,7,"p-dropdown",12),_(7,Qie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"div",16),g(16),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",15),g(22),m(23,"translate"),c(),l(24,"div",16),g(25),c(),k(26,"small",14),c(),l(27,"div",10)(28,"label",17),g(29),m(30,"translate"),c(),l(31,"input",18,19),C("ngModelChange",function(s){return v(e),d().currentDevice.IPAddress=s}),c(),l(33,"small",14),g(34),m(35,"translate"),c()(),l(36,"div",10)(37,"label",20),g(38),m(39,"translate"),c(),l(40,"input",21,19),C("ngModelChange",function(s){return v(e),d().currentDevice.TunerNumber=s}),c(),l(42,"small",14),g(43),m(44,"translate"),c()(),l(45,"div",10)(46,"label",22),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(50,"small",14),g(51),m(52,"translate"),c()(),l(53,"div",10)(54,"label",24),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(58,"small",14),g(59),m(60,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,31,"settings.capture.satip.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,33,"settings.capture.vbox.device_desc")," "),a(4),S(f(14,35,"settings.capture.vbox.deviceid_label")),a(3),T(" ",e.card.VideoDevice," \xa0 "),a(2),T(" ",f(19,37,"settings.capture.vbox.deviceid_desc")," "),a(4),S(f(23,39,"settings.capture.vbox.description_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(4),S(f(30,41,"settings.capture.ceton.ipaddress_label")),a(2),p("ngModel",e.currentDevice.IPAddress)("disabled",e.currentDevice!==e.manualDevice),a(3),T(" ",f(35,43,"settings.capture.vbox.ipaddress_desc")," "),a(4),S(f(39,45,"settings.capture.ceton.tuner_label")),a(2),p("ngModel",e.currentDevice.TunerNumber)("disabled",e.currentDevice!==e.manualDevice),a(3),T(" ",f(44,47,"settings.capture.vbox.tuner_desc")," "),a(4),S(f(48,49,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(52,51,"settings.capture.sigtimeout_desc")," "),a(4),S(f(56,53,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(60,55,"settings.capture.tunetimeout_desc")," ")}}function Yie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Zie(t,i){1&t&&(k(0,"p-message",35),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Xie(t,i){if(1&t){const e=I();l(0,"div",29)(1,"div",30),_(2,Yie,2,3,"p-message",31),_(3,Zie,2,3,"p-message",32),c(),l(4,"p-button",33),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let ese=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected",manuallyEnter:"settings.capture.vbox.manuallyenter"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r),s.get(this.messages.manuallyEnter).subscribe(r=>this.messages.manuallyEnter=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("VBOX").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.manualDevice={VideoDevicePrompt:this.messages.manuallyEnter,VideoDevice:"",Description:"",IPAddress:"",TunerNumber:0,SignalTimeout:7e3,ChannelTimeout:1e4},this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift(this.manualDevice),this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.currentDevice===this.manualDevice?this.subscription=this.currentForm.valueChanges.pipe(_S(50)).subscribe(()=>this.card.VideoDevice=this.manualDevice.IPAddress+"-"+this.manualDevice.TunerNumber):this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-vbox"]],viewQuery:function(e,n){if(1&e&&(j(Gie,5),j(zie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","vboxform",1,"ml-3","mr-3"],["vboxform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],["u","",1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevicePrompt",1,"label","block"],["optionLabel","VideoDevicePrompt","name","VideoDevicePrompt",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","ip",1,"label","block"],["pInputText","","id","ip","name","ip",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["ipAddress","ngModel"],["for","tuner",1,"label","block"],["pInputText","","id","tuner","name","tuner",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevicePrompt","name","VideoDevicePrompt",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevicePrompt","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,jie,2,3,"ng-template",4),_(6,$ie,0,0,"ng-template",5),_(7,Jie,61,57,"ng-template",6),_(8,Xie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,qe,ve],pipes:[de],styles:[""]}),t})();const tse=["firewireform"],nse=["top"];function ise(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.firewire.title")," ")}function sse(t,i){}const Ed=function(){return{minWidth:"83%"}};function rse(t,i){if(1&t){const e=I();l(0,"p-dropdown",30,31),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Ed)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function ose(t,i){if(1&t&&(l(0,"div")(1,"small",32),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function ase(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,rse,2,7,"p-dropdown",12),_(7,ose,3,1,"div",13),k(8,"small",14),c(),l(9,"div",10)(10,"label",15),g(11),m(12,"translate"),c(),l(13,"div",16),g(14),c(),k(15,"small",14),c(),l(16,"div",10)(17,"label",17),g(18),m(19,"translate"),c(),l(20,"p-dropdown",18,19),C("ngModelChange",function(s){return v(e),d().card.FirewireModel=s}),c(),l(22,"small",14),g(23),m(24,"translate"),c()(),l(25,"div",10)(26,"label",20),g(27),m(28,"translate"),c(),l(29,"p-dropdown",21,22),C("ngModelChange",function(s){return v(e),d().card.FirewireConnection=s}),c(),k(31,"small",14),c(),l(32,"div",10)(33,"label",23),g(34),m(35,"translate"),c(),l(36,"p-dropdown",24,25),C("ngModelChange",function(s){return v(e),d().card.FirewireSpeed=s}),c(),k(38,"small",14),c(),l(39,"div",10)(40,"label",26),g(41),m(42,"translate"),c(),l(43,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(44,"small",14),g(45),m(46,"translate"),c()(),l(47,"div",10)(48,"label",28),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(52,"small",14),g(53),m(54,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.firewire.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(4),S(f(12,43,"settings.capture.vbox.description_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(4),S(f(19,45,"settings.capture.firewire.model_label")),a(2),q(A(61,Ed)),p("options",e.models)("ngModel",e.card.FirewireModel)("editable",!1)("maxlength",0),a(3),T(" ",f(24,47,"settings.capture.firewire.model_desc")," "),a(4),S(f(28,49,"settings.capture.firewire.connection_label")),a(2),q(A(62,Ed)),p("options",e.connectionTypes)("ngModel",e.card.FirewireConnection)("editable",!1)("maxlength",0),a(5),S(f(35,51,"settings.capture.firewire.speed_label")),a(2),q(A(63,Ed)),p("options",e.speeds)("ngModel",e.card.FirewireSpeed)("editable",!1)("maxlength",0),a(5),S(f(42,53,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(46,55,"settings.capture.sigtimeout_desc")," "),a(4),S(f(50,57,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(54,59,"settings.capture.tunetimeout_desc")," ")}}function lse(t,i){1&t&&(k(0,"p-message",38),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function cse(t,i){1&t&&(k(0,"p-message",39),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function use(t,i){if(1&t){const e=I();l(0,"div",33)(1,"div",34),_(2,lse,2,3,"p-message",35),_(3,cse,2,3,"p-message",36),c(),l(4,"p-button",37),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let dse=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected",manuallyEnter:"settings.capture.vbox.manuallyenter"},this.models=[{name:"settings.capture.firewire.motogeneric",value:"MOTO GENERIC"},{name:"settings.capture.firewire.sageneric",value:"SA GENERIC"},{name:"DCH-3200",value:"DCH-3200"},{name:"DCX-3200",value:"DCX-3200"},{name:"DCT-3412",value:"DCT-3412"},{name:"DCT-3416",value:"DCT-3416"},{name:"DCT-6200",value:"DCT-6200"},{name:"DCT-6212",value:"DCT-6212"},{name:"DCT-6216",value:"DCT-6216"},{name:"QIP-6200",value:"QIP-6200"},{name:"QIP-7100",value:"QIP-7100"},{name:"PACE-550",value:"PACE-550"},{name:"PACE-779",value:"PACE-779"},{name:"SA3250HD",value:"SA3250HD"},{name:"SA4200HD",value:"SA4200HD"},{name:"SA4250HDC",value:"SA4250HDC"},{name:"SA8300HD",value:"SA8300HD"}],this.connectionTypes=[{name:"settings.capture.firewire.pointtopoint",value:0},{name:"settings.capture.firewire.broadcast",value:1}],this.speeds=[{name:"100Mbps",value:0},{name:"200Mbps",value:1},{name:"400Mbps",value:2},{name:"800Mbps",value:3}],this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r),s.get(this.messages.manuallyEnter).subscribe(r=>this.messages.manuallyEnter=r),s.get(this.models[0].name).subscribe(r=>this.models[0].name=r),s.get(this.models[1].name).subscribe(r=>this.models[1].name=r),s.get(this.connectionTypes[0].name).subscribe(r=>this.connectionTypes[0].name=r),s.get(this.connectionTypes[1].name).subscribe(r=>this.connectionTypes[1].name=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("FIREWIRE").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.FirewireModel=this.currentDevice.FirewireModel,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_model",this.card.FirewireModel).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_connection",String(this.card.FirewireConnection)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_speed",String(this.card.FirewireSpeed)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-firewire"]],viewQuery:function(e,n){if(1&e&&(j(tse,5),j(nse,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","firewireform",1,"ml-3","mr-3"],["firewireform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","FirewireModel",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireModel",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireModel","ngModel"],["for","FirewireConnection",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireConnection",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireConnection","ngModel"],["for","FirewireSpeed",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireSpeed",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireSpeed","ngModel"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,ise,2,3,"ng-template",4),_(6,sse,0,0,"ng-template",5),_(7,ase,55,64,"ng-template",6),_(8,use,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,dt,qe,ve],pipes:[de],styles:[""]}),t})();const pse=["scroll"],hse=["statusPanel"],pt=function(){return{minWidth:"400px"}};function mse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",38),g(2),m(3,"translate"),c(),l(4,"p-dropdown",39,40),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s})("onChange",function(){return v(e),d(2).onFreqTableChange(!1)}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.freqtable_label")),a(2),q(A(12,pt)),p("options",e.freqTableSelect)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.freqtable_desc")," ")}}function fse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.country_label")),a(2),q(A(12,pt)),p("options",e.countryTable)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.scantype_dvbt_desc")," ")}}function gse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s}),c(),k(6,"small",4),c()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.channelscan.country_label")),a(2),q(A(9,pt)),p("options",e.networkTable)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0)}}function _se(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"p-dropdown",45,46),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s})("onChange",function(){return v(e),d(2).onFreqTableChange(!0)}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.atscModulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.atscmodulation_desc")," ")}}function bse(t,i){1&t&&(l(0,"div")(1,"small",51),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.channelscan.invalid_range")))}function vse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",47),g(2),m(3,"translate"),c(),l(4,"p-dropdown",48,49),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FirstChan=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c(),_(9,bse,4,3,"div",50),c()}if(2&t){const e=d(2);a(2),S(f(3,9,"settings.channelscan.firstchan_label")),a(2),q(A(13,pt)),p("options",e.channels)("ngModel",e.scanRequest.FirstChan)("editable",!1)("maxlength",0),a(3),T(" ",f(8,11,"settings.channelscan.firstchan_desc")," "),a(2),p("ngIf",e.channelCount<1)}}function Cse(t,i){1&t&&(l(0,"div")(1,"small",51),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.channelscan.invalid_range")))}function yse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",52),g(2),m(3,"translate"),c(),l(4,"p-dropdown",53,54),C("ngModelChange",function(s){return v(e),d(2).scanRequest.LastChan=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c(),_(9,Cse,4,3,"div",50),c()}if(2&t){const e=d(2);a(2),S(f(3,9,"settings.channelscan.lastchan_label")),a(2),q(A(13,pt)),p("options",e.channels)("ngModel",e.scanRequest.LastChan)("editable",!1)("maxlength",0),a(3),T(" ",f(8,11,"settings.channelscan.lastchan_desc")," "),a(2),p("ngIf",e.channelCount<1)}}function wse(t,i){if(1&t&&(l(0,"div",0)(1,"label",30),g(2),m(3,"translate"),c(),l(4,"div",29),g(5),c(),l(6,"small",4),g(7),m(8,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,3,"settings.channelscan.chancount_label")),a(3),T(" ",e.calcCount()," \xa0 "),a(2),T(" ",f(8,5,"settings.channelscan.chancount_desc")," ")}}const Xs=function(){return["DVBT","DVBT2"]};function Tse(t,i){if(1&t&&(l(0,"p-fieldset",37),m(1,"translate"),_(2,mse,9,13,"div",33),_(3,fse,9,13,"div",33),_(4,gse,7,10,"div",33),_(5,_se,9,13,"div",33),_(6,vse,10,14,"div",33),_(7,yse,10,14,"div",33),_(8,wse,9,7,"div",33),c()),2&t){const e=d();D("legend",f(1,10,"settings.channelscan.type.full")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf",A(12,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType)}}function Sse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",61),g(2),m(3,"translate"),c(),l(4,"p-dropdown",62,63),C("ngModelChange",function(s){return v(e),d(2).satTuning=s})("onChange",function(){return v(e),d(2).onSatTuningChange()}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.sattuning_label")),a(2),q(A(12,pt)),p("options",e.satTuningTable)("ngModel",e.satTuning)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.sattuning_desc")," ")}}function xse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",64),g(2),m(3,"translate"),c(),l(4,"p-dropdown",65,66),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Bandwidth=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.bandwidth_label")),a(2),q(A(12,pt)),p("options",e.bandwidthTable)("ngModel",e.scanRequest.Bandwidth)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.bandwidth_desc")," ")}}function Dse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",67),g(2),m(3,"translate"),c(),l(4,"p-dropdown",68,69),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Polarity=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.polarity_label")),a(2),q(A(12,pt)),p("options",e.polarityTable)("ngModel",e.scanRequest.Polarity)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.polarity_desc")," ")}}function Mse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",70),g(2),m(3,"translate"),c(),l(4,"p-dropdown",71,72),C("ngModelChange",function(s){return v(e),d(2).scanRequest.SymbolRate=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.symbolrate_label")),a(2),q(A(12,pt)),p("options",e.dvbcSymbolRateTable)("ngModel",e.scanRequest.SymbolRate)("editable",!0)("maxlength",8),a(3),T(" ",f(8,10,"settings.channelscan.dvbcsymbolrate_desc")," ")}}function kse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",73),g(2),m(3,"translate"),c(),l(4,"p-dropdown",74,75),C("ngModelChange",function(s){return v(e),d(2).scanRequest.SymbolRate=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.symbolrate_label")),a(2),q(A(12,pt)),p("options",e.dvbsSymbolRateTable)("ngModel",e.scanRequest.SymbolRate)("editable",!0)("maxlength",8),a(3),T(" ",f(8,10,"settings.channelscan.dvbssymbolrate_desc")," ")}}function Ise(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",76),g(2),m(3,"translate"),c(),l(4,"p-dropdown",77,78),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Constellation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.constellation_label")),a(2),q(A(12,pt)),p("options",e.modulationTable)("ngModel",e.scanRequest.Constellation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.constellation_desc")," ")}}function Ese(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",79),g(2),m(3,"translate"),c(),l(4,"p-dropdown",80,81),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.modulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.Modulation_desc")," ")}}function Rse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",82),g(2),m(3,"translate"),c(),l(4,"p-dropdown",83,84),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.dvbsModulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbsmodulation_desc")," ")}}function Lse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",85),g(2),m(3,"translate"),c(),l(4,"p-dropdown",86,87),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbtModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbtmodsys_desc")," ")}}function Ose(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",88),g(2),m(3,"translate"),c(),l(4,"p-dropdown",89,90),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbcModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbcmodsys_desc")," ")}}function Ase(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",91),g(2),m(3,"translate"),c(),l(4,"p-dropdown",92,93),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbsModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbsmodsys_desc")," ")}}function Pse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",94),g(2),m(3,"translate"),c(),l(4,"p-dropdown",95,96),C("ngModelChange",function(s){return v(e),d(2).scanRequest.CodeRateLP=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.coderatelp_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.CodeRateLP)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.coderatelp_desc")," ")}}function Fse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",97),g(2),m(3,"translate"),c(),l(4,"p-dropdown",98,99),C("ngModelChange",function(s){return v(e),d(2).scanRequest.CodeRateHP=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.coderatehp_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.CodeRateHP)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.coderatehp_desc")," ")}}function Nse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",100),g(2),m(3,"translate"),c(),l(4,"p-dropdown",101,102),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FEC=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.FEC_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.FEC)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.FEC_desc")," ")}}function Vse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",103),g(2),m(3,"translate"),c(),l(4,"p-dropdown",104,105),C("ngModelChange",function(s){return v(e),d(2).scanRequest.TransmissionMode=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.transmissionmode_label")),a(2),q(A(12,pt)),p("options",e.transmissionModeTable)("ngModel",e.scanRequest.TransmissionMode)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.transmissionmode_desc")," ")}}function Bse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",106),g(2),m(3,"translate"),c(),l(4,"p-dropdown",107,108),C("ngModelChange",function(s){return v(e),d(2).scanRequest.GuardInterval=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.guardinterval_label")),a(2),q(A(12,pt)),p("options",e.guardIntervalTable)("ngModel",e.scanRequest.GuardInterval)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.guardinterval_desc")," ")}}function Hse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",109),g(2),m(3,"translate"),c(),l(4,"p-dropdown",110,111),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Hierarchy=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.hierarchy_label")),a(2),q(A(12,pt)),p("options",e.hierarchyTable)("ngModel",e.scanRequest.Hierarchy)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.hierarchy_desc")," ")}}function qse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",112),g(2),m(3,"translate"),c(),l(4,"p-dropdown",113,114),C("ngModelChange",function(s){return v(e),d(2).scanRequest.RollOff=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.rolloff_label")),a(2),q(A(12,pt)),p("options",e.rollOffTable)("ngModel",e.scanRequest.RollOff)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.rolloff_desc")," ")}}const Tg=function(){return["DVBS","DVBS2"]},Use=function(t){return{unit:t}},Gse=function(){return["DVBC","DVBS","DVBS2"]};function zse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),_(2,Sse,9,13,"div",33),l(3,"div",0)(4,"label",55),g(5),m(6,"translate"),c(),l(7,"p-inputNumber",56),C("ngModelChange",function(s){return v(e),d().scanRequest.Frequency=s}),c(),l(8,"small",4),k(9,"div",57),c()(),_(10,xse,9,13,"div",33),_(11,Dse,9,13,"div",33),_(12,Mse,9,13,"div",33),_(13,kse,9,13,"div",33),l(14,"div",0)(15,"label",58),g(16),m(17,"translate"),c(),l(18,"p-dropdown",59,60),C("ngModelChange",function(s){return v(e),d().scanRequest.Inversion=s}),c(),l(20,"small",4),g(21),m(22,"translate"),c()(),_(23,Ise,9,13,"div",33),_(24,Ese,9,13,"div",33),_(25,Rse,9,13,"div",33),_(26,Lse,9,13,"div",33),_(27,Ose,9,13,"div",33),_(28,Ase,9,13,"div",33),_(29,Pse,9,13,"div",33),_(30,Fse,9,13,"div",33),_(31,Nse,9,13,"div",33),_(32,Vse,9,13,"div",33),_(33,Bse,9,13,"div",33),_(34,Hse,9,13,"div",33),_(35,qse,9,13,"div",33),c()}if(2&t){const e=d();D("legend",f(1,35,"settings.channelscan.type.fulltuned")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","DVBS2"==e.scanSubType),a(3),S(f(6,37,"settings.channelscan.frequency_label")),a(2),p("ngModel",e.scanRequest.Frequency)("min",0)("max",999999999),a(2),p("translate","settings.channelscan.frequency_desc")("translateParams",z(44,Use,A(43,Tg).includes(e.scanSubType)?"kHZ":"Hz")),a(1),p("ngIf",A(46,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(47,Tg).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf",A(48,Tg).includes(e.scanSubType)),a(3),S(f(17,39,"settings.channelscan.inversion_label")),a(2),q(A(49,pt)),p("options",e.inversionTable)("ngModel",e.scanRequest.Inversion)("editable",!1)("maxlength",0),a(3),T(" ",f(22,41,"settings.channelscan.inversion_desc")," "),a(2),p("ngIf",A(50,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","DVBS2"==e.scanSubType),a(1),p("ngIf","DVBT2"==e.scanSubType),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","DVBS2"==e.scanSubType),a(1),p("ngIf",A(51,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(52,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(53,Gse).includes(e.scanSubType)),a(1),p("ngIf",A(54,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(55,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(56,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBS2"==e.scanSubType)}}function jse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),l(2,"div",0)(3,"label",115),g(4),m(5,"translate"),c(),l(6,"p-dropdown",116,117),C("ngModelChange",function(s){return v(e),d().scanRequest.ScanId=s}),c(),k(8,"small",4),c()()}if(2&t){const e=d();D("legend",f(1,10,"settings.channelscan.type.import")),p("toggleable",!1)("collapsed",!1),a(4),S(f(5,12,"settings.channelscan.scanimport_label")),a(2),q(A(14,pt)),p("options",e.scans)("ngModel",e.scanRequest.ScanId)("editable",!1)("maxlength",0)}}function $se(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",122),g(2),m(3,"translate"),c(),l(4,"p-dropdown",123,124),C("ngModelChange",function(s){return v(e),d(2).scanRequest.MplexId=s}),c(),k(6,"small",4),c()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.channelscan.transport_label")),a(2),q(A(9,pt)),p("options",e.multiplex)("ngModel",e.scanRequest.MplexId)("editable",!1)("maxlength",0)}}function Wse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),_(2,$se,7,10,"div",33),l(3,"div",0)(4,"p-checkbox",118,119),C("ngModelChange",function(s){return v(e),d().scanRequest.IgnoreSignalTimeout=s}),m(6,"translate"),c(),l(7,"small",4),g(8),m(9,"translate"),c()(),l(10,"div",0)(11,"p-checkbox",120,121),C("ngModelChange",function(s){return v(e),d().scanRequest.FollowNITSetting=s}),m(13,"translate"),c(),l(14,"small",4),g(15),m(16,"translate"),c()()()}if(2&t){const e=d();D("legend",f(1,12,"settings.channelscan.type.transports")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","ONETRANSPORT"==e.scanRequest.ScanType),a(2),D("label",f(6,14,"settings.channelscan.ignoresignaltimeout_label")),p("ngModel",e.scanRequest.IgnoreSignalTimeout)("binary",!0),a(4),T(" ",f(9,16,"settings.channelscan.ignoresignaltimeout_desc")," "),a(3),D("label",f(13,18,"settings.channelscan.follownitsetting_label")),p("ngModel",e.scanRequest.FollowNITSetting)("binary",!0),a(4),T(" ",f(16,20,"settings.channelscan.follownitsetting_desc")," ")}}function Kse(t,i){1&t&&(l(0,"small",4),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"settings.channelscan.scan_desc")," "))}function Qse(t,i){if(1&t&&(l(0,"div",0)(1,"div",125)(2,"b"),g(3),c(),g(4," \xa0 "),c(),k(5,"br"),c()),2&t){const e=d();a(3),S(e.scanStatus.DialogMsg)}}function Jse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"input",126,127),C("ngModelChange",function(s){return v(e),d().dialogResponse.DialogString=s}),c()()}if(2&t){const e=d();a(1),p("ngModel",e.dialogResponse.DialogString)}}function Yse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",128),g(2),m(3,"translate"),c(),l(4,"p-dropdown",129,3),C("ngModelChange",function(s){return v(e),d().buttonText=s}),c()()}if(2&t){const e=d();a(2),S(f(3,7,"settings.channelscan.scanimport_option")),a(2),q(A(9,pt)),p("options",e.scanStatus.DialogButtons)("ngModel",e.buttonText)("editable",!1)("maxlength",0)}}function Zse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"p-button",130),C("onClick",function(){return v(e),d().respondDialog()}),m(2,"translate"),c()()}2&t&&(a(1),D("label",f(2,1,"common.submit")))}const Sg=function(){return{height:"20px"}},Xse=function(){return{width:"100%",height:"400px"}};class ${constructor(i,e){this.label=i,this.value=e}}class Ar{constructor(i,e,n,s,r,o,u){this.label=i,this.Frequency=e,this.Polarity=n,this.SymbolRate=s,this.Modulation=r,this.ModSys=o,this.FEC=u}}let ere=(()=>{class t{constructor(e,n,s,r){this.translate=e,this.channelService=n,this.captureCardService=s,this.setupService=r,this.serviceValues=[new $("settings.channelscan.tv","tv"),new $("settings.channelscan.tvradio","audio"),new $("settings.channelscan.all","all")],this.scanSubType="",this.scanTypes=[],this.freqTableSelect=[new $("settings.channelscan.freq.usa.broadcast","us"),new $("settings.channelscan.freq.usa.cablehi","uscablehigh"),new $("settings.channelscan.freq.usa.cablehrchi","ushrchigh"),new $("settings.channelscan.freq.usa.cableirchi","usirchigh"),new $("settings.channelscan.freq.usa.cable","uscable"),new $("settings.channelscan.freq.usa.cablehrc","ushrc"),new $("settings.channelscan.freq.usa.cableirc","usirc")],this.countryTable=[new $("settings.channelscan.country.au","au"),new $("settings.channelscan.country.cl","cl"),new $("settings.channelscan.country.cz","cz"),new $("settings.channelscan.country.dk","dk"),new $("settings.channelscan.country.fi","fi"),new $("settings.channelscan.country.fr","fr"),new $("settings.channelscan.country.de","de"),new $("settings.channelscan.country.gr","gr"),new $("settings.channelscan.country.il","il"),new $("settings.channelscan.country.it","it"),new $("settings.channelscan.country.nl","nl"),new $("settings.channelscan.country.nz","nz"),new $("settings.channelscan.country.es","es"),new $("settings.channelscan.country.se","se"),new $("settings.channelscan.country.gb","gb")],this.networkTable=[new $("settings.channelscan.country.de","de"),new $("settings.channelscan.country.nl","nl"),new $("settings.channelscan.country.gb","gb")],this.satTuningTable=[new Ar("(Select Satellite)",0,"h","27500000","qpsk","DVB-S2","auto"),new Ar("Thor 5/6/7 0.8W",10872e3,"h","25000000","8psk","DVB-S2","3/4"),new Ar("Eutelsat 7.0E",10721e3,"h","22000000","qpsk","DVB-S","3/4"),new Ar("Hotbird 13.0E",12015e3,"h","27500000","8psk","DVB-S2","3/4"),new Ar("Astra-1 19.2E",11229e3,"v","22000000","8psk","DVB-S2","2/3"),new Ar("Astra-3 23.5E",12031500,"h","27500000","qpsk","DVB-S2","auto"),new Ar("Astra-2 28.2E",10714e3,"h","22000000","qpsk","DVB-S","5/6")],this.atscModulationTable=[new $("settings.channelscan.modulation.atsc.vsb8","vsb8"),new $("settings.channelscan.modulation.atsc.qam256","qam256"),new $("settings.channelscan.modulation.atsc.qam128","qam128"),new $("settings.channelscan.modulation.atsc.qam64","qam64")],this.bandwidthTable=[new $("settings.channelscan.auto","a"),new $("6 MHz","6"),new $("7 MHz","7"),new $("8 MHz","8")],this.inversionTable=[new $("settings.channelscan.auto","a"),new $("settings.channelscan.on","1"),new $("settings.channelscan.off","0")],this.modulationTable=[new $("settings.channelscan.auto","auto"),new $("QPSK","qpsk"),new $("QAM-16","qam_16"),new $("QAM-32","qam_32"),new $("QAM-64","qam_64"),new $("QAM-128","qam_128"),new $("QAM-256","qam_256")],this.dvbsModulationTable=[new $("QPSK","qpsk"),new $("8PSK","8psk"),new $("QAM-16","qam_16"),new $("16PSK","16psk"),new $("32PSK","32psk")],this.dvbtModSysTable=[new $("DVB-T","DVB-T"),new $("DVB-T2","DVB-T2")],this.dvbcModSysTable=[new $("DVB-C/A","DVB-C/A"),new $("DVB-C/B","DVB-C/B"),new $("DVB-C/C","DVB-C/C")],this.dvbsModSysTable=[new $("DVB-S","DVB-S"),new $("DVB-S2","DVB-S2")],this.polarityTable=[new $("settings.channelscan.polarity.horizontal","h"),new $("settings.channelscan.polarity.vertical","v"),new $("settings.channelscan.polarity.right","r"),new $("settings.channelscan.polarity.left","l")],this.fecTable=[new $("settings.channelscan.auto","auto"),new $("settings.channelscan.none","none"),new $("1/2","1/2"),new $("2/3","2/3"),new $("3/4","3/4"),new $("4/5","4/5"),new $("5/6","5/6"),new $("6/2","6/2"),new $("7/8","7/8"),new $("8/9","8/9"),new $("3/5","3/5"),new $("9/10","9/10")],this.transmissionModeTable=[new $("settings.channelscan.auto","a"),new $("2K","2"),new $("8K","8")],this.guardIntervalTable=[new $("settings.channelscan.auto","auto"),new $("1/4","1/4"),new $("1/8","1/8"),new $("1/16","1/16"),new $("1/32","1/32")],this.hierarchyTable=[new $("settings.channelscan.auto","a"),new $("settings.channelscan.none","n"),new $("1","1"),new $("2","2"),new $("4","4")],this.dvbcSymbolRateTable=[new $("3450000","3450000"),new $("5000000","5000000"),new $("5900000","5900000"),new $("6875000","6875000"),new $("6900000","6900000"),new $("6950000","6950000")],this.dvbsSymbolRateTable=[new $("3333000","3333000"),new $("22000000","22000000"),new $("22500000","22500000"),new $("23000000","23000000"),new $("27500000","27500000"),new $("28000000","28000000"),new $("28500000","28500000"),new $("29500000","29500000"),new $("29700000","29700000"),new $("29900000","29900000")],this.rollOffTable=[new $("0.35","0.35"),new $("0.20","0.20"),new $("0.25","0.25"),new $("Auto","auto")],this.lockDesc="settings.channelscan.lock_value",this.nolockDesc="settings.channelscan.nolock_value",this.procDesc="processed",this.unprocDesc="unprocessed",this.satTuning=this.satTuningTable[0],this.scanRequest={CardId:0,DesiredServices:"tv",FreeToAirOnly:!0,ChannelNumbersOnly:!1,CompleteChannelsOnly:!0,FullChannelSearch:!0,RemoveDuplicates:!0,AddFullTS:!1,TestDecryptable:!1,ScanType:"",FreqTable:"",Modulation:"",FirstChan:"",LastChan:"",ScanId:0,IgnoreSignalTimeout:!1,FollowNITSetting:!1,MplexId:0,Frequency:0,Bandwidth:"",Polarity:"",SymbolRate:"",Inversion:"",Constellation:"",ModSys:"",CodeRateLP:"",CodeRateHP:"",FEC:"",TransmissionMode:"",GuardInterval:"",Hierarchy:"",RollOff:""},this.emptyScanStatus={CardId:0,Status:"",SignalLock:!1,Progress:0,SignalNoise:0,SignalStrength:0,StatusLog:"",StatusText:"",StatusTitle:"",DialogMsg:"",DialogInputReq:!1,DialogButtons:[]},this.dialogResponse={CardId:0,DialogString:"",DialogButton:0},this.buttonText="",this.scanStatus=Object.assign({},this.emptyScanStatus),this.channels=[],this.channelCount=1,this.refreshCount=5,this.helpText="",this.scans=[],this.multiplex=[],this.tableTranslate(this.serviceValues),this.tableTranslate(this.freqTableSelect),this.tableTranslate(this.countryTable),this.tableTranslate(this.networkTable),this.tableTranslate(this.atscModulationTable),this.tableTranslate(this.bandwidthTable),this.tableTranslate(this.inversionTable),this.tableTranslate(this.modulationTable),this.tableTranslate(this.fecTable),this.tableTranslate(this.transmissionModeTable),this.tableTranslate(this.guardIntervalTable),this.tableTranslate(this.hierarchyTable),this.tableTranslate(this.polarityTable),e.get(this.lockDesc).subscribe(o=>this.lockDesc=o),e.get(this.nolockDesc).subscribe(o=>this.nolockDesc=o)}tableTranslate(e){e.forEach(n=>{n.label.startsWith("settings.")&&this.translate.get(n.label).subscribe(s=>n.label=s)})}ngAfterViewInit(){this.refreshStatus(),this.getScanList(),this.getmultiplexList()}ngOnInit(){this.iconnection.deviceFree.subscribe(e=>{this.captureCardService.GetCardSubType(this.card.CardId).subscribe(n=>{this.cardSubType=n.CardSubType,this.buildScanTypeList(),this.onFreqTableChange(!1),"DVBT2"==this.cardSubType.InputType&&(this.scanRequest.ModSys="DVB-T2"),"DVBS2"==this.cardSubType.InputType&&(this.scanRequest.ModSys="DVB-S2"),"DVBC"==this.cardSubType.InputType&&(this.scanRequest.SymbolRate="6900000"),["DVBS","DVBS2"].includes(this.cardSubType.InputType)&&(this.scanRequest.SymbolRate="27500000")})}),this.iconnection.captureDeviceList.CaptureDeviceList.CaptureDevices.length>0&&!this.cardSubType&&this.iconnection.deviceFree.next(!0)}buildScanTypeList(){let e=!1;switch(this.helpText="",this.scanSubType=this.cardSubType.InputType,this.cardSubType.InputType){case"V4L":case"MPEG":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"});break;case"DVBT":case"DVBT2":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),this.helpText="settings.channelscan.scantype_dvbt_desc",e=!0;break;case"DVBC":this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"DVBS":case"DVBS2":this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"ATSC":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"HDHOMERUN":this.cardSubType.HDHRdoesDVBC?(this.scanSubType="DVBC",this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"})):this.cardSubType.HDHRdoesDVB?(this.scanSubType="DVBT",this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.helpText="settings.channelscan.scantype_dvbt_desc"):(this.scanSubType="ATSC",this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"})),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),this.scanTypes.push({label:"settings.channelscan.type.hdhrimport",value:"HDHRIMPORT"}),e=!0;break;case"VBOX":this.scanTypes.push({label:"settings.channelscan.type.vboximport",value:"VBOXIMPORT"});break;case"FREEBOX":this.scanTypes.push({label:"settings.channelscan.type.m3umpts",value:"MPTSIMPORT"}),this.scanTypes.push({label:"settings.channelscan.type.m3u",value:"M3UIMPORT"});break;case"ASI":this.scanTypes.push({label:"settings.channelscan.type.asi",value:"ASI"});break;case"EXTERNAL":this.scanTypes.push({label:"settings.channelscan.type.mpts",value:"MPTS"}),this.scanTypes.push({label:"settings.channelscan.type.externimport",value:"EXTIMPORT"});break;case"ERROR_PROBE":this.scanTypes.push({label:"settings.channelscan.type.errorprobe",value:"ERROR"});break;default:this.scanTypes.push({label:"settings.channelscan.type.erroropen",value:"ERROR"})}e&&(this.scanTypes.push({label:"settings.channelscan.type.alltransport",value:"ALLTRANSPORT"}),this.scanTypes.push({label:"settings.channelscan.type.onetransport",value:"ONETRANSPORT"})),this.scanTypes.forEach(n=>this.translate.get(n.label).subscribe(s=>n.label=s)),this.helpText&&this.translate.get(this.helpText).subscribe(n=>this.helpText=n)}onScanTypeChange(){this.scanRequest.Frequency="FULLTUNED"==this.scanRequest.ScanType?this.videoSourceLookup[this.card.SourceId].ScanFrequency:0,setTimeout(()=>this.onFreqTableChange(!1),100)}onFreqTableChange(e){this.channels=[];let n="";if(this.scanRequest.FreqTable.startsWith("us")){if(e||("us"==this.scanRequest.FreqTable?this.scanRequest.Modulation="vsb8":"vsb8"==this.scanRequest.Modulation&&(this.scanRequest.Modulation="qam256")),"vsb8"==this.scanRequest.Modulation?n="ATSC Channel ":"qam256"==this.scanRequest.Modulation?n="QAM-256 Channel ":"qam128"==this.scanRequest.Modulation?n="QAM-128 Channel ":"qam64"==this.scanRequest.Modulation&&(n="QAM-64 Channel "),"us"==this.scanRequest.FreqTable){if("vsb8"==this.scanRequest.Modulation)for(let s=2;s<=36;s++)this.channels.push(n+s)}else if(this.scanRequest.FreqTable.match(/us.*high/))for(let s=78;s<=158;s++)this.channels.push(n+s);else if(this.scanRequest.FreqTable.match(/^us/)){this.channels.push(n+"T-13"),this.channels.push(n+"T-14");for(let s=2;s<=158;s++)this.channels.push(n+s)}this.channels.length>0?setTimeout(()=>{this.scanRequest.FirstChan=this.channels[0],this.scanRequest.LastChan=this.channels[this.channels.length-1]},100):(this.scanRequest.FirstChan="",this.scanRequest.LastChan="")}}onSatTuningChange(){Object.assign(this.scanRequest,this.satTuning)}calcCount(){return this.channelCount=this.channels.findIndex(e=>e==this.scanRequest.LastChan)-this.channels.findIndex(e=>e==this.scanRequest.FirstChan)+1}getScanList(){this.channelService.GetScanList(this.card.SourceId).subscribe(e=>{this.scans=e.ScanList.Scans,this.scans.forEach(n=>{var s=new Date(n.ScanDate);n.label=s.toLocaleDateString()+" "+s.toLocaleTimeString()+" "+(n.Processed?this.procDesc:this.unprocDesc)})})}getmultiplexList(){this.channelService.GetVideoMultiplexList({SourceID:this.card.SourceId}).subscribe(e=>{this.multiplex=e.VideoMultiplexList.VideoMultiplexes})}startScan(){this.scanRequest.CardId=this.card.CardId,this.channelService.StartScan(this.scanRequest).subscribe(e=>{setTimeout(()=>this.refreshStatus(),500)})}stopScan(){this.channelService.StopScan(this.card.CardId).subscribe()}respondDialog(){this.dialogResponse.CardId=this.card.CardId,this.dialogResponse.DialogButton=this.scanStatus.DialogButtons.indexOf(this.buttonText),this.channelService.SendScanDialogResponse(this.dialogResponse).subscribe(e=>this.iconnection.loadChannels())}refreshStatus(){this.channelService.GetScanStatus().subscribe(e=>{this.scanStatus=e.ScanStatus,this.scrollpanel.scrollTop(1e5),"RUNNING"==this.scanStatus.Status?this.refreshCount=5:this.refreshCount--,this.refreshCount>0?setTimeout(()=>this.refreshStatus(),500):this.iconnection.loadChannels()})}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Or),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-channelscan"]],viewQuery:function(e,n){if(1&e&&(j(pse,5),j(hse,5)),2&e){let s;V(s=B())&&(n.scrollpanel=s.first),V(s=B())&&(n.statusPanel=s.first)}},inputs:{card:"card",cardList:"cardList",iconnection:"iconnection",videoSourceLookup:"videoSourceLookup"},decls:131,vars:137,consts:[[1,"form-group","field"],["for","DesiredServices",1,"label","block"],["optionLabel","label","optionValue","value","name","DesiredServices",3,"options","ngModel","editable","maxlength","ngModelChange"],["DesiredServices","ngModel"],[1,"block"],["inputId","FreeToAirOnly","name","FreeToAirOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FreeToAirOnly","ngModel"],["inputId","ChannelNumbersOnly","name","ChannelNumbersOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["ChannelNumbersOnly","ngModel"],["inputId","CompleteChannelsOnly","name","CompleteChannelsOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["CompleteChannelsOnly","ngModel"],["inputId","FullChannelSearch","name","FullChannelSearch",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FullChannelSearch","ngModel"],["inputId","RemoveDuplicates","name","RemoveDuplicates",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["RemoveDuplicates","ngModel"],["inputId","AddFullTS","name","AddFullTS",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AddFullTS","ngModel"],["inputId","TestDecryptable","name","TestDecryptable",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["TestDecryptable","ngModel"],["for","ScanType",1,"label","block"],["optionLabel","label","optionValue","value","name","ScanType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["ScanType","ngModel"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"grid"],[2,"display","flex","align-items","center"],["icon","pi pi-play","iconPos","left",3,"label","disabled","onClick"],["class","block",4,"ngIf"],[1,"mb-4","w-full",3,"legend","collapsed","toggleable"],[1,"col-6"],[1,"col-10","bg-blue-100","text-gray-900"],[1,"label","block"],[1,"col-10"],[3,"value"],["class","form-group field",4,"ngIf"],["icon","pi pi-times-circle","iconPos","left","styleClass","p-button-danger",3,"label","disabled","onClick"],[1,"col-6",2,"white-space","pre-line"],["scroll",""],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","FreqTable",1,"label","block"],["optionLabel","label","optionValue","value","name","FreqTable",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["FreqTable","ngModel"],["for","Country",1,"label","block"],["optionLabel","label","optionValue","value","name","Country",3,"options","ngModel","editable","maxlength","ngModelChange"],["Country","ngModel"],["for","atscModulation",1,"label","block"],["optionLabel","label","optionValue","value","name","atscModulation",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["atscModulation","ngModel"],["for","FirstChan",1,"label","block"],["name","FirstChan",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirstChan","ngModel"],[4,"ngIf"],[1,"p-error","block"],["for","LastChan",1,"label","block"],["name","LastChan",3,"options","ngModel","editable","maxlength","ngModelChange"],["LastChan","ngModel"],["for","Frequency",1,"label","block"],["name","Frequency","id","Frequency",3,"ngModel","min","max","ngModelChange"],[3,"translate","translateParams"],["for","Inversion",1,"label","block"],["name","Inversion","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Inversion","ngModel"],["for","SatTuning",1,"label","block"],["name","SatTuning","optionLabel","label",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SatTuning","ngModel"],["for","Bandwidth",1,"label","block"],["name","Bandwidth","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Bandwidth","ngModel"],["for","Polarity",1,"label","block"],["name","Polarity","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Polarity","ngModel"],["for","dvbcSymbolRate",1,"label","block"],["name","dvbcSymbolRate","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["dvbcSymbolRate","ngModel"],["for","dvbsSymbolRate",1,"label","block"],["name","dvbsSymbolRate","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["dvbsSymbolRate","ngModel"],["for","Constellation",1,"label","block"],["name","Constellation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Constellation","ngModel"],["for","Modulation",1,"label","block"],["name","Modulation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Modulation","ngModel"],["for","DVBSModulation",1,"label","block"],["name","DVBSModulation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBSModulation","ngModel"],["for","DVBTModSys",1,"label","block"],["name","DVBTModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBTModSys","ngModel"],["for","DVBCModSys",1,"label","block"],["name","DVBCModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBCModSys","ngModel"],["for","DVBSModSys",1,"label","block"],["name","DVBSModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBSModSys","ngModel"],["for","CodeRateLP",1,"label","block"],["name","CodeRateLP","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["CodeRateLP","ngModel"],["for","CodeRateHP",1,"label","block"],["name","CodeRateHP","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["CodeRateHP","ngModel"],["for","FEC",1,"label","block"],["name","FEC","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["FEC","ngModel"],["for","TransmissionMode",1,"label","block"],["name","TransmissionMode","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["TransmissionMode","ngModel"],["for","GuardInterval",1,"label","block"],["name","GuardInterval","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["GuardInterval","ngModel"],["for","Hierarchy",1,"label","block"],["name","Hierarchy","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Hierarchy","ngModel"],["for","RollOff",1,"label","block"],["name","RollOff","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["RollOff","ngModel"],["for","ScanId",1,"label","block"],["optionLabel","label","optionValue","ScanId","name","ScanId",3,"options","ngModel","editable","maxlength","ngModelChange"],["ScanId","ngModel"],["inputId","IgnoreSignalTimeout","name","IgnoreSignalTimeout",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["IgnoreSignalTimeout","ngModel"],["inputId","FollowNITSetting","name","FollowNITSetting",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FollowNITSetting","ngModel"],["for","MplexId",1,"label","block"],["optionLabel","Description","optionValue","MplexId","name","MplexId",3,"options","ngModel","editable","maxlength","ngModelChange"],["MplexId","ngModel"],[1,"col-10",2,"color","black","background-color","pink"],["pInputText","","id","DialogString","name","DialogString",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["InputName","ngModel"],["for","DialogButtons",1,"label","block"],["name","DialogButtons",3,"options","ngModel","editable","maxlength","ngModelChange"],["styleClass","p-button-info",1,"gap-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"label",1),g(2),m(3,"translate"),c(),l(4,"p-dropdown",2,3),C("ngModelChange",function(r){return n.scanRequest.DesiredServices=r}),c(),l(6,"small",4),g(7),m(8,"translate"),c()(),l(9,"div",0)(10,"p-checkbox",5,6),C("ngModelChange",function(r){return n.scanRequest.FreeToAirOnly=r}),m(12,"translate"),c(),l(13,"small",4),g(14),m(15,"translate"),c()(),l(16,"div",0)(17,"p-checkbox",7,8),C("ngModelChange",function(r){return n.scanRequest.ChannelNumbersOnly=r}),m(19,"translate"),c(),l(20,"small",4),g(21),m(22,"translate"),c()(),l(23,"div",0)(24,"p-checkbox",9,10),C("ngModelChange",function(r){return n.scanRequest.CompleteChannelsOnly=r}),m(26,"translate"),c(),l(27,"small",4),g(28),m(29,"translate"),c()(),l(30,"div",0)(31,"p-checkbox",11,12),C("ngModelChange",function(r){return n.scanRequest.FullChannelSearch=r}),m(33,"translate"),c(),l(34,"small",4),g(35),m(36,"translate"),c()(),l(37,"div",0)(38,"p-checkbox",13,14),C("ngModelChange",function(r){return n.scanRequest.RemoveDuplicates=r}),m(40,"translate"),c(),l(41,"small",4),g(42),m(43,"translate"),c()(),l(44,"div",0)(45,"p-checkbox",15,16),C("ngModelChange",function(r){return n.scanRequest.AddFullTS=r}),m(47,"translate"),c(),l(48,"small",4),g(49),m(50,"translate"),c()(),l(51,"div",0)(52,"p-checkbox",17,18),C("ngModelChange",function(r){return n.scanRequest.TestDecryptable=r}),m(54,"translate"),c(),l(55,"small",4),g(56),m(57,"translate"),c()(),l(58,"div",0)(59,"label",19),g(60),m(61,"translate"),c(),l(62,"p-dropdown",20,21),C("ngModelChange",function(r){return n.scanRequest.ScanType=r})("onChange",function(){return n.onScanTypeChange()}),c(),l(64,"small",4),g(65),c()(),_(66,Tse,9,13,"p-fieldset",22),_(67,zse,36,57,"p-fieldset",22),_(68,jse,9,15,"p-fieldset",22),_(69,Wse,17,22,"p-fieldset",22),k(70,"br")(71,"br"),l(72,"div",0)(73,"div",23)(74,"div",24)(75,"p-button",25),C("onClick",function(){return n.startScan()}),m(76,"translate"),c()()(),_(77,Kse,3,3,"small",26),c(),l(78,"p-fieldset",27),m(79,"translate"),l(80,"div",23)(81,"div",28)(82,"div",0)(83,"div",29)(84,"b"),g(85),c()()(),l(86,"div",0)(87,"label",30),g(88),m(89,"translate"),c(),l(90,"div",29),g(91),c()(),l(92,"div",0)(93,"label",30),g(94),m(95,"translate"),c(),l(96,"div",29),g(97),c()(),l(98,"div",0)(99,"label",30),g(100),m(101,"translate"),c(),l(102,"div",31),k(103,"p-progressBar",32),c()(),l(104,"div",0)(105,"label",30),g(106),m(107,"translate"),c(),l(108,"div",31),k(109,"p-progressBar",32),c()(),l(110,"div",0)(111,"label",30),g(112),m(113,"translate"),c(),l(114,"div",31),k(115,"p-progressBar",32),c()(),k(116,"br"),_(117,Qse,6,1,"div",33),_(118,Jse,3,1,"div",33),_(119,Yse,6,10,"div",33),_(120,Zse,3,3,"div",33),k(121,"br"),l(122,"div",0)(123,"div",24)(124,"p-button",34),C("onClick",function(){return n.stopScan()}),m(125,"translate"),c()(),k(126,"small",4),c()(),l(127,"div",35)(128,"p-scrollPanel",null,36),g(130),c()()()()),2&e&&(a(2),S(f(3,81,"settings.channelscan.services_label")),a(2),q(A(131,pt)),p("options",n.serviceValues)("ngModel",n.scanRequest.DesiredServices)("editable",!1)("maxlength",0),a(3),T(" ",f(8,83,"settings.channelscan.services_desc")," "),a(3),D("label",f(12,85,"settings.channelscan.ftaonly_label")),p("ngModel",n.scanRequest.FreeToAirOnly)("binary",!0),a(4),T(" ",f(15,87,"settings.channelscan.ftaonly_desc")," "),a(3),D("label",f(19,89,"settings.channelscan.channelnumbersonly_label")),p("ngModel",n.scanRequest.ChannelNumbersOnly)("binary",!0),a(4),T(" ",f(22,91,"settings.channelscan.channelnumbersonly_desc")," "),a(3),D("label",f(26,93,"settings.channelscan.completeonly_label")),p("ngModel",n.scanRequest.CompleteChannelsOnly)("binary",!0),a(4),T(" ",f(29,95,"settings.channelscan.completeonly_desc")," "),a(3),D("label",f(33,97,"settings.channelscan.fullsearch_label")),p("ngModel",n.scanRequest.FullChannelSearch)("binary",!0),a(4),T(" ",f(36,99,"settings.channelscan.fullsearch_desc")," "),a(3),D("label",f(40,101,"settings.channelscan.removeduplicates_label")),p("ngModel",n.scanRequest.RemoveDuplicates)("binary",!0),a(4),T(" ",f(43,103,"settings.channelscan.removeduplicates_desc")," "),a(3),D("label",f(47,105,"settings.channelscan.addfullts_label")),p("ngModel",n.scanRequest.AddFullTS)("binary",!0),a(4),T(" ",f(50,107,"settings.channelscan.addfullts_desc")," "),a(3),D("label",f(54,109,"settings.channelscan.testdecryptable_label")),p("ngModel",n.scanRequest.TestDecryptable)("binary",!0),a(4),T(" ",f(57,111,"settings.channelscan.testdecryptable_desc")," "),a(4),S(f(61,113,"settings.channelscan.scantype_label")),a(2),q(A(132,pt)),p("options",n.scanTypes)("ngModel",n.scanRequest.ScanType)("editable",!1)("maxlength",0),a(3),T(" ",n.helpText," "),a(1),p("ngIf","FULL"==n.scanRequest.ScanType),a(1),p("ngIf","FULLTUNED"==n.scanRequest.ScanType),a(1),p("ngIf","IMPORT"==n.scanRequest.ScanType),a(1),p("ngIf","ALLTRANSPORT"==n.scanRequest.ScanType||"ONETRANSPORT"==n.scanRequest.ScanType),a(6),D("label",f(76,115,"settings.channelscan.scan_label")),p("disabled",n.setupService.schedulingEnabled||"RUNNING"==n.scanStatus.Status||n.iconnection.currentForm&&n.iconnection.currentForm.form.dirty||!n.card.SourceId),a(2),p("ngIf",n.iconnection.currentForm&&n.iconnection.currentForm.form.dirty||!n.card.SourceId),a(1),D("legend",f(79,117,"settings.channelscan.status_title")),p("collapsed",!0)("toggleable",!1)("collapsed",!1),a(7),T("",n.scanStatus.StatusTitle," \xa0"),a(3),S(f(89,119,"settings.channelscan.status_label")),a(3),T(" ",n.scanStatus.StatusText," \xa0 "),a(3),S(f(95,121,"settings.channelscan.lock_label")),a(3),T(" ",n.scanStatus.SignalLock?n.lockDesc:n.nolockDesc," \xa0 "),a(3),S(f(101,123,"settings.channelscan.progress_label")),a(3),q(A(133,Sg)),p("value",n.scanStatus.Progress),a(3),S(f(107,125,"settings.channelscan.noise_label")),a(3),q(A(134,Sg)),p("value",n.scanStatus.SignalNoise),a(3),S(f(113,127,"settings.channelscan.strength_label")),a(3),q(A(135,Sg)),p("value",n.scanStatus.SignalStrength),a(2),p("ngIf",n.scanStatus.DialogMsg),a(1),p("ngIf",n.scanStatus.DialogInputReq),a(1),p("ngIf",n.scanStatus.DialogButtons.length>0),a(1),p("ngIf",n.scanStatus.DialogButtons.length>0||n.scanStatus.DialogInputReq),a(4),D("label",f(125,129,"settings.channelscan.stop_label")),p("disabled","RUNNING"!=n.scanStatus.Status||n.scanStatus.DialogButtons.length>0),a(4),q(A(136,Xse)),a(2),T(" ",n.scanStatus.StatusLog," "))},directives:[Vt,Te,_e,fn,rn,Q,Ui,dt,hu,ve,XG,Ye,az],pipes:[de],styles:[""]}),t})(),tre=(()=>{class t{constructor(e){this.httpClient=e}GetBackendStatus(){return this.httpClient.get("/Status/GetBackendStatus")}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var ci=(()=>(function(t){t[t.kState_Error=-1]="kState_Error",t[t.kState_None=0]="kState_None",t[t.kState_WatchingLiveTV=1]="kState_WatchingLiveTV",t[t.kState_WatchingPreRecorded=2]="kState_WatchingPreRecorded",t[t.kState_WatchingVideo=3]="kState_WatchingVideo",t[t.kState_WatchingDVD=4]="kState_WatchingDVD",t[t.kState_WatchingBD=5]="kState_WatchingBD",t[t.kState_WatchingRecording=6]="kState_WatchingRecording",t[t.kState_RecordingOnly=7]="kState_RecordingOnly",t[t.kState_ChangingState=8]="kState_ChangingState"}(ci||(ci={})),ci))();let as=(()=>{class t{constructor(e){this.translate=e,this.allSlashes=new RegExp(/\//g),this.deSpacer=new RegExp(/ /g),this.recTypeTrans={"Single Record":"","Record All":"","Record One":"","Record Daily":"","Record Weekly":"","Override Recording":"","Do not Record":"","Recording Template":"","Not Recording":""};for(const[n,s]of Object.entries(this.recTypeTrans)){const r="recrule."+n.replace(this.deSpacer,"");this.translate.get(r).subscribe(o=>{Object.defineProperty(this.recTypeTrans,n,{value:o})})}}formatDate(e,n){if(!e)return"";10==e.length&&(e+=" 00:00");let s=new Date(e).toLocaleDateString();return n?s.replace(this.allSlashes,"/"):s}formatTime(e){return e?(new Date(e).toLocaleTimeString()+" ").replace(/:.. /,""):""}formatDateTime(e,n){return this.formatDate(e,n)+" "+this.formatTime(e)}}return t.\u0275fac=function(e){return new(e||t)(K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const nre=function(t){return{EndTime:t}};function ire(t,i){if(1&t&&(ce(0),g(1),m(2,"translate"),ue()),2&t){const e=d().$implicit,n=d(2);a(1),yo(" '",e.Recording.Title,"' on ",e.Recording.Channel.CallSign,". ",Dt(2,3,"dashboard.status.endtime_text",z(6,nre,n.utility.formatTime(e.Recording.EndTime)))," ")}}const sre=function(t,i,e,n){return{CardId:t,Id:i,InputName:e,DisplayName:n}};function rre(t,i){if(1&t&&(l(0,"div")(1,"ul")(2,"li"),g(3),m(4,"translate"),c()()()),2&t){const e=i.$implicit;a(3),T("",Dt(4,1,"dashboard.status.card_text",_i(4,sre,e.CardId,e.Id,e.InputName,e.DisplayName))," ")}}const ore=function(t,i,e){return{Id:t,HostName:i,State:e}};function are(t,i){if(1&t&&(l(0,"div")(1,"ul")(2,"li"),g(3),m(4,"translate"),_(5,ire,3,8,"ng-container",4),c(),_(6,rre,5,9,"div",3),c()()),2&t){const e=i.$implicit,n=d(2);a(3),T(" ",Dt(4,3,"dashboard.status.encoder_text",Rt(6,ore,e.Id,e.HostName,n.EncoderStatusText(e.State)))," "),a(2),p("ngIf",7==e.State),a(1),p("ngForOf",e.Inputs)}}function lre(t,i){if(1&t&&(l(0,"div"),_(1,are,7,10,"div",3),c()),2&t){const e=d();a(1),p("ngForOf",e.encoders)}}function cre(t,i){1&t&&(l(0,"div"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.no_encoders")))}let ure=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}EncoderStatusText(e){switch(e){case ci.kState_Error:return"Error";case ci.kState_None:return"Idle";case ci.kState_WatchingLiveTV:return"Watching Live TV";case ci.kState_WatchingPreRecorded:return"Watching Pre Recorded";case ci.kState_WatchingVideo:return"Watching Video";case ci.kState_WatchingDVD:return"Watching DVD";case ci.kState_WatchingBD:return"Watching BD";case ci.kState_WatchingRecording:return"Watching Recording";case ci.kState_RecordingOnly:return"Recording";case ci.kState_ChangingState:return"Changing State";default:return"unknown"}}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-encoders"]],inputs:{encoders:"encoders"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noEncoders",""],[4,"ngFor","ngForOf"],[4,"ngIf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,lre,2,1,"div",1),c(),_(5,cre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.encoder_title")),a(2),p("ngIf",0!=(null==n.encoders?null:n.encoders.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function dre(t,i){if(1&t&&(l(0,"li",4)(1,"div",5),g(2),c()()),2&t){const e=i.$implicit,n=d(2);a(1),D("pTooltip",e.Description),a(1),Ih(" ",n.utility.formatDate(e.StartTime)," ",n.utility.formatTime(e.StartTime)," - ",e.Recording.EncoderId," - ",e.Channel.CallSign," - ",e.Title," ")}}const pre=function(t){return{length:t}};function hre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul"),_(5,dre,3,6,"li",3),c()()),2&t){const e=d();a(2),S(Dt(3,2,"dashboard.status.schedule_text",z(5,pre,null==e.scheduled?null:e.scheduled.length))),a(3),p("ngForOf",e.scheduled)}}function mre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.schedule_none")))}let fre=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-scheduled"]],inputs:{scheduled:"scheduled"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noSchedule",""],["class","flex",4,"ngFor","ngForOf"],[1,"flex"],["tooltipPosition","bottom",3,"pTooltip"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,hre,6,7,"div",1),c(),_(5,mre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.schedule_title")),a(2),p("ngIf",0!=(null==n.scheduled?null:n.scheduled.length))("ngIfElse",s)}},directives:[Q,at,Jt],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function gre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit,n=d(2);a(2),Eh("",n.utility.formatDate(e.StatusTime)," ",n.utility.formatTime(e.StatusTime)," - ",e.Program.Title," - ",e.LocalizedJobName," - ",f(3,6,"dashboard.status.jobs_status"),": ",e.LocalizedStatus," ")}}function _re(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul"),_(5,gre,4,8,"div",3),c()()),2&t){const e=d();a(2),T("",f(3,2,"dashboard.status.jobs_text"),":"),a(3),p("ngForOf",e.jobqueue)}}function bre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.jobs_none")))}let vre=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-jobqueue"]],inputs:{jobqueue:"jobqueue"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noJobs",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,_re,6,4,"div",1),c(),_(5,bre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.jobs_title")),a(2),p("ngIf",0!=(null==n.jobqueue?null:n.jobqueue.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function Cre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul")(5,"li"),g(6),m(7,"translate"),c(),l(8,"ul")(9,"li"),g(10),m(11,"translate"),c(),l(12,"li"),g(13),m(14,"translate"),c(),l(15,"li"),g(16),m(17,"translate"),c(),l(18,"li"),g(19),m(20,"translate"),c(),l(21,"ul")(22,"li"),g(23),m(24,"translate"),c(),l(25,"li"),g(26),m(27,"translate"),c(),l(28,"li"),g(29),m(30,"translate"),c()()()()()),2&t){const e=i.ngIf;a(2),T("",f(3,16,"dashboard.status.mach.disk_summ"),":"),a(4),T("",f(7,18,"dashboard.status.mach.disk_total"),":"),a(4),$e("",f(11,20,"dashboard.status.mach.total_space"),": ",e.Total.toLocaleString()," MiB"),a(3),$e("",f(14,22,"dashboard.status.mach.space_used"),": ",e.Used.toLocaleString()," MiB"),a(3),$e("",f(17,24,"dashboard.status.mach.space_free"),": ",e.Free.toLocaleString()," MiB"),a(3),$e("",f(20,26,"dashboard.status.mach.space_after_expire"),": ",(e.Free+e.Expirable).toLocaleString(),""),a(4),$e("",f(24,28,"dashboard.status.mach.space_livetv"),": ",e.LiveTV.toLocaleString()," MiB"),a(3),$e("",f(27,30,"dashboard.status.mach.space_deleted"),": ",e.Deleted.toLocaleString()," MiB"),a(3),$e("",f(30,32,"dashboard.status.mach.space_expirable"),": ",e.Expirable.toLocaleString()," MiB")}}function yre(t,i){1&t&&Y(0)}function wre(t,i){if(1&t&&(l(0,"div"),_(1,yre,1,0,"ng-container",6),c()),2&t){const e=i.$implicit;d(2);const n=F(10);a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",e)}}const Tre=function(t,i,e){return{GuideStart:t,GuideEnd:i,GuideStatus:e}},Sre=function(t){return{GuideNext:t}},xre=function(t,i){return{GuideThru:t,GuideDays:i}};function Dre(t,i){if(1&t&&(l(0,"div")(1,"div")(2,"p"),g(3),m(4,"translate"),c(),l(5,"ul")(6,"li"),g(7),m(8,"translate"),c(),l(9,"li"),g(10),m(11,"translate"),c(),l(12,"li"),g(13),m(14,"translate"),c()()(),_(15,Cre,31,34,"div",1),l(16,"div")(17,"p"),g(18),m(19,"translate"),c(),_(20,wre,2,2,"div",5),c(),l(21,"div")(22,"p"),g(23),m(24,"translate"),k(25,"br"),g(26),m(27,"translate"),k(28,"br"),g(29),m(30,"translate"),c()()()),2&t){const e=d(),n=F(8);a(3),S(f(4,14,"dashboard.status.mach.load")),a(4),$e("1 ",f(8,16,"dashboard.status.mach.minute"),": ",e.machineinfo.LoadAvg1.toLocaleString(),""),a(3),$e("5 ",f(11,18,"dashboard.status.mach.minutes"),": ",e.machineinfo.LoadAvg2.toLocaleString(),""),a(3),$e("15 ",f(14,20,"dashboard.status.mach.minutes"),": ",e.machineinfo.LoadAvg3.toLocaleString(),""),a(2),p("ngIf",e.getStorageGroupTotal(e.machineinfo.StorageGroups))("ngIfElse",n),a(3),T("",f(19,22,"dashboard.status.mach.disk_details"),":"),a(2),p("ngForOf",e.getStorageGroupDetails(e.machineinfo.StorageGroups)),a(3),S(Dt(24,24,"dashboard.status.mach.mythfill_last",Rt(33,Tre,e.utility.formatDateTime(e.machineinfo.GuideStart),e.utility.formatDateTime(e.machineinfo.GuideEnd),e.machineinfo.GuideStatus))),a(3),T(" ",Dt(27,27,"dashboard.status.mach.mythfill_next",z(37,Sre,e.utility.formatDateTime(e.machineinfo.GuideNext))),""),a(3),T(" ",Dt(30,30,"dashboard.status.mach.mythfill_until",We(39,xre,e.utility.formatDateTime(e.machineinfo.GuideThru),e.machineinfo.GuideDays))," ")}}function Mre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.mach.none")))}function kre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.mach.disk_none")))}function Ire(t,i){if(1&t&&(l(0,"ul")(1,"li"),g(2),m(3,"translate"),c(),l(4,"ul")(5,"li"),g(6),m(7,"translate"),c(),l(8,"li"),g(9),m(10,"translate"),c(),l(11,"li"),g(12),m(13,"translate"),c(),l(14,"li"),g(15),m(16,"translate"),c()()()),2&t){const e=i.Id,n=i.Directory,s=i.Total,r=i.Used,o=i.Free;a(2),$e("",f(3,10,"dashboard.status.mach.myth_drive")," #",e,""),a(4),$e("",f(7,12,"dashboard.status.mach.disk_dirs"),": ",n,""),a(3),$e("",f(10,14,"dashboard.status.mach.total_space"),": ",s.toLocaleString()," MiB"),a(3),$e("",f(13,16,"dashboard.status.mach.space_used"),": ",r.toLocaleString()," MiB"),a(3),$e("",f(16,18,"dashboard.status.mach.space_free"),": ",o.toLocaleString()," MiB")}}let Ere=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}getStorageGroupTotal(e){return e.filter(n=>"total"==n.Id)[0]}getStorageGroupDetails(e){return e.filter(n=>"total"!=n.Id)}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-machineinfo"]],inputs:{machineinfo:"machineinfo"},decls:11,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noMachineInfo",""],["noDiskInfo",""],["printStorageGroup",""],[4,"ngFor","ngForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Dre,31,42,"div",1),c(),_(5,Mre,3,3,"ng-template",null,2,we),_(7,kre,3,3,"ng-template",null,3,we),_(9,Ire,17,20,"ng-template",null,4,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.mach.title")),a(2),p("ngIf",n.machineinfo)("ngIfElse",s)}},directives:[Q,at,Lt],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const Rre=function(t,i,e){return{Name:t,Type:i,IP:e}};function Lre(t,i){if(1&t&&(l(0,"div")(1,"li"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit;a(2),T("",Dt(3,1,"dashboard.status.backends_detail",Rt(4,Rre,e.Name,e.Type,e.IP))," ")}}function Ore(t,i){if(1&t&&(l(0,"div")(1,"ul"),_(2,Lre,4,8,"div",3),c()()),2&t){const e=d();a(2),p("ngForOf",e.backends)}}function Are(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.backends_none")))}let Pre=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-status-backends"]],inputs:{backends:"backends"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noBackends",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Ore,3,1,"div",1),c(),_(5,Are,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.backends_title")),a(2),p("ngIf",0!=(null==n.backends?null:n.backends.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const Fre=function(t,i,e,n){return{Name:t,IP:i,Port:e,OnLine:n}};function Nre(t,i){if(1&t&&(l(0,"div")(1,"li"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit;a(2),T("",Dt(3,1,"dashboard.status.frontends_detail",_i(4,Fre,e.Name,e.IP,e.Port,e.OnLine))," ")}}function Vre(t,i){if(1&t&&(l(0,"div")(1,"ul"),_(2,Nre,4,9,"div",3),c()()),2&t){const e=d();a(2),p("ngForOf",e.frontends)}}function Bre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.frontends_none")))}let Hre=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-status-frontends"]],inputs:{frontends:"frontends"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noFrontends",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Vre,3,1,"div",1),c(),_(5,Bre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.frontends_title")),a(2),p("ngIf",0!=(null==n.frontends?null:n.frontends.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function qre(t,i){if(1&t&&(l(0,"div",9)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"div"),g(5),c()()),2&t){const e=d().ngIf;a(2),S(f(3,2,"dashboard.status.misc_title")),a(3),T(" ",e.Miscellaneous," ")}}function Ure(t,i){if(1&t&&(l(0,"div"),k(1,"app-status-encoders",2)(2,"app-status-scheduled",3)(3,"app-status-jobqueue",4)(4,"app-status-machineinfo",5)(5,"app-status-backends",6)(6,"app-status-frontends",7),_(7,qre,6,4,"div",8),c()),2&t){const e=i.ngIf;a(1),p("encoders",e.Encoders),a(1),p("scheduled",e.Scheduled),a(1),p("jobqueue",e.JobQueue),a(1),p("machineinfo",e.MachineInfo),a(1),p("backends",e.Backends),a(1),p("frontends",e.Frontends),a(1),p("ngIf",e.Miscellaneous)}}function Gre(t,i){1&t&&(l(0,"div"),g(1,"Loading..."),c())}let zre=(()=>{class t{constructor(e){this.statusService=e}ngOnInit(){this.m_status$=this.statusService.GetBackendStatus()}}return t.\u0275fac=function(e){return new(e||t)(x(tre))},t.\u0275cmp=G({type:t,selectors:[["app-status"]],decls:7,vars:7,consts:[[4,"ngIf","ngIfElse"],["loading",""],[3,"encoders"],[3,"scheduled"],[3,"jobqueue"],[3,"machineinfo"],[3,"backends"],[3,"frontends"],["class","statusBox",4,"ngIf"],[1,"statusBox"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,Ure,8,7,"div",0),m(4,"async"),_(5,Gre,2,0,"ng-template",null,1,we)),2&e){const s=F(6);let r;a(1),T("",f(2,3,"dashboard.backendStatus")," "),a(2),p("ngIf",null==(r=f(4,5,n.m_status$))?null:r.BackendStatus)("ngIfElse",s)}},directives:[Q,ure,fre,vre,Ere,Pre,Hre],pipes:[de,xy],styles:["div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const jre=["recsform"],$re=["menu"];function Wre(t,i){}function Kre(t,i){1&t&&g(0),2&t&&T(" ",i.$implicit," ")}function Qre(t,i){if(1&t){const e=I();l(0,"p-dropdown",57),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),_(2,Kre,1,1,"ng-template",58),c()}if(2&t){const e=i.$implicit,n=d(2);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.recGroups)("showClear",!0)}}function Jre(t,i){if(1&t){const e=I();l(0,"tr")(1,"th"),g(2),m(3,"translate"),m(4,"translate"),k(5,"p-columnFilter",36),g(6),m(7,"translate"),l(8,"p-columnFilter",37),_(9,Qre,3,6,"ng-template",38),c(),l(10,"button",39),C("click",function(){v(e);const s=d();return s.refreshing=!0,s.refresh()}),m(11,"translate"),c(),g(12),c()(),l(13,"tr")(14,"th",40),g(15),m(16,"translate"),k(17,"p-sortIcon",41),c(),k(18,"th",42),l(19,"th",43),g(20),m(21,"translate"),c(),l(22,"th",44),g(23),m(24,"translate"),c(),l(25,"th",45),g(26),m(27,"translate"),k(28,"p-sortIcon",46),c(),l(29,"th",47),g(30),m(31,"translate"),k(32,"p-sortIcon",48),c(),l(33,"th",49),g(34),m(35,"translate"),c(),l(36,"th",50),g(37),m(38,"translate"),k(39,"p-sortIcon",51),c(),l(40,"th",52),g(41),m(42,"translate"),c(),l(43,"th",53),g(44),m(45,"translate"),c(),l(46,"th",44)(47,"a",54),k(48,"i",55),c(),k(49,"button",56),c()()}if(2&t){const e=d();a(2),$e(" ",f(3,17,"dashboard.recordings.filter"),": \xa0\xa0 ",f(4,19,"dashboard.recordings.title"),": \xa0 "),a(3),p("matchModeOptions",e.matchModeTitle),a(1),T(" ",f(7,21,"dashboard.recordings.recgrp"),": \xa0 "),a(2),p("showMenu",!1),a(2),D("pTooltip",f(11,23,"common.refresh")),a(2),T(" \xa0\xa0\xa0",e.programs.length," Rows "),a(3),T(" ",f(16,25,"dashboard.recordings.title")," "),a(5),S(f(21,27,"dashboard.recordings.subtitle")),a(3),S(f(24,29,"dashboard.recordings.seas_ep")),a(3),T(" ",f(27,31,"dashboard.recordings.orig_airdate")," "),a(4),T(" ",f(31,33,"dashboard.recordings.airdate")," "),a(4),S(f(35,35,"dashboard.recordings.channel")),a(3),T(" ",f(38,37,"dashboard.recordings.recgrp")," "),a(4),T(" ",f(42,39,"dashboard.recordings.duration")," "),a(3),S(f(45,41,"dashboard.recordings.file_size")),a(5),p("disabled",!0)}}function Yre(t,i){1&t&&(k(0,"i",70),m(1,"translate")),2&t&&D("pTooltip",f(1,1,"dashboard.recordings.damaged"))}function Zre(t,i){1&t&&(k(0,"i",71),m(1,"translate")),2&t&&D("pTooltip",f(1,1,"dashboard.recordings.watched"))}function Xre(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}const eoe=function(t){return{"line-through":t}};function toe(t,i){if(1&t){const e=I();l(0,"tr",59)(1,"td",60),_(2,Yre,2,3,"i",61),g(3),c(),l(4,"td",42),_(5,Zre,2,3,"i",62),c(),l(6,"td",63),g(7),c(),l(8,"td",44),_(9,Xre,2,2,"div",64),c(),l(10,"td",53),k(11,"div",65),c(),l(12,"td",53),k(13,"div",65),c(),l(14,"td",49),g(15),c(),l(16,"td",66),g(17),c(),l(18,"td",52),g(19),m(20,"number"),c(),l(21,"td",53),g(22),m(23,"number"),c(),l(24,"td",44)(25,"a",67),m(26,"translate"),k(27,"i",68),c(),l(28,"button",69),C("click",function(s){const o=v(e).$implicit;return d().showMenu(o,s)}),c()()()}if(2&t){const e=i.$implicit,n=d();p("ngClass",z(24,eoe,"Deleted"==e.Recording.RecGroup)),a(2),p("ngIf",e.VideoPropNames.indexOf("DAMAGED")>-1),a(1),T(" ",e.Title," "),a(2),p("ngIf",e.ProgramFlagNames.indexOf("WATCHED")>-1),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle,""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",n.utility.formatDate(e.Airdate,!0),Ht),a(2),p("innerHTML",n.utility.formatDate(e.StartTime,!0),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(2),S(e.Recording.RecGroup),a(2),T("",Dt(20,16,n.getDuration(e),"1.0-0")," min"),a(3),T(" ",Dt(23,19,e.Recording.FileSize/1e6,"1.0-0")," MB"),a(3),D("href",n.URLencode("/Content/GetRecording?RecordedId="+e.Recording.RecordedId),Xt),D("pTooltip",f(26,22,"dashboard.recordings.download"))}}function noe(t,i){1&t&&(k(0,"p-message",77),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ioe(t,i){1&t&&(k(0,"p-message",78),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function soe(t,i){if(1&t){const e=I();l(0,"div",72),_(1,noe,2,3,"p-message",73),_(2,ioe,2,3,"p-message",74),c(),l(3,"p-button",75),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",76),C("onClick",function(){return v(e),d().saveProgram()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(1);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.program.Title.trim())}}function roe(t,i){if(1&t){const e=I();l(0,"p-button",79),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",80),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const ooe=function(){return{height:"75vw",width:"50vw"}},aoe=function(){return{minWidth:"400px"}};let loe=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.messageService=n,this.translate=s,this.setupService=r,this.utility=o,this.programs=[],this.recGroups=[],this.program={Title:"",Recording:{}},this.displayMetadataDlg=!1,this.displayRunJobs=!1,this.displayUnsaved=!1,this.successCount=0,this.errorCount=0,this.refreshing=!1,this.msg={Success:"common.success",Failed:"common.failed",NetFail:"common.networkfail",CanUndo:"dashboard.recordings.canundel",AlreadyDel:"dashboard.recordings.alreadydel",NonReRec:"dashboard.recordings.nonrerec"},this.jobsoffset=3,this.jobs=[{id:"Transcode",label:"dashboard.recordings.job_Transcode",command:h=>this.runjob(h)},{id:"Commflag",label:"dashboard.recordings.job_Commflag",command:h=>this.runjob(h)},{id:"Metadata",label:"dashboard.recordings.job_Metadata",command:h=>this.runjob(h)},{id:"UserJob1",visible:!1,command:h=>this.runjob(h)},{id:"UserJob2",visible:!1,command:h=>this.runjob(h)},{id:"UserJob3",visible:!1,command:h=>this.runjob(h)},{id:"UserJob4",visible:!1,command:h=>this.runjob(h)}],this.mnu_delete={label:"dashboard.recordings.mnu_delete",command:h=>this.delete(h,!1)},this.mnu_delete_rerec={label:"dashboard.recordings.mnu_delete_rerec",command:h=>this.delete(h,!0)},this.mnu_undelete={label:"dashboard.recordings.mnu_undelete",command:h=>this.undelete(h)},this.mnu_rerec={label:"dashboard.recordings.mnu_rerec",command:h=>this.rerec(h)},this.mnu_markwatched={label:"dashboard.recordings.mnu_markwatched",command:h=>this.markwatched(h,!0)},this.mnu_markunwatched={label:"dashboard.recordings.mnu_markunwatched",command:h=>this.markwatched(h,!1)},this.mnu_markdamaged={label:"dashboard.recordings.mnu_markdamaged",command:h=>this.markdamaged(h,!0)},this.mnu_markundamaged={label:"dashboard.recordings.mnu_markundamaged",command:h=>this.markdamaged(h,!1)},this.mnu_updatemeta={label:"dashboard.recordings.mnu_updatemeta",command:h=>this.updatemeta(h)},this.mnu_updaterecrule={label:"dashboard.recordings.mnu_updaterecrule",command:h=>this.updaterecrule(h)},this.mnu_stoprec={label:"dashboard.recordings.mnu_stoprec",command:h=>this.stoprec(h)},this.mnu_runjobs={label:"dashboard.recordings.mnu_runjobs",items:this.jobs},this.menuToShow=[],this.matchModeRecGrp=[{value:_t.EQUALS,label:"common.filter.equals"}],this.matchModeTitle=[{value:_t.STARTS_WITH,label:"common.filter.startswith"},{value:_t.CONTAINS,label:"common.filter.contains"},{value:_t.EQUALS,label:"common.filter.equals"}],this.saveObserver={next:h=>{h.bool?(this.successCount++,this.currentForm.form.markAsPristine(),this.editingProgram&&Object.assign(this.editingProgram,this.program)):(console.log("saveObserver error",h),this.errorCount++)},error:h=>{console.log("saveObserver error",h),this.errorCount++}},this.JobQCmds=this.setupService.getJobQCommands(),this.dvrService.GetRecGroupList().subscribe(h=>{this.recGroups=h.RecGroupList,this.recGroups.push("Deleted")});for(const[h,b]of Object.entries(this.msg))this.translate.get(b).subscribe(y=>{Object.defineProperty(this.msg,h,{value:y})});[this.mnu_delete,this.mnu_delete_rerec,this.mnu_undelete,this.mnu_rerec,this.mnu_markwatched,this.mnu_markunwatched,this.mnu_markdamaged,this.mnu_markundamaged,this.mnu_updatemeta,this.mnu_updaterecrule,this.mnu_stoprec,this.mnu_runjobs,this.jobs[0],this.jobs[1],this.jobs[2],...this.matchModeRecGrp,...this.matchModeTitle].forEach(h=>{h.label&&this.translate.get(h.label).subscribe(b=>h.label=b)})}ngOnInit(){}loadLazy(e){this.lazyLoadEvent=e;let n={StartIndex:0,Count:1};if(e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows),e.sortField&&(n.Sort=e.sortField,n.Sort="Airdate"==e.sortField?"originalairdate":"Recording.RecGroup"==e.sortField?"recgroup":e.sortField,e.sortOrder&&(n.Sort=n.Sort+(e.sortOrder>0?"asc":"desc"))),e.filters){if(e.filters.Title.value)switch(e.filters.Title.matchMode){case _t.STARTS_WITH:n.TitleRegEx="^"+e.filters.Title.value;break;case _t.CONTAINS:n.TitleRegEx=e.filters.Title.value;break;case _t.EQUALS:n.TitleRegEx="^"+e.filters.Title.value+"$"}e.filters["Recording.RecGroup"].value&&e.filters["Recording.RecGroup"].matchMode==_t.EQUALS&&(n.RecGroup=e.filters["Recording.RecGroup"].value)}this.dvrService.GetRecordedList(n).subscribe(s=>{let r=s.ProgramList;this.programs.length=s.ProgramList.TotalAvailable,this.programs.splice(r.StartIndex,r.Count,...r.Programs),this.programs=[...this.programs],this.refreshing=!1})}refresh(){this.loadLazy(this.lazyLoadEvent)}URLencode(e){return encodeURI(e)}getDuration(e){const n=new Date(e.Recording.StartTs).getTime();return(new Date(e.Recording.EndTs).getTime()-n)/6e4}showMenu(e,n){if(this.program=e,this.menuToShow.length=0,"Deleted"==this.program.Recording.RecGroup?this.menuToShow.push(this.mnu_undelete):(this.menuToShow.push(this.mnu_delete),this.menuToShow.push(this.mnu_delete_rerec)),this.menuToShow.push(this.mnu_rerec),e.ProgramFlagNames.indexOf("WATCHED")>-1?this.menuToShow.push(this.mnu_markunwatched):this.menuToShow.push(this.mnu_markwatched),e.VideoPropNames.indexOf("DAMAGED")>-1?this.menuToShow.push(this.mnu_markundamaged):this.menuToShow.push(this.mnu_markdamaged),this.menuToShow.push(this.mnu_updatemeta),"Deleted"!=this.program.Recording.RecGroup){this.menuToShow.push(this.mnu_runjobs);for(let s=0;s<4;s++)this.JobQCmds.UserJob[s]?(this.jobs[s+this.jobsoffset].visible=!0,this.jobs[s+this.jobsoffset].label=this.JobQCmds.UserJobDesc[s]):this.jobs[s+this.jobsoffset].visible=!1}this.menu.toggle(n)}delete(e,n){this.dvrService.GetRecorded({RecordedId:this.program.Recording.RecordedId}).subscribe({next:s=>{"Deleted"==s.Program.Recording.RecGroup?(this.sendMessage("error",e.item.label,this.msg.AlreadyDel),this.program.Recording.RecGroup="Deleted"):this.dvrService.DeleteRecording({RecordedId:this.program.Recording.RecordedId,AllowRerecord:n}).subscribe({next:r=>{r.bool?(this.sendMessage("success",e.item.label,this.msg.Success,this.msg.CanUndo),this.program.Recording.RecGroup="Deleted"):this.sendMessage("error",e.item.label,this.msg.Failed)},error:r=>this.networkError(r)})},error:s=>this.networkError(s)})}undelete(e){this.dvrService.UnDeleteRecording({RecordedId:this.program.Recording.RecordedId}).subscribe({next:n=>{n.bool?(this.program.Recording.RecGroup="Default",this.sendMessage("success",e.item.label,this.msg.Success)):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}networkError(e){console.log("network error",e),this.sendMessage("error","",this.msg.NetFail)}sendMessage(e,n,s,r){this.messageService.add({severity:e,summary:s,detail:n+" "+this.program.Title+" "+this.program.SubTitle+(r=r?"\n"+r:""),life:3e3})}rerec(e){this.dvrService.AllowReRecord(this.program.Recording.RecordedId).subscribe({next:n=>{n.bool?this.sendMessage("success",e.item.label,this.msg.Success):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}markwatched(e,n){this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Watched:n}).subscribe({next:s=>{s.bool?(this.sendMessage("success",e.item.label,this.msg.Success),this.program.ProgramFlagNames=n?this.program.ProgramFlagNames+"|WATCHED|":this.program.ProgramFlagNames.replace(/WATCHED/g,"")):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}markdamaged(e,n){this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Damaged:n}).subscribe({next:s=>{s.bool?n?(this.sendMessage("success",e.item.label,this.msg.Success,this.msg.NonReRec),this.program.VideoPropNames=this.program.VideoPropNames+"|DAMAGED|"):(this.sendMessage("success",e.item.label,this.msg.Success),this.program.VideoPropNames=this.program.VideoPropNames.replace(/DAMAGED/g,"")):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}updatemeta(e){this.editingProgram=this.program,this.program=Object.assign({},this.program),this.program.Airdate=this.program.Airdate?new Date(this.program.Airdate+" 00:00"):null,this.displayMetadataDlg=!0,this.currentForm.form.markAsPristine()}saveProgram(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1,this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Description:this.program.Description,Episode:this.program.Episode,Inetref:this.program.Inetref,OriginalAirDate:this.program.Airdate,Season:this.program.Season,SubTitle:this.program.SubTitle,Title:this.program.Title,RecGroup:this.program.Recording.RecGroup}).subscribe(this.saveObserver)}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayMetadataDlg=!1,this.editingProgram=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.editingProgram=void 0)}updaterecrule(e){}stoprec(e){}runjob(e){this.dvrService.ManageJobQueue({Action:"Add",JobName:e.item.id,RecordedId:this.program.Recording.RecordedId}).subscribe({next:n=>{n.int>0?this.sendMessage("success",e.item.label,this.msg.Success):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(ys),x(Le),x(De),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-recordings"]],viewQuery:function(e,n){if(1&e&&(j(jre,5),j($re,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.menu=s.first)}},features:[Ne([ys])],decls:68,vars:79,consts:[["name","recsform"],["recsform","ngForm"],[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full",2,"height","90vh"],[3,"popup","model","viewportHeight","backLabel"],["menu",""],["scrollHeight","flex","styleClass","p-datatable-striped",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","Title",1,"label","block"],["pInputText","","id","Title","name","Title",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Title","ngModel"],["for","SubTitle",1,"label","block"],["pInputText","","id","SubTitle","name","SubTitle",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["SubTitle","ngModel"],["for","Inetref",1,"label","block"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Description",1,"label","block"],["pInputTextarea","","id","Description","name","Description",1,"mb-2","form-control","w-full",3,"rows","cols","ngModel","ngModelChange"],["Description","ngModel"],["for","Season",1,"label","block"],["name","Season","id","Season",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Episode",1,"label","block"],["name","Episode","id","Episode",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Airdate",1,"label","block"],["dateFormat","yy-mm-dd","name","Airdate","id","Airdate",3,"ngModel","ngModelChange"],["for","RecGroup",1,"label","block"],["name","RecGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecGroup","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["type","text","field","Title",3,"matchModeOptions"],["field","Recording.RecGroup","matchMode","equals",3,"showMenu"],["pTemplate","filter"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],["pSortableColumn","Title",1,"p-1",2,"flex-basis","12%"],["field","Title"],[1,"p-1",2,"flex-basis","2%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],["pSortableColumn","Airdate",1,"justify-content-end","p-1",2,"flex-basis","8%"],["field","Airdate"],["pSortableColumn","StartTime",1,"justify-content-end","p-1",2,"flex-basis","8%"],["field","StartTime"],[1,"p-1",2,"flex-basis","10%"],["pSortableColumn","Recording.RecGroup",1,"p-1",2,"flex-basis","8%"],["field","Recording.RecGroup"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","p-1",2,"flex-basis","8%"],["target","_blank"],[1,"pi","pi-download"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"disabled"],["name","filter",3,"ngModel","options","placeholder","showClear","onChange"],["pTemplate","item"],[3,"ngClass"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["class","pi pi-exclamation-triangle p-1","tooltipPosition","top",3,"pTooltip",4,"ngIf"],["class","pi pi-eye","tooltipPosition","top",3,"pTooltip",4,"ngIf"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"innerHTML"],[1,"p-1",2,"flex-basis","8%"],["target","_blank","tooltipPosition","left",3,"href","pTooltip"],[1,"pi","pi-download","text-primary"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"click"],["tooltipPosition","top",1,"pi","pi-exclamation-triangle","p-1",3,"pTooltip"],["tooltipPosition","top",1,"pi","pi-eye",3,"pTooltip"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"div",2),k(3,"p-toast",3),c(),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"div",4),k(8,"p-slideMenu",5,6),l(10,"p-table",7),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(11,Wre,0,0,"ng-template",8),_(12,Jre,50,43,"ng-template",9),_(13,toe,29,26,"ng-template",10),c(),l(14,"p-dialog",11),C("visibleChange",function(r){return n.displayMetadataDlg=r}),m(15,"translate"),l(16,"div",12)(17,"label",13),g(18),m(19,"translate"),c(),l(20,"input",14,15),C("ngModelChange",function(r){return n.program.Title=r}),c()(),l(22,"div",12)(23,"label",16),g(24),m(25,"translate"),c(),l(26,"input",17,18),C("ngModelChange",function(r){return n.program.SubTitle=r}),c()(),l(28,"div",12)(29,"label",19),g(30),m(31,"translate"),c(),l(32,"input",20,21),C("ngModelChange",function(r){return n.program.Inetref=r}),c()(),l(34,"div",12)(35,"label",22),g(36),m(37,"translate"),c(),l(38,"textarea",23,24),C("ngModelChange",function(r){return n.program.Description=r}),c()(),l(40,"div",12)(41,"label",25),g(42),m(43,"translate"),c(),l(44,"p-inputNumber",26),C("ngModelChange",function(r){return n.program.Season=r}),c()(),l(45,"div",12)(46,"label",27),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",28),C("ngModelChange",function(r){return n.program.Episode=r}),c()(),l(50,"div",12)(51,"label",29),g(52),m(53,"translate"),c(),l(54,"p-calendar",30),C("ngModelChange",function(r){return n.program.Airdate=r}),c()(),l(55,"div",12)(56,"label",31),g(57),m(58,"translate"),c(),l(59,"p-dropdown",32,33),C("ngModelChange",function(r){return n.program.Recording.RecGroup=r}),c()(),_(61,soe,7,9,"ng-template",34),c(),l(62,"p-dialog",35),C("visibleChange",function(r){return n.displayUnsaved=r}),m(63,"translate"),l(64,"p"),g(65),m(66,"translate"),c(),_(67,roe,4,6,"ng-template",34),c()()()),2&e&&(a(5),S(f(6,53,"dashboard.recordings.heading")),a(3),p("popup",!0)("model",n.menuToShow)("viewportHeight",360)("backLabel",n.translate.instant("common.back")),a(2),p("value",n.programs)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(4),q(A(77,ooe)),D("header",f(15,55,"dashboard.recordings.edit_metadata")),p("visible",n.displayMetadataDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(4),S(f(19,57,"dashboard.recordings.title")),a(2),p("ngModel",n.program.Title),a(4),S(f(25,59,"dashboard.recordings.subtitle")),a(2),p("ngModel",n.program.SubTitle),a(4),S(f(31,61,"dashboard.recordings.inetref")),a(2),p("ngModel",n.program.Inetref),a(4),S(f(37,63,"dashboard.recordings.description")),a(2),p("rows",5)("cols",30)("ngModel",n.program.Description),a(4),S(f(43,65,"dashboard.recordings.season")),a(2),p("ngModel",n.program.Season)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(48,67,"dashboard.recordings.episode")),a(2),p("ngModel",n.program.Episode)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(53,69,"dashboard.recordings.orig_airdate")),a(2),p("ngModel",n.program.Airdate),a(3),S(f(58,71,"dashboard.sched.recgroup_label")),a(2),q(A(78,aoe)),p("options",n.recGroups)("ngModel",n.program.Recording.RecGroup)("editable",!0)("maxlength",64),a(3),D("header",f(63,73,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(66,75,"common.unsaved_message")))},directives:[ze,Ge,He,wd,Z2,xn,ie,vg,Vt,Te,_e,Ln,vt,Jt,Cd,yd,Oe,Q,Tn,Ye,X2,dt,xr,fn,qe,ve],pipes:[de,Xc],styles:[""]}),t})();const coe=["schedform"];function uoe(t,i){1&t&&(l(0,"label",65),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.subtitle_label"),""))}function doe(t,i){1&t&&(l(0,"label",65),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.add_tables_label"),""))}function poe(t,i){if(1&t){const e=I();l(0,"textarea",66),C("ngModelChange",function(s){return v(e),d(3).recRule.SubTitle=s}),g(1," "),c()}if(2&t){const e=d(3);p("ngModel",e.recRule.SubTitle)("disabled","Power Search"!=e.recRule.SearchType)("rows",e.subTitleRows)}}const hoe=function(){return["None","Power Search"]};function moe(t,i){if(1&t&&(l(0,"div",4),_(1,uoe,3,3,"label",63),_(2,doe,3,3,"label",63),_(3,poe,2,3,"textarea",64),c()),2&t){const e=d(2);a(1),p("ngIf","None"==e.recRule.SearchType),a(1),p("ngIf","Power Search"==e.recRule.SearchType),a(1),p("ngIf",A(3,hoe).indexOf(e.recRule.SearchType)>-1)}}function foe(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d(2);a(1),$e("S",e.recRule.Season," E",e.recRule.Episode,"")}}function goe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.description_label"),""))}function _oe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.sqlwhere_label"),""))}function boe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.description_label"),""))}function voe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.srchValue_label"),""))}const Coe=function(){return["None","Manual Search"]};function yoe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"div",67),_(2,goe,3,3,"label",68),_(3,_oe,3,3,"label",68),_(4,boe,3,3,"label",68),_(5,voe,3,3,"label",69),c(),l(6,"textarea",70),C("ngModelChange",function(s){return v(e),d(2).recRule.Description=s})("focusout",function(){return v(e),d(2).onDescriptionBlur()}),g(7," "),c()()}if(2&t){const e=d(2);a(1),p("ngSwitch",e.recRule.SearchType),a(1),p("ngSwitchCase","None"),a(1),p("ngSwitchCase","Power Search"),a(1),p("ngSwitchCase","Manual Search"),a(2),p("ngModel",e.recRule.Description)("disabled",A(7,Coe).indexOf(e.recRule.SearchType)>-1)("rows",e.descriptionRows)}}function woe(t,i){1&t&&(l(0,"div"),g(1," Examples of SQL Additional Tables and Where Conditions are in the MythTV wiki at"),k(2,"br"),l(3,"a",72),g(4,"Power Search"),c()())}const Di=function(){return{minWidth:"400px"}};function Toe(t,i){if(1&t){const e=I();l(0,"div"),k(1,"p-divider"),l(2,"div",4)(3,"label",73),g(4),m(5,"translate"),c(),l(6,"p-dropdown",74),C("ngModelChange",function(s){return v(e),d(2).channel=s})("onChange",function(){return v(e),d(2).onChannelChange()}),c()(),l(7,"div",4)(8,"label",75),g(9),m(10,"translate"),c(),l(11,"p-calendar",76),C("ngModelChange",function(s){return v(e),d(2).reqDate=s})("onClose",function(){return v(e),d(2).onDateChange()})("keyup.enter",function(){return v(e),d(2).onDateChange()})("onBlur",function(){return v(e),d(2).onDateChange()}),c()(),l(12,"div",4)(13,"label",77),g(14),m(15,"translate"),c(),l(16,"p-inputNumber",78),C("ngModelChange",function(s){return v(e),d(2).reqDuration=s})("ngModelChange",function(){return v(e),d(2).onDurationChange()}),c()()()}if(2&t){const e=d(2);a(4),S(f(5,23,"dashboard.sched.channel_label")),a(2),q(A(29,Di)),p("options",e.allChannels)("ngModel",e.channel)("editable",!1)("maxlength",0),a(3),S(f(10,25,"dashboard.sched.starttime_label")),a(2),p("ngModel",e.reqDate)("showTime",!0)("stepMinute",5)("dateFormat","yy/mm/dd")("selectOtherMonths",!0)("showIcon",!0)("showOnFocus",!1)("showButtonBar",!0)("clearButtonStyleClass","hidden"),a(3),S(f(15,27,"dashboard.sched.duration_label")),a(2),p("ngModel",e.reqDuration)("showButtons",!0)("min",5)("max",360)("step",5)}}function Soe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"label",79),g(2),m(3,"translate"),c(),l(4,"div",80)(5,"div",81)(6,"p-radioButton",82),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(7,"label",83),k(8,"img",84),c()(),l(9,"div",85)(10,"a",86),g(11),m(12,"translate"),c(),k(13,"br"),c(),l(14,"div",87)(15,"p-radioButton",88),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(16,"label",89),k(17,"img",90),c()(),l(18,"div",91)(19,"a",86),g(20),m(21,"translate"),c(),k(22,"br"),c(),l(23,"div",81)(24,"p-radioButton",92),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(25,"label",93),k(26,"img",94),c()(),l(27,"div",85)(28,"a",86),g(29),m(30,"translate"),c(),k(31,"br"),c()(),g(32),l(33,"input",95,96),C("ngModelChange",function(s){return v(e),d(2).recRule.Inetref=s})("ngModelChange",function(){v(e);const s=d(2);return s.iText(s.recRule)}),c(),l(35,"small",55),g(36),m(37,"translate"),k(38,"br"),c()()}if(2&t){const e=d(2);a(2),S(f(3,13,"dashboard.sched.inetref_label")),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://thetvdb.com/search?query="+e.recRule.Title),Xt),a(1),T(" ",f(12,15,"dashboard.sched.isearch")," thetvdb.com"),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://www.tvmaze.com/search?q="+e.recRule.Title),Xt),a(1),T(" ",f(21,17,"dashboard.sched.isearch")," tvmaze.com"),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://www.themoviedb.org/search?query="+e.recRule.Title),Xt),a(1),T(" ",f(30,19,"dashboard.sched.isearch")," themoviedb.org"),a(3),T(" ",e.metaPrefix," \xa0 "),a(1),p("ngModel",e.recRule.Inetref),a(3),T(" ",f(37,21,"dashboard.sched.inetref_desc"),"")}}function xoe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"label",97),g(2),m(3,"translate"),c(),l(4,"p-dropdown",98,99),C("ngModelChange",function(s){return v(e),d(2).templateId=s}),c(),l(6,"p-button",100),C("onClick",function(){v(e);const s=d(2);return s.templateChange(s.recRule)}),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,9,"dashboard.sched.template_label")),a(2),q(A(13,Di)),p("options",e.templates)("ngModel",e.templateId)("editable",!1)("maxlength",0),a(2),D("label",f(7,11,"dashboard.sched.template_apply")),p("disabled",!e.templateId)}}function Doe(t,i){1&t&&(k(0,"p-message",105),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Moe(t,i){if(1&t&&(k(0,"p-message",106),m(1,"translate")),2&t){const e=d(3);La("text","",f(1,2,"common.backenderror"),": ",e.errortext,"")}}function koe(t,i){if(1&t){const e=I();l(0,"div",101),_(1,Doe,2,3,"p-message",102),_(2,Moe,2,4,"p-message",103),c(),l(3,"p-button",104),C("onClick",function(){return v(e),d(2).close()}),m(4,"translate"),c(),l(5,"p-button",100),C("onClick",function(){return v(e),d(2).save()}),m(6,"translate"),c()}if(2&t){const e=d(2),n=F(1);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||0==e.recRule.Id&&"Not Recording"==e.recRule.Type||!e.recRule.Title)}}function Ioe(t,i){if(1&t){const e=I();l(0,"p-button",107),C("onClick",function(){return v(e),d(2).close()}),m(1,"translate"),c(),l(2,"p-button",108),C("onClick",function(){return v(e),d(2).displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const Eoe=function(){return{height:"90vw",width:"700px"}},Roe=function(){return["Power Search","Manual Search"]},IS=function(){return{minWidth:"400px",maxHeight:"400px",maxWidth:"640px"}};function Loe(t,i){if(1&t){const e=I();l(0,"div")(1,"p-dialog",3),C("visibleChange",function(s){return v(e),d().displayDlg=s}),m(2,"translate"),l(3,"p"),g(4),c(),l(5,"p"),g(6),c(),l(7,"div",4)(8,"label",5),g(9),m(10,"translate"),c(),l(11,"p-dropdown",6,7),C("ngModelChange",function(s){return v(e),d().recRule.SearchType=s})("onChange",function(){return v(e),d().onSearchTypeChange()}),c()(),l(13,"div",4)(14,"label",8),g(15),m(16,"translate"),c(),l(17,"textarea",9),C("ngModelChange",function(s){return v(e),d().recRule.Title=s})("focusout",function(){return v(e),d().onTitleBlur()}),g(18," "),c()(),_(19,moe,4,4,"div",10),l(20,"p"),_(21,foe,2,2,"span",2),c(),_(22,yoe,8,8,"div",10),_(23,woe,5,0,"div",2),_(24,Toe,17,30,"div",2),k(25,"p-divider"),l(26,"div",4)(27,"label",11),g(28),m(29,"translate"),c(),l(30,"p-dropdown",12,13),C("ngModelChange",function(s){return v(e),d().recRule.Type=s}),c()(),l(32,"div",4)(33,"label",14),g(34),m(35,"translate"),c(),l(36,"p-dropdown",15,16),C("ngModelChange",function(s){return v(e),d().recRule.RecGroup=s}),c()(),l(38,"div",4)(39,"p-checkbox",17,18),C("ngModelChange",function(s){return v(e),d().recRule.Inactive=s}),m(41,"translate"),c()(),l(42,"div",4)(43,"label",19),g(44),m(45,"translate"),c(),l(46,"p-dropdown",20,21),C("ngModelChange",function(s){return v(e),d().recRule.PlayGroup=s}),c()(),l(48,"div",4)(49,"label",22),g(50),m(51,"translate"),c(),l(52,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().recRule.StartOffset=s}),c()(),l(53,"div",4)(54,"label",24),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().recRule.EndOffset=s}),c()(),l(58,"div",4)(59,"p-checkbox",26,27),C("ngModelChange",function(s){return v(e),d().recRule.NewEpisOnly=s}),m(61,"translate"),c()(),l(62,"div",4)(63,"label",28),g(64),m(65,"translate"),c(),l(66,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().recRule.RecPriority=s}),c()(),l(67,"div",4)(68,"label",30),g(69),m(70,"translate"),c(),l(71,"p-dropdown",31,32),C("ngModelChange",function(s){return v(e),d().recRule.PreferredInput=s}),c()(),l(73,"div",4)(74,"label",33),g(75),m(76,"translate"),c(),l(77,"p-dropdown",34,35),C("ngModelChange",function(s){return v(e),d().recRule.DupMethod=s}),c()(),l(79,"div",4)(80,"label",36),g(81),m(82,"translate"),c(),l(83,"p-dropdown",37,38),C("ngModelChange",function(s){return v(e),d().recRule.DupIn=s}),c()(),l(85,"div",4)(86,"label",39),g(87),m(88,"translate"),c(),l(89,"p-dropdown",40,41),C("ngModelChange",function(s){return v(e),d().recRule.AutoExtend=s}),c()(),l(91,"div",4)(92,"label",42),g(93),m(94,"translate"),c(),l(95,"p-multiSelect",43,44),C("ngModelChange",function(s){return v(e),d().selectedFilters=s})("onChange",function(){v(e);const s=d();return s.filterToRec(s.recRule)}),c()(),l(97,"div",4)(98,"label",45),g(99),m(100,"translate"),c(),l(101,"p-dropdown",46,47),C("ngModelChange",function(s){return v(e),d().recRule.RecProfile=s}),c()(),l(103,"div",4)(104,"label",48),g(105),m(106,"translate"),c(),l(107,"p-dropdown",49,50),C("ngModelChange",function(s){return v(e),d().recRule.StorageGroup=s}),c()(),l(109,"div",4)(110,"label",51),g(111),m(112,"translate"),c(),l(113,"p-inputNumber",52),C("ngModelChange",function(s){return v(e),d().recRule.MaxEpisodes=s}),c()(),l(114,"div",4)(115,"p-checkbox",53,54),C("ngModelChange",function(s){return v(e),d().recRule.MaxNewest=s}),m(117,"translate"),c(),l(118,"small",55),g(119),m(120,"translate"),c()(),l(121,"div",4)(122,"p-checkbox",56,57),C("ngModelChange",function(s){return v(e),d().recRule.AutoExpire=s}),m(124,"translate"),c()(),l(125,"div",4)(126,"label",58),g(127),m(128,"translate"),c(),l(129,"p-multiSelect",59,60),C("ngModelChange",function(s){return v(e),d().selectedPostProc=s})("onChange",function(){v(e);const s=d();return s.postProcToRec(s.recRule)}),c()(),_(131,Soe,39,23,"div",10),_(132,xoe,8,14,"div",10),k(133,"br")(134,"br")(135,"br")(136,"br")(137,"br")(138,"br")(139,"br")(140,"br")(141,"br")(142,"br")(143,"br")(144,"br")(145,"br")(146,"br"),_(147,koe,7,9,"ng-template",61),c(),l(148,"p-dialog",62),C("visibleChange",function(s){return v(e),d().displayUnsaved=s}),m(149,"translate"),l(150,"p"),g(151),m(152,"translate"),c(),_(153,Ioe,4,6,"ng-template",61),c()()}if(2&t){const e=d();a(1),q(A(198,Eoe)),D("header",f(2,148,"dashboard.sched.heading")),p("visible",e.displayDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(3),T(" ",e.recRule.CallSign,""),a(2),yo(" ",e.utility.formatDate(e.recRule.StartTime)," ",e.utility.formatTime(e.recRule.StartTime)," - ",e.utility.formatTime(e.recRule.EndTime)," "),a(3),S(f(10,150,"dashboard.sched.srchtype_label")),a(2),q(A(199,Di)),p("options",e.srchTypeList)("ngModel",e.recRule.SearchType)("editable",!1)("maxlength",0)("disabled",e.srchTypeDisabled),a(4),S(f(16,152,"dashboard.sched.title_label")),a(2),p("ngModel",e.recRule.Title)("disabled",-1==A(200,Roe).indexOf(e.recRule.SearchType)&&"Recording Template"!=e.recRule.Type||e.recRule.Id==(null==e.defaultTemplate?null:e.defaultTemplate.Id))("rows",e.titleRows),a(2),p("ngIf","Recording Template"!=e.recRule.Type),a(2),p("ngIf",e.recRule.Season&&e.recRule.Episode),a(1),p("ngIf","Recording Template"!=e.recRule.Type),a(1),p("ngIf","Power Search"==e.recRule.SearchType),a(1),p("ngIf","Manual Search"==e.recRule.SearchType),a(4),S(f(29,154,"dashboard.sched.type_label")),a(2),q(A(201,Di)),p("options",e.typeList)("ngModel",e.recRule.Type)("editable",!1)("maxlength",0),a(4),S(f(35,156,"dashboard.sched.recgroup_label")),a(2),q(A(202,Di)),p("options",e.recGroups)("ngModel",e.recRule.RecGroup)("editable",!0)("maxlength",64),a(3),D("label",f(41,158,"dashboard.sched.active_label")),p("ngModel",e.recRule.Inactive)("binary",!0)("trueValue",!1)("falseValue",!0)("disabled",e.override),a(5),S(f(45,160,"dashboard.sched.playgroup_label")),a(2),q(A(203,Di)),p("options",e.playGroups)("ngModel",e.recRule.PlayGroup)("editable",!1)("maxlength",0),a(4),S(f(51,162,"dashboard.sched.startoffset_label")),a(2),p("ngModel",e.recRule.StartOffset)("showButtons",!0)("min",-480)("max",480)("step",1),a(3),S(f(56,164,"dashboard.sched.endoffset_label")),a(2),p("ngModel",e.recRule.EndOffset)("showButtons",!0)("min",-480)("max",480)("step",1),a(2),D("label",f(61,166,"dashboard.sched.newepis_label")),p("ngModel",e.recRule.NewEpisOnly)("binary",!0),a(5),S(f(65,168,"dashboard.sched.priority_label")),a(2),p("ngModel",e.recRule.RecPriority)("showButtons",!0)("min",-100)("max",100)("step",1),a(3),S(f(70,170,"dashboard.sched.prefinput_label")),a(2),q(A(204,Di)),p("options",e.inputList.Inputs)("ngModel",e.recRule.PreferredInput)("editable",!1)("maxlength",0),a(4),S(f(76,172,"dashboard.sched.dupmethod_label")),a(2),q(A(205,Di)),p("options",e.dupMethodList)("ngModel",e.recRule.DupMethod)("editable",!1)("maxlength",0),a(4),S(f(82,174,"dashboard.sched.dupin_label")),a(2),q(A(206,Di)),p("options",e.dupInList)("ngModel",e.recRule.DupIn)("editable",!1)("maxlength",0),a(4),S(f(88,176,"dashboard.sched.autoextend_label")),a(2),q(A(207,Di)),p("options",e.autoExtendList)("ngModel",e.recRule.AutoExtend)("editable",!1)("maxlength",0),a(4),S(f(94,178,"dashboard.sched.filters_label")),a(2),q(A(208,IS)),p("options",e.recRuleFilters)("ngModel",e.selectedFilters),a(4),S(f(100,180,"dashboard.sched.recprofile_label")),a(2),q(A(209,Di)),p("options",e.recProfileList)("ngModel",e.recRule.RecProfile)("editable",!1)("maxlength",0),a(4),S(f(106,182,"dashboard.sched.sgroup_label")),a(2),q(A(210,Di)),p("options",e.recStorageGroups)("ngModel",e.recRule.StorageGroup)("editable",!1)("maxlength",0),a(4),S(f(112,184,"dashboard.sched.maxeps_label")),a(2),p("ngModel",e.recRule.MaxEpisodes)("showButtons",!0)("min",0)("max",100)("step",1),a(2),D("label",f(117,186,"dashboard.sched.maxnewest_label")),p("ngModel",e.recRule.MaxNewest)("binary",!0),a(4),T(" ",f(120,188,"dashboard.sched.maxnewest_desc")," "),a(3),D("label",f(124,190,"dashboard.sched.autoexpire_label")),p("ngModel",e.recRule.AutoExpire)("binary",!0),a(5),S(f(128,192,"dashboard.sched.postproc_label")),a(2),q(A(211,IS)),p("options",e.postProcList)("ngModel",e.selectedPostProc)("filter",!0),a(2),p("ngIf","Recording Template"!=e.recRule.Type),a(1),p("ngIf","Recording Template"!=e.recRule.Type),a(16),D("header",f(149,194,"common.unsaved_heading")),p("visible",e.displayUnsaved)("modal",!0),a(3),S(f(152,196,"common.unsaved_message"))}}let Rd=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.translate=n,this.mythService=s,this.utility=r,this.channelService=o,this.displayDlg=!1,this.displayUnsaved=!1,this.loadCount=0,this.successCount=0,this.errorCount=0,this.errortext="",this.htmlRegex=new RegExp("|"),this.srchTypeDisabled=!0,this.titleRows=1,this.subTitleRows=1,this.descriptionRows=5,this.override=!1,this.reqDate=new Date,this.reqDuration=60,this.recRules=[],this.playGroups=[],this.recGroups=[],this.recStorageGroups=[],this.inputList={Inputs:[]},this.recRuleFilters=[],this.selectedFilters=[],this.templates=[],this.typeList=[],this.allChannels=[],this.srchTypeList=[{prompt:this.translate.instant("recrule.srch_None"),value:"None"},{prompt:this.translate.instant("recrule.srch_PowerSearch"),value:"Power Search"},{prompt:this.translate.instant("recrule.srch_TitleSearch"),value:"Title Search"},{prompt:this.translate.instant("recrule.srch_KeywordSearch"),value:"Keyword Search"},{prompt:this.translate.instant("recrule.srch_PeopleSearch"),value:"People Search"},{prompt:this.translate.instant("recrule.srch_ManualSearch"),value:"Manual Search"}],this.dupMethodList=[{prompt:this.translate.instant("dashboard.sched.dupmethod.none"),value:"None"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s_and_d"),value:"Subtitle and Description"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s_then_d"),value:"Subtitle then Description"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s"),value:"Subtitle"},{prompt:this.translate.instant("dashboard.sched.dupmethod.d"),value:"Description"}],this.dupInList=[{prompt:this.translate.instant("dashboard.sched.dupin.both"),value:"All Recordings"},{prompt:this.translate.instant("dashboard.sched.dupin.curr"),value:"Current Recordings"},{prompt:this.translate.instant("dashboard.sched.dupin.prev"),value:"Previous Recordings"}],this.autoExtendList=[{prompt:this.translate.instant("dashboard.sched.extend_none"),value:"None"},{prompt:"ESPN",value:"ESPN"},{prompt:"MLB",value:"MLB"}],this.recProfileList=[{prompt:this.translate.instant("dashboard.sched.recprof.default"),value:"Default"},{prompt:this.translate.instant("dashboard.sched.recprof.livetv"),value:"Live TV"},{prompt:this.translate.instant("dashboard.sched.recprof.highq"),value:"High Quality"},{prompt:this.translate.instant("dashboard.sched.recprof.lowq"),value:"Low Quality"}],this.postProcList=[{prompt:this.translate.instant("dashboard.sched.postproc.autocommflag"),value:"AutoCommflag"},{prompt:this.translate.instant("dashboard.sched.postproc.autometalookup"),value:"AutoMetaLookup"},{prompt:this.translate.instant("dashboard.sched.postproc.autotranscode"),value:"AutoTranscode"},{prompt:"1",value:"AutoUserJob1"},{prompt:"2",value:"AutoUserJob2"},{prompt:"3",value:"AutoUserJob3"},{prompt:"4",value:"AutoUserJob4"}],this.selectedPostProc=[],this.metaPrefix="",this.templateId=0,this.saveObserver={next:u=>{this.recRule?this.recRule.Id&&u.bool?(this.successCount++,this.currentForm.form.markAsPristine(),setTimeout(()=>this.inter.summaryComponent.refresh(),3e3),"Not Recording"==this.recRule.Type&&(this.recRule.Id=0)):!this.recRule.Id&&u.uint?(this.successCount++,this.currentForm.form.markAsPristine(),setTimeout(()=>this.inter.summaryComponent.refresh(),3e3),this.recRule.Id=u.uint):(this.errorCount++,this.currentForm.form.markAsDirty()):(console.log("ERROR: recRule is undefined"),this.errorCount++)},error:u=>{if(console.error(u),400==u.status){let h=u.error.split(this.htmlRegex);h.length>1&&(this.errortext=h[1])}this.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){this.inter.sched=this}loadLists(){let e;this.recRules=[],this.playGroups=[],this.recGroups=[],this.recStorageGroups=[],this.inputList.Inputs=[],this.recRuleFilters=[],this.loadCount=0,this.errorCount=0,this.dvrService.GetRecordScheduleList({}).subscribe({next:n=>{this.recRules=n.RecRuleList.RecRules,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetPlayGroupList().subscribe({next:n=>{this.playGroups=n.PlayGroupList,this.playGroups.unshift("Default"),this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecGroupList().subscribe({next:n=>{this.recGroups=n.RecGroupList,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecStorageGroupList().subscribe({next:n=>{this.recStorageGroups=n.RecStorageGroupList,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetInputList().subscribe({next:n=>{this.inputList=n.InputList,this.inputList.Inputs.unshift({Id:0,CardId:0,SourceId:0,InputName:"",DisplayName:this.translate.instant("dashboard.sched.input_any"),QuickTune:!1,RecPriority:0,ScheduleOrder:0,LiveTVOrder:0}),this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecRuleFilterList().subscribe({next:n=>{this.recRuleFilters=n.RecRuleFilterList.RecRuleFilters,this.loadSuccess()},error:n=>this.loadFail()});for(let n=1;n<5;n++)e=this.translate.instant("settings.services.job_default",{num:n}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+n,Default:e}).subscribe({next:s=>{this.postProcList[n+2].prompt=s.String,this.loadSuccess()},error:()=>this.loadFail()});this.channelService.GetChannelInfoList({Details:!0}).subscribe(n=>{this.allChannels=n.ChannelInfoList.ChannelInfos,this.allChannels.forEach(s=>s.Description=s.ChanNum+" "+s.ChannelName+" ("+s.CallSign+")")})}loadSuccess(){this.loadCount++,10==this.loadCount&&(this.loadCount=0,this.setupData(),this.displayDlg=!0,this.currentForm.form.markAsPristine())}loadFail(){this.errorCount++}open(e,n,s){this.reqProgram=e,this.reqChannel=n,this.reqRecRule=s,this.titleRows=1,e||s?(this.srchTypeDisabled=!0,this.srchTypeList[0].inactive=!1):(this.srchTypeDisabled=!1,this.srchTypeList[0].inactive=!0),this.loadLists()}setupData(){let e=!1;this.program=this.reqProgram;let n="";this.reqRecRule&&(n=this.reqRecRule.Type),this.reqRecRule?["Override Recording","Do not Record"].indexOf(n)>-1&&!this.reqRecRule.Id?(e=!0,this.recRule=void 0):this.recRule=Object.assign({},this.reqRecRule):this.recRule=void 0,this.channel=this.reqChannel,this.program&&!this.channel&&this.program.Channel&&(this.channel=this.program.Channel);var s=0;if(this.typeList=[],this.templates=[{Id:0,Title:""}],this.defaultTemplate=void 0,this.program&&this.program.Recording&&!e&&(s=this.program.Recording.RecordId),this.recRules.forEach((r,o)=>{r.Id==s&&(this.recRule=r,n=this.recRule.Type),"Recording Template"==r.Type&&(this.templates.push(r),"Default"==r.Category&&(this.defaultTemplate=r))}),this.recRule||(this.recRule={Id:0}),this.recRule.Title||(this.recRule.Title="",this.recRule.SubTitle="",this.recRule.Description="",this.defaultTemplate&&this.mergeTemplate(this.recRule,this.defaultTemplate)),this.recRule.SearchType||(this.recRule.SearchType="None"),this.program&&this.channel&&"None"==this.recRule.SearchType&&this.mergeProgram(this.recRule,this.program,this.channel),e&&(this.recRule.ParentId=this.program.Recording.RecordId),n||(n="Not Recording"),!this.recRule.StartTime){let r=new Date;this.recRule.StartTime=r.toISOString(),this.recRule.FindDay=(r.getDay()+1)%7,this.recRule.FindTime=r.toTimeString().slice(0,8)}this.filterFromRec(this.recRule),this.postProcFromRec(this.recRule),this.recRule.Type=n,this.setupTypeList(this.recRule),this.srchTypeDisabled||this.onSearchTypeChange(),this.override&&(this.recRule.Inactive=!1),setTimeout(()=>{this.recRule&&(this.recRule.Type=n),this.currentForm.form.markAsPristine()},10)}setupTypeList(e){let n=e.Type;if(this.typeList.length=0,this.override=!1,"Recording Template"==n)this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.mod_template"),value:"Recording Template"}),"Default"!=e.Category&&e.Id>0&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.del_template"),value:"Not Recording"});else if(["Override Recording","Do not Record"].indexOf(n)>-1)this.override=!0,this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.del_override"),value:"Not Recording"},{prompt:this.translate.instant("dashboard.sched.type.rec_override"),value:"Override Recording"},{prompt:this.translate.instant("dashboard.sched.type.dont_rec_override"),value:"Do not Record"});else{const s="Manual Search"==e.SearchType,r="None"!=e.SearchType;this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.not"),value:"Not Recording"}),(e.CallSign&&!r||s)&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.this"),value:"Single Record"}),s||this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.one"),value:"Record One"}),(!e.CallSign||r)&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.weekly"),value:"Record Weekly"},{prompt:this.translate.instant("dashboard.sched.type.daily"),value:"Record Daily"}),s||this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.all"),value:"Record All"})}-1==this.typeList.findIndex(s=>s.value==e.Type)&&(e.Type=this.typeList[0].value)}mergeProgram(e,n,s){e.Title=n.Title,e.SubTitle=n.SubTitle,e.Description=n.Description,e.Category=n.Category,e.StartTime=n.StartTime,e.EndTime=n.EndTime,e.SeriesId=n.SeriesId,e.ProgramId=n.ProgramId,e.ChanId=s.ChanId,e.CallSign=s.CallSign,e.Season=n.Season,e.Episode=n.Episode;let r=new Date(e.StartTime);e.FindDay=(r.getDay()+1)%7,e.FindTime=r.toTimeString().slice(0,8)}filterFromRec(e){this.selectedFilters=[],this.recRuleFilters.forEach(n=>{0!=(e.Filter&1<{e.Filter|=1<{n[s.value]&&this.selectedPostProc.push(s.value)})}postProcToRec(e){let n=e;this.postProcList.forEach(s=>n[s.value]=!1),this.selectedPostProc.forEach(s=>n[s]=!0)}iCheckbox(e){e.Inetref||(e.Inetref=""),e.Inetref=e.Inetref.includes(".py_")?e.Inetref.replace(/^.*\.py_/,this.metaPrefix):this.metaPrefix+e.Inetref}iText(e){this.metaPrefix=e.Inetref.replace(/_.*/,"_"),this.metaPrefix.endsWith(".py_")||(this.metaPrefix="")}templateChange(e){const n=this.templates.find(s=>s.Id==this.templateId);n&&this.mergeTemplate(e,n),this.templateId=0}onSearchTypeChange(){this.recRule&&(this.recRule.Title="",this.reqDate=new Date,this.reqDate.setMinutes(0),this.reqDate.setSeconds(0,0),this.reqDuration=60,this.onDateChange(),"Manual Search"==this.recRule.SearchType&&(this.recRule.Description="",setTimeout(()=>this.onChannelChange(),100)),this.subTitleRows="Power Search"==this.recRule.SearchType?5:1,this.descriptionRows=["None","Power Search"].indexOf(this.recRule.SearchType)>-1?5:1,this.recRule.SubTitle="",this.recRule.Description="",this.setupTypeList(this.recRule)),this.onTitleBlur(),this.onDescriptionBlur()}onTitleBlur(){if(this.recRule){if(this.recRule.Title=this.recRule.Title.trim(),this.recRule.Title.length>0){let e;["Manual Search","Power Search"].indexOf(this.recRule.SearchType)>-1&&this.recRule.Title.length>0&&(e="("+this.trSearch(this.recRule.SearchType)+")"),"Recording Template"==this.recRule.Type&&this.recRule.Title.length>0&&(e="("+this.translate.instant("recrule.template")+")"),e&&-1==this.recRule.Title.indexOf(e)&&(this.recRule.Title=this.recRule.Title+" "+e)}"Manual Search"==this.recRule.SearchType&&(this.recRule.Description=this.recRule.Title)}}onDescriptionBlur(){this.recRule&&(this.recRule.Description=this.recRule.Description.trim(),["Title Search","Keyword Search","People Search"].indexOf(this.recRule.SearchType)>-1&&(this.recRule.Title=this.recRule.Description.length>0?this.recRule.Description+" ("+this.trSearch(this.recRule.SearchType)+")":""))}onChannelChange(){this.recRule&&this.channel&&(this.recRule.ChanId=this.channel.ChanId,this.recRule.CallSign=this.channel.CallSign)}onDateChange(){this.recRule&&(this.recRule.StartTime=this.reqDate.toISOString(),this.recRule.FindDay=(this.reqDate.getDay()+1)%7,this.recRule.FindTime=this.reqDate.toTimeString().slice(0,8),this.onDurationChange())}onDurationChange(){if(this.recRule){let e=new Date(this.recRule.StartTime),n=new Date(e.getTime()+6e4*this.reqDuration);this.recRule.EndTime=n.toISOString()}}trSearch(e){return this.translate.instant("recrule.srch_"+e.replace(" ",""))}mergeTemplate(e,n){e.Inactive=n.Inactive,e.RecPriority=n.RecPriority,e.PreferredInput=n.PreferredInput,e.StartOffset=n.StartOffset,e.EndOffset=n.EndOffset,e.DupMethod=n.DupMethod,e.DupIn=n.DupIn,e.NewEpisOnly=n.NewEpisOnly,e.Filter=n.Filter,e.RecProfile=n.RecProfile,e.RecGroup=n.RecGroup,e.StorageGroup=n.StorageGroup,e.PlayGroup=n.PlayGroup,e.AutoExpire=n.AutoExpire,e.MaxEpisodes=n.MaxEpisodes,e.MaxNewest=n.MaxNewest,e.AutoCommflag=n.AutoCommflag,e.AutoMetaLookup=n.AutoMetaLookup,e.AutoTranscode=n.AutoTranscode,e.AutoUserJob1=n.AutoUserJob1,e.AutoUserJob2=n.AutoUserJob2,e.AutoUserJob3=n.AutoUserJob3,e.AutoUserJob4=n.AutoUserJob4,e.Transcoder=n.Transcoder,this.postProcFromRec(e),this.filterFromRec(e)}close(){!this.recRule||0==this.recRule.Id&&"Not Recording"==this.recRule.Type?this.displayDlg=!1:this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayDlg=!1,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayDlg=!1,this.displayUnsaved=!1)}save(){if(this.errortext="",this.recRule&&(0!=this.recRule.Id||"Not Recording"!=this.recRule.Type))if(this.errorCount=0,this.successCount=0,this.recRule.Id>0&&"Not Recording"==this.recRule.Type)this.dvrService.RemoveRecordSchedule(this.recRule.Id).subscribe(this.saveObserver);else if(this.recRule.Id>0){const e=this.createRequest(this.recRule);e.RecordId=this.recRule.Id,this.dvrService.UpdateRecordSchedule(e).subscribe(this.saveObserver)}else{const e=this.createRequest(this.recRule);this.dvrService.AddRecordSchedule(e).subscribe(this.saveObserver)}}createRequest(e){return{Title:e.Title,Subtitle:e.SubTitle,Description:e.Description,Category:e.Category,StartTime:e.StartTime,EndTime:e.EndTime,SeriesId:e.SeriesId,ProgramId:e.ProgramId,ChanId:e.ChanId,Station:e.CallSign,FindDay:e.FindDay,FindTime:e.FindTime,ParentId:e.ParentId,Inactive:e.Inactive,Season:e.Season,Episode:e.Episode,Inetref:e.Inetref,Type:e.Type,SearchType:e.SearchType,RecPriority:e.RecPriority,PreferredInput:e.PreferredInput,StartOffset:e.StartOffset,EndOffset:e.EndOffset,LastRecorded:e.LastRecorded,DupMethod:e.DupMethod,DupIn:e.DupIn,NewEpisOnly:e.NewEpisOnly,Filter:e.Filter,RecProfile:e.RecProfile,RecGroup:e.RecGroup,StorageGroup:e.StorageGroup,PlayGroup:e.PlayGroup,AutoExpire:e.AutoExpire,MaxEpisodes:e.MaxEpisodes,MaxNewest:e.MaxNewest,AutoCommflag:e.AutoCommflag,AutoTranscode:e.AutoTranscode,AutoMetaLookup:e.AutoMetaLookup,AutoUserJob1:e.AutoUserJob1,AutoUserJob2:e.AutoUserJob2,AutoUserJob3:e.AutoUserJob3,AutoUserJob4:e.AutoUserJob4,Transcoder:e.Transcoder,AutoExtend:e.AutoExtend}}URLencode(e){return encodeURI(e)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.translate.instant("settings.common.warning"))}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(Le),x(Ut),x(as),x(Or))},t.\u0275cmp=G({type:t,selectors:[["app-schedule"]],viewQuery:function(e,n){if(1&e&&j(coe,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},inputs:{inter:"inter"},decls:3,vars:1,consts:[["name","schedform",1,"ml-3","mr-3"],["schedform","ngForm"],[4,"ngIf"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","SearchType",1,"label","block"],["optionLabel","prompt","optionValue","value","name","SearchType","optionDisabled","inactive",3,"options","ngModel","editable","maxlength","disabled","ngModelChange","onChange"],["SearchType","ngModel"],["for","Title",1,"label","block"],["pInputTextArea","","id","Title","name","Title",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange","focusout"],["class","form-group field",4,"ngIf"],["for","Type",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Type",3,"options","ngModel","editable","maxlength","ngModelChange"],["Type","ngModel"],["for","RecGroup",1,"label","block"],["name","RecGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecGroup","ngModel"],["inputId","Active","name","Active",1,"label","mb-2","w-full",3,"ngModel","binary","label","trueValue","falseValue","disabled","ngModelChange"],["Active","ngModel"],["for","PlayGroup",1,"label","block"],["PlayGroup","Type","name","PlayGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["PlayGroup","ngModel"],["for","StartOffset",1,"label","block"],["name","StartOffset","id","StartOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","EndOffset",1,"label","block"],["name","EndOffset","id","EndOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","NewEpisOnly","name","NewEpisOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","PreferredInput",1,"label","block"],["optionLabel","DisplayName","optionValue","Id","name","PreferredInput",3,"options","ngModel","editable","maxlength","ngModelChange"],["PreferredInput","ngModel"],["for","DupMethod",1,"label","block"],["optionLabel","prompt","optionValue","value","name","DupMethod",3,"options","ngModel","editable","maxlength","ngModelChange"],["DupMethod","ngModel"],["for","DupIn",1,"label","block"],["optionLabel","prompt","optionValue","value","name","DupIn",3,"options","ngModel","editable","maxlength","ngModelChange"],["DupIn","ngModel"],["for","AutoExtend",1,"label","block"],["optionLabel","prompt","optionValue","value","name","AutoExtend",3,"options","ngModel","editable","maxlength","ngModelChange"],["AutoExtend","ngModel"],["for","Filters",1,"label","block"],["optionLabel","Description","optionValue","Id","name","Filters",3,"options","ngModel","ngModelChange","onChange"],["Filters","ngModel"],["for","RecProfile",1,"label","block"],["optionLabel","prompt","optionValue","value","name","RecProfile",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecProfile","ngModel"],["for","StorageGroup",1,"label","block"],["name","StorageGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["StorageGroup","ngModel"],["for","MaxEpisodes",1,"label","block"],["name","MaxEpisodes","id","MaxEpisodes",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","MaxNewest","name","MaxNewest",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["MaxNewest","ngModel"],[1,"block"],["inputId","AutoExpire","name","AutoExpire",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AutoExpire","ngModel"],["for","PostProc",1,"label","block"],["optionLabel","prompt","optionValue","value","name","PostProc",3,"options","ngModel","filter","ngModelChange","onChange"],["PostProc","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["for","SubTitle","class","label block",4,"ngIf"],["pInputTextArea","","id","SubTitle","name","SubTitle","class","text-lg mb-2 form-control w-full",3,"ngModel","disabled","rows","ngModelChange",4,"ngIf"],["for","SubTitle",1,"label","block"],["pInputTextArea","","id","SubTitle","name","SubTitle",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange"],[3,"ngSwitch"],["for","Description","class","label block mb-2",4,"ngSwitchCase"],["for","Description","class","label block mb-2",4,"ngSwitchDefault"],["pInputTextArea","","id","Description","name","Description",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange","focusout"],["for","Description",1,"label","block","mb-2"],["href","https://www.mythtv.org/wiki/Power_Search","target","_blank"],["for","ChanId",1,"label","block"],["optionLabel","Description","name","Type",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["for","StartTime",1,"label","block"],["name","StartTime",3,"ngModel","showTime","stepMinute","dateFormat","selectOtherMonths","showIcon","showOnFocus","showButtonBar","clearButtonStyleClass","ngModelChange","onClose","keyup.enter","onBlur"],["for","Duration",1,"label","block"],["name","Duration","id","Duration",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Inetref",1,"label","block"],[1,"grid","p-0"],[1,"col-3","flex","align-items-center"],["name","prefix","value","ttvdb4.py_","inputId","ttvdb",3,"ngModel","ngModelChange"],["for","ttvdb"],["src","images/metadata/thetvdb.png","alt","thtvdb","height","40",1,"pl-1"],[1,"col-9","flex","align-items-center"],["target","_blank",3,"href"],[1,"col-5","flex","align-items-center"],["name","prefix","value","tvmaze.py_","inputId","tvmaze",3,"ngModel","ngModelChange"],["for","tvmaze"],["src","images/metadata/tvmaze.png","alt","tvmaze","height","40",1,"pl-1"],[1,"col-7","flex","align-items-center"],["name","prefix","value","tmdb3.py_","inputId","tmdb",3,"ngModel","ngModelChange"],["for","tmdb"],["src","images/metadata/themoviedb.svg","alt","themoviedb","height","40",1,"pl-1"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Template",1,"label","block"],["optionLabel","Title","optionValue","Id","name","Template",1,"pr-5",3,"options","ngModel","editable","maxlength","ngModelChange"],["Template","ngModel"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1),_(2,Loe,154,212,"div",2),c()),2&e&&(a(2),p("ngIf",n.recRule))},directives:[ze,Ge,He,Q,Tn,Vt,Te,_e,fn,Ye,gr,Ja,km,w7,xr,dt,rn,J2,Td,ve,ie,qe],pipes:[de],styles:[""]}),t})();function Ooe(t,i){if(1&t){const e=I();l(0,"p-checkbox",27,28),C("onChange",function(s){return v(e).filterCallback(s.checked)}),m(2,"translate"),c()}if(2&t){const e=i.$implicit;Bn("label","",f(2,3,"dashboard.upcoming.showall")," "),p("ngModel",e)("binary",!0)}}function Aoe(t,i){if(1&t){const e=I();l(0,"p-dropdown",29),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),c()}if(2&t){const e=i.$implicit,n=d(2);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.recRules)("showClear",!0)}}const Poe=function(){return{width:"2rem",height:"2rem"}};function Foe(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,Poe)))}function Noe(t,i){if(1&t){const e=I();l(0,"button",30),C("click",function(){return v(e),d(2).refresh()}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"common.refresh"))}function Voe(t,i){if(1&t&&(l(0,"tr")(1,"th")(2,"p-columnFilter",10),_(3,Ooe,3,5,"ng-template",11),c(),g(4),m(5,"translate"),l(6,"p-columnFilter",12),_(7,Aoe,2,6,"ng-template",11),c(),_(8,Foe,2,3,"div",13),_(9,Noe,2,3,"ng-template",null,14,we),g(11),c()(),l(12,"tr")(13,"th",15),g(14),m(15,"translate"),c(),l(16,"th",16),g(17),m(18,"translate"),c(),k(19,"th",17),l(20,"th",18),g(21),m(22,"translate"),c(),l(23,"th",19),g(24),m(25,"translate"),c(),l(26,"th",20),g(27),m(28,"translate"),c(),l(29,"th",21),g(30),m(31,"translate"),c(),l(32,"th",15),g(33),m(34,"translate"),c(),l(35,"th",22),g(36),m(37,"translate"),c(),l(38,"th",18),g(39),m(40,"translate"),c(),l(41,"th",23),g(42),m(43,"translate"),c(),l(44,"th",24),k(45,"button",25),c(),l(46,"th",24),k(47,"button",26),c()()),2&t){const e=F(10),n=d();a(2),p("showMenu",!1)("showClearButton",!1),a(2),T(" \xa0\xa0\xa0\xa0\xa0 ",f(5,20,"dashboard.upcoming.recrule"),": \xa0 "),a(2),p("showMenu",!1)("showClearButton",!1),a(2),p("ngIf",n.refreshing)("ngIfElse",e),a(3),T(" \xa0\xa0\xa0",n.programs.length," Rows "),a(3),T(" ",f(15,22,"dashboard.upcoming.date")," "),a(3),T(" ",f(18,24,"dashboard.upcoming.time")," "),a(4),T("",f(22,26,"dashboard.upcoming.encoder")," "),a(3),T(" ",f(25,28,"dashboard.recordings.title"),""),a(3),S(f(28,30,"dashboard.recordings.subtitle")),a(3),S(f(31,32,"dashboard.recordings.seas_ep")),a(3),T(" ",f(34,34,"dashboard.recordings.orig_airdate")," "),a(3),S(f(37,36,"dashboard.recordings.channel")),a(3),T(" ",f(40,38,"dashboard.recordings.recgrp")," "),a(3),T(" ",f(43,40,"dashboard.upcoming.status")," "),a(3),p("disabled",!0),a(2),p("disabled",!0)}}function Boe(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}const Hoe=function(){return["WillRecord","Recording","Recorded"]};function qoe(t,i){if(1&t&&(l(0,"div",42),g(1),c()),2&t){const e=d().$implicit,n=d();p("ngClass",A(2,Hoe).indexOf(e.Recording.StatusName)>-1?"text-green-500":"text-pink-500"),a(1),T(" ",n.dataService.recStatusText[e.Recording.StatusName]," ")}}function Uoe(t,i){if(1&t){const e=I();l(0,"button",43),C("click",function(){v(e);const s=d().$implicit;return d().stopRequest(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.stop_recording"))}function Goe(t,i){if(1&t){const e=I();l(0,"button",44),C("click",function(){v(e);const s=d().$implicit;return d().override(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.override_rule"))}const zoe=function(){return["Recording","Failing"]};function joe(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",31),k(2,"div",32),c(),l(3,"td",33),g(4),c(),l(5,"td",34),g(6),m(7,"number"),c(),l(8,"td",18),g(9),c(),l(10,"td",35),g(11),c(),l(12,"td",36),g(13),c(),l(14,"td",21),_(15,Boe,2,2,"div",37),c(),l(16,"td",15),k(17,"div",32),c(),l(18,"td",22),g(19),c(),l(20,"td",18),g(21),c(),l(22,"td",23),_(23,qoe,2,3,"div",38),c(),l(24,"td",24),_(25,Uoe,2,3,"button",39),_(26,Goe,2,3,"ng-template",null,40,we),c(),l(28,"td",24)(29,"button",41),C("click",function(){const r=v(e).$implicit;return d().updateRecRule(r)}),m(30,"translate"),c()()()}if(2&t){const e=i.$implicit,n=F(27),s=d();a(2),p("innerHTML",s.formatStartDate(e),Ht),a(2),T(" ",s.formatStartTime(e),""),a(2),T(" ",Dt(7,17,s.getDuration(e),"1.0-0")," min"),a(3),T("",e.Recording.EncoderName," "),a(2),T(" ",e.Title,""),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle.slice(0,50),""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",s.formatAirDate(e),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(2),S(e.Recording.RecGroup),a(2),p("ngIf",e.Recording),a(2),p("ngIf",A(22,zoe).indexOf(e.Recording.StatusName)>-1)("ngIfElse",n),a(4),D("pTooltip",f(30,20,"dashboard.recordings.edit_rule")),p("disabled",e.Recording&&7==e.Recording.RecType)}}function $oe(t,i){1&t&&(k(0,"p-message",49),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Woe(t,i){if(1&t){const e=I();l(0,"div",45),_(1,$oe,2,3,"p-message",46),c(),l(2,"p-button",47),C("onClick",function(){return v(e),d().displayStop=!1}),m(3,"translate"),c(),l(4,"p-button",48),C("onClick",function(){v(e);const s=d();return s.stopRecording(s.program)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"dashboard.recordings.stop_recording"))}}let Koe=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.messageService=n,this.translate=s,this.dataService=r,this.utility=o,this.programs=[],this.recRules=[],this.allRecRules=[],this.activeRecRules=[],this.defaultRecRule={Id:0,Title:"settings.chanedit.all"},this.displayUpdateDlg=!1,this.showAllStatuses=!1,this.refreshing=!1,this.loaded=!1,this.inter={summaryComponent:this},this.displayStop=!1,this.errorCount=0,this.translate.get(this.defaultRecRule.Title).subscribe(u=>this.defaultRecRule.Title=u),this.loadRecRules()}ngOnInit(){}refresh(){this.refreshing=!0,this.loadRecRules(),this.loadLazy(this.lazyLoadEvent)}loadRecRules(){this.dvrService.GetRecordScheduleList({}).subscribe({next:e=>{this.allRecRules.length=0,this.allRecRules.push(this.defaultRecRule),this.activeRecRules.length=0,this.activeRecRules.push(this.defaultRecRule),e.RecRuleList.RecRules.forEach(n=>{if("Recording Template"!=n.Type){let s={Id:n.Id,Title:n.Title.substring(0,30)+" ["+this.utility.recTypeTrans[n.Type]+"]"};this.allRecRules.push(s),n.NextRecording&&this.activeRecRules.push(s)}})}})}loadLazy(e){this.lazyLoadEvent=e;let n={StartIndex:0,Count:1};e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows,n.Count<100&&(n.Count=100)),e.filters&&(e.filters.ShowAll.value&&(n.ShowAll=!0),e.filters.RecordId.value&&(n.RecordId=e.filters.RecordId.value)),this.recRules.length=0,n.ShowAll?this.recRules.push(...this.allRecRules):this.recRules.push(...this.activeRecRules),this.dvrService.GetUpcomingList(n).subscribe(s=>{let r=s.ProgramList;this.programs.length=s.ProgramList.TotalAvailable,this.programs.splice(r.StartIndex,r.Count,...r.Programs),this.programs=[...this.programs],this.refreshing=!1})}formatStartDate(e){return this.utility.formatDate(e.Recording.StartTs,!0)}formatAirDate(e){return e.Airdate?this.utility.formatDate(e.Airdate+" 00:00",!0):""}formatStartTime(e){return(new Date(e.Recording.StartTs).toLocaleTimeString()+" ").replace(/:.. /," ")}getDuration(e){let n=new Date(e.Recording.StartTs).getTime();return(new Date(e.Recording.EndTs).getTime()-n)/6e4}updateRecRule(e){this.inter.sched&&this.inter.sched.open(e)}override(e){this.inter.sched&&(7==e.Recording.RecType?this.inter.sched.open(e):this.inter.sched.open(e,void 0,{Type:"Override Recording"}))}stopRequest(e){e.Recording.RecordId&&(this.program=e,this.displayStop=!0)}stopRecording(e){this.errorCount=0,this.dvrService.StopRecording(e.Recording.RecordedId).subscribe({next:n=>{n.bool?(this.displayStop=!1,setTimeout(()=>this.inter.summaryComponent.refresh(),3e3)):this.errorCount++},error:n=>{this.errorCount++}})}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(ys),x(Le),x(Ll),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-upcoming"]],features:[Ne([ys])],decls:24,vars:25,consts:[[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full"],[2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],["field","ShowAll","matchMode","equals",3,"showMenu","showClearButton"],["pTemplate","filter"],["field","RecordId","matchMode","equals",3,"showMenu","showClearButton"],[4,"ngIf","ngIfElse"],["refreshBn",""],[1,"justify-content-end","p-1",2,"flex-basis","8%"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1",2,"flex-basis","7%"],[1,"p-1",2,"flex-basis","8%"],[1,"p-1",2,"flex-basis","12%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],[1,"p-1",2,"flex-basis","10%"],[1,"p-1",2,"flex-basis","7%"],[1,"p-1",2,"flex-basis","2%"],["pButton","","pRipple","","icon","pi pi-paperclip",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],["inputId","showAllStatuses","name","showAllStatuses",3,"ngModel","binary","label","onChange"],["showAll","ngModel"],["name","rulefilter","optionLabel","Title","optionValue","Id",3,"ngModel","options","placeholder","showClear","onChange"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","8%"],[3,"innerHTML"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1","overflow-hidden",2,"flex-basis","7%"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["pButton","","pRipple","","icon","pi pi-stop-circle","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","click",4,"ngIf","ngIfElse"],["overrideBn",""],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","disabled","click"],[3,"ngClass"],["pButton","","pRipple","","icon","pi pi-stop-circle","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-paperclip","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div")(1,"div",0),k(2,"p-toast",1),c(),l(3,"h2"),g(4),m(5,"translate"),c(),l(6,"div",2)(7,"div",3)(8,"p-table",4),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(9,Voe,48,42,"ng-template",5),_(10,joe,31,23,"ng-template",6),c(),l(11,"p-dialog",7),C("visibleChange",function(r){return n.displayStop=r}),m(12,"translate"),l(13,"h2"),g(14),m(15,"translate"),c(),l(16,"p"),g(17),m(18,"translate"),k(19,"br"),l(20,"b"),g(21),c()(),_(22,Woe,6,7,"ng-template",8),c(),k(23,"app-schedule",9),c()()()),2&e&&(a(4),S(f(5,17,"dashboard.upcoming.heading")),a(4),p("value",n.programs)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(3),D("header",f(12,19,"dashboard.recordings.stop_recording")),p("visible",n.displayStop)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(15,21,"settings.common.ru_sure")),a(3),T("",f(18,23,"dashboard.recordings.stop_details")," "),a(4),$e(" ",null==n.program?null:n.program.Title,": ",null==n.program?null:n.program.SubTitle,""),a(2),p("inter",n.inter))},directives:[wd,xn,ie,vg,rn,Te,_e,Vt,Q,Uo,Ln,vt,Jt,Oe,Tn,qe,ve,Rd],pipes:[de,Xc],styles:[""]}),t})();function Qoe(t,i){if(1&t){const e=I();l(0,"button",10),C("click",function(){return v(e),d(2).newRecRule()}),m(1,"translate"),c(),l(2,"button",11),C("click",function(){return v(e),d(2).newTemplate()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"dashboard.recrules.new_recrule")),a(2),D("label",f(3,4,"dashboard.recrules.new_teplate")))}function Joe(t,i){1&t&&(l(0,"tr")(1,"th",12),g(2),m(3,"translate"),k(4,"p-sortIcon",13),c(),l(5,"th",14),g(6),m(7,"translate"),c(),l(8,"th",15),g(9),m(10,"translate"),c(),l(11,"th",15),g(12),m(13,"translate"),c(),l(14,"th",15),g(15),m(16,"translate"),c(),l(17,"th",16),g(18),m(19,"translate"),k(20,"p-sortIcon",17),c(),l(21,"th",18),g(22),m(23,"translate"),k(24,"p-sortIcon",19),c(),l(25,"th",20),g(26,"Active"),c(),l(27,"th",21),k(28,"button",22)(29,"button",23),c()()),2&t&&(a(2),T(" ",f(3,9,"dashboard.recordings.title")," "),a(4),S(f(7,11,"dashboard.recrule.type")),a(3),S(f(10,13,"common.priority")),a(3),T(" ",f(13,15,"dashboard.recordings.recgrp")," "),a(3),T(" ",f(16,17,"dashboard.recrules.storgrp")," "),a(3),T(" ",f(19,19,"dashboard.recrules.lastrec"),""),a(4),T(" ",f(23,21,"dashboard.recrules.nextrec"),""),a(6),p("disabled",!0),a(1),p("disabled",!0))}function Yoe(t,i){1&t&&k(0,"i",31)}function Zoe(t,i){1&t&&k(0,"i",32)}function Xoe(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",24),g(2),c(),l(3,"td",14),g(4),c(),l(5,"td",15),g(6),c(),l(7,"td",15),g(8),c(),l(9,"td",15),g(10),c(),l(11,"td",25),g(12),c(),l(13,"td",26),g(14),c(),l(15,"td",20),_(16,Yoe,1,0,"i",27),_(17,Zoe,1,0,"ng-template",null,28,we),c(),l(19,"td",21)(20,"button",29),C("click",function(){const r=v(e).$implicit;return d(2).updateRecRule(r)}),m(21,"translate"),c(),l(22,"button",30),C("click",function(){const r=v(e).$implicit;return d(2).deleteRequest(r)}),m(23,"translate"),c()()()}if(2&t){const e=i.$implicit,n=F(18),s=d(2);a(2),T(" ",e.Title,""),a(2),T(" ",s.utility.recTypeTrans[e.Type],""),a(2),S(e.RecPriority),a(2),S(e.RecGroup),a(2),S(e.StorageGroup),a(2),T(" ",s.utility.formatDate(e.LastRecorded),""),a(2),$e(" ",s.utility.formatDate(e.NextRecording)," ",s.utility.formatTime(e.NextRecording),""),a(2),p("ngIf",e.Inactive)("ngIfElse",n),a(4),D("pTooltip",f(21,13,"dashboard.recordings.edit_rule")),a(2),D("pTooltip",f(23,15,"dashboard.recordings.delete_rule")),p("disabled","Recording Template"==e.Type&&"Default"==e.Category)}}function eae(t,i){if(1&t&&(l(0,"div",5)(1,"p-table",6),_(2,Qoe,4,6,"ng-template",7),_(3,Joe,30,23,"ng-template",8),_(4,Xoe,24,17,"ng-template",9),c()()),2&t){const e=d();a(1),p("value",e.recRules)("scrollable",!0)("rowHover",!0)}}function tae(t,i){1&t&&(k(0,"p-message",37),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function nae(t,i){if(1&t){const e=I();l(0,"div",33),_(1,tae,2,3,"p-message",34),c(),l(2,"p-button",35),C("onClick",function(){return v(e),d().displayDelete=!1}),m(3,"translate"),c(),l(4,"p-button",36),C("onClick",function(){v(e);const s=d();return s.deleteRule(s.recRule)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"common.delete"))}}function iae(t,i){1&t&&k(0,"p-progressSpinner")}let sae=(()=>{class t{constructor(e,n){this.dvrService=e,this.utility=n,this.recRules=[],this.inter={summaryComponent:this},this.deSpacer=new RegExp(/ /g),this.rulesLoaded=!1,this.errorCount=0,this.successCount=0,this.displayDelete=!1,this.saveObserver={next:s=>{this.recRule?this.recRule.Id&&s.bool?(this.successCount++,this.displayDelete=!1,setTimeout(()=>this.refresh(),1e3)):!this.recRule.Id&&s.uint?(this.successCount++,setTimeout(()=>this.inter.summaryComponent.refresh(),1e3),this.recRule.Id=s.uint):this.errorCount++:(console.log("ERROR: recRule is undefined"),this.errorCount++)},error:s=>{console.error(s),this.errorCount++}}}refresh(){this.loadLists()}ngOnInit(){this.loadLists()}loadLists(){this.recRules=[],this.errorCount=0,this.dvrService.GetRecordScheduleList({}).subscribe({next:e=>{this.recRules=e.RecRuleList.RecRules,this.rulesLoaded=!0},error:e=>{this.errorCount++}})}newRecRule(){this.updateRecRule()}updateRecRule(e){this.inter.sched&&this.inter.sched.open(void 0,void 0,e)}newTemplate(){this.updateRecRule({Type:"Recording Template"})}deleteRequest(e){this.recRule=e,this.displayDelete=!0}deleteRule(e){this.dvrService.RemoveRecordSchedule(e.Id).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-recrules"]],decls:19,vars:21,consts:[["class","block card w-full","style","height: 90vh",4,"ngIf","ngIfElse"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],["loading",""],[1,"block","card","w-full",2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","mr-2",3,"label","click"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","p-button-outlined","mr-2",3,"label","click"],["pSortableColumn","Title",1,"p-1",2,"flex-basis","20%"],["field","Title"],[1,"p-1",2,"flex-basis","20%"],[1,"p-1",2,"flex-basis","10%"],["pSortableColumn","LastRecorded",1,"justify-content-end","pr-5",2,"flex-basis","10%"],["field","LastRecorded"],["pSortableColumn","NextRecording",1,"justify-content-end","pr-5",2,"flex-basis","15%"],["field","NextRecording"],[1,"p-1",2,"flex-basis","5%"],[1,"p-1",2,"flex-basis","6%"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-trash",1,"p-button-text","p-button-danger",3,"disabled"],[1,"p-1","overflow-hidden",2,"flex-basis","20%"],[1,"justify-content-end","p-1","pr-5",2,"flex-basis","10%"],[1,"justify-content-end","p-1","pr-5",2,"flex-basis","15%"],["class","pi pi-times text-pink-500",4,"ngIf","ngIfElse"],["checkmark",""],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-trash","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","disabled","click"],[1,"pi","pi-times","text-pink-500"],[1,"pi","pi-check","text-green-500"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,eae,5,3,"div",0),l(4,"p-dialog",1),C("visibleChange",function(r){return n.displayDelete=r}),m(5,"translate"),l(6,"h2"),g(7),m(8,"translate"),c(),l(9,"p"),g(10),m(11,"translate"),k(12,"br"),l(13,"b"),g(14),c()(),_(15,nae,6,7,"ng-template",2),c(),k(16,"app-schedule",3),_(17,iae,1,0,"ng-template",null,4,we)),2&e){const s=F(18);a(1),S(f(2,13,"dashboard.recrules.heading")),a(2),p("ngIf",n.rulesLoaded)("ngIfElse",s),a(1),D("header",f(5,15,"dashboard.recordings.delete_rule")),p("visible",n.displayDelete)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(8,17,"settings.common.ru_sure")),a(3),T("",f(11,19,"dashboard.recordings.delete_details")," "),a(4),$e(" ",null==n.recRule?null:n.recRule.Title,": ",null==n.recRule?null:n.recRule.Type,""),a(2),p("inter",n.inter)}},directives:[Q,xn,ie,Ln,vt,Cd,yd,Jt,Tn,qe,ve,Rd,Uo],pipes:[de],styles:[""]}),t})(),rae=(()=>{class t{constructor(e){this.httpClient=e}GetVideoList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Video/GetVideoList",{params:n})}UpdateVideoWatchedStatus(e,n){return this.httpClient.post("/Video/UpdateVideoWatchedStatus",{Id:e,Watched:n})}UpdateVideoMetadata(e){return this.httpClient.post("/Video/UpdateVideoMetadata",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oae=["vidsform"],aae=["menu"],lae=["table"];function cae(t,i){}function uae(t,i){if(1&t){const e=I();l(0,"div")(1,"p-button",34),C("onClick",function(){const r=v(e).index;return d(2).breadCrumb(r+1)}),c()()}if(2&t){const e=i.$implicit;a(1),D("label",e)}}const dae=function(){return{width:"30px",height:"30px"}};function pae(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,dae)))}function hae(t,i){if(1&t){const e=I();l(0,"button",51),C("click",function(){v(e);const s=d(2);return s.refreshing=!0,s.reLoadVideos()}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"common.refresh"))}function mae(t,i){if(1&t){const e=I();l(0,"tr")(1,"th")(2,"p-button",34),C("onClick",function(){return v(e),d().breadCrumb(0)}),m(3,"translate"),c(),_(4,uae,2,1,"div",35),g(5," \xa0\xa0\xa0 "),l(6,"p-checkbox",36,37),C("ngModelChange",function(s){return v(e),d().showAllVideos=s})("onChange",function(){return v(e),d().showAllChange()}),m(8,"translate"),c(),_(9,pae,2,3,"div",38),_(10,hae,2,3,"ng-template",null,39,we),g(12),c()(),l(13,"tr")(14,"th",40),g(15),m(16,"translate"),k(17,"p-sortIcon",41),c(),k(18,"th",42),l(19,"th",43),g(20),m(21,"translate"),c(),l(22,"th",44),g(23),m(24,"translate"),c(),l(25,"th",45),g(26),m(27,"translate"),k(28,"p-sortIcon",46),c(),l(29,"th",47),g(30),m(31,"translate"),c(),l(32,"th",44)(33,"a",48),k(34,"i",49),c(),k(35,"button",50),c()()}if(2&t){const e=F(11),n=d();a(2),D("label",f(3,14,"dashboard.videos.heading")),a(2),p("ngForOf",n.directory),a(2),Bn("label","",f(8,16,"dashboard.videos.showall")," "),p("ngModel",n.showAllVideos)("binary",!0),a(3),p("ngIf",n.refreshing)("ngIfElse",e),a(3),T(" \xa0\xa0\xa0",n.videos.length," Rows "),a(3),T(" ",f(16,18,"dashboard.recordings.title")," "),a(5),S(f(21,20,"dashboard.recordings.subtitle")),a(3),S(f(24,22,"dashboard.recordings.seas_ep")),a(3),T(" ",f(27,24,"dashboard.videos.releasedate")," "),a(4),T(" ",f(31,26,"dashboard.recordings.duration")," "),a(5),p("disabled",!0)}}function fae(t,i){if(1&t){const e=I();l(0,"div")(1,"button",59),C("click",function(){v(e);const s=d().$implicit;return d().onDirectory(s.Title)}),c()()}if(2&t){const e=d().$implicit;a(1),D("label",e.Title)}}function gae(t,i){1&t&&g(0),2&t&&T(" ",d().$implicit.Title," ")}function _ae(t,i){1&t&&k(0,"i",60)}function bae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}function vae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),T(" ",e.Length," min ")}}function Cae(t,i){if(1&t){const e=I();l(0,"div")(1,"a",61),m(2,"translate"),k(3,"i",62),c(),l(4,"button",63),C("click",function(s){v(e);const r=d().$implicit;return d().showMenu(r,s)}),c()()}if(2&t){const e=d().$implicit,n=d();a(1),D("href",n.URLencode("/Content/GetVideo?Id="+e.Id),Xt),D("pTooltip",f(2,2,"dashboard.videos.download"))}}function yae(t,i){if(1&t&&(l(0,"tr")(1,"td",52),_(2,fae,2,1,"div",38),_(3,gae,1,1,"ng-template",null,53,we),c(),l(5,"td",42),_(6,_ae,1,0,"i",54),c(),l(7,"td",55),g(8),c(),l(9,"td",44),_(10,bae,2,2,"div",56),c(),l(11,"td",57),k(12,"div",58),c(),l(13,"td",47),_(14,vae,2,1,"div",56),c(),l(15,"td",44),_(16,Cae,5,4,"div",56),c()()),2&t){const e=i.$implicit,n=F(4),s=d();a(2),p("ngIf","DIRECTORY"==e.ContentType)("ngIfElse",n),a(4),p("ngIf",e.Watched),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle,""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",s.utility.formatDate(e.ReleaseDate,!0),Ht),a(2),p("ngIf",e.Length>0),a(2),p("ngIf","DIRECTORY"!=e.ContentType)}}function wae(t,i){1&t&&(k(0,"p-message",69),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Tae(t,i){1&t&&(k(0,"p-message",70),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Sae(t,i){if(1&t){const e=I();l(0,"div",64),_(1,wae,2,3,"p-message",65),_(2,Tae,2,3,"p-message",66),c(),l(3,"p-button",67),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",68),C("onClick",function(){return v(e),d().saveVideo()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(15);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.video.Title.trim())}}function xae(t,i){if(1&t){const e=I();l(0,"p-button",71),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",72),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const Dae=function(){return{height:"75vw",width:"50vw"}};let Mae=(()=>{class t{constructor(e,n,s,r){this.videoService=e,this.translate=n,this.messageService=s,this.utility=r,this.videos=[],this.refreshing=!1,this.successCount=0,this.errorCount=0,this.directory=[],this.video={Title:""},this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.showAllVideos=!1,this.mnu_markwatched={label:"dashboard.recordings.mnu_markwatched",command:u=>this.markwatched(u,!0)},this.mnu_markunwatched={label:"dashboard.recordings.mnu_markunwatched",command:u=>this.markwatched(u,!1)},this.mnu_updatemeta={label:"dashboard.recordings.mnu_updatemeta",command:u=>this.updatemeta(u)},this.menuToShow=[],this.msg={Success:"common.success",Failed:"common.failed",NetFail:"common.networkfail"},this.saveObserver={next:u=>{u.bool?(console.log("saveObserver success",u),this.successCount++,this.successCount++,this.currentForm.form.markAsPristine(),this.editingVideo&&Object.assign(this.editingVideo,this.video)):(console.log("saveObserver error",u),this.errorCount++)},error:u=>{console.log("saveObserver error",u),this.errorCount++}};for(const[u,h]of Object.entries(this.msg))this.translate.get(h).subscribe(b=>{Object.defineProperty(this.msg,u,{value:b})});[this.mnu_markwatched,this.mnu_markunwatched,this.mnu_updatemeta].forEach(u=>{u.label&&this.translate.get(u.label).subscribe(h=>u.label=h)})}ngOnInit(){}loadLazy(e){this.lazyLoadEvent=e;let n={Sort:"Title",Folder:this.directory.join("/"),CollapseSubDirs:!this.showAllVideos,StartIndex:0,Count:1};e.sortField&&(n.Sort=e.sortField,e.sortOrder&&(n.Descending=e.sortOrder<0)),e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows),this.videoService.GetVideoList(n).subscribe(s=>{let r=s.VideoMetadataInfoList;this.videos.length=s.VideoMetadataInfoList.TotalAvailable,this.videos.splice(r.StartIndex,r.Count,...r.VideoMetadataInfos),this.videos=[...this.videos],this.refreshing=!1})}reLoadVideos(){this.table.resetScrollTop(),this.videos.length=0,this.lazyLoadEvent.first=0,this.lazyLoadEvent.rows=100,this.loadLazy(this.lazyLoadEvent)}showAllChange(){this.refreshing=!0,setTimeout(()=>this.reLoadVideos(),100)}URLencode(e){return encodeURI(e)}onDirectory(e){this.directory.push(e),this.reLoadVideos()}breadCrumb(e){this.directory.length=e,this.reLoadVideos()}showMenu(e,n){this.video=e,this.menuToShow.length=0,this.menuToShow.push(e.Watched?this.mnu_markunwatched:this.mnu_markwatched),this.menuToShow.push(this.mnu_updatemeta),this.menu.toggle(n)}markwatched(e,n){this.videoService.UpdateVideoWatchedStatus(this.video.Id,n).subscribe({next:s=>{s.bool?(this.sendMessage("success",e.item.label,this.msg.Success),this.video.Watched=n):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}updatemeta(e){this.editingVideo=this.video,this.video=Object.assign({},this.video),this.video.ReleaseDate=this.video.ReleaseDate?new Date(this.video.ReleaseDate):null,this.displayMetadataDlg=!0}sendMessage(e,n,s,r){this.messageService.add({severity:e,summary:s,detail:n+" "+this.video.Title+" "+this.video.SubTitle+(r=r?"\n"+r:""),life:3e3})}saveVideo(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1,this.videoService.UpdateVideoMetadata({Id:this.video.Id,Episode:this.video.Episode,Inetref:this.video.Inetref,Plot:this.video.Description,ReleaseDate:this.video.ReleaseDate,Season:this.video.Season,SubTitle:this.video.SubTitle,Title:this.video.Title}).subscribe(this.saveObserver)}networkError(e){console.log("network error",e),this.sendMessage("error","",this.msg.NetFail)}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayMetadataDlg=!1,this.editingVideo=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.editingVideo=void 0)}}return t.\u0275fac=function(e){return new(e||t)(x(rae),x(Le),x(ys),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-videos"]],viewQuery:function(e,n){if(1&e&&(j(oae,5),j(aae,5),j(lae,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.menu=s.first),V(s=B())&&(n.table=s.first)}},features:[Ne([ys])],decls:64,vars:67,consts:[[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full",2,"height","90vh"],[3,"popup","model"],["menu",""],["name","table","scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["table",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["name","vidsform",1,"ml-3","mr-3"],["vidsform","ngForm"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","Title",1,"label","block"],["pInputText","","id","Title","name","Title",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Title","ngModel"],["for","SubTitle",1,"label","block"],["pInputText","","id","SubTitle","name","SubTitle",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["SubTitle","ngModel"],["for","Inetref",1,"label","block"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Description",1,"label","block"],["pInputTextarea","","id","Description","name","Description",1,"mb-2","form-control","w-full",3,"rows","cols","ngModel","ngModelChange"],["Description","ngModel"],["for","Season",1,"label","block"],["name","Season","id","Season",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Episode",1,"label","block"],["name","Episode","id","Episode",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ReleaseDate",1,"label","block"],["dateFormat","yy-mm-dd","name","ReleaseDate","id","ReleaseDate",3,"ngModel","ngModelChange"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["styleClass","p-button-primary",1,"p-1",3,"label","onClick"],[4,"ngFor","ngForOf"],["inputId","showAllVideos","name","showAllVideos",3,"ngModel","binary","label","ngModelChange","onChange"],["showAll","ngModel"],[4,"ngIf","ngIfElse"],["refreshBn",""],["pSortableColumn","Title",1,"p-1",2,"flex-basis","30%"],["field","Title"],[1,"p-1",2,"flex-basis","3%"],[1,"p-1",2,"flex-basis","30%"],[1,"p-1",2,"flex-basis","6%"],["pSortableColumn","ReleaseDate",1,"justify-content-end","p-1",2,"flex-basis","12%"],["field","ReleaseDate"],[1,"justify-content-end","p-1",2,"flex-basis","10%"],["target","_blank"],[1,"pi","pi-download"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],[1,"p-1","overflow-hidden",2,"flex-basis","30%"],["title",""],["class","pi pi-eye",4,"ngIf"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","30%",3,"pTooltip"],[4,"ngIf"],[1,"justify-content-end","p-1",2,"flex-basis","12%"],[3,"innerHTML"],["pButton","","pRipple","","icon","pi pi-folder",1,"p-button-text","p-button-primary",3,"label","click"],[1,"pi","pi-eye"],["target","_blank","tooltipPosition","left",3,"href","pTooltip"],[1,"pi","pi-download","text-primary"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"click"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"div")(1,"div",0),k(2,"p-toast",1),c(),l(3,"h2"),g(4),m(5,"translate"),c(),l(6,"div",2),k(7,"p-menu",3,4),l(9,"p-table",5,6),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(11,cae,0,0,"ng-template",7),_(12,mae,36,28,"ng-template",8),_(13,yae,17,9,"ng-template",9),c()(),l(14,"form",10,11)(16,"p-dialog",12),C("visibleChange",function(r){return n.displayMetadataDlg=r}),m(17,"translate"),l(18,"div",13)(19,"label",14),g(20),m(21,"translate"),c(),l(22,"input",15,16),C("ngModelChange",function(r){return n.video.Title=r}),c()(),l(24,"div",13)(25,"label",17),g(26),m(27,"translate"),c(),l(28,"input",18,19),C("ngModelChange",function(r){return n.video.SubTitle=r}),c()(),l(30,"div",13)(31,"label",20),g(32),m(33,"translate"),c(),l(34,"input",21,22),C("ngModelChange",function(r){return n.video.Inetref=r}),c()(),l(36,"div",13)(37,"label",23),g(38),m(39,"translate"),c(),l(40,"textarea",24,25),C("ngModelChange",function(r){return n.video.Description=r}),c()(),l(42,"div",13)(43,"label",26),g(44),m(45,"translate"),c(),l(46,"p-inputNumber",27),C("ngModelChange",function(r){return n.video.Season=r}),c()(),l(47,"div",13)(48,"label",28),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",29),C("ngModelChange",function(r){return n.video.Episode=r}),c()(),l(52,"div",13)(53,"label",30),g(54),m(55,"translate"),c(),l(56,"p-calendar",31),C("ngModelChange",function(r){return n.video.ReleaseDate=r}),c()(),_(57,Sae,7,9,"ng-template",32),c(),l(58,"p-dialog",33),C("visibleChange",function(r){return n.displayUnsaved=r}),m(59,"translate"),l(60,"p"),g(61),m(62,"translate"),c(),_(63,xae,4,6,"ng-template",32),c()()()),2&e&&(a(4),S(f(5,44,"dashboard.videos.heading")),a(3),p("popup",!0)("model",n.menuToShow),a(2),p("value",n.videos)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(7),q(A(66,Dae)),D("header",f(17,46,"dashboard.recordings.edit_metadata")),p("visible",n.displayMetadataDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(4),S(f(21,48,"dashboard.recordings.title")),a(2),p("ngModel",n.video.Title),a(4),S(f(27,50,"dashboard.recordings.subtitle")),a(2),p("ngModel",n.video.SubTitle),a(4),S(f(33,52,"dashboard.recordings.inetref")),a(2),p("ngModel",n.video.Inetref),a(4),S(f(39,54,"dashboard.recordings.description")),a(2),p("rows",5)("cols",30)("ngModel",n.video.Description),a(4),S(f(45,56,"dashboard.recordings.season")),a(2),p("ngModel",n.video.Season)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(50,58,"dashboard.recordings.episode")),a(2),p("ngModel",n.video.Episode)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(55,60,"dashboard.videos.releasedate")),a(2),p("ngModel",n.video.ReleaseDate),a(2),D("header",f(59,62,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(62,64,"common.unsaved_message")))},directives:[wd,tS,xn,ie,ve,at,rn,Te,_e,Q,Uo,Ln,vt,Jt,Cd,yd,ze,Ge,He,Tn,Ye,X2,dt,xr,qe],pipes:[de],styles:[""]}),t})(),kae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[On.forChild([{path:"dashboard",component:iS,children:[{path:"status",component:zre},{path:"channel-editor",component:fS},{path:"program-guide",component:gS},{path:"recordings",component:loe},{path:"upcoming",component:Koe},{path:"recrules",component:sae},{path:"videos",component:Mae}]}])],On]}),t})();function Iae(t,i){1&t&&(l(0,"th",19),g(1),m(2,"translate"),c()),2&t&&(a(1),T("",f(2,1,"dashboard.upcoming.encoder")," "))}function Eae(t,i){1&t&&(l(0,"th",19),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.recordings.recgrp")," "))}function Rae(t,i){1&t&&(l(0,"th",17),k(1,"button",20),c()),2&t&&(a(1),p("disabled",!0))}function Lae(t,i){if(1&t&&(l(0,"tr")(1,"th",7),g(2),m(3,"translate"),c(),l(4,"th",8),g(5),m(6,"translate"),c(),k(7,"th",9),_(8,Iae,3,3,"th",10),l(9,"th",11),g(10),m(11,"translate"),c(),l(12,"th",12),g(13),m(14,"translate"),c(),l(15,"th",13),g(16),m(17,"translate"),c(),l(18,"th",7),g(19),m(20,"translate"),c(),l(21,"th",14),g(22),m(23,"translate"),c(),_(24,Eae,3,3,"th",10),l(25,"th",15),g(26),m(27,"translate"),c(),_(28,Rae,2,1,"th",16),l(29,"th",17),k(30,"button",18),c()()),2&t){const e=d();a(2),T(" ",f(3,12,"dashboard.upcoming.date")," "),a(3),T(" ",f(6,14,"dashboard.upcoming.time")," "),a(3),p("ngIf","UPCOMING"==e.usage),a(2),T(" ",f(11,16,"dashboard.recordings.title"),""),a(3),S(f(14,18,"dashboard.recordings.subtitle")),a(3),S(f(17,20,"dashboard.recordings.seas_ep")),a(3),T(" ",f(20,22,"dashboard.recordings.orig_airdate")," "),a(3),S(f(23,24,"dashboard.recordings.channel")),a(2),p("ngIf","UPCOMING"==e.usage),a(2),T(" ",f(27,26,"dashboard.upcoming.status")," "),a(2),p("ngIf","UPCOMING"==e.usage),a(2),p("disabled",!0)}}function Oae(t,i){if(1&t&&(l(0,"td",19),g(1),c()),2&t){const e=d().$implicit;a(1),T("",e.Recording.EncoderName," ")}}function Aae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode,"")}}function Pae(t,i){if(1&t&&(l(0,"td",19),g(1),c()),2&t){const e=d().$implicit;a(1),S(e.Recording.RecGroup)}}const Fae=function(){return["WillRecord","Recording","Recorded"]};function Nae(t,i){if(1&t&&(l(0,"div",30),g(1),c()),2&t){const e=d().$implicit,n=d();p("ngClass",A(2,Fae).indexOf(e.Recording.StatusName)>-1?"text-green-500":"text-pink-500"),a(1),T(" ",n.dataService.recStatusText[e.Recording.StatusName]," ")}}function Vae(t,i){if(1&t){const e=I();l(0,"button",33),C("click",function(){v(e);const s=d(2).$implicit;return d().stopRequest(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.stop_recording"))}function Bae(t,i){if(1&t){const e=I();l(0,"button",34),C("click",function(){v(e);const s=d(2).$implicit;return d().override(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.override_rule"))}function Hae(t,i){if(1&t&&(l(0,"td",17),_(1,Vae,2,3,"button",31),_(2,Bae,2,3,"ng-template",null,32,we),c()),2&t){const e=F(3),n=d().$implicit;a(1),p("ngIf","Recording"==n.Recording.StatusName)("ngIfElse",e)}}function qae(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",21),k(2,"div",22),c(),l(3,"td",23),g(4),c(),l(5,"td",24),g(6),m(7,"number"),c(),_(8,Oae,2,1,"td",10),l(9,"td",25),g(10),c(),l(11,"td",26),g(12),c(),l(13,"td",13),_(14,Aae,2,2,"div",27),c(),l(15,"td",7),k(16,"div",22),c(),l(17,"td",14),g(18),c(),_(19,Pae,2,1,"td",10),l(20,"td",15),_(21,Nae,2,3,"div",28),c(),_(22,Hae,4,2,"td",16),l(23,"td",17)(24,"button",29),C("click",function(){const r=v(e).$implicit;return d().updateRecRule(r)}),m(25,"translate"),c()()()}if(2&t){const e=i.$implicit,n=d();a(2),p("innerHTML",n.formatStartDate(e),Ht),a(2),T(" ",n.formatStartTime(e),""),a(2),T(" ",Dt(7,16,n.getDuration(e),"1.0-0")," min"),a(2),p("ngIf","UPCOMING"==n.usage),a(2),T(" ",e.Title,""),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle.slice(0,50),""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",n.formatAirDate(e),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(1),p("ngIf","UPCOMING"==n.usage),a(2),p("ngIf",e.Recording),a(1),p("ngIf","UPCOMING"==n.usage),a(2),D("pTooltip",f(25,19,"dashboard.recordings.edit_rule")),p("disabled",e.Recording&&7==e.Recording.RecType)}}function Uae(t,i){1&t&&(k(0,"p-message",39),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Gae(t,i){if(1&t){const e=I();l(0,"div",35),_(1,Uae,2,3,"p-message",36),c(),l(2,"p-button",37),C("onClick",function(){return v(e),d().displayStop=!1}),m(3,"translate"),c(),l(4,"p-button",38),C("onClick",function(){v(e);const s=d();return s.stopRecording(s.program)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"dashboard.recordings.stop_recording"))}}let zae=(()=>{class t{constructor(e,n,s){this.dataService=e,this.dvrService=n,this.utility=s,this.programs=[],this.usage="",this.displayStop=!1,this.successCount=0,this.errorCount=0}ngOnInit(){}formatStartDate(e){let n;return n="UPCOMING"==this.usage?e.Recording.StartTs:e.StartTime,this.utility.formatDate(n,!0)}formatAirDate(e){return e.Airdate?this.utility.formatDate(e.Airdate+" 00:00",!0):""}formatStartTime(e){let n;return n="UPCOMING"==this.usage?new Date(e.Recording.StartTs).getTime():new Date(e.StartTime).getTime(),(new Date(n).toLocaleTimeString()+" ").replace(/:.. /," ")}getDuration(e){let n,s;return"UPCOMING"==this.usage?(n=new Date(e.Recording.StartTs).getTime(),s=new Date(e.Recording.EndTs).getTime()):(n=new Date(e.StartTime).getTime(),s=new Date(e.EndTime).getTime()),(s-n)/6e4}updateRecRule(e){this.inter.sched&&this.inter.sched.open(e)}override(e){this.inter.sched&&(7==e.Recording.RecType?this.inter.sched.open(e):this.inter.sched.open(e,void 0,{Type:"Override Recording"}))}stopRequest(e){e.Recording.RecordId&&(this.program=e,this.displayStop=!0)}stopRecording(e){this.errorCount=0,this.dvrService.StopRecording(e.Recording.RecordedId).subscribe({next:n=>{n.bool?(this.displayStop=!1,setTimeout(()=>this.inter.summaryComponent.refresh(),3e3)):this.errorCount++},error:n=>{this.errorCount++}})}}return t.\u0275fac=function(e){return new(e||t)(x(Ll),x(jo),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-programs"]],inputs:{programs:"programs",inter:"inter",usage:"usage"},decls:17,vars:19,consts:[[2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],[1,"justify-content-end","p-1",2,"flex-basis","8%"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1",2,"flex-basis","7%"],["style","flex-basis: 8%","class","p-1",4,"ngIf"],[1,"p-1",2,"flex-basis","12%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],[1,"p-1",2,"flex-basis","10%"],[1,"p-1",2,"flex-basis","7%"],["style","flex-basis: 2%","class","p-1",4,"ngIf"],[1,"p-1",2,"flex-basis","2%"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],[1,"p-1",2,"flex-basis","8%"],["pButton","","pRipple","","icon","pi pi-paperclip",1,"p-button-text","p-button-primary",3,"disabled"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","8%"],[3,"innerHTML"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1","overflow-hidden",2,"flex-basis","7%"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","disabled","click"],[3,"ngClass"],["pButton","","pRipple","","icon","pi pi-stop","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","click",4,"ngIf","ngIfElse"],["overrideBn",""],["pButton","","pRipple","","icon","pi pi-stop","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-paperclip","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"p-table",1),_(2,Lae,31,28,"ng-template",2),_(3,qae,26,21,"ng-template",3),c(),l(4,"p-dialog",4),C("visibleChange",function(r){return n.displayStop=r}),m(5,"translate"),l(6,"h2"),g(7),m(8,"translate"),c(),l(9,"p"),g(10),m(11,"translate"),k(12,"br"),l(13,"b"),g(14),c()(),_(15,Gae,6,7,"ng-template",5),c(),k(16,"app-schedule",6),c()),2&e&&(a(1),p("value",n.programs)("scrollable",!0)("rowHover",!0),a(3),D("header",f(5,13,"dashboard.recordings.stop_recording")),p("visible",n.displayStop)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(8,15,"settings.common.ru_sure")),a(3),T("",f(11,17,"dashboard.recordings.stop_details")," "),a(4),$e(" ",null==n.program?null:n.program.Title,": ",null==n.program?null:n.program.SubTitle,""),a(2),p("inter",n.inter))},directives:[xn,ie,Q,Ln,vt,Jt,Oe,Tn,qe,ve,Rd],pipes:[de,Xc],styles:[""]}),t})();function jae(t){return new GO(t)}let $ae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t,bootstrap:[fW]}),t.\u0275inj=pe({providers:[],imports:[[qy,xO,eW,BF,Du,BA,B$,UO.forRoot({defaultLanguage:"en_US",loader:{provide:nl,useFactory:jae,deps:[Bi]}}),c$,RZ,kae]]}),t})();$i(gS,[Q,xr,Te,_e,Ye,Ln,vt,Jt,Uo,j6,ie,rX,eX,at,sX,zae,Rd],[de]),$i(uS,[Pe,ve,Tn,ws,Te,_e,ie,Q,qe,Ks,at,Ws,gr,Ja,_X,bS,Yee,lte,_te,Dte,Pte,_ie,Eie,Uie,ese,dse,km],[de]),$i(bS,[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,rn,Ui,ve,Tn,ws,Jt,qe,kd,Ol,wg,Al],[de]),$i(Ol,[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Vt,fn,Q,xn,z2,SG,Ui,ve,Tn,ws,kd,Ol,wg,Al],[de]),$i(Al,[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Ui,Q,ve,Tn,ws,kd,Ol,wg,Al],[de]),$i(mS,[Pe,Ks,at,Ws,ie,Q,SS,ve],[de]),$i(SS,[ze,Ge,He,Pe,ie,Q,gr,Ja,dt,Te,_e,Td,Ye,Vt,fn,rn,Ui,ere,ve,Tn,qe],[de]),$i(dS,[Pe,Ks,at,Ws,ie,Q,DS,ve],[de]),$i(DS,[ve,Tn,Ye,Te,_e,ie,Q,qe,Ks,at,Ws,sie],[de]),function jR(){if(ZC)throw new Error("Cannot enable prod mode after platform setup.");YC=!1}(),Z4().bootstrapModule($ae).catch(t=>console.error(t))}},Ms=>{Ms(Ms.s=681)}]); \ No newline at end of file +"use strict";(self.webpackChunkbackend=self.webpackChunkbackend||[]).push([[179],{681:()=>{function Ms(t){return"function"==typeof t}let Qo=!1;const di={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const i=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+i.stack)}else Qo&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Qo=t},get useDeprecatedSynchronousErrorHandling(){return Qo}};function ks(t){setTimeout(()=>{throw t},0)}const Pl={closed:!0,next(t){},error(t){if(di.useDeprecatedSynchronousErrorHandling)throw t;ks(t)},complete(){}},Nr=Array.isArray||(t=>t&&"number"==typeof t.length);function Ld(t){return null!==t&&"object"==typeof t}const Fl=(()=>{function t(i){return Error.call(this),this.message=i?`${i.length} errors occurred during unsubscription:\n${i.map((e,n)=>`${n+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=i,this}return t.prototype=Object.create(Error.prototype),t})();class Et{constructor(i){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,i&&(this._ctorUnsubscribe=!0,this._unsubscribe=i)}unsubscribe(){let i;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:n,_unsubscribe:s,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof Et)e.remove(this);else if(null!==e)for(let o=0;oi.concat(e instanceof Fl?e.errors:e),[])}Et.EMPTY=((t=new Et).closed=!0,t);const Nl="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class yt extends Et{constructor(i,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Pl;break;case 1:if(!i){this.destination=Pl;break}if("object"==typeof i){i instanceof yt?(this.syncErrorThrowable=i.syncErrorThrowable,this.destination=i,i.add(this)):(this.syncErrorThrowable=!0,this.destination=new Mg(this,i));break}default:this.syncErrorThrowable=!0,this.destination=new Mg(this,i,e,n)}}[Nl](){return this}static create(i,e,n){const s=new yt(i,e,n);return s.syncErrorThrowable=!1,s}next(i){this.isStopped||this._next(i)}error(i){this.isStopped||(this.isStopped=!0,this._error(i))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(i){this.destination.next(i)}_error(i){this.destination.error(i),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:i}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=i,this}}class Mg extends yt{constructor(i,e,n,s){super(),this._parentSubscriber=i;let r,o=this;Ms(e)?r=e:e&&(r=e.next,n=e.error,s=e.complete,e!==Pl&&(o=Object.create(e),Ms(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=n,this._complete=s}next(i){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;di.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,i)&&this.unsubscribe():this.__tryOrUnsub(this._next,i)}}error(i){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=di;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,i),this.unsubscribe()):(this.__tryOrUnsub(this._error,i),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=i,e.syncErrorThrown=!0):ks(i),this.unsubscribe();else{if(this.unsubscribe(),n)throw i;ks(i)}}}complete(){if(!this.isStopped){const{_parentSubscriber:i}=this;if(this._complete){const e=()=>this._complete.call(this._context);di.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable?(this.__tryOrSetError(i,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(i,e){try{i.call(this._context,e)}catch(n){if(this.unsubscribe(),di.useDeprecatedSynchronousErrorHandling)throw n;ks(n)}}__tryOrSetError(i,e,n){if(!di.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(s){return di.useDeprecatedSynchronousErrorHandling?(i.syncErrorValue=s,i.syncErrorThrown=!0,!0):(ks(s),!0)}return!1}_unsubscribe(){const{_parentSubscriber:i}=this;this._context=null,this._parentSubscriber=null,i.unsubscribe()}}const Jo="function"==typeof Symbol&&Symbol.observable||"@@observable";function Vl(t){return t}let Je=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,s){const{operator:r}=this,o=function LS(t,i,e){if(t){if(t instanceof yt)return t;if(t[Nl])return t[Nl]()}return t||i||e?new yt(t,i,e):new yt(Pl)}(e,n,s);if(o.add(r?r.call(o,this.source):this.source||di.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),di.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o}_trySubscribe(e){try{return this._subscribe(e)}catch(n){di.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=n),function RS(t){for(;t;){const{closed:i,destination:e,isStopped:n}=t;if(i||n)return!1;t=e&&e instanceof yt?e:null}return!0}(e)?e.error(n):console.warn(n)}}forEach(e,n){return new(n=Ig(n))((s,r)=>{let o;o=this.subscribe(u=>{try{e(u)}catch(h){r(h),o&&o.unsubscribe()}},r,s)})}_subscribe(e){const{source:n}=this;return n&&n.subscribe(e)}[Jo](){return this}pipe(...e){return 0===e.length?this:function kg(t){return 0===t.length?Vl:1===t.length?t[0]:function(e){return t.reduce((n,s)=>s(n),e)}}(e)(this)}toPromise(e){return new(e=Ig(e))((n,s)=>{let r;this.subscribe(o=>r=o,o=>s(o),()=>n(r))})}}return t.create=i=>new t(i),t})();function Ig(t){if(t||(t=di.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const nr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class Eg extends Et{constructor(i,e){super(),this.subject=i,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const i=this.subject,e=i.observers;if(this.subject=null,!e||0===e.length||i.isStopped||i.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class Rg extends yt{constructor(i){super(i),this.destination=i}}let ct=(()=>{class t extends Je{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Nl](){return new Rg(this)}lift(e){const n=new Lg(this,this);return n.operator=e,n}next(e){if(this.closed)throw new nr;if(!this.isStopped){const{observers:n}=this,s=n.length,r=n.slice();for(let o=0;onew Lg(i,e),t})();class Lg extends ct{constructor(i,e){super(),this.destination=i,this.source=e}next(i){const{destination:e}=this;e&&e.next&&e.next(i)}error(i){const{destination:e}=this;e&&e.error&&this.destination.error(i)}complete(){const{destination:i}=this;i&&i.complete&&this.destination.complete()}_subscribe(i){const{source:e}=this;return e?this.source.subscribe(i):Et.EMPTY}}function Vr(t){return t&&"function"==typeof t.schedule}function et(t,i){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new OS(t,i))}}class OS{constructor(i,e){this.project=i,this.thisArg=e}call(i,e){return e.subscribe(new AS(i,this.project,this.thisArg))}}class AS extends yt{constructor(i,e,n){super(i),this.project=e,this.count=0,this.thisArg=n||this}_next(i){let e;try{e=this.project.call(this.thisArg,i,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const Og=t=>i=>{for(let e=0,n=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function Pg(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Od=t=>{if(t&&"function"==typeof t[Jo])return(t=>i=>{const e=t[Jo]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(i)})(t);if(Ag(t))return Og(t);if(Pg(t))return(t=>i=>(t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,ks),i))(t);if(t&&"function"==typeof t[Bl])return(t=>i=>{const e=t[Bl]();for(;;){let n;try{n=e.next()}catch(s){return i.error(s),i}if(n.done){i.complete();break}if(i.next(n.value),i.closed)break}return"function"==typeof e.return&&i.add(()=>{e.return&&e.return()}),i})(t);{const e=`You provided ${Ld(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Ad(t,i){return new Je(e=>{const n=new Et;let s=0;return n.add(i.schedule(function(){s!==t.length?(e.next(t[s++]),e.closed||n.add(this.schedule())):e.complete()})),n})}function Dn(t,i){return i?function zS(t,i){if(null!=t){if(function US(t){return t&&"function"==typeof t[Jo]}(t))return function BS(t,i){return new Je(e=>{const n=new Et;return n.add(i.schedule(()=>{const s=t[Jo]();n.add(s.subscribe({next(r){n.add(i.schedule(()=>e.next(r)))},error(r){n.add(i.schedule(()=>e.error(r)))},complete(){n.add(i.schedule(()=>e.complete()))}}))})),n})}(t,i);if(Pg(t))return function HS(t,i){return new Je(e=>{const n=new Et;return n.add(i.schedule(()=>t.then(s=>{n.add(i.schedule(()=>{e.next(s),n.add(i.schedule(()=>e.complete()))}))},s=>{n.add(i.schedule(()=>e.error(s)))}))),n})}(t,i);if(Ag(t))return Ad(t,i);if(function GS(t){return t&&"function"==typeof t[Bl]}(t)||"string"==typeof t)return function qS(t,i){if(!t)throw new Error("Iterable cannot be null");return new Je(e=>{const n=new Et;let s;return n.add(()=>{s&&"function"==typeof s.return&&s.return()}),n.add(i.schedule(()=>{s=t[Bl](),n.add(i.schedule(function(){if(e.closed)return;let r,o;try{const u=s.next();r=u.value,o=u.done}catch(u){return void e.error(u)}o?e.complete():(e.next(r),this.schedule())}))})),n})}(t,i)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,i):t instanceof Je?t:new Je(Od(t))}class Yo extends yt{constructor(i){super(),this.parent=i}_next(i){this.parent.notifyNext(i)}_error(i){this.parent.notifyError(i),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Zo extends yt{notifyNext(i){this.destination.next(i)}notifyError(i){this.destination.error(i)}notifyComplete(){this.destination.complete()}}function Xo(t,i){if(i.closed)return;if(t instanceof Je)return t.subscribe(i);let e;try{e=Od(t)(i)}catch(n){i.error(n)}return e}function bn(t,i,e=Number.POSITIVE_INFINITY){return"function"==typeof i?n=>n.pipe(bn((s,r)=>Dn(t(s,r)).pipe(et((o,u)=>i(s,o,r,u))),e)):("number"==typeof i&&(e=i),n=>n.lift(new jS(t,e)))}class jS{constructor(i,e=Number.POSITIVE_INFINITY){this.project=i,this.concurrent=e}call(i,e){return e.subscribe(new $S(i,this.project,this.concurrent))}}class $S extends Zo{constructor(i,e,n=Number.POSITIVE_INFINITY){super(i),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(i){this.active0?this._next(i.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function ea(t=Number.POSITIVE_INFINITY){return bn(Vl,t)}function Pd(t,i){return i?Ad(t,i):new Je(Og(t))}function Fd(){return function(i){return i.lift(new KS(i))}}class KS{constructor(i){this.connectable=i}call(i,e){const{connectable:n}=this;n._refCount++;const s=new QS(i,n),r=e.subscribe(s);return s.closed||(s.connection=n.connect()),r}}class QS extends yt{constructor(i,e){super(i),this.connectable=e}_unsubscribe(){const{connectable:i}=this;if(!i)return void(this.connection=null);this.connectable=null;const e=i._refCount;if(e<=0)return void(this.connection=null);if(i._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,s=i._connection;this.connection=null,s&&(!n||s===n)&&s.unsubscribe()}}class Fg extends Je{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){const i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let i=this._connection;return i||(this._isComplete=!1,i=this._connection=new Et,i.add(this.source.subscribe(new YS(this.getSubject(),this))),i.closed&&(this._connection=null,i=Et.EMPTY)),i}refCount(){return Fd()(this)}}const JS=(()=>{const t=Fg.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class YS extends Rg{constructor(i,e){super(i),this.connectable=e}_error(i){this._unsubscribe(),super._error(i)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const i=this.connectable;if(i){this.connectable=null;const e=i._connection;i._refCount=0,i._subject=null,i._connection=null,e&&e.unsubscribe()}}}class ex{constructor(i,e){this.subjectFactory=i,this.selector=e}call(i,e){const{selector:n}=this,s=this.subjectFactory(),r=n(s).subscribe(i);return r.add(e.subscribe(s)),r}}function tx(){return new ct}function wt(t){for(let i in t)if(t[i]===wt)return i;throw Error("Could not find renamed property on target object.")}function Nd(t,i){for(const e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function mt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(mt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const i=t.toString();if(null==i)return""+i;const e=i.indexOf("\n");return-1===e?i:i.substring(0,e)}function Vd(t,i){return null==t||""===t?null===i?"":i:null==i||""===i?t:t+" "+i}const ix=wt({__forward_ref__:wt});function Ue(t){return t.__forward_ref__=Ue,t.toString=function(){return mt(this())},t}function Fe(t){return Ng(t)?t():t}function Ng(t){return"function"==typeof t&&t.hasOwnProperty(ix)&&t.__forward_ref__===Ue}class re extends Error{constructor(i,e){super(function Bd(t,i){return`NG0${Math.abs(t)}${i?": "+i:""}`}(i,e)),this.code=i}}function ke(t){return"string"==typeof t?t:null==t?"":String(t)}function vn(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ke(t)}function Hl(t,i){const e=i?` in ${i}`:"";throw new re(-201,`No provider for ${vn(t)} found${e}`)}function Qn(t,i){null==t&&function ft(t,i,e,n){throw new Error(`ASSERTION ERROR: ${t}`+(null==n?"":` [Expected=> ${e} ${n} ${i} <=Actual]`))}(i,t,null,"!=")}function X(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function pe(t){return{providers:t.providers||[],imports:t.imports||[]}}function Hd(t){return Vg(t,ql)||Vg(t,Hg)}function Vg(t,i){return t.hasOwnProperty(i)?t[i]:null}function Bg(t){return t&&(t.hasOwnProperty(qd)||t.hasOwnProperty(ux))?t[qd]:null}const ql=wt({\u0275prov:wt}),qd=wt({\u0275inj:wt}),Hg=wt({ngInjectableDef:wt}),ux=wt({ngInjectorDef:wt});var xe=(()=>((xe=xe||{})[xe.Default=0]="Default",xe[xe.Host=1]="Host",xe[xe.Self=2]="Self",xe[xe.SkipSelf=4]="SkipSelf",xe[xe.Optional=8]="Optional",xe))();let Ud;function Is(t){const i=Ud;return Ud=t,i}function qg(t,i,e){const n=Hd(t);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:e&xe.Optional?null:void 0!==i?i:void Hl(mt(t),"Injector")}function Es(t){return{toString:t}.toString()}var Mi=(()=>((Mi=Mi||{})[Mi.OnPush=0]="OnPush",Mi[Mi.Default=1]="Default",Mi))(),ki=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(ki||(ki={})),ki))();const px="undefined"!=typeof globalThis&&globalThis,hx="undefined"!=typeof window&&window,mx="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,bt=px||"undefined"!=typeof global&&global||hx||mx,Br={},Tt=[],Ul=wt({\u0275cmp:wt}),Gd=wt({\u0275dir:wt}),zd=wt({\u0275pipe:wt}),Ug=wt({\u0275mod:wt}),us=wt({\u0275fac:wt}),ta=wt({__NG_ELEMENT_ID__:wt});let fx=0;function G(t){return Es(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Mi.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||Tt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ki.Emulated,id:"c",styles:t.styles||Tt,_:null,setInput:null,schemas:t.schemas||null,tView:null},s=t.directives,r=t.features,o=t.pipes;return n.id+=fx++,n.inputs=$g(t.inputs,e),n.outputs=$g(t.outputs),r&&r.forEach(u=>u(n)),n.directiveDefs=s?()=>("function"==typeof s?s():s).map(Gg):null,n.pipeDefs=o?()=>("function"==typeof o?o():o).map(zg):null,n})}function $i(t,i,e){const n=t.\u0275cmp;n.directiveDefs=()=>i.map(Gg),n.pipeDefs=()=>e.map(zg)}function Gg(t){return Cn(t)||function Rs(t){return t[Gd]||null}(t)}function zg(t){return function ir(t){return t[zd]||null}(t)}const jg={};function he(t){return Es(()=>{const i={type:t.type,bootstrap:t.bootstrap||Tt,declarations:t.declarations||Tt,imports:t.imports||Tt,exports:t.exports||Tt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&(jg[t.id]=t.type),i})}function $g(t,i){if(null==t)return Br;const e={};for(const n in t)if(t.hasOwnProperty(n)){let s=t[n],r=s;Array.isArray(s)&&(r=s[1],s=s[0]),e[s]=n,i&&(i[s]=r)}return e}const le=G;function An(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Cn(t){return t[Ul]||null}function pi(t,i){const e=t[Ug]||null;if(!e&&!0===i)throw new Error(`Type ${mt(t)} does not have '\u0275mod' property.`);return e}function Wi(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ei(t){return Array.isArray(t)&&!0===t[1]}function Wd(t){return 0!=(8&t.flags)}function $l(t){return 2==(2&t.flags)}function Wl(t){return 1==(1&t.flags)}function Ri(t){return null!==t.template}function Cx(t){return 0!=(512&t[2])}function ar(t,i){return t.hasOwnProperty(us)?t[us]:null}class Tx{constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function mn(){return Kg}function Kg(t){return t.type.prototype.ngOnChanges&&(t.setInput=xx),Sx}function Sx(){const t=Jg(this),i=null==t?void 0:t.current;if(i){const e=t.previous;if(e===Br)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function xx(t,i,e,n){const s=Jg(t)||function Dx(t,i){return t[Qg]=i}(t,{previous:Br,current:null}),r=s.current||(s.current={}),o=s.previous,u=this.declaredInputs[e],h=o[u];r[u]=new Tx(h&&h.currentValue,i,o===Br),t[n]=i}mn.ngInherit=!0;const Qg="__ngSimpleChanges__";function Jg(t){return t[Qg]||null}let Zd;function Xd(){return void 0!==Zd?Zd:"undefined"!=typeof document?document:void 0}function Wt(t){return!!t.listen}const Yg={createRenderer:(t,i)=>Xd()};function Yt(t){for(;Array.isArray(t);)t=t[0];return t}function Kl(t,i){return Yt(i[t])}function Yn(t,i){return Yt(i[t.index])}function ep(t,i){return t.data[i]}function zr(t,i){return t[i]}function Zn(t,i){const e=i[t];return Wi(e)?e:e[0]}function Zg(t){return 4==(4&t[2])}function tp(t){return 128==(128&t[2])}function Ls(t,i){return null==i?null:t[i]}function Xg(t){t[18]=0}function np(t,i){t[5]+=i;let e=t,n=t[3];for(;null!==n&&(1===i&&1===e[5]||-1===i&&0===e[5]);)n[5]+=i,e=n,n=n[3]}const Ie={lFrame:l_(null),bindingsEnabled:!0};function t_(){return Ie.bindingsEnabled}function W(){return Ie.lFrame.lView}function tt(){return Ie.lFrame.tView}function v(t){return Ie.lFrame.contextLView=t,t[8]}function on(){let t=n_();for(;null!==t&&64===t.type;)t=t.parent;return t}function n_(){return Ie.lFrame.currentTNode}function Ki(t,i){const e=Ie.lFrame;e.currentTNode=t,e.isParent=i}function ip(){return Ie.lFrame.isParent}function sp(){Ie.lFrame.isParent=!1}function Fn(){const t=Ie.lFrame;let i=t.bindingRootIndex;return-1===i&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function ds(){return Ie.lFrame.bindingIndex}function jr(){return Ie.lFrame.bindingIndex++}function ps(t){const i=Ie.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function Gx(t,i){const e=Ie.lFrame;e.bindingIndex=e.bindingRootIndex=t,rp(i)}function rp(t){Ie.lFrame.currentDirectiveIndex=t}function r_(){return Ie.lFrame.currentQueryIndex}function ap(t){Ie.lFrame.currentQueryIndex=t}function jx(t){const i=t[1];return 2===i.type?i.declTNode:1===i.type?t[6]:null}function o_(t,i,e){if(e&xe.SkipSelf){let s=i,r=t;for(;!(s=s.parent,null!==s||e&xe.Host||(s=jx(r),null===s||(r=r[15],10&s.type))););if(null===s)return!1;i=s,t=r}const n=Ie.lFrame=a_();return n.currentTNode=i,n.lView=t,!0}function Jl(t){const i=a_(),e=t[1];Ie.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function a_(){const t=Ie.lFrame,i=null===t?null:t.child;return null===i?l_(t):i}function l_(t){const i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=i),i}function c_(){const t=Ie.lFrame;return Ie.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const u_=c_;function Yl(){const t=c_();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Nn(){return Ie.lFrame.selectedIndex}function Os(t){Ie.lFrame.selectedIndex=t}function Bt(){const t=Ie.lFrame;return ep(t.tView,t.selectedIndex)}function Zl(t,i){for(let e=i.directiveStart,n=i.directiveEnd;e=n)break}else i[h]<0&&(t[18]+=65536),(u>11>16&&(3&t[2])===i){t[2]+=2048;try{r.call(u)}finally{}}}else try{r.call(u)}finally{}}class oa{constructor(i,e,n){this.factory=i,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function tc(t,i,e){const n=Wt(t);let s=0;for(;si){o=r-1;break}}}for(;r>16}(t),n=i;for(;e>0;)n=n[15],e--;return n}let dp=!0;function ic(t){const i=dp;return dp=t,i}let rD=0;function la(t,i){const e=hp(t,i);if(-1!==e)return e;const n=i[1];n.firstCreatePass&&(t.injectorIndex=i.length,pp(n.data,t),pp(i,null),pp(n.blueprint,null));const s=sc(t,i),r=t.injectorIndex;if(f_(s)){const o=$r(s),u=Wr(s,i),h=u[1].data;for(let b=0;b<8;b++)i[r+b]=u[o+b]|h[o+b]}return i[r+8]=s,r}function pp(t,i){t.push(0,0,0,0,0,0,0,0,i)}function hp(t,i){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===i[t.injectorIndex+8]?-1:t.injectorIndex}function sc(t,i){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,n=null,s=i;for(;null!==s;){const r=s[1],o=r.type;if(n=2===o?r.declTNode:1===o?s[6]:null,null===n)return-1;if(e++,s=s[15],-1!==n.injectorIndex)return n.injectorIndex|e<<16}return-1}function rc(t,i,e){!function oD(t,i,e){let n;"string"==typeof e?n=e.charCodeAt(0)||0:e.hasOwnProperty(ta)&&(n=e[ta]),null==n&&(n=e[ta]=rD++);const s=255&n;i.data[t+(s>>5)]|=1<=0?255&i:lD:i}(e);if("function"==typeof r){if(!o_(i,t,n))return n&xe.Host?b_(s,e,n):v_(i,e,n,s);try{const o=r(n);if(null!=o||n&xe.Optional)return o;Hl(e)}finally{u_()}}else if("number"==typeof r){let o=null,u=hp(t,i),h=-1,b=n&xe.Host?i[16][6]:null;for((-1===u||n&xe.SkipSelf)&&(h=-1===u?sc(t,i):i[u+8],-1!==h&&T_(n,!1)?(o=i[1],u=$r(h),i=Wr(h,i)):u=-1);-1!==u;){const y=i[1];if(w_(r,u,y.data)){const w=cD(u,i,e,o,n,b);if(w!==y_)return w}h=i[u+8],-1!==h&&T_(n,i[1].data[u+8]===b)&&w_(r,u,i)?(o=y,u=$r(h),i=Wr(h,i)):u=-1}}}return v_(i,e,n,s)}const y_={};function lD(){return new Kr(on(),W())}function cD(t,i,e,n,s,r){const o=i[1],u=o.data[t+8],y=oc(u,o,e,null==n?$l(u)&&dp:n!=o&&0!=(3&u.type),s&xe.Host&&r===u);return null!==y?ca(i,o,y,u):y_}function oc(t,i,e,n,s){const r=t.providerIndexes,o=i.data,u=1048575&r,h=t.directiveStart,y=r>>20,M=s?u+y:t.directiveEnd;for(let E=n?u:u+y;E=h&&R.type===e)return E}if(s){const E=o[h];if(E&&Ri(E)&&E.type===e)return h}return null}function ca(t,i,e,n){let s=t[e];const r=i.data;if(function eD(t){return t instanceof oa}(s)){const o=s;o.resolving&&function sx(t,i){const e=i?`. Dependency path: ${i.join(" > ")} > ${t}`:"";throw new re(-200,`Circular dependency in DI detected for ${t}${e}`)}(vn(r[e]));const u=ic(o.canSeeViewProviders);o.resolving=!0;const h=o.injectImpl?Is(o.injectImpl):null;o_(t,n,xe.Default);try{s=t[e]=o.factory(void 0,r,t,n),i.firstCreatePass&&e>=n.directiveStart&&function Zx(t,i,e){const{ngOnChanges:n,ngOnInit:s,ngDoCheck:r}=i.type.prototype;if(n){const o=Kg(i);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o)}s&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,s),r&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,r),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,r))}(e,r[e],i)}finally{null!==h&&Is(h),ic(u),o.resolving=!1,u_()}}return s}function w_(t,i,e){return!!(e[i+(t>>5)]&1<{const i=t.prototype.constructor,e=i[us]||mp(i),n=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==n;){const r=s[us]||mp(s);if(r&&r!==e)return r;s=Object.getPrototypeOf(s)}return r=>new r})}function mp(t){return Ng(t)?()=>{const i=mp(Fe(t));return i&&i()}:ar(t)}function ua(t){return function aD(t,i){if("class"===i)return t.classes;if("style"===i)return t.styles;const e=t.attrs;if(e){const n=e.length;let s=0;for(;s{const n=function fp(t){return function(...e){if(t){const n=t(...e);for(const s in n)this[s]=n[s]}}}(i);function s(...r){if(this instanceof s)return n.apply(this,r),this;const o=new s(...r);return u.annotation=o,u;function u(h,b,y){const w=h.hasOwnProperty(Jr)?h[Jr]:Object.defineProperty(h,Jr,{value:[]})[Jr];for(;w.length<=y;)w.push(null);return(w[y]=w[y]||[]).push(o),h}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}class be{constructor(i,e){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=X({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const pD=new be("AnalyzeForEntryComponents");function fi(t,i){void 0===i&&(i=t);for(let e=0;eArray.isArray(e)?Qi(e,i):i(e))}function x_(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function ac(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function ha(t,i){const e=[];for(let n=0;n=0?t[1|n]=e:(n=~n,function fD(t,i,e,n){let s=t.length;if(s==i)t.push(e,n);else if(1===s)t.push(n,t[0]),t[0]=e;else{for(s--,t.push(t[s-1],t[s]);s>i;)t[s]=t[s-2],s--;t[i]=e,t[i+1]=n}}(t,n,i,e)),n}function _p(t,i){const e=Xr(t,i);if(e>=0)return t[1|e]}function Xr(t,i){return function k_(t,i,e){let n=0,s=t.length>>e;for(;s!==n;){const r=n+(s-n>>1),o=t[r<i?s=r:n=r+1}return~(s<({token:t})),-1),Ps=ga(Zr("Optional"),8),_a=ga(Zr("SkipSelf"),4);var ei=(()=>((ei=ei||{})[ei.Important=1]="Important",ei[ei.DashCase=2]="DashCase",ei))();const H_="__ngContext__";function kn(t,i){t[H_]=i}function Tp(t){const i=function va(t){return t[H_]||null}(t);return i?Array.isArray(i)?i:i.lView:null}function xp(t,i){return undefined(t,i)}function Ca(t){const i=t[3];return Ei(i)?i[3]:i}function Dp(t){return W_(t[13])}function Mp(t){return W_(t[4])}function W_(t){for(;null!==t&&!Ei(t);)t=t[4];return t}function to(t,i,e,n,s){if(null!=n){let r,o=!1;Ei(n)?r=n:Wi(n)&&(o=!0,n=n[0]);const u=Yt(n);0===t&&null!==e?null==s?X_(i,e,u):lr(i,e,u,s||null,!0):1===t&&null!==e?lr(i,e,u,s||null,!0):2===t?function Ap(t,i,e){const n=pc(t,i);n&&function iM(t,i,e,n){Wt(t)?t.removeChild(i,e,n):i.removeChild(e)}(t,n,i,e)}(i,u,o):3===t&&i.destroyNode(u),null!=r&&function oM(t,i,e,n,s){const r=e[7];r!==Yt(e)&&to(i,t,n,r,s);for(let u=10;u0&&(t[e-1][4]=n[4]);const r=ac(t,10+i);!function QD(t,i){ya(t,i,i[11],2,null,null),i[0]=null,i[6]=null}(n[1],n);const o=r[19];null!==o&&o.detachView(r[1]),n[3]=null,n[4]=null,n[2]&=-129}return n}function J_(t,i){if(!(256&i[2])){const e=i[11];Wt(e)&&e.destroyNode&&ya(t,i,e,3,null,null),function ZD(t){let i=t[13];if(!i)return Rp(t[1],t);for(;i;){let e=null;if(Wi(i))e=i[13];else{const n=i[10];n&&(e=n)}if(!e){for(;i&&!i[4]&&i!==t;)Wi(i)&&Rp(i[1],i),i=i[3];null===i&&(i=t),Wi(i)&&Rp(i[1],i),e=i&&i[4]}i=e}}(i)}}function Rp(t,i){if(!(256&i[2])){i[2]&=-129,i[2]|=256,function nM(t,i){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let n=0;n=0?n[s=b]():n[s=-b].unsubscribe(),r+=2}else{const o=n[s=e[r+1]];e[r].call(o)}if(null!==n){for(let r=s+1;rt,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return fc}())||void 0===i?void 0:i.createHTML(t))||t}function lb(t){var i;return(null===(i=function Vp(){if(void 0===gc&&(gc=null,bt.trustedTypes))try{gc=bt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return gc}())||void 0===i?void 0:i.createHTML(t))||t}class db{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function Fs(t){return t instanceof db?t.changingThisBreaksApplicationSecurity:t}function wa(t,i){const e=function gM(t){return t instanceof db&&t.getTypeName()||null}(t);if(null!=e&&e!==i){if("ResourceURL"===e&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${e} (see https://g.co/ng/security#xss)`)}return e===i}class _M{constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{const e=(new window.DOMParser).parseFromString(cr(i),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(i):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class bM{constructor(i){if(this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const n=this.inertDocument.createElement("body");e.appendChild(n)}}getInertBodyElement(i){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=cr(i),e;const n=this.inertDocument.createElement("body");return n.innerHTML=cr(i),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(i){const e=i.attributes;for(let s=e.length-1;0_c(i.trim())).join(", ")}function Ji(t){const i={};for(const e of t.split(","))i[e]=!0;return i}function Ta(...t){const i={};for(const e of t)for(const n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}const mb=Ji("area,br,col,hr,img,wbr"),fb=Ji("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),gb=Ji("rp,rt"),Bp=Ta(mb,Ta(fb,Ji("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ta(gb,Ji("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ta(gb,fb)),Hp=Ji("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),qp=Ji("srcset"),_b=Ta(Hp,qp,Ji("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ji("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),wM=Ji("script,style,template");class TM{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(i){let e=i.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let s=this.checkClobberedElement(e,e.nextSibling);if(s){e=s;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(i){const e=i.nodeName.toLowerCase();if(!Bp.hasOwnProperty(e))return this.sanitizedSomething=!0,!wM.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=i.attributes;for(let s=0;s"),!0}endElement(i){const e=i.nodeName.toLowerCase();Bp.hasOwnProperty(e)&&!mb.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(bb(i))}checkClobberedElement(i,e){if(e&&(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`);return e}}const SM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xM=/([^\#-~ |!])/g;function bb(t){return t.replace(/&/g,"&").replace(SM,function(i){return"&#"+(1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320)+65536)+";"}).replace(xM,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}let bc;function Up(t){return"content"in t&&function MM(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Zt=(()=>((Zt=Zt||{})[Zt.NONE=0]="NONE",Zt[Zt.HTML=1]="HTML",Zt[Zt.STYLE=2]="STYLE",Zt[Zt.SCRIPT=3]="SCRIPT",Zt[Zt.URL=4]="URL",Zt[Zt.RESOURCE_URL=5]="RESOURCE_URL",Zt))();function Ht(t){const i=Sa();return i?lb(i.sanitize(Zt.HTML,t)||""):wa(t,"HTML")?lb(Fs(t)):function DM(t,i){let e=null;try{bc=bc||function pb(t){const i=new bM(t);return function vM(){try{return!!(new window.DOMParser).parseFromString(cr(""),"text/html")}catch(t){return!1}}()?new _M(i):i}(t);let n=i?String(i):"";e=bc.getInertBodyElement(n);let s=5,r=n;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,n=r,r=e.innerHTML,e=bc.getInertBodyElement(n)}while(n!==r);return cr((new TM).sanitizeChildren(Up(e)||e))}finally{if(e){const n=Up(e)||e;for(;n.firstChild;)n.removeChild(n.firstChild)}}}(Xd(),ke(t))}function Xt(t){const i=Sa();return i?i.sanitize(Zt.URL,t)||"":wa(t,"URL")?Fs(t):_c(ke(t))}function Sa(){const t=W();return t&&t[12]}function zp(t){return t.ngOriginalError}function NM(t,...i){t.error(...i)}class xa{constructor(){this._console=console}handleError(i){const e=this._findOriginalError(i),n=function FM(t){return t&&t.ngErrorLogger||NM}(i);n(this._console,"ERROR",i),e&&n(this._console,"ORIGINAL ERROR",e)}_findOriginalError(i){let e=i&&zp(i);for(;e&&zp(e);)e=zp(e);return e||null}}const zM=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(bt))();function ti(t){return t.ownerDocument.defaultView}function Yi(t){return t instanceof Function?t():t}function yb(t,i,e){let n=t.length;for(;;){const s=t.indexOf(i,e);if(-1===s)return s;if(0===s||t.charCodeAt(s-1)<=32){const r=i.length;if(s+r===n||t.charCodeAt(s+r)<=32)return s}e=s+1}}const wb="ng-template";function WM(t,i,e){let n=0;for(;nr?"":s[w+1].toLowerCase();const E=8&n?M:null;if(E&&-1!==yb(E,b,0)||2&n&&b!==M){if(Li(n))return!1;o=!0}}}}else{if(!o&&!Li(n)&&!Li(h))return!1;if(o&&Li(h))continue;o=!1,n=h|1&n}}return Li(n)||o}function Li(t){return 0==(1&t)}function JM(t,i,e,n){if(null===i)return-1;let s=0;if(n||!e){let r=!1;for(;s-1)for(e++;e0?'="'+u+'"':"")+"]"}else 8&n?s+="."+o:4&n&&(s+=" "+o);else""!==s&&!Li(o)&&(i+=xb(r,s),s=""),n=o,r=r||!Li(n);e++}return""!==s&&(i+=xb(r,s)),i}const Ee={};function a(t){Db(tt(),W(),Nn()+t,!1)}function Db(t,i,e,n){if(!n)if(3==(3&i[2])){const r=t.preOrderCheckHooks;null!==r&&Xl(i,r,e)}else{const r=t.preOrderHooks;null!==r&&ec(i,r,0,e)}Os(e)}function vc(t,i){return t<<17|i<<2}function Oi(t){return t>>17&32767}function jp(t){return 2|t}function hs(t){return(131068&t)>>2}function $p(t,i){return-131069&t|i<<2}function Wp(t){return 1|t}function Nb(t,i){const e=t.contentQueries;if(null!==e)for(let n=0;n20&&Db(t,i,20,!1),e(n,s)}finally{Os(r)}}function Bb(t,i,e){if(Wd(i)){const s=i.directiveEnd;for(let r=i.directiveStart;r0;){const e=t[--i];if("number"==typeof e&&e<0)return e}return 0})(u)!=h&&u.push(h),u.push(n,s,o)}}function Wb(t,i){null!==t.hostBindings&&t.hostBindings(1,i)}function Kb(t,i){i.flags|=2,(t.components||(t.components=[])).push(i.index)}function Ek(t,i,e){if(e){if(i.exportAs)for(let n=0;n0&&ah(e)}}function ah(t){for(let n=Dp(t);null!==n;n=Mp(n))for(let s=10;s0&&ah(r)}const e=t[1].components;if(null!==e)for(let n=0;n0&&ah(s)}}function Nk(t,i){const e=Zn(i,t),n=e[1];(function Vk(t,i){for(let e=i.length;ePromise.resolve(null))();function Xb(t){return t[7]||(t[7]=[])}function ev(t){return t.cleanup||(t.cleanup=[])}function nv(t,i){const e=t[9],n=e?e.get(xa,null):null;n&&n.handleError(i)}function iv(t,i,e,n,s){for(let r=0;rthis.processProvider(u,i,e)),Qi([i],u=>this.processInjectorType(u,[],r)),this.records.set(ph,oo(void 0,this));const o=this.records.get(hh);this.scope=null!=o?o.value:null,this.source=s||("object"==typeof i?null:mt(i))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(i=>i.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(i,e=ma,n=xe.Default){this.assertNotDestroyed();const s=R_(this),r=Is(void 0);try{if(!(n&xe.SkipSelf)){let u=this.records.get(i);if(void 0===u){const h=function Zk(t){return"function"==typeof t||"object"==typeof t&&t instanceof be}(i)&&Hd(i);u=h&&this.injectableDefInScope(h)?oo(fh(i),ka):null,this.records.set(i,u)}if(null!=u)return this.hydrate(i,u)}return(n&xe.Self?rv():this.parent).get(i,e=n&xe.Optional&&e===ma?null:e)}catch(o){if("NullInjectorError"===o.name){if((o[cc]=o[cc]||[]).unshift(mt(i)),s)throw o;return function MD(t,i,e,n){const s=t[cc];throw i[E_]&&s.unshift(i[E_]),t.message=function kD(t,i,e,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=mt(i);if(Array.isArray(i))s=i.map(mt).join(" -> ");else if("object"==typeof i){let r=[];for(let o in i)if(i.hasOwnProperty(o)){let u=i[o];r.push(o+":"+("string"==typeof u?JSON.stringify(u):mt(u)))}s=`{${r.join(", ")}}`}return`${e}${n?"("+n+")":""}[${s}]: ${t.replace(wD,"\n ")}`}("\n"+t.message,s,e,n),t.ngTokenPath=s,t[cc]=null,t}(o,i,"R3InjectorError",this.source)}throw o}finally{Is(r),R_(s)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(i=>this.get(i))}toString(){const i=[];return this.records.forEach((n,s)=>i.push(mt(s))),`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new re(205,!1)}processInjectorType(i,e,n){if(!(i=Fe(i)))return!1;let s=Bg(i);const r=null==s&&i.ngModule||void 0,o=void 0===r?i:r,u=-1!==n.indexOf(o);if(void 0!==r&&(s=Bg(r)),null==s)return!1;if(null!=s.imports&&!u){let y;n.push(o);try{Qi(s.imports,w=>{this.processInjectorType(w,e,n)&&(void 0===y&&(y=[]),y.push(w))})}finally{}if(void 0!==y)for(let w=0;wthis.processProvider(R,M,E||Tt))}}this.injectorDefTypes.add(o);const h=ar(o)||(()=>new o);this.records.set(o,oo(h,ka));const b=s.providers;if(null!=b&&!u){const y=i;Qi(b,w=>this.processProvider(w,y,b))}return void 0!==r&&void 0!==i.providers}processProvider(i,e,n){let s=ao(i=Fe(i))?i:Fe(i&&i.provide);const r=function $k(t,i,e){return cv(t)?oo(void 0,t.useValue):oo(lv(t),ka)}(i);if(ao(i)||!0!==i.multi)this.records.get(s);else{let o=this.records.get(s);o||(o=oo(void 0,ka,!0),o.factory=()=>Cp(o.multi),this.records.set(s,o)),s=i,o.multi.push(i)}this.records.set(s,r)}hydrate(i,e){return e.value===ka&&(e.value=Gk,e.value=e.factory()),"object"==typeof e.value&&e.value&&function Yk(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this.onDestroy.add(e.value),e.value}injectableDefInScope(i){if(!i.providedIn)return!1;const e=Fe(i.providedIn);return"string"==typeof e?"any"===e||e===this.scope:this.injectorDefTypes.has(e)}}function fh(t){const i=Hd(t),e=null!==i?i.factory:ar(t);if(null!==e)return e;if(t instanceof be)throw new re(204,!1);if(t instanceof Function)return function jk(t){const i=t.length;if(i>0)throw ha(i,"?"),new re(204,!1);const e=function lx(t){const i=t&&(t[ql]||t[Hg]);if(i){const e=function cx(t){if(t.hasOwnProperty("name"))return t.name;const i=(""+t).match(/^function\s*([^\s(]+)/);return null===i?"":i[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),i}return null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new re(204,!1)}function lv(t,i,e){let n;if(ao(t)){const s=Fe(t);return ar(s)||fh(s)}if(cv(t))n=()=>Fe(t.useValue);else if(function Kk(t){return!(!t||!t.useFactory)}(t))n=()=>t.useFactory(...Cp(t.deps||[]));else if(function Wk(t){return!(!t||!t.useExisting)}(t))n=()=>K(Fe(t.useExisting));else{const s=Fe(t&&(t.useClass||t.provide));if(!function Jk(t){return!!t.deps}(t))return ar(s)||fh(s);n=()=>new s(...Cp(t.deps))}return n}function oo(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function cv(t){return null!==t&&"object"==typeof t&&SD in t}function ao(t){return"function"==typeof t}let In=(()=>{class t{static create(e,n){var s;if(Array.isArray(e))return ov({name:""},n,e,"");{const r=null!==(s=e.name)&&void 0!==s?s:"";return ov({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=ma,t.NULL=new sv,t.\u0275prov=X({token:t,providedIn:"any",factory:()=>K(ph)}),t.__NG_ELEMENT_ID__=-1,t})();function oI(t,i){Zl(Tp(t)[1],on())}function ut(t){let i=function yv(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),e=!0;const n=[t];for(;i;){let s;if(Ri(t))s=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new re(903,"");s=i.\u0275dir}if(s){if(e){n.push(s);const o=t;o.inputs=bh(t.inputs),o.declaredInputs=bh(t.declaredInputs),o.outputs=bh(t.outputs);const u=s.hostBindings;u&&uI(t,u);const h=s.viewQuery,b=s.contentQueries;if(h&&lI(t,h),b&&cI(t,b),Nd(t.inputs,s.inputs),Nd(t.declaredInputs,s.declaredInputs),Nd(t.outputs,s.outputs),Ri(s)&&s.data.animation){const y=t.data;y.animation=(y.animation||[]).concat(s.data.animation)}}const r=s.features;if(r)for(let o=0;o=0;n--){const s=t[n];s.hostVars=i+=s.hostVars,s.hostAttrs=nc(s.hostAttrs,e=nc(e,s.hostAttrs))}}(n)}function bh(t){return t===Br?{}:t===Tt?[]:t}function lI(t,i){const e=t.viewQuery;t.viewQuery=e?(n,s)=>{i(n,s),e(n,s)}:i}function cI(t,i){const e=t.contentQueries;t.contentQueries=e?(n,s,r)=>{i(n,s,r),e(n,s,r)}:i}function uI(t,i){const e=t.hostBindings;t.hostBindings=e?(n,s)=>{i(n,s),e(n,s)}:i}let xc=null;function lo(){if(!xc){const t=bt.Symbol;if(t&&t.iterator)xc=t.iterator;else{const i=Object.getOwnPropertyNames(Map.prototype);for(let e=0;eu(Yt(se[n.index])):n.index;if(Wt(e)){let se=null;if(!u&&h&&(se=function HI(t,i,e,n){const s=t.cleanup;if(null!=s)for(let r=0;rh?u[h]:null}"string"==typeof o&&(r+=2)}return null}(t,i,s,n.index)),null!==se)(se.__ngLastListenerFn__||se).__ngNextListenerFn__=r,se.__ngLastListenerFn__=r,E=!1;else{r=Mh(n,i,w,r,!1);const Me=e.listen(U,s,r);M.push(r,Me),y&&y.push(s,J,P,P+1)}}else r=Mh(n,i,w,r,!0),U.addEventListener(s,r,o),M.push(r),y&&y.push(s,J,P,o)}else r=Mh(n,i,w,r,!1);const R=n.outputs;let O;if(E&&null!==R&&(O=R[s])){const N=O.length;if(N)for(let U=0;U0;)i=i[15],t--;return i}(t,Ie.lFrame.contextLView))[8]}(t)}function qI(t,i){let e=null;const n=function YM(t){const i=t.attrs;if(null!=i){const e=i.indexOf(5);if(0==(1&e))return i[e+1]}return null}(t);for(let s=0;s=0}const cn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Xv(t){return t.substring(cn.key,cn.keyEnd)}function jI(t){return t.substring(cn.value,cn.valueEnd)}function e1(t,i){const e=cn.textEnd;return e===i?-1:(i=cn.keyEnd=function KI(t,i,e){for(;i32;)i++;return i}(t,cn.key=i,e),Co(t,i,e))}function t1(t,i){const e=cn.textEnd;let n=cn.key=Co(t,i,e);return e===n?-1:(n=cn.keyEnd=function QI(t,i,e){let n;for(;i=65&&(-33&n)<=90||n>=48&&n<=57);)i++;return i}(t,n,e),n=s1(t,n,e),n=cn.value=Co(t,n,e),n=cn.valueEnd=function JI(t,i,e){let n=-1,s=-1,r=-1,o=i,u=o;for(;o32&&(u=o),r=s,s=n,n=-33&h}return u}(t,n,e),s1(t,n,e))}function n1(t){cn.key=0,cn.keyEnd=0,cn.value=0,cn.valueEnd=0,cn.textEnd=t.length}function Co(t,i,e){for(;i=0;e=t1(i,e))l1(t,Xv(i),jI(i))}function me(t){Fi(Xn,es,t,!0)}function es(t,i){for(let e=function $I(t){return n1(t),e1(t,Co(t,0,cn.textEnd))}(i);e>=0;e=e1(i,e))Xn(t,Xv(i),!0)}function Pi(t,i,e,n){const s=W(),r=tt(),o=ps(2);r.firstUpdatePass&&a1(r,t,o,n),i!==Ee&&En(s,o,i)&&c1(r,r.data[Nn()],s,s[11],t,s[o+1]=function r3(t,i){return null==t||("string"==typeof i?t+=i:"object"==typeof t&&(t=mt(Fs(t)))),t}(i,e),n,o)}function Fi(t,i,e,n){const s=tt(),r=ps(2);s.firstUpdatePass&&a1(s,null,r,n);const o=W();if(e!==Ee&&En(o,r,e)){const u=s.data[Nn()];if(d1(u,n)&&!o1(s,r)){let h=n?u.classesWithoutHost:u.stylesWithoutHost;null!==h&&(e=Vd(h,e||"")),xh(s,u,o,e,n)}else!function s3(t,i,e,n,s,r,o,u){s===Ee&&(s=Tt);let h=0,b=0,y=0=t.expandoStartIndex}function a1(t,i,e,n){const s=t.data;if(null===s[e+1]){const r=s[Nn()],o=o1(t,e);d1(r,n)&&null===i&&!o&&(i=!1),i=function ZI(t,i,e,n){const s=function op(t){const i=Ie.lFrame.currentDirectiveIndex;return-1===i?null:t[i]}(t);let r=n?i.residualClasses:i.residualStyles;if(null===s)0===(n?i.classBindings:i.styleBindings)&&(e=Oa(e=kh(null,t,i,e,n),i.attrs,n),r=null);else{const o=i.directiveStylingLast;if(-1===o||t[o]!==s)if(e=kh(s,t,i,e,n),null===r){let h=function XI(t,i,e){const n=e?i.classBindings:i.styleBindings;if(0!==hs(n))return t[Oi(n)]}(t,i,n);void 0!==h&&Array.isArray(h)&&(h=kh(null,t,i,h[1],n),h=Oa(h,i.attrs,n),function e3(t,i,e,n){t[Oi(e?i.classBindings:i.styleBindings)]=n}(t,i,n,h))}else r=function t3(t,i,e){let n;const s=i.directiveEnd;for(let r=1+i.directiveStylingLast;r0)&&(b=!0)}else y=e;if(s)if(0!==h){const M=Oi(t[u+1]);t[n+1]=vc(M,u),0!==M&&(t[M+1]=$p(t[M+1],n)),t[u+1]=function sk(t,i){return 131071&t|i<<17}(t[u+1],n)}else t[n+1]=vc(u,0),0!==u&&(t[u+1]=$p(t[u+1],n)),u=n;else t[n+1]=vc(h,0),0===u?u=n:t[h+1]=$p(t[h+1],n),h=n;b&&(t[n+1]=jp(t[n+1])),Zv(t,y,n,!0),Zv(t,y,n,!1),function GI(t,i,e,n,s){const r=s?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof i&&Xr(r,i)>=0&&(e[n+1]=Wp(e[n+1]))}(i,y,t,n,r),o=vc(u,h),r?i.classBindings=o:i.styleBindings=o}(s,r,i,e,o,n)}}function kh(t,i,e,n,s){let r=null;const o=e.directiveEnd;let u=e.directiveStylingLast;for(-1===u?u=e.directiveStart:u++;u0;){const h=t[s],b=Array.isArray(h),y=b?h[1]:h,w=null===y;let M=e[s+1];M===Ee&&(M=w?Tt:void 0);let E=w?_p(M,n):y===n?M:void 0;if(b&&!kc(E)&&(E=_p(h,n)),kc(E)&&(u=E,o))return u;const R=t[s+1];s=o?Oi(R):hs(R)}if(null!==i){let h=r?i.residualClasses:i.residualStyles;null!=h&&(u=_p(h,n))}return u}function kc(t){return void 0!==t}function d1(t,i){return 0!=(t.flags&(i?16:32))}function g(t,i=""){const e=W(),n=tt(),s=t+20,r=n.firstCreatePass?io(n,s,1,i,null):n.data[s],o=e[s]=function kp(t,i){return Wt(t)?t.createText(i):t.createTextNode(i)}(e[11],i);hc(n,e,o,r),Ki(r,!1)}function S(t){return T("",t,""),S}function T(t,i,e){const n=W(),s=uo(n,t,i,e);return s!==Ee&&ms(n,Nn(),s),T}function $e(t,i,e,n,s){const r=W(),o=po(r,t,i,e,n,s);return o!==Ee&&ms(r,Nn(),o),$e}function yo(t,i,e,n,s,r,o){const u=W(),h=function ho(t,i,e,n,s,r,o,u){const b=Dc(t,ds(),e,s,o);return ps(3),b?i+ke(e)+n+ke(s)+r+ke(o)+u:Ee}(u,t,i,e,n,s,r,o);return h!==Ee&&ms(u,Nn(),h),yo}function Ic(t,i,e,n,s,r,o,u,h){const b=W(),y=function mo(t,i,e,n,s,r,o,u,h,b){const w=gi(t,ds(),e,s,o,h);return ps(4),w?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b:Ee}(b,t,i,e,n,s,r,o,u,h);return y!==Ee&&ms(b,Nn(),y),Ic}function Ih(t,i,e,n,s,r,o,u,h,b,y){const w=W(),M=function fo(t,i,e,n,s,r,o,u,h,b,y,w){const M=ds();let E=gi(t,M,e,s,o,h);return E=En(t,M+4,y)||E,ps(5),E?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b+ke(y)+w:Ee}(w,t,i,e,n,s,r,o,u,h,b,y);return M!==Ee&&ms(w,Nn(),M),Ih}function Eh(t,i,e,n,s,r,o,u,h,b,y,w,M){const E=W(),R=function go(t,i,e,n,s,r,o,u,h,b,y,w,M,E){const R=ds();let O=gi(t,R,e,s,o,h);return O=ur(t,R+4,y,M)||O,ps(6),O?i+ke(e)+n+ke(s)+r+ke(o)+u+ke(h)+b+ke(y)+w+ke(M)+E:Ee}(E,t,i,e,n,s,r,o,u,h,b,y,w,M);return R!==Ee&&ms(E,Nn(),R),Eh}const dr=void 0;var x3=["en",[["a","p"],["AM","PM"],dr],[["AM","PM"],dr,dr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],dr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],dr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",dr,"{1} 'at' {0}",dr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function S3(t){const e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let wo={};function qn(t){const i=function D3(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=M1(i);if(e)return e;const n=i.split("-")[0];if(e=M1(n),e)return e;if("en"===n)return x3;throw new Error(`Missing locale data for the locale "${t}".`)}function M1(t){return t in wo||(wo[t]=bt.ng&&bt.ng.common&&bt.ng.common.locales&&bt.ng.common.locales[t]),wo[t]}var te=(()=>((te=te||{})[te.LocaleId=0]="LocaleId",te[te.DayPeriodsFormat=1]="DayPeriodsFormat",te[te.DayPeriodsStandalone=2]="DayPeriodsStandalone",te[te.DaysFormat=3]="DaysFormat",te[te.DaysStandalone=4]="DaysStandalone",te[te.MonthsFormat=5]="MonthsFormat",te[te.MonthsStandalone=6]="MonthsStandalone",te[te.Eras=7]="Eras",te[te.FirstDayOfWeek=8]="FirstDayOfWeek",te[te.WeekendRange=9]="WeekendRange",te[te.DateFormat=10]="DateFormat",te[te.TimeFormat=11]="TimeFormat",te[te.DateTimeFormat=12]="DateTimeFormat",te[te.NumberSymbols=13]="NumberSymbols",te[te.NumberFormats=14]="NumberFormats",te[te.CurrencyCode=15]="CurrencyCode",te[te.CurrencySymbol=16]="CurrencySymbol",te[te.CurrencyName=17]="CurrencyName",te[te.Currencies=18]="Currencies",te[te.Directionality=19]="Directionality",te[te.PluralCase=20]="PluralCase",te[te.ExtraData=21]="ExtraData",te))();const Ec="en-US";let k1=Ec;function Oh(t,i,e,n,s){if(t=Fe(t),Array.isArray(t))for(let r=0;r>20;if(ao(t)||!t.multi){const E=new oa(h,s,x),R=Ph(u,i,s?y:y+M,w);-1===R?(rc(la(b,o),r,u),Ah(r,t,i.length),i.push(u),b.directiveStart++,b.directiveEnd++,s&&(b.providerIndexes+=1048576),e.push(E),o.push(E)):(e[R]=E,o[R]=E)}else{const E=Ph(u,i,y+M,w),R=Ph(u,i,y,y+M),O=E>=0&&e[E],N=R>=0&&e[R];if(s&&!N||!s&&!O){rc(la(b,o),r,u);const U=function SE(t,i,e,n,s){const r=new oa(t,e,x);return r.multi=[],r.index=i,r.componentProviders=0,Z1(r,s,n&&!e),r}(s?TE:wE,e.length,s,n,h);!s&&N&&(e[R].providerFactory=U),Ah(r,t,i.length,0),i.push(u),b.directiveStart++,b.directiveEnd++,s&&(b.providerIndexes+=1048576),e.push(U),o.push(U)}else Ah(r,t,E>-1?E:R,Z1(e[s?R:E],h,!s&&n));!s&&n&&N&&e[R].componentProviders++}}}function Ah(t,i,e,n){const s=ao(i),r=function Qk(t){return!!t.useClass}(i);if(s||r){const h=(r?Fe(i.useClass):i).prototype.ngOnDestroy;if(h){const b=t.destroyHooks||(t.destroyHooks=[]);if(!s&&i.multi){const y=b.indexOf(e);-1===y?b.push(e,[n,h]):b[y+1].push(n,h)}else b.push(e,h)}}}function Z1(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function Ph(t,i,e,n){for(let s=e;s{e.providersResolver=(n,s)=>function yE(t,i,e){const n=tt();if(n.firstCreatePass){const s=Ri(t);Oh(e,n.data,n.blueprint,s,!0),Oh(i,n.data,n.blueprint,s,!1)}}(n,s?s(t):t,i)}}class X1{}class ME{resolveComponentFactory(i){throw function DE(t){const i=Error(`No component factory found for ${mt(t)}. Did you add it to @NgModule.entryComponents?`);return i.ngComponent=t,i}(i)}}let Va=(()=>{class t{}return t.NULL=new ME,t})();function kE(){return So(on(),W())}function So(t,i){return new Re(Yn(t,i))}let Re=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=kE,t})();function IE(t){return t instanceof Re?t.nativeElement:t}class Ba{}let wn=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function RE(){const t=W(),e=Zn(on().index,t);return function EE(t){return t[11]}(Wi(e)?e:t)}(),t})(),LE=(()=>{class t{}return t.\u0275prov=X({token:t,providedIn:"root",factory:()=>null}),t})();class Ha{constructor(i){this.full=i,this.major=i.split(".")[0],this.minor=i.split(".")[1],this.patch=i.split(".").slice(2).join(".")}}const OE=new Ha("13.3.12"),Nh={};function Pc(t,i,e,n,s=!1){for(;null!==e;){const r=i[e.index];if(null!==r&&n.push(Yt(r)),Ei(r))for(let u=10;u-1&&(Ep(i,n),ac(e,n))}this._attachedToViewContainer=!1}J_(this._lView[1],this._lView)}onDestroy(i){Gb(this._lView[1],this._lView,null,i)}markForCheck(){lh(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){!function uh(t,i,e){const n=i[10];n.begin&&n.begin();try{ro(t,i,t.template,e)}catch(s){throw nv(i,s),s}finally{n.end&&n.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new re(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function YD(t,i){ya(t,i,i[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new re(902,"");this._appRef=i}}class AE extends qa{constructor(i){super(i),this._view=i}detectChanges(){Zb(this._view)}checkNoChanges(){}get context(){return null}}class tC extends Va{constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){const e=Cn(i);return new Vh(e,this.ngModule)}}function nC(t){const i=[];for(let e in t)t.hasOwnProperty(e)&&i.push({propName:t[e],templateName:e});return i}class Vh extends X1{constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=function nk(t){return t.map(tk).join(",")}(i.selectors),this.ngContentSelectors=i.ngContentSelectors?i.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return nC(this.componentDef.inputs)}get outputs(){return nC(this.componentDef.outputs)}create(i,e,n,s){const r=(s=s||this.ngModule)?function FE(t,i){return{get:(e,n,s)=>{const r=t.get(e,Nh,s);return r!==Nh||n===Nh?r:i.get(e,n,s)}}}(i,s.injector):i,o=r.get(Ba,Yg),u=r.get(LE,null),h=o.createRenderer(null,this.componentDef),b=this.componentDef.selectors[0][0]||"div",y=n?function Ub(t,i,e){if(Wt(t))return t.selectRootElement(i,e===ki.ShadowDom);let n="string"==typeof i?t.querySelector(i):i;return n.textContent="",n}(h,n,this.componentDef.encapsulation):Ip(o.createRenderer(null,this.componentDef),b,function PE(t){const i=t.toLowerCase();return"svg"===i?"svg":"math"===i?"math":null}(b)),w=this.componentDef.onPush?576:528,M=function Cv(t,i){return{components:[],scheduler:t||zM,clean:Hk,playerHandler:i||null,flags:0}}(),E=wc(0,null,null,1,0,null,null,null,null,null),R=Da(null,E,M,w,null,null,o,h,u,r);let O,N;Jl(R);try{const U=function bv(t,i,e,n,s,r){const o=e[1];e[20]=t;const h=io(o,20,2,"#host",null),b=h.mergedAttrs=i.hostAttrs;null!==b&&(Sc(h,b,!0),null!==t&&(tc(s,t,b),null!==h.classes&&Fp(s,t,h.classes),null!==h.styles&&ab(s,t,h.styles)));const y=n.createRenderer(t,i),w=Da(e,Hb(i),null,i.onPush?64:16,e[20],h,n,y,r||null,null);return o.firstCreatePass&&(rc(la(h,e),o,i.type),Kb(o,h),Qb(h,e.length,1)),Tc(e,w),e[20]=w}(y,this.componentDef,R,o,h);if(y)if(n)tc(h,y,["ng-version",OE.full]);else{const{attrs:P,classes:J}=function ik(t){const i=[],e=[];let n=1,s=2;for(;n0&&Fp(h,y,J.join(" "))}if(N=ep(E,20),void 0!==e){const P=N.projection=[];for(let J=0;Jh(o,i)),i.contentQueries){const h=on();i.contentQueries(1,o,h.directiveStart)}const u=on();return!r.firstCreatePass||null===i.hostBindings&&null===i.hostAttrs||(Os(u.index),$b(e[1],u,0,u.directiveStart,u.directiveEnd,i),Wb(i,o)),o}(U,this.componentDef,R,M,[oI]),Ma(E,R,null)}finally{Yl()}return new VE(this.componentType,O,So(N,R),R,N)}}class VE extends class xE{}{constructor(i,e,n,s,r){super(),this.location=n,this._rootLView=s,this._tNode=r,this.instance=e,this.hostView=this.changeDetectorRef=new AE(s),this.componentType=i}get injector(){return new Kr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}}class fs{}class iC{}const xo=new Map;class oC extends fs{constructor(i,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new tC(this);const n=pi(i);this._bootstrapComponents=Yi(n.bootstrap),this._r3Injector=av(i,e,[{provide:fs,useValue:this},{provide:Va,useValue:this.componentFactoryResolver}],mt(i)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(i)}get(i,e=In.THROW_IF_NOT_FOUND,n=xe.Default){return i===In||i===fs||i===ph?this:this._r3Injector.get(i,e,n)}destroy(){const i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class Bh extends iC{constructor(i){super(),this.moduleType=i,null!==pi(i)&&function HE(t){const i=new Set;!function e(n){const s=pi(n,!0),r=s.id;null!==r&&(function sC(t,i,e){if(i&&i!==e)throw new Error(`Duplicate module registered for ${t} - ${mt(i)} vs ${mt(i.name)}`)}(r,xo.get(r),n),xo.set(r,n));const o=Yi(s.imports);for(const u of o)i.has(u)||(i.add(u),e(u))}(t)}(i)}create(i){return new oC(this.moduleType,i)}}function A(t,i,e){const n=Fn()+t,s=W();return s[n]===Ee?Xi(s,n,e?i.call(e):i()):Ea(s,n)}function z(t,i,e,n){return lC(W(),Fn(),t,i,e,n)}function We(t,i,e,n,s){return cC(W(),Fn(),t,i,e,n,s)}function Rt(t,i,e,n,s,r){return uC(W(),Fn(),t,i,e,n,s,r)}function _i(t,i,e,n,s,r,o){return function dC(t,i,e,n,s,r,o,u,h){const b=i+e;return gi(t,b,s,r,o,u)?Xi(t,b+4,h?n.call(h,s,r,o,u):n(s,r,o,u)):Ua(t,b+4)}(W(),Fn(),t,i,e,n,s,r,o)}function pr(t,i,e,n,s,r,o,u){const h=Fn()+t,b=W(),y=gi(b,h,e,n,s,r);return En(b,h+4,o)||y?Xi(b,h+5,u?i.call(u,e,n,s,r,o):i(e,n,s,r,o)):Ea(b,h+5)}function Do(t,i,e,n,s,r,o,u,h){const b=Fn()+t,y=W(),w=gi(y,b,e,n,s,r);return ur(y,b+4,o,u)||w?Xi(y,b+6,h?i.call(h,e,n,s,r,o,u):i(e,n,s,r,o,u)):Ea(y,b+6)}function Hh(t,i,e,n){return function pC(t,i,e,n,s,r){let o=i+e,u=!1;for(let h=0;h=0;e--){const n=i[e];if(t===n.name)return n}}(i,e.pipeRegistry),e.data[s]=n,n.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(s,n.onDestroy)):n=e.data[s];const r=n.factory||(n.factory=ar(n.type)),o=Is(x);try{const u=ic(!1),h=r();return ic(u),function bI(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}(e,W(),s,h),h}finally{Is(o)}}function f(t,i,e){const n=t+20,s=W(),r=zr(s,n);return Ga(s,n)?lC(s,Fn(),i,r.transform,e,r):r.transform(e)}function Dt(t,i,e,n){const s=t+20,r=W(),o=zr(r,s);return Ga(r,s)?cC(r,Fn(),i,o.transform,e,n,o):o.transform(e,n)}function Ga(t,i){return t[1].data[i].pure}function qh(t){return i=>{setTimeout(t,void 0,i)}}const H=class jE extends ct{constructor(i=!1){super(),this.__isAsync=i}emit(i){super.next(i)}subscribe(i,e,n){var s,r,o;let u=i,h=e||(()=>null),b=n;if(i&&"object"==typeof i){const w=i;u=null===(s=w.next)||void 0===s?void 0:s.bind(w),h=null===(r=w.error)||void 0===r?void 0:r.bind(w),b=null===(o=w.complete)||void 0===o?void 0:o.bind(w)}this.__isAsync&&(h=qh(h),u&&(u=qh(u)),b&&(b=qh(b)));const y=super.subscribe({next:u,error:h,complete:b});return i instanceof Et&&i.add(y),y}};function $E(){return this._results[lo()]()}class Uh{constructor(i=!1){this._emitDistinctChangesOnly=i,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=lo(),n=Uh.prototype;n[e]||(n[e]=$E)}get changes(){return this._changes||(this._changes=new H)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){const n=this;n.dirty=!1;const s=fi(i);(this._changesDetected=!function hD(t,i,e){if(t.length!==i.length)return!1;for(let n=0;n{class t{}return t.__NG_ELEMENT_ID__=QE,t})();const WE=bi,KE=class extends WE{constructor(i,e,n){super(),this._declarationLView=i,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(i){const e=this._declarationTContainer.tViews,n=Da(this._declarationLView,e,i,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),Ma(e,n,i),new qa(n)}};function QE(){return Fc(on(),W())}function Fc(t,i){return 4&t.type?new KE(i,t,So(t,i)):null}let vi=(()=>{class t{}return t.__NG_ELEMENT_ID__=JE,t})();function JE(){return gC(on(),W())}const YE=vi,mC=class extends YE{constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return So(this._hostTNode,this._hostLView)}get injector(){return new Kr(this._hostTNode,this._hostLView)}get parentInjector(){const i=sc(this._hostTNode,this._hostLView);if(f_(i)){const e=Wr(i,this._hostLView),n=$r(i);return new Kr(e[1].data[n+8],e)}return new Kr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const e=fC(this._lContainer);return null!==e&&e[i]||null}get length(){return this._lContainer.length-10}createEmbeddedView(i,e,n){const s=i.createEmbeddedView(e||{});return this.insert(s,n),s}createComponent(i,e,n,s,r){const o=i&&!function pa(t){return"function"==typeof t}(i);let u;if(o)u=e;else{const w=e||{};u=w.index,n=w.injector,s=w.projectableNodes,r=w.ngModuleRef}const h=o?i:new Vh(Cn(i)),b=n||this.parentInjector;if(!r&&null==h.ngModule){const M=(o?b:this.parentInjector).get(fs,null);M&&(r=M)}const y=h.create(b,s,void 0,r);return this.insert(y.hostView,u),y}insert(i,e){const n=i._lView,s=n[1];if(function Px(t){return Ei(t[3])}(n)){const y=this.indexOf(i);if(-1!==y)this.detach(y);else{const w=n[3],M=new mC(w,w[6],w[3]);M.detach(M.indexOf(i))}}const r=this._adjustIndex(e),o=this._lContainer;!function XD(t,i,e,n){const s=10+n,r=e.length;n>0&&(e[s-1][4]=i),n0)n.push(o[u/2]);else{const b=r[u+1],y=i[-h];for(let w=10;w{class t{constructor(e){this.appInits=e,this.resolve=Bc,this.reject=Bc,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,s)=>{this.resolve=n,this.reject=s})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s{r.subscribe({complete:u,error:h})});e.push(o)}}Promise.all(e).then(()=>{n()}).catch(s=>{this.reject(s)}),0===e.length&&n(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(K(em,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const ja=new be("AppId",{providedIn:"root",factory:function VC(){return`${nm()}${nm()}${nm()}`}});function nm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const BC=new be("Platform Initializer"),Hc=new be("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),HC=new be("appBootstrapListener");let wR=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Bs=new be("LocaleId",{providedIn:"root",factory:()=>O_(Bs,xe.Optional|xe.SkipSelf)||function TR(){return"undefined"!=typeof $localize&&$localize.locale||Ec}()});class xR{constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}}let qC=(()=>{class t{compileModuleSync(e){return new Bh(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),r=Yi(pi(e).declarations).reduce((o,u)=>{const h=Cn(u);return h&&o.push(new Vh(h)),o},[]);return new xR(n,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const MR=(()=>Promise.resolve(0))();function im(t){"undefined"==typeof Zone?MR.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class nt{constructor({enableLongStackTrace:i=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new H(!1),this.onMicrotaskEmpty=new H(!1),this.onStable=new H(!1),this.onError=new H(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!n&&e,s.shouldCoalesceRunChangeDetection=n,s.lastRequestAnimationFrameId=-1,s.nativeRequestAnimationFrame=function kR(){let t=bt.requestAnimationFrame,i=bt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&i){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const n=i[Zone.__symbol__("OriginalDelegate")];n&&(i=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:i}}().nativeRequestAnimationFrame,function RR(t){const i=()=>{!function ER(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(bt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,rm(t),t.isCheckStableRunning=!0,sm(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),rm(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,s,r,o,u)=>{try{return UC(t),e.invokeTask(s,r,o,u)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&i(),GC(t)}},onInvoke:(e,n,s,r,o,u,h)=>{try{return UC(t),e.invoke(s,r,o,u,h)}finally{t.shouldCoalesceRunChangeDetection&&i(),GC(t)}},onHasTask:(e,n,s,r)=>{e.hasTask(s,r),n===s&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,rm(t),sm(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,n,s,r)=>(e.handleError(s,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(s)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(nt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,s){const r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+s,i,IR,Bc,Bc);try{return r.runTask(o,e,n)}finally{r.cancelTask(o)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}}const IR={};function sm(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function rm(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function UC(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function GC(t){t._nesting--,sm(t)}class LR{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new H,this.onMicrotaskEmpty=new H,this.onStable=new H,this.onError=new H}run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,s){return i.apply(e,n)}}let om=(()=>{class t{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nt.assertNotInAngularZone(),im(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())im(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,s){let r=-1;n&&n>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==r),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:s})}whenStable(e,n,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,n,s){return[]}}return t.\u0275fac=function(e){return new(e||t)(K(nt))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),OR=(()=>{class t{constructor(){this._applications=new Map,am.addToWindow(this)}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return am.findTestabilityInTree(this,e,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();class AR{addToWindow(i){}findTestabilityInTree(i,e,n){return null}}let am=new AR,hr=null;const zC=new be("AllowMultipleToken"),jC=new be("PlatformOnDestroy");class $C{constructor(i,e){this.name=i,this.token=e}}function WC(t,i,e=[]){const n=`Platform: ${i}`,s=new be(n);return(r=[])=>{let o=lm();if(!o||o.injector.get(zC,!1)){const u=[...e,...r,{provide:s,useValue:!0}];t?t(u):function VR(t){if(hr&&!hr.get(zC,!1))throw new re(400,"");hr=t;const i=t.get(KC),e=t.get(BC,null);e&&e.forEach(n=>n())}(function HR(t=[],i){return In.create({name:i,providers:[{provide:hh,useValue:"platform"},{provide:jC,useValue:()=>hr=null},...t]})}(u,n))}return function BR(t){const i=lm();if(!i)throw new re(401,"");return i}()}}function lm(){var t;return null!==(t=null==hr?void 0:hr.get(KC))&&void 0!==t?t:null}let KC=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const u=function qR(t,i){let e;return e="noop"===t?new LR:("zone.js"===t?void 0:t)||new nt({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==i?void 0:i.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==i?void 0:i.ngZoneRunCoalescing)}),e}(n?n.ngZone:void 0,{ngZoneEventCoalescing:n&&n.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:n&&n.ngZoneRunCoalescing||!1}),h=[{provide:nt,useValue:u}];return u.run(()=>{const b=In.create({providers:h,parent:this.injector,name:e.moduleType.name}),y=e.create(b),w=y.injector.get(xa,null);if(!w)throw new re(402,"");return u.runOutsideAngular(()=>{const M=u.onError.subscribe({next:E=>{w.handleError(E)}});y.onDestroy(()=>{um(this._modules,y),M.unsubscribe()})}),function UR(t,i,e){try{const n=e();return Ra(n)?n.catch(s=>{throw i.runOutsideAngular(()=>t.handleError(s)),s}):n}catch(n){throw i.runOutsideAngular(()=>t.handleError(n)),n}}(w,u,()=>{const M=y.injector.get(tm);return M.runInitializers(),M.donePromise.then(()=>(function E3(t){Qn(t,"Expected localeId to be defined"),"string"==typeof t&&(k1=t.toLowerCase().replace(/_/g,"-"))}(y.injector.get(Bs,Ec)||Ec),this._moduleDoBootstrap(y),y))})})}bootstrapModule(e,n=[]){const s=QC({},n);return function FR(t,i,e){const n=new Bh(e);return Promise.resolve(n)}(0,0,e).then(r=>this.bootstrapModuleFactory(r,s))}_moduleDoBootstrap(e){const n=e.injector.get(cm);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(s=>n.bootstrap(s));else{if(!e.instance.ngDoBootstrap)throw new re(403,"");e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new re(404,"");this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(jC,null);null==e||e(),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function QC(t,i){return Array.isArray(i)?i.reduce(QC,t):Object.assign(Object.assign({},t),i)}let cm=(()=>{class t{constructor(e,n,s,r){this._zone=e,this._injector=n,this._exceptionHandler=s,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Je(h=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{h.next(this._stable),h.complete()})}),u=new Je(h=>{let b;this._zone.runOutsideAngular(()=>{b=this._zone.onStable.subscribe(()=>{nt.assertNotInAngularZone(),im(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,h.next(!0))})})});const y=this._zone.onUnstable.subscribe(()=>{nt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{h.next(!1)}))});return()=>{b.unsubscribe(),y.unsubscribe()}});this.isStable=function WS(...t){let i=Number.POSITIVE_INFINITY,e=null,n=t[t.length-1];return Vr(n)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(i=t.pop())):"number"==typeof n&&(i=t.pop()),null===e&&1===t.length&&t[0]instanceof Je?t[0]:ea(i)(Pd(t,e))}(o,u.pipe(function nx(){return t=>Fd()(function XS(t,i){return function(n){let s;if(s="function"==typeof t?t:function(){return t},"function"==typeof i)return n.lift(new ex(s,i));const r=Object.create(n,JS);return r.source=n,r.subjectFactory=s,r}}(tx)(t))}()))}bootstrap(e,n){if(!this._initStatus.done)throw new re(405,"");let s;s=e instanceof X1?e:this._injector.get(Va).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const r=function NR(t){return t.isBoundToModule}(s)?void 0:this._injector.get(fs),u=s.create(In.NULL,[],n||s.selector,r),h=u.location.nativeElement,b=u.injector.get(om,null),y=b&&u.injector.get(OR);return b&&y&&y.registerApplication(h,b),u.onDestroy(()=>{this.detachView(u.hostView),um(this.components,u),y&&y.unregisterApplication(h)}),this._loadComponent(u),u}tick(){if(this._runningTick)throw new re(101,"");try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){const n=e;um(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(HC,[]).concat(this._bootstrapListeners).forEach(s=>s(e))}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(K(nt),K(In),K(xa),K(tm))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function um(t,i){const e=t.indexOf(i);e>-1&&t.splice(e,1)}let YC=!0,ZC=!1,ot=(()=>{class t{}return t.__NG_ELEMENT_ID__=$R,t})();function $R(t){return function WR(t,i,e){if($l(t)&&!e){const n=Zn(t.index,i);return new qa(n,n)}return 47&t.type?new qa(i[16],i):null}(on(),W(),16==(16&t))}class ny{constructor(){}supports(i){return Ia(i)}create(i){return new XR(i)}}const ZR=(t,i)=>i;class XR{constructor(i){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=i||ZR}forEachItem(i){let e;for(e=this._itHead;null!==e;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,n=this._removalsHead,s=0,r=null;for(;e||n;){const o=!n||e&&e.currentIndex{o=this._trackByFn(s,u),null!==e&&Object.is(e.trackById,o)?(n&&(e=this._verifyReinsertion(e,u,o,s)),Object.is(e.item,u)||this._addIdentityChange(e,u)):(e=this._mismatch(e,u,o,s),n=!0),e=e._next,s++}),this.length=s;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,n,s){let r;return null===i?r=this._itTail:(r=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,r,s)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(n,s))?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,r,s)):i=this._addAfter(new eL(e,n),r,s),i}_verifyReinsertion(i,e,n,s){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?i=this._reinsertAfter(r,i._prev,s):i.currentIndex!=s&&(i.currentIndex=s,this._addToMoves(i,s)),i}_truncate(i){for(;null!==i;){const e=i._next;this._addToRemovals(this._unlink(i)),i=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const s=i._prevRemoved,r=i._nextRemoved;return null===s?this._removalsHead=r:s._nextRemoved=r,null===r?this._removalsTail=s:r._prevRemoved=s,this._insertAfter(i,e,n),this._addToMoves(i,n),i}_moveAfter(i,e,n){return this._unlink(i),this._insertAfter(i,e,n),this._addToMoves(i,n),i}_addAfter(i,e,n){return this._insertAfter(i,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,e,n){const s=null===e?this._itHead:e._next;return i._next=s,i._prev=e,null===s?this._itTail=i:s._prev=i,null===e?this._itHead=i:e._next=i,null===this._linkedRecords&&(this._linkedRecords=new iy),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const e=i._prev,n=i._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new iy),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class eL{constructor(i,e){this.item=i,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class tL{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){const e=i._prevDup,n=i._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class iy{constructor(){this.map=new Map}put(i){const e=i.trackById;let n=this.map.get(e);n||(n=new tL,this.map.set(e,n)),n.add(i)}get(i,e){const s=this.map.get(i);return s?s.get(i,e):null}remove(i){const e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function sy(t,i,e){const n=t.previousIndex;if(null===n)return n;let s=0;return e&&n{if(e&&e.key===s)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(s,n);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){const n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){const s=this._records.get(i);this._maybeAddToChanges(s,e);const r=s._prev,o=s._next;return r&&(r._next=o),o&&(o._prev=r),s._next=null,s._prev=null,s}const n=new iL(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(n=>e(i[n],n))}}class iL{constructor(i){this.key=i,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function oy(){return new $a([new ny])}let $a=(()=>{class t{constructor(e){this.factories=e}static create(e,n){if(null!=n){const s=n.factories.slice();e=e.concat(s)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||oy()),deps:[[t,new _a,new Ps]]}}find(e){const n=this.factories.find(s=>s.supports(e));if(null!=n)return n;throw new re(901,"")}}return t.\u0275prov=X({token:t,providedIn:"root",factory:oy}),t})();function ay(){return new Wa([new ry])}let Wa=(()=>{class t{constructor(e){this.factories=e}static create(e,n){if(n){const s=n.factories.slice();e=e.concat(s)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>t.create(e,n||ay()),deps:[[t,new _a,new Ps]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new re(901,"")}}return t.\u0275prov=X({token:t,providedIn:"root",factory:ay}),t})();const oL=WC(null,"core",[]);let aL=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(K(cm))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})(),Gc=null;function ts(){return Gc}const en=new be("DocumentToken");let fr=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:function(){return function dL(){return K(ly)}()},providedIn:"platform"}),t})();const pL=new be("Location Initialized");let ly=(()=>{class t extends fr{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ts().getBaseHref(this._doc)}onPopState(e){const n=ts().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=ts().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,n,s){cy()?this._history.pushState(e,n,s):this.location.hash=s}replaceState(e,n,s){cy()?this._history.replaceState(e,n,s):this.location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:function(){return function hL(){return new ly(K(en))}()},providedIn:"platform"}),t})();function cy(){return!!window.history.pushState}function fm(t,i){if(0==t.length)return i;if(0==i.length)return t;let e=0;return t.endsWith("/")&&e++,i.startsWith("/")&&e++,2==e?t+i.substring(1):1==e?t+i:t+"/"+i}function uy(t){const i=t.match(/#|\?|$/),e=i&&i.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function gs(t){return t&&"?"!==t[0]?"?"+t:t}let ko=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:function(){return function mL(t){const i=K(en).location;return new dy(K(fr),i&&i.origin||"")}()},providedIn:"root"}),t})();const gm=new be("appBaseHref");let dy=(()=>{class t extends ko{constructor(e,n){if(super(),this._platformLocation=e,this._removeListenerFns=[],null==n&&(n=this._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=n}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return fm(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+gs(this._platformLocation.search),s=this._platformLocation.hash;return s&&e?`${n}${s}`:n}pushState(e,n,s,r){const o=this.prepareExternalUrl(s+gs(r));this._platformLocation.pushState(e,n,o)}replaceState(e,n,s,r){const o=this.prepareExternalUrl(s+gs(r));this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformLocation).historyGo)||void 0===s||s.call(n,e)}}return t.\u0275fac=function(e){return new(e||t)(K(fr),K(gm,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),fL=(()=>{class t extends ko{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=fm(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,s,r){let o=this.prepareExternalUrl(s+gs(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(e,n,o)}replaceState(e,n,s,r){let o=this.prepareExternalUrl(s+gs(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformLocation).historyGo)||void 0===s||s.call(n,e)}}return t.\u0275fac=function(e){return new(e||t)(K(fr),K(gm,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),_m=(()=>{class t{constructor(e,n){this._subject=new H,this._urlChangeListeners=[],this._platformStrategy=e;const s=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=uy(py(s)),this._platformStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+gs(n))}normalize(e){return t.stripTrailingSlash(function _L(t,i){return t&&i.startsWith(t)?i.substring(t.length):i}(this._baseHref,py(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,n="",s=null){this._platformStrategy.pushState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+gs(n)),s)}replaceState(e,n="",s=null){this._platformStrategy.replaceState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+gs(n)),s)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(e=0){var n,s;null===(s=(n=this._platformStrategy).historyGo)||void 0===s||s.call(n,e)}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}))}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(s=>s(e,n))}subscribe(e,n,s){return this._subject.subscribe({next:e,error:n,complete:s})}}return t.normalizeQueryParams=gs,t.joinWithSlash=fm,t.stripTrailingSlash=uy,t.\u0275fac=function(e){return new(e||t)(K(ko),K(fr))},t.\u0275prov=X({token:t,factory:function(){return function gL(){return new _m(K(ko),K(fr))}()},providedIn:"root"}),t})();function py(t){return t.replace(/\/index.html$/,"")}var $n=(()=>(($n=$n||{})[$n.Decimal=0]="Decimal",$n[$n.Percent=1]="Percent",$n[$n.Currency=2]="Currency",$n[$n.Scientific=3]="Scientific",$n))(),ge=(()=>((ge=ge||{})[ge.Decimal=0]="Decimal",ge[ge.Group=1]="Group",ge[ge.List=2]="List",ge[ge.PercentSign=3]="PercentSign",ge[ge.PlusSign=4]="PlusSign",ge[ge.MinusSign=5]="MinusSign",ge[ge.Exponential=6]="Exponential",ge[ge.SuperscriptingExponent=7]="SuperscriptingExponent",ge[ge.PerMille=8]="PerMille",ge[ge.Infinity=9]="Infinity",ge[ge.NaN=10]="NaN",ge[ge.TimeSeparator=11]="TimeSeparator",ge[ge.CurrencyDecimal=12]="CurrencyDecimal",ge[ge.CurrencyGroup=13]="CurrencyGroup",ge))();function Ci(t,i){const e=qn(t),n=e[te.NumberSymbols][i];if(void 0===n){if(i===ge.CurrencyDecimal)return e[te.NumberSymbols][ge.Decimal];if(i===ge.CurrencyGroup)return e[te.NumberSymbols][ge.Group]}return n}const GL=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function xm(t){const i=parseInt(t);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+t);return i}function yy(t,i){i=encodeURIComponent(i);for(const e of t.split(";")){const n=e.indexOf("="),[s,r]=-1==n?[e,""]:[e.slice(0,n),e.slice(n+1)];if(s.trim()===i)return decodeURIComponent(r)}return null}let Oe=(()=>{class t{constructor(e,n,s,r){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=s,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Ia(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(n=>this._toggleClass(n.key,n.currentValue)),e.forEachChangedItem(n=>this._toggleClass(n.key,n.currentValue)),e.forEachRemovedItem(n=>{n.previousValue&&this._toggleClass(n.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(n=>{if("string"!=typeof n.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${mt(n.item)}`);this._toggleClass(n.item,!0)}),e.forEachRemovedItem(n=>this._toggleClass(n.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(n=>this._toggleClass(n,!0)):Object.keys(e).forEach(n=>this._toggleClass(n,!!e[n])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(n=>this._toggleClass(n,!1)):Object.keys(e).forEach(n=>this._toggleClass(n,!1)))}_toggleClass(e,n){(e=e.trim())&&e.split(/\s+/g).forEach(s=>{n?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}}return t.\u0275fac=function(e){return new(e||t)(x($a),x(Wa),x(Re),x(wn))},t.\u0275dir=le({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class t4{constructor(i,e,n,s){this.$implicit=i,this.ngForOf=e,this.index=n,this.count=s}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let at=(()=>{class t{constructor(e,n,s){this._viewContainer=e,this._template=n,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((s,r,o)=>{if(null==s.previousIndex)n.createEmbeddedView(this._template,new t4(s.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===r?void 0:r);else if(null!==r){const u=n.get(r);n.move(u,o),wy(u,s)}});for(let s=0,r=n.length;s{wy(n.get(s.currentIndex),s)})}static ngTemplateContextGuard(e,n){return!0}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x($a))},t.\u0275dir=le({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();function wy(t,i){t.context.$implicit=i.item}let Q=(()=>{class t{constructor(e,n){this._viewContainer=e,this._context=new n4,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Ty("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Ty("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi))},t.\u0275dir=le({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class n4{constructor(){this.$implicit=null,this.ngIf=null}}function Ty(t,i){if(i&&!i.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${mt(i)}'.`)}class Mm{constructor(i,e){this._viewContainerRef=i,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(i){i&&!this._created?this.create():!i&&this._created&&this.destroy()}}let gr=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let n=0;n{class t{constructor(e,n,s){this.ngSwitch=s,s._addCase(),this._view=new Mm(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x(gr,9))},t.\u0275dir=le({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),km=(()=>{class t{constructor(e,n,s){s._addDefault(new Mm(e,n))}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x(gr,9))},t.\u0275dir=le({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),lt=(()=>{class t{constructor(e,n,s){this._ngEl=e,this._differs=n,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[s,r]=e.split(".");null!=(n=null!=n&&r?`${n}${r}`:n)?this._renderer.setStyle(this._ngEl.nativeElement,s,n):this._renderer.removeStyle(this._ngEl.nativeElement,s)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(Wa),x(wn))},t.\u0275dir=le({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Lt=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(e.ngTemplateOutlet){const n=this._viewContainerRef;this._viewRef&&n.remove(n.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?n.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(x(vi))},t.\u0275dir=le({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[mn]}),t})();function Vi(t,i){return new re(2100,"")}class r4{createSubscription(i,e){return i.subscribe({next:e,error:n=>{throw n}})}dispose(i){i.unsubscribe()}onDestroy(i){i.unsubscribe()}}class o4{createSubscription(i,e){return i.then(e,n=>{throw n})}dispose(i){}onDestroy(i){}}const a4=new o4,l4=new r4;let xy=(()=>{class t{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(Ra(e))return a4;if(qv(e))return l4;throw Vi()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(x(ot,16))},t.\u0275pipe=An({name:"async",type:t,pure:!1}),t})(),Xc=(()=>{class t{constructor(e){this._locale=e}transform(e,n,s){if(!function Im(t){return!(null==t||""===t||t!=t)}(e))return null;s=s||this._locale;try{return function QL(t,i,e){return function Tm(t,i,e,n,s,r,o=!1){let u="",h=!1;if(isFinite(t)){let b=function YL(t){let n,s,r,o,u,i=Math.abs(t)+"",e=0;for((s=i.indexOf("."))>-1&&(i=i.replace(".","")),(r=i.search(/e/i))>0?(s<0&&(s=r),s+=+i.slice(r+1),i=i.substring(0,r)):s<0&&(s=i.length),r=0;"0"===i.charAt(r);r++);if(r===(u=i.length))n=[0],s=1;else{for(u--;"0"===i.charAt(u);)u--;for(s-=r,n=[],o=0;r<=u;r++,o++)n[o]=Number(i.charAt(r))}return s>22&&(n=n.splice(0,21),e=s-1,s=1),{digits:n,exponent:e,integerLen:s}}(t);o&&(b=function JL(t){if(0===t.digits[0])return t;const i=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===i?t.digits.push(0,0):1===i&&t.digits.push(0),t.integerLen+=2),t}(b));let y=i.minInt,w=i.minFrac,M=i.maxFrac;if(r){const P=r.match(GL);if(null===P)throw new Error(`${r} is not a valid digit info`);const J=P[1],se=P[3],Me=P[5];null!=J&&(y=xm(J)),null!=se&&(w=xm(se)),null!=Me?M=xm(Me):null!=se&&w>M&&(M=w)}!function ZL(t,i,e){if(i>e)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${e}).`);let n=t.digits,s=n.length-t.integerLen;const r=Math.min(Math.max(i,s),e);let o=r+t.integerLen,u=n[o];if(o>0){n.splice(Math.max(t.integerLen,o));for(let w=o;w=5)if(o-1<0){for(let w=0;w>o;w--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[o-1]++;for(;s=b?R.pop():h=!1),M>=10?1:0},0);y&&(n.unshift(y),t.integerLen++)}(b,w,M);let E=b.digits,R=b.integerLen;const O=b.exponent;let N=[];for(h=E.every(P=>!P);R0?N=E.splice(R,E.length):(N=E,E=[0]);const U=[];for(E.length>=i.lgSize&&U.unshift(E.splice(-i.lgSize,E.length).join(""));E.length>i.gSize;)U.unshift(E.splice(-i.gSize,E.length).join(""));E.length&&U.unshift(E.join("")),u=U.join(Ci(e,n)),N.length&&(u+=Ci(e,s)+N.join("")),O&&(u+=Ci(e,ge.Exponential)+"+"+O)}else u=Ci(e,ge.Infinity);return u=t<0&&!h?i.negPre+u+i.negSuf:i.posPre+u+i.posSuf,u}(t,function Sm(t,i="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(";"),s=n[0],r=n[1],o=-1!==s.indexOf(".")?s.split("."):[s.substring(0,s.lastIndexOf("0")+1),s.substring(s.lastIndexOf("0")+1)],u=o[0],h=o[1]||"";e.posPre=u.substr(0,u.indexOf("#"));for(let y=0;y{class t{transform(e,n,s){if(null==e)return null;if(!this.supports(e))throw Vi();return e.slice(n,s)}supports(e){return"string"==typeof e||Array.isArray(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=An({name:"slice",type:t,pure:!1}),t})(),Be=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();const ky="browser";let M4=(()=>{class t{}return t.\u0275prov=X({token:t,providedIn:"root",factory:()=>new k4(K(en),window)}),t})();class k4{constructor(i,e){this.document=i,this.window=e,this.offset=()=>[0,0]}setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(i){this.supportsScrolling()&&this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){if(!this.supportsScrolling())return;const e=function I4(t,i){const e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){const r=s.shadowRoot;if(r){const o=r.getElementById(i)||r.querySelector(`[name="${i}"]`);if(o)return o}s=n.nextNode()}}return null}(this.document,i);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(i){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=i)}}scrollToElement(i){const e=i.getBoundingClientRect(),n=e.left+this.window.pageXOffset,s=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],s-r[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const i=Iy(this.window.history)||Iy(Object.getPrototypeOf(this.window.history));return!(!i||!i.writable&&!i.set)}catch(i){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(i){return!1}}}function Iy(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Ey{}class Rm extends class E4 extends class uL{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function cL(t){Gc||(Gc=t)}(new Rm)}onAndCancel(i,e,n){return i.addEventListener(e,n,!1),()=>{i.removeEventListener(e,n,!1)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.parentNode&&i.parentNode.removeChild(i)}createElement(i,e){return(e=e||this.getDefaultDocument()).createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return"window"===e?window:"document"===e?i:"body"===e?i.body:null}getBaseHref(i){const e=function R4(){return Ya=Ya||document.querySelector("base"),Ya?Ya.getAttribute("href"):null}();return null==e?null:function L4(t){eu=eu||document.createElement("a"),eu.setAttribute("href",t);const i=eu.pathname;return"/"===i.charAt(0)?i:`/${i}`}(e)}resetBaseElement(){Ya=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return yy(document.cookie,i)}}let eu,Ya=null;const Ry=new be("TRANSITION_ID"),A4=[{provide:em,useFactory:function O4(t,i,e){return()=>{e.get(tm).donePromise.then(()=>{const n=ts(),s=i.querySelectorAll(`style[ng-transition="${t}"]`);for(let r=0;r{const r=i.findTestabilityInTree(n,s);if(null==r)throw new Error("Could not find testability for element.");return r},bt.getAllAngularTestabilities=()=>i.getAllTestabilities(),bt.getAllAngularRootElements=()=>i.getAllRootElements(),bt.frameworkStabilizers||(bt.frameworkStabilizers=[]),bt.frameworkStabilizers.push(n=>{const s=bt.getAllAngularTestabilities();let r=s.length,o=!1;const u=function(h){o=o||h,r--,0==r&&n(o)};s.forEach(function(h){h.whenStable(u)})})}findTestabilityInTree(i,e,n){if(null==e)return null;const s=i.getTestability(e);return null!=s?s:n?ts().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null}}let P4=(()=>{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const tu=new be("EventManagerPlugins");let nu=(()=>{class t{constructor(e,n){this._zone=n,this._eventNameToPlugin=new Map,e.forEach(s=>s.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,n,s){return this._findPluginFor(n).addEventListener(e,n,s)}addGlobalEventListener(e,n,s){return this._findPluginFor(n).addGlobalEventListener(e,n,s)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const s=this._plugins;for(let r=0;r{class t{constructor(){this._stylesSet=new Set}addStyles(e){const n=new Set;e.forEach(s=>{this._stylesSet.has(s)||(this._stylesSet.add(s),n.add(s))}),this.onStylesAdded(n)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),Za=(()=>{class t extends Oy{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,n,s){e.forEach(r=>{const o=this._doc.createElement("style");o.textContent=r,s.push(n.appendChild(o))})}addHost(e){const n=[];this._addStylesToHost(this._stylesSet,e,n),this._hostNodes.set(e,n)}removeHost(e){const n=this._hostNodes.get(e);n&&n.forEach(Ay),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((n,s)=>{this._addStylesToHost(e,s,n)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(Ay))}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function Ay(t){ts().remove(t)}const Om={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Am=/%COMP%/g;function iu(t,i,e){for(let n=0;n{if("__ngUnwrap__"===i)return t;!1===t(i)&&(i.preventDefault(),i.returnValue=!1)}}let su=(()=>{class t{constructor(e,n,s){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.rendererByCompId=new Map,this.defaultRenderer=new Pm(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;switch(n.encapsulation){case ki.Emulated:{let s=this.rendererByCompId.get(n.id);return s||(s=new q4(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,s)),s.applyToHost(e),s}case 1:case ki.ShadowDom:return new U4(this.eventManager,this.sharedStylesHost,e,n);default:if(!this.rendererByCompId.has(n.id)){const s=iu(n.id,n.styles,[]);this.sharedStylesHost.addStyles(s),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(K(nu),K(Za),K(ja))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Pm{constructor(i){this.eventManager=i,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(i,e){return e?document.createElementNS(Om[e]||e,i):document.createElement(i)}createComment(i){return document.createComment(i)}createText(i){return document.createTextNode(i)}appendChild(i,e){i.appendChild(e)}insertBefore(i,e,n){i&&i.insertBefore(e,n)}removeChild(i,e){i&&i.removeChild(e)}selectRootElement(i,e){let n="string"==typeof i?document.querySelector(i):i;if(!n)throw new Error(`The selector "${i}" did not match any elements`);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,s){if(s){e=s+":"+e;const r=Om[s];r?i.setAttributeNS(r,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){const s=Om[n];s?i.removeAttributeNS(s,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,s){s&(ei.DashCase|ei.Important)?i.style.setProperty(e,n,s&ei.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&ei.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i[e]=n}setValue(i,e){i.nodeValue=e}listen(i,e,n){return"string"==typeof i?this.eventManager.addGlobalEventListener(i,e,Ny(n)):this.eventManager.addEventListener(i,e,Ny(n))}}class q4 extends Pm{constructor(i,e,n,s){super(i),this.component=n;const r=iu(s+"-"+n.id,n.styles,[]);e.addStyles(r),this.contentAttr=function V4(t){return"_ngcontent-%COMP%".replace(Am,t)}(s+"-"+n.id),this.hostAttr=function B4(t){return"_nghost-%COMP%".replace(Am,t)}(s+"-"+n.id)}applyToHost(i){super.setAttribute(i,this.hostAttr,"")}createElement(i,e){const n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}}class U4 extends Pm{constructor(i,e,n,s){super(i),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=iu(s.id,s.styles,[]);for(let o=0;o{class t extends Ly{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s){return e.addEventListener(n,s,!1),()=>this.removeEventListener(e,n,s)}removeEventListener(e,n,s){return e.removeEventListener(n,s)}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const By=["alt","control","meta","shift"],j4={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Hy={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},$4={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let W4=(()=>{class t extends Ly{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,s){const r=t.parseEventName(n),o=t.eventCallback(r.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ts().onAndCancel(e,r.domEventName,o))}static parseEventName(e){const n=e.toLowerCase().split("."),s=n.shift();if(0===n.length||"keydown"!==s&&"keyup"!==s)return null;const r=t._normalizeKey(n.pop());let o="";if(By.forEach(h=>{const b=n.indexOf(h);b>-1&&(n.splice(b,1),o+=h+".")}),o+=r,0!=n.length||0===r.length)return null;const u={};return u.domEventName=s,u.fullKey=o,u}static getEventFullKey(e){let n="",s=function K4(t){let i=t.key;if(null==i){if(i=t.keyIdentifier,null==i)return"Unidentified";i.startsWith("U+")&&(i=String.fromCharCode(parseInt(i.substring(2),16)),3===t.location&&Hy.hasOwnProperty(i)&&(i=Hy[i]))}return j4[i]||i}(e);return s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),By.forEach(r=>{r!=s&&$4[r](e)&&(n+=r+".")}),n+=s,n}static eventCallback(e,n,s){return r=>{t.getEventFullKey(r)===e&&s.runGuarded(()=>n(r))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Z4=WC(oL,"browser",[{provide:Hc,useValue:ky},{provide:BC,useValue:function Q4(){Rm.makeCurrent(),Lm.init()},multi:!0},{provide:en,useFactory:function Y4(){return function Rx(t){Zd=t}(document),document},deps:[]}]),X4=[{provide:hh,useValue:"root"},{provide:xa,useFactory:function J4(){return new xa},deps:[]},{provide:tu,useClass:G4,multi:!0,deps:[en,nt,Hc]},{provide:tu,useClass:W4,multi:!0,deps:[en]},{provide:su,useClass:su,deps:[nu,Za,ja]},{provide:Ba,useExisting:su},{provide:Oy,useExisting:Za},{provide:Za,useClass:Za,deps:[en]},{provide:om,useClass:om,deps:[nt]},{provide:nu,useClass:nu,deps:[tu,nt]},{provide:Ey,useClass:P4,deps:[]}];let qy=(()=>{class t{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:ja,useValue:e.appId},{provide:Ry,useExisting:ja},A4]}}}return t.\u0275fac=function(e){return new(e||t)(K(t,12))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:X4,imports:[Be,aL]}),t})();function oe(...t){let i=t[t.length-1];return Vr(i)?(t.pop(),Ad(t,i)):Pd(t)}function _r(t,i){return bn(t,i,1)}function qs(t,i){return function(n){return n.lift(new uO(t,i))}}"undefined"!=typeof window&&window;class uO{constructor(i,e){this.predicate=i,this.thisArg=e}call(i,e){return e.subscribe(new dO(i,this.predicate,this.thisArg))}}class dO extends yt{constructor(i,e,n){super(i),this.predicate=e,this.thisArg=n,this.count=0}_next(i){let e;try{e=this.predicate.call(this.thisArg,i,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(i)}}class zy{}class jy{}class bs{constructor(i){this.normalizedNames=new Map,this.lazyUpdate=null,i?this.lazyInit="string"==typeof i?()=>{this.headers=new Map,i.split("\n").forEach(e=>{const n=e.indexOf(":");if(n>0){const s=e.slice(0,n),r=s.toLowerCase(),o=e.slice(n+1).trim();this.maybeSetNormalizedName(s,r),this.headers.has(r)?this.headers.get(r).push(o):this.headers.set(r,[o])}})}:()=>{this.headers=new Map,Object.keys(i).forEach(e=>{let n=i[e];const s=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(s,n),this.maybeSetNormalizedName(e,s))})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();const e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof bs?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){const e=new bs;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof bs?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){const e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(i.name,e);const s=("a"===i.op?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":const r=i.value;if(r){let o=this.headers.get(e);if(!o)return;o=o.filter(u=>-1===r.indexOf(u)),0===o.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}}class pO{encodeKey(i){return $y(i)}encodeValue(i){return $y(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}}const mO=/%(\d[a-f0-9])/gi,fO={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function $y(t){return encodeURIComponent(t).replace(mO,(i,e)=>{var n;return null!==(n=fO[e])&&void 0!==n?n:i})}function Wy(t){return`${t}`}class ye{constructor(i={}){if(this.updates=null,this.cloneFrom=null,this.encoder=i.encoder||new pO,i.fromString){if(i.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function hO(t,i){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(s=>{const r=s.indexOf("="),[o,u]=-1==r?[i.decodeKey(s),""]:[i.decodeKey(s.slice(0,r)),i.decodeValue(s.slice(r+1))],h=e.get(o)||[];h.push(u),e.set(o,h)}),e}(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{const n=i.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();const e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){const e=[];return Object.keys(i).forEach(n=>{const s=i[n];Array.isArray(s)?s.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{const e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>""!==i).join("&")}clone(i){const e=new ye({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":const e=("a"===i.op?this.map.get(i.param):void 0)||[];e.push(Wy(i.value)),this.map.set(i.param,e);break;case"d":if(void 0===i.value){this.map.delete(i.param);break}{let n=this.map.get(i.param)||[];const s=n.indexOf(Wy(i.value));-1!==s&&n.splice(s,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}}}),this.cloneFrom=this.updates=null)}}class gO{constructor(){this.map=new Map}set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}}function Ky(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Qy(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Jy(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Xa{constructor(i,e,n,s){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=i.toUpperCase(),function _O(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||s?(this.body=void 0!==n?n:null,r=s):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params)),this.headers||(this.headers=new bs),this.context||(this.context=new gO),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{const u=e.indexOf("?");this.urlWithParams=e+(-1===u?"?":uM.set(E,i.setHeaders[E]),b)),i.setParams&&(y=Object.keys(i.setParams).reduce((M,E)=>M.set(E,i.setParams[E]),y)),new Xa(n,s,o,{params:y,headers:b,context:w,reportProgress:h,responseType:r,withCredentials:u})}}var sn=(()=>((sn=sn||{})[sn.Sent=0]="Sent",sn[sn.UploadProgress=1]="UploadProgress",sn[sn.ResponseHeader=2]="ResponseHeader",sn[sn.DownloadProgress=3]="DownloadProgress",sn[sn.Response=4]="Response",sn[sn.User=5]="User",sn))();class Nm{constructor(i,e=200,n="OK"){this.headers=i.headers||new bs,this.status=void 0!==i.status?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}}class Vm extends Nm{constructor(i={}){super(i),this.type=sn.ResponseHeader}clone(i={}){return new Vm({headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class ru extends Nm{constructor(i={}){super(i),this.type=sn.Response,this.body=void 0!==i.body?i.body:null}clone(i={}){return new ru({body:void 0!==i.body?i.body:this.body,headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Yy extends Nm{constructor(i){super(i,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${i.url||"(unknown url)"}`:`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}}function Bm(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Bi=(()=>{class t{constructor(e){this.handler=e}request(e,n,s={}){let r;if(e instanceof Xa)r=e;else{let h,b;h=s.headers instanceof bs?s.headers:new bs(s.headers),s.params&&(b=s.params instanceof ye?s.params:new ye({fromObject:s.params})),r=new Xa(e,n,void 0!==s.body?s.body:null,{headers:h,context:s.context,params:b,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials})}const o=oe(r).pipe(_r(h=>this.handler.handle(h)));if(e instanceof Xa||"events"===s.observe)return o;const u=o.pipe(qs(h=>h instanceof ru));switch(s.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return u.pipe(et(h=>{if(null!==h.body&&!(h.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return h.body}));case"blob":return u.pipe(et(h=>{if(null!==h.body&&!(h.body instanceof Blob))throw new Error("Response is not a Blob.");return h.body}));case"text":return u.pipe(et(h=>{if(null!==h.body&&"string"!=typeof h.body)throw new Error("Response is not a string.");return h.body}));default:return u.pipe(et(h=>h.body))}case"response":return u;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:(new ye).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Bm(s,n))}post(e,n,s={}){return this.request("POST",e,Bm(s,n))}put(e,n,s={}){return this.request("PUT",e,Bm(s,n))}}return t.\u0275fac=function(e){return new(e||t)(K(zy))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Zy{constructor(i,e){this.next=i,this.interceptor=e}handle(i){return this.interceptor.intercept(i,this.next)}}const Xy=new be("HTTP_INTERCEPTORS");let vO=(()=>{class t{intercept(e,n){return n.handle(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const CO=/^\)\]\}',?\n/;let e0=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Je(n=>{const s=this.xhrFactory.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((E,R)=>s.setRequestHeader(E,R.join(","))),e.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const E=e.detectContentTypeHeader();null!==E&&s.setRequestHeader("Content-Type",E)}if(e.responseType){const E=e.responseType.toLowerCase();s.responseType="json"!==E?E:"text"}const r=e.serializeBody();let o=null;const u=()=>{if(null!==o)return o;const E=s.statusText||"OK",R=new bs(s.getAllResponseHeaders()),O=function yO(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(s)||e.url;return o=new Vm({headers:R,status:s.status,statusText:E,url:O}),o},h=()=>{let{headers:E,status:R,statusText:O,url:N}=u(),U=null;204!==R&&(U=void 0===s.response?s.responseText:s.response),0===R&&(R=U?200:0);let P=R>=200&&R<300;if("json"===e.responseType&&"string"==typeof U){const J=U;U=U.replace(CO,"");try{U=""!==U?JSON.parse(U):null}catch(se){U=J,P&&(P=!1,U={error:se,text:U})}}P?(n.next(new ru({body:U,headers:E,status:R,statusText:O,url:N||void 0})),n.complete()):n.error(new Yy({error:U,headers:E,status:R,statusText:O,url:N||void 0}))},b=E=>{const{url:R}=u(),O=new Yy({error:E,status:s.status||0,statusText:s.statusText||"Unknown Error",url:R||void 0});n.error(O)};let y=!1;const w=E=>{y||(n.next(u()),y=!0);let R={type:sn.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(R.total=E.total),"text"===e.responseType&&!!s.responseText&&(R.partialText=s.responseText),n.next(R)},M=E=>{let R={type:sn.UploadProgress,loaded:E.loaded};E.lengthComputable&&(R.total=E.total),n.next(R)};return s.addEventListener("load",h),s.addEventListener("error",b),s.addEventListener("timeout",b),s.addEventListener("abort",b),e.reportProgress&&(s.addEventListener("progress",w),null!==r&&s.upload&&s.upload.addEventListener("progress",M)),s.send(r),n.next({type:sn.Sent}),()=>{s.removeEventListener("error",b),s.removeEventListener("abort",b),s.removeEventListener("load",h),s.removeEventListener("timeout",b),e.reportProgress&&(s.removeEventListener("progress",w),null!==r&&s.upload&&s.upload.removeEventListener("progress",M)),s.readyState!==s.DONE&&s.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(K(Ey))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Hm=new be("XSRF_COOKIE_NAME"),qm=new be("XSRF_HEADER_NAME");class t0{}let wO=(()=>{class t{constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=yy(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(K(en),K(Hc),K(Hm))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),Um=(()=>{class t{constructor(e,n){this.tokenService=e,this.headerName=n}intercept(e,n){const s=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||s.startsWith("http://")||s.startsWith("https://"))return n.handle(e);const r=this.tokenService.getToken();return null!==r&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,r)})),n.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(K(t0),K(qm))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),TO=(()=>{class t{constructor(e,n){this.backend=e,this.injector=n,this.chain=null}handle(e){if(null===this.chain){const n=this.injector.get(Xy,[]);this.chain=n.reduceRight((s,r)=>new Zy(s,r),this.backend)}return this.chain.handle(e)}}return t.\u0275fac=function(e){return new(e||t)(K(jy),K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),SO=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Um,useClass:vO}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Hm,useValue:e.cookieName}:[],e.headerName?{provide:qm,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[Um,{provide:Xy,useExisting:Um,multi:!0},{provide:t0,useClass:wO},{provide:Hm,useValue:"XSRF-TOKEN"},{provide:qm,useValue:"X-XSRF-TOKEN"}]}),t})(),xO=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[Bi,{provide:zy,useClass:TO},e0,{provide:jy,useExisting:e0}],imports:[[SO.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();function ns(t){return!!t&&(t instanceof Je||"function"==typeof t.lift&&"function"==typeof t.subscribe)}function n0(...t){if(1===t.length){const i=t[0];if(Nr(i))return ou(i,null);if(Ld(i)&&Object.getPrototypeOf(i)===Object.prototype){const e=Object.keys(i);return ou(e.map(n=>i[n]),e)}}if("function"==typeof t[t.length-1]){const i=t.pop();return ou(t=1===t.length&&Nr(t[0])?t[0]:t,null).pipe(et(e=>i(...e)))}return ou(t,null)}function ou(t,i){return new Je(e=>{const n=t.length;if(0===n)return void e.complete();const s=new Array(n);let r=0,o=0;for(let u=0;u{b||(b=!0,o++),s[u]=y},error:y=>e.error(y),complete:()=>{r++,(r===n||!b)&&(o===n&&e.next(i?i.reduce((y,w,M)=>(y[w]=s[M],y),{}):s),e.complete())}}))}})}function el(...t){return function DO(){return ea(1)}()(oe(...t))}const Io=new Je(t=>t.complete());function au(t){return t?function MO(t){return new Je(i=>t.schedule(()=>i.complete()))}(t):Io}function lu(t){return new Je(i=>{let e;try{e=t()}catch(s){return void i.error(s)}return(e?Dn(e):au()).subscribe(i)})}const s0=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function br(t){return i=>0===t?au():i.lift(new kO(t))}class kO{constructor(i){if(this.total=i,this.total<0)throw new s0}call(i,e){return e.subscribe(new IO(i,this.total))}}class IO extends yt{constructor(i,e){super(i),this.total=e,this.count=0}_next(i){const e=this.total,n=++this.count;n<=e&&(this.destination.next(i),n===e&&(this.destination.complete(),this.unsubscribe()))}}class EO extends Et{constructor(i,e){super()}schedule(i,e=0){return this}}class cu extends EO{constructor(i,e){super(i,e),this.scheduler=i,this.work=e,this.pending=!1}schedule(i,e=0){if(this.closed)return this;this.state=i;const n=this.id,s=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(s,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(s,this.id,e),this}requestAsyncId(i,e,n=0){return setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(i,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(i,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,e){let s,n=!1;try{this.work(i)}catch(r){n=!0,s=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),s}_unsubscribe(){const i=this.id,e=this.scheduler,n=e.actions,s=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==s&&n.splice(s,1),null!=i&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null}}let r0=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(e,n=0,s){return new this.SchedulerAction(this,e).schedule(s,n)}}return t.now=()=>Date.now(),t})();class Hi extends r0{constructor(i,e=r0.now){super(i,()=>Hi.delegate&&Hi.delegate!==this?Hi.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(i,e=0,n){return Hi.delegate&&Hi.delegate!==this?Hi.delegate.schedule(i,e,n):super.schedule(i,e,n)}flush(i){const{actions:e}=this;if(this.active)return void e.push(i);let n;this.active=!0;do{if(n=i.execute(i.state,i.delay))break}while(i=e.shift());if(this.active=!1,n){for(;i=e.shift();)i.unsubscribe();throw n}}}const OO=new class LO extends Hi{}(class RO extends cu{constructor(i,e){super(i,e),this.scheduler=i,this.work=e}schedule(i,e=0){return e>0?super.schedule(i,e):(this.delay=e,this.state=i,this.scheduler.flush(this),this)}execute(i,e){return e>0||this.closed?super.execute(i,e):this._execute(i,e)}requestAsyncId(i,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(i,e,n):i.flush(this)}});function tl(t,i){return new Je(i?e=>i.schedule(AO,0,{error:t,subscriber:e}):e=>e.error(t))}function AO({error:t,subscriber:i}){i.error(t)}class Wn{constructor(i,e,n){this.kind=i,this.value=e,this.error=n,this.hasValue="N"===i}observe(i){switch(this.kind){case"N":return i.next&&i.next(this.value);case"E":return i.error&&i.error(this.error);case"C":return i.complete&&i.complete()}}do(i,e,n){switch(this.kind){case"N":return i&&i(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(i,e,n){return i&&"function"==typeof i.next?this.observe(i):this.do(i,e,n)}toObservable(){switch(this.kind){case"N":return oe(this.value);case"E":return tl(this.error);case"C":return au()}throw new Error("unexpected notification kind value")}static createNext(i){return void 0!==i?new Wn("N",i):Wn.undefinedValueNotification}static createError(i){return new Wn("E",void 0,i)}static createComplete(){return Wn.completeNotification}}Wn.completeNotification=new Wn("C"),Wn.undefinedValueNotification=new Wn("N",void 0);class uu extends yt{constructor(i,e,n=0){super(i),this.scheduler=e,this.delay=n}static dispatch(i){const{notification:e,destination:n}=i;e.observe(n),this.unsubscribe()}scheduleMessage(i){this.destination.add(this.scheduler.schedule(uu.dispatch,this.delay,new FO(i,this.destination)))}_next(i){this.scheduleMessage(Wn.createNext(i))}_error(i){this.scheduleMessage(Wn.createError(i)),this.unsubscribe()}_complete(){this.scheduleMessage(Wn.createComplete()),this.unsubscribe()}}class FO{constructor(i,e){this.notification=i,this.destination=e}}class NO extends ct{constructor(i=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=i<1?1:i,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(i){if(!this.isStopped){const e=this._events;e.push(i),e.length>this._bufferSize&&e.shift()}super.next(i)}nextTimeWindow(i){this.isStopped||(this._events.push(new VO(this._getNow(),i)),this._trimBufferThenGetEvents()),super.next(i)}_subscribe(i){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),s=this.scheduler,r=n.length;let o;if(this.closed)throw new nr;if(this.isStopped||this.hasError?o=Et.EMPTY:(this.observers.push(i),o=new Eg(this,i)),s&&i.add(i=new uu(i,s)),e)for(let u=0;ue&&(o=Math.max(o,r-e)),o>0&&s.splice(0,o),s}}class VO{constructor(i,e){this.time=i,this.value=e}}function Gm(t,i,e){let n;return n=t&&"object"==typeof t?t:{bufferSize:t,windowTime:i,refCount:!1,scheduler:e},s=>s.lift(function BO({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:i=Number.POSITIVE_INFINITY,refCount:e,scheduler:n}){let s,o,r=0,u=!1,h=!1;return function(y){let w;r++,!s||u?(u=!1,s=new NO(t,i,n),w=s.subscribe(this),o=y.subscribe({next(M){s.next(M)},error(M){u=!0,s.error(M)},complete(){h=!0,o=void 0,s.complete()}}),h&&(o=void 0)):w=s.subscribe(this),this.add(()=>{r--,w.unsubscribe(),w=void 0,o&&!h&&e&&0===r&&(o.unsubscribe(),o=void 0,s=void 0)})}}(n))}function qi(t,i){return"function"==typeof i?e=>e.pipe(qi((n,s)=>Dn(t(n,s)).pipe(et((r,o)=>i(n,r,s,o))))):e=>e.lift(new HO(t))}class HO{constructor(i){this.project=i}call(i,e){return e.subscribe(new qO(i,this.project))}}class qO extends Zo{constructor(i,e){super(i),this.project=e,this.index=0}_next(i){let e;const n=this.index++;try{e=this.project(i,n)}catch(s){return void this.destination.error(s)}this._innerSub(e)}_innerSub(i){const e=this.innerSubscription;e&&e.unsubscribe();const n=new Yo(this),s=this.destination;s.add(n),this.innerSubscription=Xo(i,n),this.innerSubscription!==n&&s.add(this.innerSubscription)}_complete(){const{innerSubscription:i}=this;(!i||i.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(i){this.destination.next(i)}}class nl{}let o0=(()=>{class t extends nl{getTranslation(e){return oe({})}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class zm{}let a0=(()=>{class t{handle(e){return e.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function il(t,i){if(t===i)return!0;if(null===t||null===i)return!1;if(t!=t&&i!=i)return!0;let s,r,o,e=typeof t;if(e==typeof i&&"object"==e){if(!Array.isArray(t)){if(Array.isArray(i))return!1;for(r in o=Object.create(null),t){if(!il(t[r],i[r]))return!1;o[r]=!0}for(r in i)if(!(r in o)&&void 0!==i[r])return!1;return!0}if(!Array.isArray(i))return!1;if((s=t.length)==i.length){for(r=0;r{jm(i[n])?n in t?e[n]=l0(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e}class du{}let c0=(()=>{class t extends du{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(e,n){let s;return s="string"==typeof e?this.interpolateString(e,n):"function"==typeof e?this.interpolateFunction(e,n):e,s}getValue(e,n){let s="string"==typeof n?n.split("."):[n];n="";do{n+=s.shift(),!si(e)||!si(e[n])||"object"!=typeof e[n]&&s.length?s.length?n+=".":e=void 0:(e=e[n],n="")}while(s.length);return e}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(s,r)=>{let o=this.getValue(n,r);return si(o)?o:s}):e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class pu{}let u0=(()=>{class t extends pu{compile(e,n){return e}compileTranslations(e,n){return e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class d0{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new H,this.onLangChange=new H,this.onDefaultLangChange=new H}}const $m=new be("USE_STORE"),Wm=new be("USE_DEFAULT_LANG"),Km=new be("DEFAULT_LANGUAGE"),Qm=new be("USE_EXTEND");let Le=(()=>{class t{constructor(e,n,s,r,o,u=!0,h=!1,b=!1,y){this.store=e,this.currentLoader=n,this.compiler=s,this.parser=r,this.missingTranslationHandler=o,this.useDefaultLang=u,this.isolate=h,this.extend=b,this.pending=!1,this._onTranslationChange=new H,this._onLangChange=new H,this._onDefaultLangChange=new H,this._langs=[],this._translations={},this._translationRequests={},y&&this.setDefaultLang(y)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(br(1)).subscribe(s=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return oe(this.translations[e]);let n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(br(1)).subscribe(s=>{this.changeLang(e)}),n):(this.changeLang(e),oe(this.translations[e]))}retrieveTranslations(e){let n;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),n=this._translationRequests[e]),n}getTranslation(e){this.pending=!0;const n=this.currentLoader.getTranslation(e).pipe(Gm(1),br(1));return this.loadingTranslations=n.pipe(et(s=>this.compiler.compileTranslations(s,e)),Gm(1),br(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?Object.assign(Object.assign({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),n}setTranslation(e,n,s=!1){n=this.compiler.compileTranslations(n,e),this.translations[e]=(s||this.extend)&&this.translations[e]?l0(this.translations[e],n):n,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(n=>{-1===this.langs.indexOf(n)&&this.langs.push(n)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,n,s){let r;if(n instanceof Array){let o={},u=!1;for(let h of n)o[h]=this.getParsedResult(e,h,s),ns(o[h])&&(u=!0);return u?n0(n.map(b=>ns(o[b])?o[b]:oe(o[b]))).pipe(et(b=>{let y={};return b.forEach((w,M)=>{y[n[M]]=w}),y})):o}if(e&&(r=this.parser.interpolate(this.parser.getValue(e,n),s)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],n),s)),void 0===r){let o={key:n,translateService:this};void 0!==s&&(o.interpolateParams=s),r=this.missingTranslationHandler.handle(o)}return void 0!==r?r:n}get(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(_r(s=>ns(s=this.getParsedResult(s,e,n))?s:oe(s)));{let s=this.getParsedResult(this.translations[this.currentLang],e,n);return ns(s)?s:oe(s)}}getStreamOnTranslationChange(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');return el(lu(()=>this.get(e,n)),this.onTranslationChange.pipe(qi(s=>{const r=this.getParsedResult(s.translations,e,n);return"function"==typeof r.subscribe?r:oe(r)})))}stream(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');return el(lu(()=>this.get(e,n)),this.onLangChange.pipe(qi(s=>{const r=this.getParsedResult(s.translations,e,n);return ns(r)?r:oe(r)})))}instant(e,n){if(!si(e)||!e.length)throw new Error('Parameter "key" required');let s=this.getParsedResult(this.translations[this.currentLang],e,n);if(ns(s)){if(e instanceof Array){let r={};return e.forEach((o,u)=>{r[e[u]]=e[u]}),r}return e}return s}set(e,n,s=this.currentLang){this.translations[s][e]=this.compiler.compile(n,s),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==e?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}}return t.\u0275fac=function(e){return new(e||t)(K(d0),K(nl),K(pu),K(du),K(zm),K(Wm),K($m),K(Qm),K(Km))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),hu=(()=>{class t{constructor(e,n,s){this.translateService=e,this.element=n,this._ref=s,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(r=>{r.lang===this.translateService.currentLang&&this.checkNodes(!0,r.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(r=>{this.checkNodes(!0,r.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(r=>{this.checkNodes(!0)}))}set translate(e){e&&(this.key=e,this.checkNodes())}set translateParams(e){il(this.currentParams,e)||(this.currentParams=e,this.checkNodes(!0))}ngAfterViewChecked(){this.checkNodes()}checkNodes(e=!1,n){let s=this.element.nativeElement.childNodes;s.length||(this.setContent(this.element.nativeElement,this.key),s=this.element.nativeElement.childNodes);for(let r=0;r{o!==e&&(n.lastKey=e),n.originalContent||(n.originalContent=this.getContent(n)),n.currentValue=si(o)?o:n.originalContent||e,this.setContent(n,this.key?n.currentValue:n.originalContent.replace(e,n.currentValue)),this._ref.markForCheck()};if(si(s)){let o=this.translateService.getParsedResult(s,e,this.currentParams);ns(o)?o.subscribe({next:r}):r(o)}else this.translateService.get(e,this.currentParams).subscribe(r)}}getContent(e){return si(e.textContent)?e.textContent:e.data}setContent(e,n){si(e.textContent)?e.textContent=n:e.data=n}ngOnDestroy(){this.onLangChangeSub&&this.onLangChangeSub.unsubscribe(),this.onDefaultLangChangeSub&&this.onDefaultLangChangeSub.unsubscribe(),this.onTranslationChangeSub&&this.onTranslationChangeSub.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Re),x(ot))},t.\u0275dir=le({type:t,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}}),t})(),de=(()=>{class t{constructor(e,n){this.translate=e,this._ref=n,this.value="",this.lastKey=null,this.lastParams=[]}updateValue(e,n,s){let r=o=>{this.value=void 0!==o?o:e,this.lastKey=e,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(s,e,n);ns(o.subscribe)?o.subscribe(r):r(o)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(il(e,this.lastKey)&&il(n,this.lastParams))return this.value;let s;if(si(n[0])&&n.length)if("string"==typeof n[0]&&n[0].length){let r=n[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else"object"==typeof n[0]&&!Array.isArray(n[0])&&(s=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(x(Le,16),x(ot,16))},t.\u0275pipe=An({name:"translate",type:t,pure:!1}),t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),UO=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:nl,useClass:o0},e.compiler||{provide:pu,useClass:u0},e.parser||{provide:du,useClass:c0},e.missingTranslationHandler||{provide:zm,useClass:a0},d0,{provide:$m,useValue:e.isolate},{provide:Wm,useValue:e.useDefaultLang},{provide:Qm,useValue:e.extend},{provide:Km,useValue:e.defaultLanguage},Le]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:nl,useClass:o0},e.compiler||{provide:pu,useClass:u0},e.parser||{provide:du,useClass:c0},e.missingTranslationHandler||{provide:zm,useClass:a0},{provide:$m,useValue:e.isolate},{provide:Wm,useValue:e.useDefaultLang},{provide:Qm,useValue:e.extend},{provide:Km,useValue:e.defaultLanguage},Le]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();class GO{constructor(i,e="/assets/i18n/",n=".json"){this.http=i,this.prefix=e,this.suffix=n}getTranslation(i){return this.http.get(`${this.prefix}${i}${this.suffix}`)}}let p0=(()=>{class t{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(x(wn),x(Re))},t.\u0275dir=le({type:t}),t})(),vr=(()=>{class t extends p0{}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,features:[ut]}),t})();const dn=new be("NgValueAccessor"),jO={provide:dn,useExisting:Ue(()=>Ye),multi:!0},WO=new be("CompositionEventMode");let Ye=(()=>{class t extends p0{constructor(e,n,s){super(e,n),this._compositionMode=s,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function $O(){const t=ts()?ts().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",null==e?"":e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(x(wn),x(Re),x(WO,8))},t.\u0275dir=le({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&C("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},features:[Ne([jO]),ut]}),t})();function Us(t){return null==t||0===t.length}const Rn=new be("NgValidators"),Gs=new be("NgAsyncValidators");function _0(t){return Us(t.value)?{required:!0}:null}function mu(t){return null}function T0(t){return null!=t}function S0(t){const i=Ra(t)?Dn(t):t;return Dh(i),i}function x0(t){let i={};return t.forEach(e=>{i=null!=e?Object.assign(Object.assign({},i),e):i}),0===Object.keys(i).length?null:i}function D0(t,i){return i.map(e=>e(t))}function M0(t){return t.map(i=>function QO(t){return!t.validate}(i)?i:e=>i.validate(e))}function Jm(t){return null!=t?function k0(t){if(!t)return null;const i=t.filter(T0);return 0==i.length?null:function(e){return x0(D0(e,i))}}(M0(t)):null}function Ym(t){return null!=t?function I0(t){if(!t)return null;const i=t.filter(T0);return 0==i.length?null:function(e){return n0(D0(e,i).map(S0)).pipe(et(x0))}}(M0(t)):null}function E0(t,i){return null===t?[i]:Array.isArray(t)?[...t,i]:[t,i]}function Zm(t){return t?Array.isArray(t)?t:[t]:[]}function fu(t,i){return Array.isArray(t)?t.includes(i):t===i}function O0(t,i){const e=Zm(i);return Zm(t).forEach(s=>{fu(e,s)||e.push(s)}),e}function A0(t,i){return Zm(i).filter(e=>!fu(t,e))}class P0{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=Jm(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=Ym(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i){this.control&&this.control.reset(i)}hasError(i,e){return!!this.control&&this.control.hasError(i,e)}getError(i,e){return this.control?this.control.getError(i,e):null}}class is extends P0{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Gn extends P0{get formDirective(){return null}get path(){return null}}class F0{constructor(i){this._cd=i}is(i){var e,n,s;return"submitted"===i?!!(null===(e=this._cd)||void 0===e?void 0:e.submitted):!!(null===(s=null===(n=this._cd)||void 0===n?void 0:n.control)||void 0===s?void 0:s[i])}}let Te=(()=>{class t extends F0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(x(is,2))},t.\u0275dir=le({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&ii("ng-untouched",n.is("untouched"))("ng-touched",n.is("touched"))("ng-pristine",n.is("pristine"))("ng-dirty",n.is("dirty"))("ng-valid",n.is("valid"))("ng-invalid",n.is("invalid"))("ng-pending",n.is("pending"))},features:[ut]}),t})(),Ge=(()=>{class t extends F0{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(x(Gn,10))},t.\u0275dir=le({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&ii("ng-untouched",n.is("untouched"))("ng-touched",n.is("touched"))("ng-pristine",n.is("pristine"))("ng-dirty",n.is("dirty"))("ng-valid",n.is("valid"))("ng-invalid",n.is("invalid"))("ng-pending",n.is("pending"))("ng-submitted",n.is("submitted"))},features:[ut]}),t})();function sl(t,i){tf(t,i),i.valueAccessor.writeValue(t.value),function iA(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&V0(t,i)})}(t,i),function rA(t,i){const e=(n,s)=>{i.valueAccessor.writeValue(n),s&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,i),function sA(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&V0(t,i),"submit"!==t.updateOn&&t.markAsTouched()})}(t,i),function nA(t,i){if(i.valueAccessor.setDisabledState){const e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,i)}function vu(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function tf(t,i){const e=function R0(t){return t._rawValidators}(t);null!==i.validator?t.setValidators(E0(e,i.validator)):"function"==typeof e&&t.setValidators([e]);const n=function L0(t){return t._rawAsyncValidators}(t);null!==i.asyncValidator?t.setAsyncValidators(E0(n,i.asyncValidator)):"function"==typeof n&&t.setAsyncValidators([n]);const s=()=>t.updateValueAndValidity();vu(i._rawValidators,s),vu(i._rawAsyncValidators,s)}function V0(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function rf(t,i){const e=t.indexOf(i);e>-1&&t.splice(e,1)}const rl="VALID",yu="INVALID",Eo="PENDING",ol="DISABLED";function af(t){return(wu(t)?t.validators:t)||null}function U0(t){return Array.isArray(t)?Jm(t):t||null}function lf(t,i){return(wu(i)?i.asyncValidators:t)||null}function G0(t){return Array.isArray(t)?Ym(t):t||null}function wu(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}const cf=t=>t instanceof df;function j0(t){return(t=>t instanceof K0)(t)?t.value:t.getRawValue()}function $0(t,i){const e=cf(t),n=t.controls;if(!(e?Object.keys(n):n).length)throw new re(1e3,"");if(!n[i])throw new re(1001,"")}function W0(t,i){cf(t),t._forEachChild((n,s)=>{if(void 0===i[s])throw new re(1002,"")})}class uf{constructor(i,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=i,this._rawAsyncValidators=e,this._composedValidatorFn=U0(this._rawValidators),this._composedAsyncValidatorFn=G0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get valid(){return this.status===rl}get invalid(){return this.status===yu}get pending(){return this.status==Eo}get disabled(){return this.status===ol}get enabled(){return this.status!==ol}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._rawValidators=i,this._composedValidatorFn=U0(i)}setAsyncValidators(i){this._rawAsyncValidators=i,this._composedAsyncValidatorFn=G0(i)}addValidators(i){this.setValidators(O0(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(O0(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(A0(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(A0(i,this._rawAsyncValidators))}hasValidator(i){return fu(this._rawValidators,i)}hasAsyncValidator(i){return fu(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){this.touched=!0,this._parent&&!i.onlySelf&&this._parent.markAsTouched(i)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(i=>i.markAllAsTouched())}markAsUntouched(i={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}markAsDirty(i={}){this.pristine=!1,this._parent&&!i.onlySelf&&this._parent.markAsDirty(i)}markAsPristine(i={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}markAsPending(i={}){this.status=Eo,!1!==i.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!i.onlySelf&&this._parent.markAsPending(i)}disable(i={}){const e=this._parentMarkedDirty(i.onlySelf);this.status=ol,this.errors=null,this._forEachChild(n=>{n.disable(Object.assign(Object.assign({},i),{onlySelf:!0}))}),this._updateValue(),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},i),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!0))}enable(i={}){const e=this._parentMarkedDirty(i.onlySelf);this.status=rl,this._forEachChild(n=>{n.enable(Object.assign(Object.assign({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},i),{skipPristineCheck:e})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(i){this._parent=i}updateValueAndValidity(i={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rl||this.status===Eo)&&this._runAsyncValidator(i.emitEvent)),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(i)}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ol:rl}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i){if(this.asyncValidator){this.status=Eo,this._hasOwnPendingAsyncValidator=!0;const e=S0(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:i})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(!1!==e.emitEvent)}get(i){return function cA(t,i,e){if(null==i||(Array.isArray(i)||(i=i.split(e)),Array.isArray(i)&&0===i.length))return null;let n=t;return i.forEach(s=>{n=cf(n)?n.controls.hasOwnProperty(s)?n.controls[s]:null:(t=>t instanceof dA)(n)&&n.at(s)||null}),n}(this,i,".")}getError(i,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(i)}_initObservables(){this.valueChanges=new H,this.statusChanges=new H}_calculateStatus(){return this._allControlsDisabled()?ol:this.errors?yu:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Eo)?Eo:this._anyControlsHaveStatus(yu)?yu:rl}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i={}){this.pristine=!this._anyControlsDirty(),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}_updateTouched(i={}){this.touched=this._anyControlsTouched(),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}_isBoxedValue(i){return"object"==typeof i&&null!==i&&2===Object.keys(i).length&&"value"in i&&"disabled"in i}_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){wu(i)&&null!=i.updateOn&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class K0 extends uf{constructor(i=null,e,n){super(af(e),lf(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),wu(e)&&e.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(i)?i.value:i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(n=>n(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){rf(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){rf(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(i){this._isBoxedValue(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}}class df extends uf{constructor(i,e,n){super(af(e),lf(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){W0(this,i),Object.keys(i).forEach(n=>{$0(this,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){null!=i&&(Object.keys(i).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,s)=>{n.reset(i[s],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=j0(e),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>!!n._syncPendingControls()||e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{const n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&i(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(i,e,n)=>((e.enabled||this.disabled)&&(i[n]=e.value),i))}_reduceChildren(i,e){let n=i;return this._forEachChild((s,r)=>{n=e(n,s,r)}),n}_allControlsDisabled(){for(const i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class dA extends uf{constructor(i,e,n){super(af(e),lf(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(i){return this.controls[i]}push(i,e={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,n={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){W0(this,i),i.forEach((n,s)=>{$0(this,s),this.at(s).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){null!=i&&(i.forEach((n,s)=>{this.at(s)&&this.at(s).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((n,s)=>{n.reset(i[s],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(i=>j0(i))}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_syncPendingControls(){let i=this.controls.reduce((e,n)=>!!n._syncPendingControls()||e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,n)=>{i(e,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(const i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}}const pA={provide:Gn,useExisting:Ue(()=>He)},al=(()=>Promise.resolve(null))();let He=(()=>{class t extends Gn{constructor(e,n){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new H,this.form=new df({},Jm(e),Ym(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){al.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),sl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){al.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){al.then(()=>{const n=this._findContainer(e.path),s=new df({});(function B0(t,i){tf(t,i)})(s,e),n.registerControl(e.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){al.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){al.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,function q0(t,i){t._syncPendingControls(),i.forEach(e=>{const n=e.control;"submit"===n.updateOn&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return t.\u0275fac=function(e){return new(e||t)(x(Rn,10),x(Gs,10))},t.\u0275dir=le({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&C("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ne([pA]),ut]}),t})();const mA={provide:is,useExisting:Ue(()=>_e)},Y0=(()=>Promise.resolve(null))();let _e=(()=>{class t extends is{constructor(e,n,s,r,o){super(),this._changeDetectorRef=o,this.control=new K0,this._registered=!1,this.update=new H,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=function sf(t,i){if(!i)return null;let e,n,s;return Array.isArray(i),i.forEach(r=>{r.constructor===Ye?e=r:function lA(t){return Object.getPrototypeOf(t.constructor)===vr}(r)?n=r:s=r}),s||n||e||null}(0,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function nf(t,i){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(i,e.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){sl(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Y0.then(()=>{var n;this.control.setValue(e,{emitViewToModelChange:!1}),null===(n=this._changeDetectorRef)||void 0===n||n.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,s=""===n||n&&"false"!==n;Y0.then(()=>{var r;s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),null===(r=this._changeDetectorRef)||void 0===r||r.markForCheck()})}_getPath(e){return this._parent?function _u(t,i){return[...i.path,t]}(e,this._parent):[e]}}return t.\u0275fac=function(e){return new(e||t)(x(Gn,9),x(Rn,10),x(Gs,10),x(dn,10),x(ot,8))},t.\u0275dir=le({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ne([mA]),ut,mn]}),t})(),ze=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const fA={provide:dn,useExisting:Ue(()=>Tu),multi:!0};let Tu=(()=>{class t extends vr{writeValue(e){this.setProperty("value",null==e?"":e)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&C("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},features:[Ne([fA]),ut]}),t})(),Z0=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();const pf=new be("NgModelWithFormControlWarning");function aw(t){return"number"==typeof t?t:parseFloat(t)}let Cr=(()=>{class t{constructor(){this._validator=mu}ngOnChanges(e){if(this.inputName in e){const n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):mu,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,features:[mn]}),t})();const RA={provide:Rn,useExisting:Ue(()=>Su),multi:!0};let Su=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>aw(e),this.createValidator=e=>function g0(t){return i=>{if(Us(i.value)||Us(t))return null;const e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}(e)}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&ne("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Ne([RA]),ut]}),t})();const LA={provide:Rn,useExisting:Ue(()=>xu),multi:!0};let xu=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>aw(e),this.createValidator=e=>function f0(t){return i=>{if(Us(i.value)||Us(t))return null;const e=parseFloat(i.value);return!isNaN(e)&&ell),multi:!0};let ll=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=e=>function EA(t){return null!=t&&!1!==t&&"false"!=`${t}`}(e),this.createValidator=e=>_0}enabled(e){return e}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&ne("required",n._enabled?"":null)},inputs:{required:"required"},features:[Ne([OA]),ut]}),t})();const NA={provide:Rn,useExisting:Ue(()=>fn),multi:!0};let fn=(()=>{class t extends Cr{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>function ow(t){return"number"==typeof t?t:parseInt(t,10)}(e),this.createValidator=e=>function y0(t){return i=>function m0(t){return null!=t&&"number"==typeof t.length}(i.value)&&i.value.length>t?{maxlength:{requiredLength:t,actualLength:i.value.length}}:null}(e)}}return t.\u0275fac=function(){let i;return function(n){return(i||(i=an(t)))(n||t)}}(),t.\u0275dir=le({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&ne("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Ne([NA]),ut]}),t})(),pw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Z0]]}),t})(),Du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[pw]}),t})(),BA=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:pf,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[pw]}),t})();class hw{}const vs="*";function wi(t,i){return{type:7,name:t,definitions:i,options:{}}}function kt(t,i=null){return{type:4,styles:i,timings:t}}function mw(t,i=null){return{type:2,steps:t,options:i}}function it(t){return{type:6,styles:t,offset:null}}function Cs(t,i,e){return{type:0,name:t,styles:i,options:e}}function Ot(t,i,e=null){return{type:1,expr:t,animation:i,options:e}}function Mu(t,i=null){return{type:8,animation:t,options:i}}function qA(t=null){return{type:9,options:t}}function fw(t,i=null){return{type:10,animation:t,options:i}}function UA(t,i,e=null){return{type:11,selector:t,animation:i,options:e}}function gw(t){Promise.resolve(null).then(t)}class cl{constructor(i=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._onStartFns.push(i)}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){gw(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class _w{constructor(i){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=i;let e=0,n=0,s=0;const r=this.players.length;0==r?gw(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++e==r&&this._onFinish()}),o.onDestroy(()=>{++n==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,u)=>Math.max(o,u.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){const e=i*this.totalTime;this.players.forEach(n=>{const s=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(s)})}getPosition(){const i=this.players.reduce((e,n)=>null===e||n.totalTime>e.totalTime?n:e,null);return null!=i?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}const Ze=!1;function bw(t){return new re(3e3,Ze)}function wP(){return"undefined"!=typeof window&&void 0!==window.document}function vf(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function zs(t){switch(t.length){case 0:return new cl;case 1:return t[0];default:return new _w(t)}}function vw(t,i,e,n,s={},r={}){const o=[],u=[];let h=-1,b=null;if(n.forEach(y=>{const w=y.offset,M=w==h,E=M&&b||{};Object.keys(y).forEach(R=>{let O=R,N=y[R];if("offset"!==R)switch(O=i.normalizePropertyName(O,o),N){case"!":N=s[R];break;case vs:N=r[R];break;default:N=i.normalizeStyleValue(R,O,N,o)}E[O]=N}),M||u.push(E),b=E,h=w}),o.length)throw function dP(t){return new re(3502,Ze)}();return u}function Cf(t,i,e,n){switch(i){case"start":t.onStart(()=>n(e&&yf(e,"start",t)));break;case"done":t.onDone(()=>n(e&&yf(e,"done",t)));break;case"destroy":t.onDestroy(()=>n(e&&yf(e,"destroy",t)))}}function yf(t,i,e){const n=e.totalTime,r=wf(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,null==n?t.totalTime:n,!!e.disabled),o=t._data;return null!=o&&(r._data=o),r}function wf(t,i,e,n,s="",r=0,o){return{element:t,triggerName:i,fromState:e,toState:n,phaseName:s,totalTime:r,disabled:!!o}}function ri(t,i,e){let n;return t instanceof Map?(n=t.get(i),n||t.set(i,n=e)):(n=t[i],n||(n=t[i]=e)),n}function Cw(t){const i=t.indexOf(":");return[t.substring(1,i),t.substr(i+1)]}let Tf=(t,i)=>!1,yw=(t,i,e)=>[],ww=null;function Sf(t){const i=t.parentNode||t.host;return i===ww?null:i}(vf()||"undefined"!=typeof Element)&&(wP()?(ww=(()=>document.documentElement)(),Tf=(t,i)=>{for(;i;){if(i===t)return!0;i=Sf(i)}return!1}):Tf=(t,i)=>t.contains(i),yw=(t,i,e)=>{if(e)return Array.from(t.querySelectorAll(i));const n=t.querySelector(i);return n?[n]:[]});let yr=null,Tw=!1;function Sw(t){yr||(yr=function SP(){return"undefined"!=typeof document?document.body:null}()||{},Tw=!!yr.style&&"WebkitAppearance"in yr.style);let i=!0;return yr.style&&!function TP(t){return"ebkit"==t.substring(1,6)}(t)&&(i=t in yr.style,!i&&Tw&&(i="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in yr.style)),i}const xw=Tf,Dw=yw;let Mw=(()=>{class t{validateStyleProperty(e){return Sw(e)}matchesElement(e,n){return!1}containsElement(e,n){return xw(e,n)}getParentElement(e){return Sf(e)}query(e,n,s){return Dw(e,n,s)}computeStyle(e,n,s){return s||""}animate(e,n,s,r,o,u=[],h){return new cl(s,r)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),xf=(()=>{class t{}return t.NOOP=new Mw,t})();const Df="ng-enter",Iu="ng-leave",Eu="ng-trigger",Ru=".ng-trigger",Iw="ng-animating",Mf=".ng-animating";function wr(t){if("number"==typeof t)return t;const i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:kf(parseFloat(i[1]),i[2])}function kf(t,i){return"s"===i?1e3*t:t}function Lu(t,i,e){return t.hasOwnProperty("duration")?t:function MP(t,i,e){let s,r=0,o="";if("string"==typeof t){const u=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===u)return i.push(bw()),{duration:0,delay:0,easing:""};s=kf(parseFloat(u[1]),u[2]);const h=u[3];null!=h&&(r=kf(parseFloat(h),u[4]));const b=u[5];b&&(o=b)}else s=t;if(!e){let u=!1,h=i.length;s<0&&(i.push(function GA(){return new re(3100,Ze)}()),u=!0),r<0&&(i.push(function zA(){return new re(3101,Ze)}()),u=!0),u&&i.splice(h,0,bw())}return{duration:s,delay:r,easing:o}}(t,i,e)}function Ro(t,i={}){return Object.keys(t).forEach(e=>{i[e]=t[e]}),i}function js(t,i,e={}){if(i)for(let n in t)e[n]=t[n];else Ro(t,e);return e}function Rw(t,i,e){return e?i+":"+e+";":""}function Lw(t){let i="";for(let e=0;e{const s=Ef(n);e&&!e.hasOwnProperty(n)&&(e[n]=t.style[s]),t.style[s]=i[n]}),vf()&&Lw(t))}function Tr(t,i){t.style&&(Object.keys(i).forEach(e=>{const n=Ef(e);t.style[n]=""}),vf()&&Lw(t))}function ul(t){return Array.isArray(t)?1==t.length?t[0]:mw(t):t}const If=new RegExp("{{\\s*(.+?)\\s*}}","g");function Ow(t){let i=[];if("string"==typeof t){let e;for(;e=If.exec(t);)i.push(e[1]);If.lastIndex=0}return i}function Ou(t,i,e){const n=t.toString(),s=n.replace(If,(r,o)=>{let u=i[o];return i.hasOwnProperty(o)||(e.push(function $A(t){return new re(3003,Ze)}()),u=""),u.toString()});return s==n?t:s}function Au(t){const i=[];let e=t.next();for(;!e.done;)i.push(e.value),e=t.next();return i}const IP=/-+([a-z0-9])/g;function Ef(t){return t.replace(IP,(...i)=>i[1].toUpperCase())}function EP(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function oi(t,i,e){switch(i.type){case 7:return t.visitTrigger(i,e);case 0:return t.visitState(i,e);case 1:return t.visitTransition(i,e);case 2:return t.visitSequence(i,e);case 3:return t.visitGroup(i,e);case 4:return t.visitAnimate(i,e);case 5:return t.visitKeyframes(i,e);case 6:return t.visitStyle(i,e);case 8:return t.visitReference(i,e);case 9:return t.visitAnimateChild(i,e);case 10:return t.visitAnimateRef(i,e);case 11:return t.visitQuery(i,e);case 12:return t.visitStagger(i,e);default:throw function WA(t){return new re(3004,Ze)}()}}function Aw(t,i){return window.getComputedStyle(t)[i]}function FP(t,i){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(n=>function NP(t,i,e){if(":"==t[0]){const h=function VP(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}(t,e);if("function"==typeof h)return void i.push(h);t=h}const n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return e.push(function oP(t){return new re(3015,Ze)}()),i;const s=n[1],r=n[2],o=n[3];i.push(Pw(s,o));"<"==r[0]&&!("*"==s&&"*"==o)&&i.push(Pw(o,s))}(n,e,i)):e.push(t),e}const Vu=new Set(["true","1"]),Bu=new Set(["false","0"]);function Pw(t,i){const e=Vu.has(t)||Bu.has(t),n=Vu.has(i)||Bu.has(i);return(s,r)=>{let o="*"==t||t==s,u="*"==i||i==r;return!o&&e&&"boolean"==typeof s&&(o=s?Vu.has(t):Bu.has(t)),!u&&n&&"boolean"==typeof r&&(u=r?Vu.has(i):Bu.has(i)),o&&u}}const BP=new RegExp("s*:selfs*,?","g");function Rf(t,i,e,n){return new HP(t).build(i,e,n)}class HP{constructor(i){this._driver=i}build(i,e,n){const s=new GP(e);this._resetContextStyleTimingState(s);const r=oi(this,ul(i),s);return s.unsupportedCSSPropertiesFound.size&&s.unsupportedCSSPropertiesFound.keys(),r}_resetContextStyleTimingState(i){i.currentQuerySelector="",i.collectedStyles={},i.collectedStyles[""]={},i.currentTime=0}visitTrigger(i,e){let n=e.queryCount=0,s=e.depCount=0;const r=[],o=[];return"@"==i.name.charAt(0)&&e.errors.push(function QA(){return new re(3006,Ze)}()),i.definitions.forEach(u=>{if(this._resetContextStyleTimingState(e),0==u.type){const h=u,b=h.name;b.toString().split(/\s*,\s*/).forEach(y=>{h.name=y,r.push(this.visitState(h,e))}),h.name=b}else if(1==u.type){const h=this.visitTransition(u,e);n+=h.queryCount,s+=h.depCount,o.push(h)}else e.errors.push(function JA(){return new re(3007,Ze)}())}),{type:7,name:i.name,states:r,transitions:o,queryCount:n,depCount:s,options:null}}visitState(i,e){const n=this.visitStyle(i.styles,e),s=i.options&&i.options.params||null;if(n.containsDynamicStyles){const r=new Set,o=s||{};n.styles.forEach(u=>{if(Hu(u)){const h=u;Object.keys(h).forEach(b=>{Ow(h[b]).forEach(y=>{o.hasOwnProperty(y)||r.add(y)})})}}),r.size&&(Au(r.values()),e.errors.push(function YA(t,i){return new re(3008,Ze)}()))}return{type:0,name:i.name,style:n,options:s?{params:s}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;const n=oi(this,ul(i.animation),e);return{type:1,matchers:FP(i.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:Sr(i.options)}}visitSequence(i,e){return{type:2,steps:i.steps.map(n=>oi(this,n,e)),options:Sr(i.options)}}visitGroup(i,e){const n=e.currentTime;let s=0;const r=i.steps.map(o=>{e.currentTime=n;const u=oi(this,o,e);return s=Math.max(s,e.currentTime),u});return e.currentTime=s,{type:3,steps:r,options:Sr(i.options)}}visitAnimate(i,e){const n=function jP(t,i){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return Lf(Lu(t,i).duration,0,"");const e=t;if(e.split(/\s+/).some(r=>"{"==r.charAt(0)&&"{"==r.charAt(1))){const r=Lf(0,0,"");return r.dynamic=!0,r.strValue=e,r}const s=Lu(e,i);return Lf(s.duration,s.delay,s.easing)}(i.timings,e.errors);e.currentAnimateTimings=n;let s,r=i.styles?i.styles:it({});if(5==r.type)s=this.visitKeyframes(r,e);else{let o=i.styles,u=!1;if(!o){u=!0;const b={};n.easing&&(b.easing=n.easing),o=it(b)}e.currentTime+=n.duration+n.delay;const h=this.visitStyle(o,e);h.isEmptyStep=u,s=h}return e.currentAnimateTimings=null,{type:4,timings:n,style:s,options:null}}visitStyle(i,e){const n=this._makeStyleAst(i,e);return this._validateStyleAst(n,e),n}_makeStyleAst(i,e){const n=[];Array.isArray(i.styles)?i.styles.forEach(o=>{"string"==typeof o?o==vs?n.push(o):e.errors.push(function ZA(t){return new re(3002,Ze)}()):n.push(o)}):n.push(i.styles);let s=!1,r=null;return n.forEach(o=>{if(Hu(o)){const u=o,h=u.easing;if(h&&(r=h,delete u.easing),!s)for(let b in u)if(u[b].toString().indexOf("{{")>=0){s=!0;break}}}),{type:6,styles:n,easing:r,offset:i.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(i,e){const n=e.currentAnimateTimings;let s=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),i.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(u=>{if(!this._driver.validateStyleProperty(u))return delete o[u],void e.unsupportedCSSPropertiesFound.add(u);const h=e.collectedStyles[e.currentQuerySelector],b=h[u];let y=!0;b&&(r!=s&&r>=b.startTime&&s<=b.endTime&&(e.errors.push(function XA(t,i,e,n,s){return new re(3010,Ze)}()),y=!1),r=b.startTime),y&&(h[u]={startTime:r,endTime:s}),e.options&&function kP(t,i,e){const n=i.params||{},s=Ow(t);s.length&&s.forEach(r=>{n.hasOwnProperty(r)||e.push(function jA(t){return new re(3001,Ze)}())})}(o[u],e.options,e.errors)})})}visitKeyframes(i,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function eP(){return new re(3011,Ze)}()),n;let r=0;const o=[];let u=!1,h=!1,b=0;const y=i.steps.map(U=>{const P=this._makeStyleAst(U,e);let J=null!=P.offset?P.offset:function zP(t){if("string"==typeof t)return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(Hu(e)&&e.hasOwnProperty("offset")){const n=e;i=parseFloat(n.offset),delete n.offset}});else if(Hu(t)&&t.hasOwnProperty("offset")){const e=t;i=parseFloat(e.offset),delete e.offset}return i}(P.styles),se=0;return null!=J&&(r++,se=P.offset=J),h=h||se<0||se>1,u=u||se0&&r{const J=M>0?P==E?1:M*P:o[P],se=J*N;e.currentTime=R+O.delay+se,O.duration=se,this._validateStyleAst(U,e),U.offset=J,n.styles.push(U)}),n}visitReference(i,e){return{type:8,animation:oi(this,ul(i.animation),e),options:Sr(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:9,options:Sr(i.options)}}visitAnimateRef(i,e){return{type:10,animation:this.visitReference(i.animation,e),options:Sr(i.options)}}visitQuery(i,e){const n=e.currentQuerySelector,s=i.options||{};e.queryCount++,e.currentQuery=i;const[r,o]=function qP(t){const i=!!t.split(/\s*,\s*/).find(e=>":self"==e);return i&&(t=t.replace(BP,"")),t=t.replace(/@\*/g,Ru).replace(/@\w+/g,e=>Ru+"-"+e.substr(1)).replace(/:animating/g,Mf),[t,i]}(i.selector);e.currentQuerySelector=n.length?n+" "+r:r,ri(e.collectedStyles,e.currentQuerySelector,{});const u=oi(this,ul(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:s.limit||0,optional:!!s.optional,includeSelf:o,animation:u,originalSelector:i.selector,options:Sr(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(function sP(){return new re(3013,Ze)}());const n="full"===i.timings?{duration:0,delay:0,easing:"full"}:Lu(i.timings,e.errors,!0);return{type:12,animation:oi(this,ul(i.animation),e),timings:n,options:null}}}class GP{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Hu(t){return!Array.isArray(t)&&"object"==typeof t}function Sr(t){return t?(t=Ro(t)).params&&(t.params=function UP(t){return t?Ro(t):null}(t.params)):t={},t}function Lf(t,i,e){return{duration:t,delay:i,easing:e}}function Of(t,i,e,n,s,r,o=null,u=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:n,duration:s,delay:r,totalTime:s+r,easing:o,subTimeline:u}}class qu{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,e){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}}const KP=new RegExp(":enter","g"),JP=new RegExp(":leave","g");function Af(t,i,e,n,s,r={},o={},u,h,b=[]){return(new YP).buildKeyframes(t,i,e,n,s,r,o,u,h,b)}class YP{buildKeyframes(i,e,n,s,r,o,u,h,b,y=[]){b=b||new qu;const w=new Pf(i,e,b,s,r,y,[]);w.options=h,w.currentTimeline.setStyles([o],null,w.errors,h),oi(this,n,w);const M=w.timelines.filter(E=>E.containsAnimation());if(Object.keys(u).length){let E;for(let R=M.length-1;R>=0;R--){const O=M[R];if(O.element===e){E=O;break}}E&&!E.allowOnlyTimelineStyles()&&E.setStyles([u],null,w.errors,h)}return M.length?M.map(E=>E.buildKeyframes()):[Of(e,[],[],[],0,0,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){const n=e.subInstructions.get(e.element);if(n){const s=e.createSubContext(i.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,s,s.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=i}visitAnimateRef(i,e){const n=e.createSubContext(i.options);n.transformIntoNewTimeline(),this.visitReference(i.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=i}_visitSubInstructions(i,e,n){let r=e.currentTimeline.currentTime;const o=null!=n.duration?wr(n.duration):null,u=null!=n.delay?wr(n.delay):null;return 0!==o&&i.forEach(h=>{const b=e.appendInstructionToTimeline(h,o,u);r=Math.max(r,b.duration+b.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),oi(this,i.animation,e),e.previousNode=i}visitSequence(i,e){const n=e.subContextCount;let s=e;const r=i.options;if(r&&(r.params||r.delay)&&(s=e.createSubContext(r),s.transformIntoNewTimeline(),null!=r.delay)){6==s.previousNode.type&&(s.currentTimeline.snapshotCurrentStyles(),s.previousNode=Uu);const o=wr(r.delay);s.delayNextStep(o)}i.steps.length&&(i.steps.forEach(o=>oi(this,o,s)),s.currentTimeline.applyStylesToKeyframe(),s.subContextCount>n&&s.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){const n=[];let s=e.currentTimeline.currentTime;const r=i.options&&i.options.delay?wr(i.options.delay):0;i.steps.forEach(o=>{const u=e.createSubContext(i.options);r&&u.delayNextStep(r),oi(this,o,u),s=Math.max(s,u.currentTimeline.currentTime),n.push(u.currentTimeline)}),n.forEach(o=>e.currentTimeline.mergeTimelineCollectedStyles(o)),e.transformIntoNewTimeline(s),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){const n=i.strValue;return Lu(e.params?Ou(n,e.params,e.errors):n,e.errors)}return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){const n=e.currentAnimateTimings=this._visitTiming(i.timings,e),s=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),s.snapshotCurrentStyles());const r=i.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),s.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){const n=e.currentTimeline,s=e.currentAnimateTimings;!s&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=s&&s.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(r):n.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){const n=e.currentAnimateTimings,s=e.currentTimeline.duration,r=n.duration,u=e.createSubContext().currentTimeline;u.easing=n.easing,i.styles.forEach(h=>{u.forwardTime((h.offset||0)*r),u.setStyles(h.styles,h.easing,e.errors,e.options),u.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(u),e.transformIntoNewTimeline(s+r),e.previousNode=i}visitQuery(i,e){const n=e.currentTimeline.currentTime,s=i.options||{},r=s.delay?wr(s.delay):0;r&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Uu);let o=n;const u=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!s.optional,e.errors);e.currentQueryTotal=u.length;let h=null;u.forEach((b,y)=>{e.currentQueryIndex=y;const w=e.createSubContext(i.options,b);r&&w.delayNextStep(r),b===e.element&&(h=w.currentTimeline),oi(this,i.animation,w),w.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,w.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),h&&(e.currentTimeline.mergeTimelineCollectedStyles(h),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){const n=e.parentContext,s=e.currentTimeline,r=i.timings,o=Math.abs(r.duration),u=o*(e.currentQueryTotal-1);let h=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":h=u-h;break;case"full":h=n.currentStaggerTime}const y=e.currentTimeline;h&&y.delayNextStep(h);const w=y.currentTime;oi(this,i.animation,e),e.previousNode=i,n.currentStaggerTime=s.currentTime-w+(s.startTime-n.currentTimeline.startTime)}}const Uu={};class Pf{constructor(i,e,n,s,r,o,u,h){this._driver=i,this.element=e,this.subInstructions=n,this._enterClassName=s,this._leaveClassName=r,this.errors=o,this.timelines=u,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Uu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=h||new Gu(this._driver,e,0),u.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;const n=i;let s=this.options;null!=n.duration&&(s.duration=wr(n.duration)),null!=n.delay&&(s.delay=wr(n.delay));const r=n.params;if(r){let o=s.params;o||(o=this.options.params={}),Object.keys(r).forEach(u=>{(!e||!o.hasOwnProperty(u))&&(o[u]=Ou(r[u],o,this.errors))})}}_copyOptions(){const i={};if(this.options){const e=this.options.params;if(e){const n=i.params={};Object.keys(e).forEach(s=>{n[s]=e[s]})}}return i}createSubContext(i=null,e,n){const s=e||this.element,r=new Pf(this._driver,s,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(s,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=Uu,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,n){const s={duration:null!=e?e:i.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+i.delay,easing:""},r=new ZP(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,s,i.stretchStartingKeyframe);return this.timelines.push(r),s}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,n,s,r,o){let u=[];if(s&&u.push(this.element),i.length>0){i=(i=i.replace(KP,"."+this._enterClassName)).replace(JP,"."+this._leaveClassName);let b=this._driver.query(this.element,i,1!=n);0!==n&&(b=n<0?b.slice(b.length+n,b.length):b.slice(0,n)),u.push(...b)}return!r&&0==u.length&&o.push(function rP(t){return new re(3014,Ze)}()),u}}class Gu{constructor(i,e,n,s){this._driver=i,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=s,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(i){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new Gu(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles[i]=e,this._globalTimelineStyles[i]=e,this._styleSummary[i]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&(this._previousKeyframe.easing=i),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||vs,this._currentKeyframe[e]=vs}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,n,s){e&&(this._previousKeyframe.easing=e);const r=s&&s.params||{},o=function XP(t,i){const e={};let n;return t.forEach(s=>{"*"===s?(n=n||Object.keys(i),n.forEach(r=>{e[r]=vs})):js(s,!1,e)}),e}(i,this._globalTimelineStyles);Object.keys(o).forEach(u=>{const h=Ou(o[u],r,n);this._pendingStyles[u]=h,this._localTimelineStyles.hasOwnProperty(u)||(this._backFill[u]=this._globalTimelineStyles.hasOwnProperty(u)?this._globalTimelineStyles[u]:vs),this._updateStyle(u,h)})}applyStylesToKeyframe(){const i=this._pendingStyles,e=Object.keys(i);0!=e.length&&(this._pendingStyles={},e.forEach(n=>{this._currentKeyframe[n]=i[n]}),Object.keys(this._localTimelineStyles).forEach(n=>{this._currentKeyframe.hasOwnProperty(n)||(this._currentKeyframe[n]=this._localTimelineStyles[n])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(i=>{const e=this._localTimelineStyles[i];this._pendingStyles[i]=e,this._updateStyle(i,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){Object.keys(i._styleSummary).forEach(e=>{const n=this._styleSummary[e],s=i._styleSummary[e];(!n||s.time>n.time)&&this._updateStyle(e,s.value)})}buildKeyframes(){this.applyStylesToKeyframe();const i=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let s=[];this._keyframes.forEach((u,h)=>{const b=js(u,!0);Object.keys(b).forEach(y=>{const w=b[y];"!"==w?i.add(y):w==vs&&e.add(y)}),n||(b.offset=h/this.duration),s.push(b)});const r=i.size?Au(i.values()):[],o=e.size?Au(e.values()):[];if(n){const u=s[0],h=Ro(u);u.offset=0,h.offset=1,s=[u,h]}return Of(this.element,s,r,o,this.duration,this.startTime,this.easing,!1)}}class ZP extends Gu{constructor(i,e,n,s,r,o,u=!1){super(i,e,o.delay),this.keyframes=n,this.preStyleProps=s,this.postStyleProps=r,this._stretchStartingKeyframe=u,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:n,easing:s}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],o=n+e,u=e/o,h=js(i[0],!1);h.offset=0,r.push(h);const b=js(i[0],!1);b.offset=Vw(u),r.push(b);const y=i.length-1;for(let w=1;w<=y;w++){let M=js(i[w],!1);M.offset=Vw((e+M.offset*n)/o),r.push(M)}n=o,e=0,s="",i=r}return Of(this.element,i,this.preStyleProps,this.postStyleProps,n,e,s,!0)}}function Vw(t,i=3){const e=Math.pow(10,i-1);return Math.round(t*e)/e}class Ff{}class eF extends Ff{normalizePropertyName(i,e){return Ef(i)}normalizeStyleValue(i,e,n,s){let r="";const o=n.toString().trim();if(tF[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const u=n.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&0==u[1].length&&s.push(function KA(t,i){return new re(3005,Ze)}())}return o+r}}const tF=(()=>function nF(t){const i={};return t.forEach(e=>i[e]=!0),i}("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".split(",")))();function Bw(t,i,e,n,s,r,o,u,h,b,y,w,M){return{type:0,element:t,triggerName:i,isRemovalTransition:s,fromState:e,fromStyles:r,toState:n,toStyles:o,timelines:u,queriedElements:h,preStyleProps:b,postStyleProps:y,totalTime:w,errors:M}}const Nf={};class Hw{constructor(i,e,n){this._triggerName=i,this.ast=e,this._stateStyles=n}match(i,e,n,s){return function iF(t,i,e,n,s){return t.some(r=>r(i,e,n,s))}(this.ast.matchers,i,e,n,s)}buildStyles(i,e,n){const s=this._stateStyles["*"],r=this._stateStyles[i],o=s?s.buildStyles(e,n):{};return r?r.buildStyles(e,n):o}build(i,e,n,s,r,o,u,h,b,y){const w=[],M=this.ast.options&&this.ast.options.params||Nf,R=this.buildStyles(n,u&&u.params||Nf,w),O=h&&h.params||Nf,N=this.buildStyles(s,O,w),U=new Set,P=new Map,J=new Map,se="void"===s,Me={params:Object.assign(Object.assign({},M),O)},ht=y?[]:Af(i,e,this.ast.animation,r,o,R,N,Me,b,w);let Ct=0;if(ht.forEach(At=>{Ct=Math.max(At.duration+At.delay,Ct)}),w.length)return Bw(e,this._triggerName,n,s,se,R,N,[],[],P,J,Ct,w);ht.forEach(At=>{const pn=At.element,$o=ri(P,pn,{});At.preStyleProps.forEach(ji=>$o[ji]=!0);const Ds=ri(J,pn,{});At.postStyleProps.forEach(ji=>Ds[ji]=!0),pn!==e&&U.add(pn)});const zt=Au(U.values());return Bw(e,this._triggerName,n,s,se,R,N,ht,zt,P,J,Ct)}}class sF{constructor(i,e,n){this.styles=i,this.defaultParams=e,this.normalizer=n}buildStyles(i,e){const n={},s=Ro(this.defaultParams);return Object.keys(i).forEach(r=>{const o=i[r];null!=o&&(s[r]=o)}),this.styles.styles.forEach(r=>{if("string"!=typeof r){const o=r;Object.keys(o).forEach(u=>{let h=o[u];h.length>1&&(h=Ou(h,s,e));const b=this.normalizer.normalizePropertyName(u,e);h=this.normalizer.normalizeStyleValue(u,b,h,e),n[b]=h})}}),n}}class oF{constructor(i,e,n){this.name=i,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states={},e.states.forEach(s=>{this.states[s.name]=new sF(s.style,s.options&&s.options.params||{},n)}),qw(this.states,"true","1"),qw(this.states,"false","0"),e.transitions.forEach(s=>{this.transitionFactories.push(new Hw(i,s,this.states))}),this.fallbackTransition=function aF(t,i,e){return new Hw(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,u)=>!0],options:null,queryCount:0,depCount:0},i)}(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,n,s){return this.transitionFactories.find(o=>o.match(i,e,n,s))||null}matchStyles(i,e,n){return this.fallbackTransition.buildStyles(i,e,n)}}function qw(t,i,e){t.hasOwnProperty(i)?t.hasOwnProperty(e)||(t[e]=t[i]):t.hasOwnProperty(e)&&(t[i]=t[e])}const lF=new qu;class cF{constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(i,e){const n=[],r=Rf(this._driver,e,n,[]);if(n.length)throw function pP(t){return new re(3503,Ze)}();this._animations[i]=r}_buildPlayer(i,e,n){const s=i.element,r=vw(0,this._normalizer,0,i.keyframes,e,n);return this._driver.animate(s,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,n={}){const s=[],r=this._animations[i];let o;const u=new Map;if(r?(o=Af(this._driver,e,r,Df,Iu,{},{},n,lF,s),o.forEach(y=>{const w=ri(u,y.element,{});y.postStyleProps.forEach(M=>w[M]=null)})):(s.push(function hP(){return new re(3300,Ze)}()),o=[]),s.length)throw function mP(t){return new re(3504,Ze)}();u.forEach((y,w)=>{Object.keys(y).forEach(M=>{y[M]=this._driver.computeStyle(w,M,vs)})});const b=zs(o.map(y=>{const w=u.get(y.element);return this._buildPlayer(y,{},w)}));return this._playersById[i]=b,b.onDestroy(()=>this.destroy(i)),this.players.push(b),b}destroy(i){const e=this._getPlayer(i);e.destroy(),delete this._playersById[i];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(i){const e=this._playersById[i];if(!e)throw function fP(t){return new re(3301,Ze)}();return e}listen(i,e,n,s){const r=wf(e,"","","");return Cf(this._getPlayer(i),n,r,s),()=>{}}command(i,e,n,s){if("register"==n)return void this.register(i,s[0]);if("create"==n)return void this.create(i,e,s[0]||{});const r=this._getPlayer(i);switch(n){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(s[0]));break;case"destroy":this.destroy(i)}}}const Uw="ng-animate-queued",Vf="ng-animate-disabled",mF=[],Gw={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},fF={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ti="__ng_removed";class Bf{constructor(i,e=""){this.namespaceId=e;const n=i&&i.hasOwnProperty("value");if(this.value=function vF(t){return null!=t?t:null}(n?i.value:i),n){const r=Ro(i);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(i){const e=i.params;if(e){const n=this.options.params;Object.keys(e).forEach(s=>{null==n[s]&&(n[s]=e[s])})}}}const dl="void",Hf=new Bf(dl);class gF{constructor(i,e,n){this.id=i,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,Si(e,this._hostClassName)}listen(i,e,n,s){if(!this._triggers.hasOwnProperty(e))throw function gP(t,i){return new re(3302,Ze)}();if(null==n||0==n.length)throw function _P(t){return new re(3303,Ze)}();if(!function CF(t){return"start"==t||"done"==t}(n))throw function bP(t,i){return new re(3400,Ze)}();const r=ri(this._elementListeners,i,[]),o={name:e,phase:n,callback:s};r.push(o);const u=ri(this._engine.statesByElement,i,{});return u.hasOwnProperty(e)||(Si(i,Eu),Si(i,Eu+"-"+e),u[e]=Hf),()=>{this._engine.afterFlush(()=>{const h=r.indexOf(o);h>=0&&r.splice(h,1),this._triggers[e]||delete u[e]})}}register(i,e){return!this._triggers[i]&&(this._triggers[i]=e,!0)}_getTrigger(i){const e=this._triggers[i];if(!e)throw function vP(t){return new re(3401,Ze)}();return e}trigger(i,e,n,s=!0){const r=this._getTrigger(e),o=new qf(this.id,e,i);let u=this._engine.statesByElement.get(i);u||(Si(i,Eu),Si(i,Eu+"-"+e),this._engine.statesByElement.set(i,u={}));let h=u[e];const b=new Bf(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&h&&b.absorbOptions(h.options),u[e]=b,h||(h=Hf),b.value!==dl&&h.value===b.value){if(!function TF(t,i){const e=Object.keys(t),n=Object.keys(i);if(e.length!=n.length)return!1;for(let s=0;s{Tr(i,N),ss(i,U)})}return}const M=ri(this._engine.playersByElement,i,[]);M.forEach(O=>{O.namespaceId==this.id&&O.triggerName==e&&O.queued&&O.destroy()});let E=r.matchTransition(h.value,b.value,i,b.params),R=!1;if(!E){if(!s)return;E=r.fallbackTransition,R=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:E,fromState:h,toState:b,player:o,isFallbackTransition:R}),R||(Si(i,Uw),o.onStart(()=>{Lo(i,Uw)})),o.onDone(()=>{let O=this.players.indexOf(o);O>=0&&this.players.splice(O,1);const N=this._engine.playersByElement.get(i);if(N){let U=N.indexOf(o);U>=0&&N.splice(U,1)}}),this.players.push(o),M.push(o),o}deregister(i){delete this._triggers[i],this._engine.statesByElement.forEach((e,n)=>{delete e[i]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(s=>s.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);const e=this._engine.playersByElement.get(i);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){const n=this._engine.driver.query(i,Ru,!0);n.forEach(s=>{if(s[Ti])return;const r=this._engine.fetchNamespacesByElement(s);r.size?r.forEach(o=>o.triggerLeaveAnimation(s,e,!1,!0)):this.clearElementCache(s)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(s=>this.clearElementCache(s)))}triggerLeaveAnimation(i,e,n,s){const r=this._engine.statesByElement.get(i),o=new Map;if(r){const u=[];if(Object.keys(r).forEach(h=>{if(o.set(h,r[h].value),this._triggers[h]){const b=this.trigger(i,h,dl,s);b&&u.push(b)}}),u.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,o),n&&zs(u).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){const e=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(e&&n){const s=new Set;e.forEach(r=>{const o=r.name;if(s.has(o))return;s.add(o);const h=this._triggers[o].fallbackTransition,b=n[o]||Hf,y=new Bf(dl),w=new qf(this.id,o,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:o,transition:h,fromState:b,toState:y,player:w,isFallbackTransition:!0})})}}removeNode(i,e){const n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let s=!1;if(n.totalAnimations){const r=n.players.length?n.playersByQueriedElement.get(i):[];if(r&&r.length)s=!0;else{let o=i;for(;o=o.parentNode;)if(n.statesByElement.get(o)){s=!0;break}}}if(this.prepareLeaveAnimationListeners(i),s)n.markElementAsRemoved(this.id,i,!1,e);else{const r=i[Ti];(!r||r===Gw)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,e))}}insertNode(i,e){Si(i,this._hostClassName)}drainQueuedTransitions(i){const e=[];return this._queue.forEach(n=>{const s=n.player;if(s.destroyed)return;const r=n.element,o=this._elementListeners.get(r);o&&o.forEach(u=>{if(u.name==n.triggerName){const h=wf(r,n.triggerName,n.fromState.value,n.toState.value);h._data=i,Cf(n.player,u.phase,h,u.callback)}}),s.markedForDestroy?this._engine.afterFlush(()=>{s.destroy()}):e.push(n)}),this._queue=[],e.sort((n,s)=>{const r=n.transition.ast.depCount,o=s.transition.ast.depCount;return 0==r||0==o?r-o:this._engine.driver.containsElement(n.element,s.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}elementContainsData(i){let e=!1;return this._elementListeners.has(i)&&(e=!0),e=!!this._queue.find(n=>n.element===i)||e,e}}class _F{constructor(i,e,n){this.bodyNode=i,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,r)=>{}}_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}get queuedPlayers(){const i=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,e){const n=new gF(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,e){const n=this._namespaceList,s=this.namespacesByHostElement,r=n.length-1;if(r>=0){let o=!1;if(void 0!==this.driver.getParentElement){let u=this.driver.getParentElement(e);for(;u;){const h=s.get(u);if(h){const b=n.indexOf(h);n.splice(b+1,0,i),o=!0;break}u=this.driver.getParentElement(u)}}else for(let u=r;u>=0;u--)if(this.driver.containsElement(n[u].hostElement,e)){n.splice(u+1,0,i),o=!0;break}o||n.unshift(i)}else n.push(i);return s.set(e,i),i}register(i,e){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,e)),n}registerTrigger(i,e,n){let s=this._namespaceLookup[i];s&&s.register(e,n)&&this.totalAnimations++}destroy(i,e){if(!i)return;const n=this._fetchNamespace(i);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[i];const s=this._namespaceList.indexOf(n);s>=0&&this._namespaceList.splice(s,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){const e=new Set,n=this.statesByElement.get(i);if(n){const s=Object.keys(n);for(let r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(i){const o=this._fetchNamespace(i);o&&o.insertNode(e,n)}s&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),Si(i,Vf)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),Lo(i,Vf))}removeNode(i,e,n,s){if(zu(e)){const r=i?this._fetchNamespace(i):null;if(r?r.removeNode(e,s):this.markElementAsRemoved(i,e,!1,s),n){const o=this.namespacesByHostElement.get(e);o&&o.id!==i&&o.removeNode(e,s)}}else this._onRemovalComplete(e,s)}markElementAsRemoved(i,e,n,s,r){this.collectedLeaveElements.push(e),e[Ti]={namespaceId:i,setForRemoval:s,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,n,s,r){return zu(e)?this._fetchNamespace(i).listen(e,n,s,r):()=>{}}_buildInstruction(i,e,n,s,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,s,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,Ru,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(i,Mf,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){const e=this.playersByElement.get(i);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){const e=this.playersByQueriedElement.get(i);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return zs(this.players).onDone(()=>i());i()})}processLeaveNode(i){var e;const n=i[Ti];if(n&&n.setForRemoval){if(i[Ti]=Gw,n.namespaceId){this.destroyInnerAnimations(i);const s=this._fetchNamespace(n.namespaceId);s&&s.clearElementCache(i)}this._onRemovalComplete(i,n.setForRemoval)}(null===(e=i.classList)||void 0===e?void 0:e.contains(Vf))&&this.markElementAsDisabled(i,!1),this.driver.query(i,".ng-animate-disabled",!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,s)=>this._balanceNamespaceList(n,s)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],e.length?zs(e).onDone(()=>{n.forEach(s=>s())}):n.forEach(s=>s())}}reportError(i){throw function CP(t){return new re(3402,Ze)}()}_flushAnimations(i,e){const n=new qu,s=[],r=new Map,o=[],u=new Map,h=new Map,b=new Map,y=new Set;this.disabledNodes.forEach(ae=>{y.add(ae);const fe=this.driver.query(ae,".ng-animate-queued",!0);for(let Se=0;Se{const Se=Df+O++;R.set(fe,Se),ae.forEach(rt=>Si(rt,Se))});const N=[],U=new Set,P=new Set;for(let ae=0;aeU.add(rt)):P.add(fe))}const J=new Map,se=$w(M,Array.from(U));se.forEach((ae,fe)=>{const Se=Iu+O++;J.set(fe,Se),ae.forEach(rt=>Si(rt,Se))}),i.push(()=>{E.forEach((ae,fe)=>{const Se=R.get(fe);ae.forEach(rt=>Lo(rt,Se))}),se.forEach((ae,fe)=>{const Se=J.get(fe);ae.forEach(rt=>Lo(rt,Se))}),N.forEach(ae=>{this.processLeaveNode(ae)})});const Me=[],ht=[];for(let ae=this._namespaceList.length-1;ae>=0;ae--)this._namespaceList[ae].drainQueuedTransitions(e).forEach(Se=>{const rt=Se.player,_n=Se.element;if(Me.push(rt),this.collectedEnterElements.length){const jn=_n[Ti];if(jn&&jn.setForMove){if(jn.previousTriggersValues&&jn.previousTriggersValues.has(Se.triggerName)){const Pr=jn.previousTriggersValues.get(Se.triggerName),tr=this.statesByElement.get(Se.element);tr&&tr[Se.triggerName]&&(tr[Se.triggerName].value=Pr)}return void rt.destroy()}}const ls=!w||!this.driver.containsElement(w,_n),ui=J.get(_n),er=R.get(_n),jt=this._buildInstruction(Se,n,er,ui,ls);if(jt.errors&&jt.errors.length)return void ht.push(jt);if(ls)return rt.onStart(()=>Tr(_n,jt.fromStyles)),rt.onDestroy(()=>ss(_n,jt.toStyles)),void s.push(rt);if(Se.isFallbackTransition)return rt.onStart(()=>Tr(_n,jt.fromStyles)),rt.onDestroy(()=>ss(_n,jt.toStyles)),void s.push(rt);const ES=[];jt.timelines.forEach(jn=>{jn.stretchStartingKeyframe=!0,this.disabledNodes.has(jn.element)||ES.push(jn)}),jt.timelines=ES,n.append(_n,jt.timelines),o.push({instruction:jt,player:rt,element:_n}),jt.queriedElements.forEach(jn=>ri(u,jn,[]).push(rt)),jt.preStyleProps.forEach((jn,Pr)=>{const tr=Object.keys(jn);if(tr.length){let Fr=h.get(Pr);Fr||h.set(Pr,Fr=new Set),tr.forEach(xg=>Fr.add(xg))}}),jt.postStyleProps.forEach((jn,Pr)=>{const tr=Object.keys(jn);let Fr=b.get(Pr);Fr||b.set(Pr,Fr=new Set),tr.forEach(xg=>Fr.add(xg))})});if(ht.length){const ae=[];ht.forEach(fe=>{ae.push(function yP(t,i){return new re(3505,Ze)}())}),Me.forEach(fe=>fe.destroy()),this.reportError(ae)}const Ct=new Map,zt=new Map;o.forEach(ae=>{const fe=ae.element;n.has(fe)&&(zt.set(fe,fe),this._beforeAnimationBuild(ae.player.namespaceId,ae.instruction,Ct))}),s.forEach(ae=>{const fe=ae.element;this._getPreviousPlayers(fe,!1,ae.namespaceId,ae.triggerName,null).forEach(rt=>{ri(Ct,fe,[]).push(rt),rt.destroy()})});const At=N.filter(ae=>Kw(ae,h,b)),pn=new Map;jw(pn,this.driver,P,b,vs).forEach(ae=>{Kw(ae,h,b)&&At.push(ae)});const Ds=new Map;E.forEach((ae,fe)=>{jw(Ds,this.driver,new Set(ae),h,"!")}),At.forEach(ae=>{const fe=pn.get(ae),Se=Ds.get(ae);pn.set(ae,Object.assign(Object.assign({},fe),Se))});const ji=[],Wo=[],Ko={};o.forEach(ae=>{const{element:fe,player:Se,instruction:rt}=ae;if(n.has(fe)){if(y.has(fe))return Se.onDestroy(()=>ss(fe,rt.toStyles)),Se.disabled=!0,Se.overrideTotalTime(rt.totalTime),void s.push(Se);let _n=Ko;if(zt.size>1){let ui=fe;const er=[];for(;ui=ui.parentNode;){const jt=zt.get(ui);if(jt){_n=jt;break}er.push(ui)}er.forEach(jt=>zt.set(jt,_n))}const ls=this._buildAnimation(Se.namespaceId,rt,Ct,r,Ds,pn);if(Se.setRealPlayer(ls),_n===Ko)ji.push(Se);else{const ui=this.playersByElement.get(_n);ui&&ui.length&&(Se.parentPlayer=zs(ui)),s.push(Se)}}else Tr(fe,rt.fromStyles),Se.onDestroy(()=>ss(fe,rt.toStyles)),Wo.push(Se),y.has(fe)&&s.push(Se)}),Wo.forEach(ae=>{const fe=r.get(ae.element);if(fe&&fe.length){const Se=zs(fe);ae.setRealPlayer(Se)}}),s.forEach(ae=>{ae.parentPlayer?ae.syncPlayerEvents(ae.parentPlayer):ae.destroy()});for(let ae=0;ae!ls.destroyed);_n.length?yF(this,fe,_n):this.processLeaveNode(fe)}return N.length=0,ji.forEach(ae=>{this.players.push(ae),ae.onDone(()=>{ae.destroy();const fe=this.players.indexOf(ae);this.players.splice(fe,1)}),ae.play()}),ji}elementContainsData(i,e){let n=!1;const s=e[Ti];return s&&s.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(i).elementContainsData(e)||n}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,n,s,r){let o=[];if(e){const u=this.playersByQueriedElement.get(i);u&&(o=u)}else{const u=this.playersByElement.get(i);if(u){const h=!r||r==dl;u.forEach(b=>{b.queued||!h&&b.triggerName!=s||o.push(b)})}}return(n||s)&&(o=o.filter(u=>!(n&&n!=u.namespaceId||s&&s!=u.triggerName))),o}_beforeAnimationBuild(i,e,n){const r=e.element,o=e.isRemovalTransition?void 0:i,u=e.isRemovalTransition?void 0:e.triggerName;for(const h of e.timelines){const b=h.element,y=b!==r,w=ri(n,b,[]);this._getPreviousPlayers(b,y,o,u,e.toState).forEach(E=>{const R=E.getRealPlayer();R.beforeDestroy&&R.beforeDestroy(),E.destroy(),w.push(E)})}Tr(r,e.fromStyles)}_buildAnimation(i,e,n,s,r,o){const u=e.triggerName,h=e.element,b=[],y=new Set,w=new Set,M=e.timelines.map(R=>{const O=R.element;y.add(O);const N=O[Ti];if(N&&N.removedBeforeQueried)return new cl(R.duration,R.delay);const U=O!==h,P=function wF(t){const i=[];return Ww(t,i),i}((n.get(O)||mF).map(Ct=>Ct.getRealPlayer())).filter(Ct=>!!Ct.element&&Ct.element===O),J=r.get(O),se=o.get(O),Me=vw(0,this._normalizer,0,R.keyframes,J,se),ht=this._buildPlayer(R,Me,P);if(R.subTimeline&&s&&w.add(O),U){const Ct=new qf(i,u,O);Ct.setRealPlayer(ht),b.push(Ct)}return ht});b.forEach(R=>{ri(this.playersByQueriedElement,R.element,[]).push(R),R.onDone(()=>function bF(t,i,e){let n;if(t instanceof Map){if(n=t.get(i),n){if(n.length){const s=n.indexOf(e);n.splice(s,1)}0==n.length&&t.delete(i)}}else if(n=t[i],n){if(n.length){const s=n.indexOf(e);n.splice(s,1)}0==n.length&&delete t[i]}return n}(this.playersByQueriedElement,R.element,R))}),y.forEach(R=>Si(R,Iw));const E=zs(M);return E.onDestroy(()=>{y.forEach(R=>Lo(R,Iw)),ss(h,e.toStyles)}),w.forEach(R=>{ri(s,R,[]).push(E)}),E}_buildPlayer(i,e,n){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,n):new cl(i.duration,i.delay)}}class qf{constructor(i,e,n){this.namespaceId=i,this.triggerName=e,this.element=n,this._player=new cl,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>Cf(i,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){const e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){ri(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return!this.queued&&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(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){const e=this._player;e.triggerCallback&&e.triggerCallback(i)}}function zu(t){return t&&1===t.nodeType}function zw(t,i){const e=t.style.display;return t.style.display=null!=i?i:"none",e}function jw(t,i,e,n,s){const r=[];e.forEach(h=>r.push(zw(h)));const o=[];n.forEach((h,b)=>{const y={};h.forEach(w=>{const M=y[w]=i.computeStyle(b,w,s);(!M||0==M.length)&&(b[Ti]=fF,o.push(b))}),t.set(b,y)});let u=0;return e.forEach(h=>zw(h,r[u++])),o}function $w(t,i){const e=new Map;if(t.forEach(u=>e.set(u,[])),0==i.length)return e;const s=new Set(i),r=new Map;function o(u){if(!u)return 1;let h=r.get(u);if(h)return h;const b=u.parentNode;return h=e.has(b)?b:s.has(b)?1:o(b),r.set(u,h),h}return i.forEach(u=>{const h=o(u);1!==h&&e.get(h).push(u)}),e}function Si(t,i){var e;null===(e=t.classList)||void 0===e||e.add(i)}function Lo(t,i){var e;null===(e=t.classList)||void 0===e||e.remove(i)}function yF(t,i,e){zs(e).onDone(()=>t.processLeaveNode(i))}function Ww(t,i){for(let e=0;es.add(r)):i.set(t,n),e.delete(t),!0}class ju{constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(s,r)=>{},this._transitionEngine=new _F(i,e,n),this._timelineEngine=new cF(i,e,n),this._transitionEngine.onRemovalComplete=(s,r)=>this.onRemovalComplete(s,r)}registerTrigger(i,e,n,s,r){const o=i+"-"+s;let u=this._triggerCache[o];if(!u){const h=[],y=Rf(this._driver,r,h,[]);if(h.length)throw function uP(t,i){return new re(3404,Ze)}();u=function rF(t,i,e){return new oF(t,i,e)}(s,y,this._normalizer),this._triggerCache[o]=u}this._transitionEngine.registerTrigger(e,s,u)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,n,s){this._transitionEngine.insertNode(i,e,n,s)}onRemove(i,e,n,s){this._transitionEngine.removeNode(i,e,s||!1,n)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,n,s){if("@"==n.charAt(0)){const[r,o]=Cw(n);this._timelineEngine.command(r,e,o,s)}else this._transitionEngine.trigger(i,e,n,s)}listen(i,e,n,s,r){if("@"==n.charAt(0)){const[o,u]=Cw(n);return this._timelineEngine.listen(o,e,u,r)}return this._transitionEngine.listen(i,e,n,s,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let xF=(()=>{class t{constructor(e,n,s){this._element=e,this._startStyles=n,this._endStyles=s,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&ss(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(ss(this._element,this._initialStyles),this._endStyles&&(ss(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Tr(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Tr(this._element,this._endStyles),this._endStyles=null),ss(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Uf(t){let i=null;const e=Object.keys(t);for(let n=0;ni()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(i,e,n){return i.animate(e,n)}onStart(i){this._onStartFns.push(i)}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&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(i=>i()),this._onDestroyFns=[])}setPosition(i){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const i={};if(this.hasStarted()){const e=this._finalKeyframe;Object.keys(e).forEach(n=>{"offset"!=n&&(i[n]=this._finished?e[n]:Aw(this.element,n))})}this.currentSnapshot=i}triggerCallback(i){const e="start"==i?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}}class MF{validateStyleProperty(i){return Sw(i)}matchesElement(i,e){return!1}containsElement(i,e){return xw(i,e)}getParentElement(i){return Sf(i)}query(i,e,n){return Dw(i,e,n)}computeStyle(i,e,n){return window.getComputedStyle(i)[e]}animate(i,e,n,s,r,o=[]){const h={duration:n,delay:s,fill:0==s?"both":"forwards"};r&&(h.easing=r);const b={},y=o.filter(M=>M instanceof Qw);(function RP(t,i){return 0===t||0===i})(n,s)&&y.forEach(M=>{let E=M.currentSnapshot;Object.keys(E).forEach(R=>b[R]=E[R])}),e=function LP(t,i,e){const n=Object.keys(e);if(n.length&&i.length){let r=i[0],o=[];if(n.forEach(u=>{r.hasOwnProperty(u)||o.push(u),r[u]=e[u]}),o.length)for(var s=1;sjs(M,!1)),b);const w=function SF(t,i){let e=null,n=null;return Array.isArray(i)&&i.length?(e=Uf(i[0]),i.length>1&&(n=Uf(i[i.length-1]))):i&&(e=Uf(i)),e||n?new xF(t,e,n):null}(i,e);return new Qw(i,e,h,w)}}let kF=(()=>{class t extends hw{constructor(e,n){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(n.body,{id:"0",encapsulation:ki.None,styles:[],data:{animation:[]}})}build(e){const n=this._nextAnimationId.toString();this._nextAnimationId++;const s=Array.isArray(e)?mw(e):e;return Jw(this._renderer,null,n,"register",[s]),new IF(n,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(K(Ba),K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class IF extends class HA{}{constructor(i,e){super(),this._id=i,this._renderer=e}create(i,e){return new EF(this._id,i,e||{},this._renderer)}}class EF{constructor(i,e,n,s){this.id=i,this.element=e,this._renderer=s,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(i,e){return this._renderer.listen(this.element,`@@${this.id}:${i}`,e)}_command(i,...e){return Jw(this._renderer,this.element,this.id,i,e)}onDone(i){this._listen("done",i)}onStart(i){this._listen("start",i)}onDestroy(i){this._listen("destroy",i)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(i){this._command("setPosition",i)}getPosition(){var i,e;return null!==(e=null===(i=this._renderer.engine.players[+this.id])||void 0===i?void 0:i.getPosition())&&void 0!==e?e:0}}function Jw(t,i,e,n,s){return t.setProperty(i,`@@${e}:${n}`,s)}const Yw="@.disabled";let RF=(()=>{class t{constructor(e,n,s){this.delegate=e,this.engine=n,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=(r,o)=>{const u=null==o?void 0:o.parentNode(r);u&&o.removeChild(u,r)}}createRenderer(e,n){const r=this.delegate.createRenderer(e,n);if(!(e&&n&&n.data&&n.data.animation)){let y=this._rendererCache.get(r);return y||(y=new Zw("",r,this.engine),this._rendererCache.set(r,y)),y}const o=n.id,u=n.id+"-"+this._currentId;this._currentId++,this.engine.register(u,e);const h=y=>{Array.isArray(y)?y.forEach(h):this.engine.registerTrigger(o,u,e,y.name,y)};return n.data.animation.forEach(h),new LF(this,u,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,n,s){e>=0&&en(s)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(r=>{const[o,u]=r;o(u)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([n,s]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(K(Ba),K(ju),K(nt))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();class Zw{constructor(i,e,n){this.namespaceId=i,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,n,s=!0){this.delegate.insertBefore(i,e,n),this.engine.onInsert(this.namespaceId,e,i,s)}removeChild(i,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,n,s){this.delegate.setAttribute(i,e,n,s)}removeAttribute(i,e,n){this.delegate.removeAttribute(i,e,n)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,n,s){this.delegate.setStyle(i,e,n,s)}removeStyle(i,e,n){this.delegate.removeStyle(i,e,n)}setProperty(i,e,n){"@"==e.charAt(0)&&e==Yw?this.disableAnimations(i,!!n):this.delegate.setProperty(i,e,n)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,n){return this.delegate.listen(i,e,n)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}}class LF extends Zw{constructor(i,e,n,s){super(e,n,s),this.factory=i,this.namespaceId=e}setProperty(i,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&e==Yw?this.disableAnimations(i,n=void 0===n||!!n):this.engine.process(this.namespaceId,i,e.substr(1),n):this.delegate.setProperty(i,e,n)}listen(i,e,n){if("@"==e.charAt(0)){const s=function OF(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(i);let r=e.substr(1),o="";return"@"!=r.charAt(0)&&([r,o]=function AF(t){const i=t.indexOf(".");return[t.substring(0,i),t.substr(i+1)]}(r)),this.engine.listen(this.namespaceId,s,r,o,u=>{this.factory.scheduleListenerCallback(u._data||-1,n,u)})}return this.delegate.listen(i,e,n)}}let PF=(()=>{class t extends ju{constructor(e,n,s){super(e.body,n,s)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(K(en),K(xf),K(Ff))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Xw=new be("AnimationModuleType"),eT=[{provide:hw,useClass:kF},{provide:Ff,useFactory:function FF(){return new eF}},{provide:ju,useClass:PF},{provide:Ba,useFactory:function NF(t,i,e){return new RF(t,i,e)},deps:[su,ju,nt]}],tT=[{provide:xf,useFactory:()=>new MF},{provide:Xw,useValue:"BrowserAnimations"},...eT],VF=[{provide:xf,useClass:Mw},{provide:Xw,useValue:"NoopAnimations"},...eT];let BF=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?VF:tT}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:tT,imports:[qy]}),t})();class Z{static equals(i,e,n){return n?this.resolveFieldData(i,n)===this.resolveFieldData(e,n):this.equalsByValue(i,e)}static equalsByValue(i,e){if(i===e)return!0;if(i&&e&&"object"==typeof i&&"object"==typeof e){var r,o,u,n=Array.isArray(i),s=Array.isArray(e);if(n&&s){if((o=i.length)!=e.length)return!1;for(r=o;0!=r--;)if(!this.equalsByValue(i[r],e[r]))return!1;return!0}if(n!=s)return!1;var h=i instanceof Date,b=e instanceof Date;if(h!=b)return!1;if(h&&b)return i.getTime()==e.getTime();var y=i instanceof RegExp,w=e instanceof RegExp;if(y!=w)return!1;if(y&&w)return i.toString()==e.toString();var M=Object.keys(i);if((o=M.length)!==Object.keys(e).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,M[r]))return!1;for(r=o;0!=r--;)if(!this.equalsByValue(i[u=M[r]],e[u]))return!1;return!0}return i!=i&&e!=e}static resolveFieldData(i,e){if(i&&e){if(this.isFunction(e))return e(i);if(-1==e.indexOf("."))return i[e];{let n=e.split("."),s=i;for(let r=0,o=n.length;r=i.length&&(n%=i.length,e%=i.length),i.splice(n,0,i.splice(e,1)[0]))}static insertIntoOrderedArray(i,e,n,s){if(n.length>0){let r=!1;for(let o=0;oe){n.splice(o,0,i),r=!0;break}r||n.push(i)}else n.push(i)}static findIndexInList(i,e){let n=-1;if(e)for(let s=0;s-1&&(i=i.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),i}static isEmpty(i){return null==i||""===i||Array.isArray(i)&&0===i.length||!(i instanceof Date)&&"object"==typeof i&&0===Object.keys(i).length}static isNotEmpty(i){return!this.isEmpty(i)}}var nT=0;function pl(){return"pr_id_"+ ++nT}var gt=function HF(){let t=[];const s=r=>r&&parseInt(r.style.zIndex,10)||0;return{get:s,set:(r,o,u)=>{o&&(o.style.zIndex=String(((r,o)=>{let u=t.length>0?t[t.length-1]:{key:r,value:o},h=u.value+(u.key===r?0:o)+1;return t.push({key:r,value:h}),h})(r,u)))},clear:r=>{r&&((r=>{t=t.filter(o=>o.value!==r)})(s(r)),r.style.zIndex="")},getCurrent:()=>t.length>0?t[t.length-1].value:0}}();const iT=["*"];let _t=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.IN="in",t.LESS_THAN="lt",t.LESS_THAN_OR_EQUAL_TO="lte",t.GREATER_THAN="gt",t.GREATER_THAN_OR_EQUAL_TO="gte",t.BETWEEN="between",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.DATE_IS="dateIs",t.DATE_IS_NOT="dateIsNot",t.DATE_BEFORE="dateBefore",t.DATE_AFTER="dateAfter",t})(),zn=(()=>{class t{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[_t.STARTS_WITH,_t.CONTAINS,_t.NOT_CONTAINS,_t.ENDS_WITH,_t.EQUALS,_t.NOT_EQUALS],numeric:[_t.EQUALS,_t.NOT_EQUALS,_t.LESS_THAN,_t.LESS_THAN_OR_EQUAL_TO,_t.GREATER_THAN,_t.GREATER_THAN_OR_EQUAL_TO],date:[_t.DATE_IS,_t.DATE_IS_NOT,_t.DATE_BEFORE,_t.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new ct,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=Object.assign(Object.assign({},this.translation),e),this.translationSource.next(this.translation)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ft=(()=>{class t{}return t.STARTS_WITH="startsWith",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.ENDS_WITH="endsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.NO_FILTER="noFilter",t.LT="lt",t.LTE="lte",t.GT="gt",t.GTE="gte",t.IS="is",t.IS_NOT="isNot",t.BEFORE="before",t.AFTER="after",t.CLEAR="clear",t.APPLY="apply",t.MATCH_ALL="matchAll",t.MATCH_ANY="matchAny",t.ADD_RULE="addRule",t.REMOVE_RULE="removeRule",t.ACCEPT="accept",t.REJECT="reject",t.CHOOSE="choose",t.UPLOAD="upload",t.CANCEL="cancel",t.DAY_NAMES="dayNames",t.DAY_NAMES_SHORT="dayNamesShort",t.DAY_NAMES_MIN="dayNamesMin",t.MONTH_NAMES="monthNames",t.MONTH_NAMES_SHORT="monthNamesShort",t.FIRST_DAY_OF_WEEK="firstDayOfWeek",t.TODAY="today",t.WEEK_HEADER="weekHeader",t.WEAK="weak",t.MEDIUM="medium",t.STRONG="strong",t.PASSWORD_PROMPT="passwordPrompt",t.EMPTY_MESSAGE="emptyMessage",t.EMPTY_FILTER_MESSAGE="emptyFilterMessage",t})(),hl=(()=>{class t{constructor(){this.filters={startsWith:(e,n,s)=>{if(null==n||""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return Z.removeAccents(e.toString()).toLocaleLowerCase(s).slice(0,r.length)===r},contains:(e,n,s)=>{if(null==n||"string"==typeof n&&""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return-1!==Z.removeAccents(e.toString()).toLocaleLowerCase(s).indexOf(r)},notContains:(e,n,s)=>{if(null==n||"string"==typeof n&&""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s);return-1===Z.removeAccents(e.toString()).toLocaleLowerCase(s).indexOf(r)},endsWith:(e,n,s)=>{if(null==n||""===n.trim())return!0;if(null==e)return!1;let r=Z.removeAccents(n.toString()).toLocaleLowerCase(s),o=Z.removeAccents(e.toString()).toLocaleLowerCase(s);return-1!==o.indexOf(r,o.length-r.length)},equals:(e,n,s)=>null==n||"string"==typeof n&&""===n.trim()||null!=e&&(e.getTime&&n.getTime?e.getTime()===n.getTime():Z.removeAccents(e.toString()).toLocaleLowerCase(s)==Z.removeAccents(n.toString()).toLocaleLowerCase(s)),notEquals:(e,n,s)=>!(null==n||"string"==typeof n&&""===n.trim()||null!=e&&(e.getTime&&n.getTime?e.getTime()===n.getTime():Z.removeAccents(e.toString()).toLocaleLowerCase(s)==Z.removeAccents(n.toString()).toLocaleLowerCase(s))),in:(e,n)=>{if(null==n||0===n.length)return!0;for(let s=0;snull==n||null==n[0]||null==n[1]||null!=e&&(e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1]),lt:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n),gt:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()>n.getTime():e>n),gte:(e,n,s)=>null==n||null!=e&&(e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n),is:(e,n,s)=>this.filters.equals(e,n,s),isNot:(e,n,s)=>this.filters.notEquals(e,n,s),before:(e,n,s)=>this.filters.lt(e,n,s),after:(e,n,s)=>this.filters.gt(e,n,s),dateIs:(e,n)=>null==n||null!=e&&e.toDateString()===n.toDateString(),dateIsNot:(e,n)=>null==n||null!=e&&e.toDateString()!==n.toDateString(),dateBefore:(e,n)=>null==n||null!=e&&e.getTime()null==n||null!=e&&e.getTime()>n.getTime()}}filter(e,n,s,r,o){let u=[];if(e)for(let h of e)for(let b of n){let y=Z.resolveFieldData(h,b);if(this.filters[r](y,s,o)){u.push(h);break}}return u}register(e,n){this.filters[e]=n}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ys=(()=>{class t{constructor(){this.messageSource=new ct,this.clearSource=new ct,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),$s=(()=>{class t{constructor(){this.clickSource=new ct,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ml=(()=>{class t{}return t.AND="and",t.OR="or",t})(),Oo=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-header"]],ngContentSelectors:iT,decls:1,vars:0,template:function(e,n){1&e&&(yn(),St(0))},encapsulation:2}),t})(),fl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-footer"]],ngContentSelectors:iT,decls:1,vars:0,template:function(e,n){1&e&&(yn(),St(0))},encapsulation:2}),t})(),ie=(()=>{class t{constructor(e){this.template=e}getType(){return this.name}}return t.\u0275fac=function(e){return new(e||t)(x(bi))},t.\u0275dir=le({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),t})(),Nt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function qF(t,i){if(1&t&&(l(0,"span",9),g(1),c()),2&t){const e=d();a(1),T(" ",e.header," ")}}function UF(t,i){1&t&&Y(0)}function GF(t,i){1&t&&St(0,1,["*ngIf","hasHeaderFacet"])}function zF(t,i){1&t&&Y(0)}function jF(t,i){if(1&t&&(ce(0),_(1,zF,1,0,"ng-container",5),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.contentTemplate)}}const $F=["*",[["p-header"]]],WF=function(t){return{"p-accordion-tab-active":t}},KF=function(t,i){return{"p-highlight":t,"p-disabled":i}},sT=function(t){return{transitionParams:t}},QF=function(t){return{value:"visible",params:t}},JF=function(t){return{value:"hidden",params:t}},YF=["*","p-header"],ZF=["*"];let XF=0,Ws=(()=>{class t{constructor(e,n){this.changeDetector=n,this.cache=!0,this.selectedChange=new H,this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.id="p-accordiontab-"+XF++,this.accordion=e}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||(this._selected&&this.cache&&(this.loaded=!0),this.changeDetector.detectChanges())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":default:this.contentTemplate=e.template;break;case"header":this.headerTemplate=e.template}})}toggle(e){if(this.disabled)return!1;let n=this.findTabIndex();if(this.selected)this.selected=!1,this.accordion.onClose.emit({originalEvent:e,index:n});else{if(!this.accordion.multiple)for(var s=0;s0}onKeydown(e){(32===e.which||13===e.which)&&(this.toggle(e),e.preventDefault())}ngOnDestroy(){this.accordion.tabs.splice(this.findTabIndex(),1)}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>Ks)),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-accordionTab"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,4),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{header:"header",disabled:"disabled",cache:"cache",transitionOptions:"transitionOptions",selected:"selected"},outputs:{selectedChange:"selectedChange"},ngContentSelectors:YF,decls:11,vars:28,consts:[[1,"p-accordion-tab",3,"ngClass"],[1,"p-accordion-header",3,"ngClass"],["role","tab",1,"p-accordion-header-link",3,"click","keydown"],[1,"p-accordion-toggle-icon",3,"ngClass"],["class","p-accordion-header-text",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["role","region",1,"p-toggleable-content"],[1,"p-accordion-content"],[1,"p-accordion-header-text"]],template:function(e,n){1&e&&(yn($F),l(0,"div",0)(1,"div",1)(2,"a",2),C("click",function(r){return n.toggle(r)})("keydown",function(r){return n.onKeydown(r)}),k(3,"span",3),_(4,qF,2,1,"span",4),_(5,UF,1,0,"ng-container",5),_(6,GF,1,0,"ng-content",6),c()(),l(7,"div",7)(8,"div",8),St(9),_(10,jF,2,1,"ng-container",6),c()()()),2&e&&(p("ngClass",z(15,WF,n.selected)),a(1),p("ngClass",We(17,KF,n.selected,n.disabled)),a(1),ne("tabindex",n.disabled?null:0)("id",n.id)("aria-controls",n.id+"-content")("aria-expanded",n.selected),a(1),p("ngClass",n.selected?n.accordion.collapseIcon:n.accordion.expandIcon),a(1),p("ngIf",!n.hasHeaderFacet),a(1),p("ngTemplateOutlet",n.headerTemplate),a(1),p("ngIf",n.hasHeaderFacet),a(1),p("@tabContent",n.selected?z(22,QF,z(20,sT,n.transitionOptions)):z(26,JF,z(24,sT,n.transitionOptions))),ne("id",n.id+"-content")("aria-hidden",!n.selected)("aria-labelledby",n.id),a(3),p("ngIf",n.contentTemplate&&(n.cache?n.loaded:n.selected)))},directives:[Oe,Q,Lt],styles:[".p-accordion-header-link{cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;position:relative;text-decoration:none}.p-accordion-header-link:focus{z-index:1}.p-accordion-header-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("tabContent",[Cs("hidden",it({height:"0",overflow:"hidden"})),Cs("visible",it({height:"*"})),Ot("visible <=> hidden",[it({overflow:"hidden"}),kt("{{transitionParams}}")]),Ot("void => *",kt(0))])]},changeDetection:0}),t})(),Ks=(()=>{class t{constructor(e,n){this.el=e,this.changeDetector=n,this.onClose=new H,this.onOpen=new H,this.expandIcon="pi pi-fw pi-chevron-right",this.collapseIcon="pi pi-fw pi-chevron-down",this.activeIndexChange=new H,this.tabs=[]}ngAfterContentInit(){this.initTabs(),this.tabListSubscription=this.tabList.changes.subscribe(e=>{this.initTabs()})}initTabs(){this.tabs=this.tabList.toArray(),this.updateSelectionState(),this.changeDetector.markForCheck()}getBlockableElement(){return this.el.nativeElement.children[0]}get activeIndex(){return this._activeIndex}set activeIndex(e){this._activeIndex=e,this.preventActiveIndexPropagation?this.preventActiveIndexPropagation=!1:this.updateSelectionState()}updateSelectionState(){if(this.tabs&&this.tabs.length&&null!=this._activeIndex)for(let e=0;e{if(n.selected){if(!this.multiple)return void(e=s);e.push(s)}}),this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(e)}ngOnDestroy(){this.tabListSubscription&&this.tabListSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-accordion"]],contentQueries:function(e,n,s){if(1&e&&st(s,Ws,4),2&e){let r;V(r=B())&&(n.tabList=r)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",expandIcon:"expandIcon",collapseIcon:"collapseIcon",activeIndex:"activeIndex"},outputs:{onClose:"onClose",onOpen:"onOpen",activeIndexChange:"activeIndexChange"},ngContentSelectors:ZF,decls:2,vars:4,consts:[["role","tablist",3,"ngClass","ngStyle"]],template:function(e,n){1&e&&(yn(),l(0,"div",0),St(1),c()),2&e&&(me(n.styleClass),p("ngClass","p-accordion p-component")("ngStyle",n.style))},directives:[Oe,lt],encapsulation:2,changeDetection:0}),t})(),eN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be],Nt]}),t})(),L=(()=>{class t{static addClass(e,n){e.classList?e.classList.add(n):e.className+=" "+n}static addMultipleClasses(e,n){if(e.classList){let s=n.trim().split(" ");for(let r=0;ru.height?(h=-1*s.height,e.style.transformOrigin="bottom",o.top+h<0&&(h=-1*o.top)):(h=r,e.style.transformOrigin="top"),b=s.width>u.width?-1*o.left:o.left+s.width>u.width?-1*(o.left+s.width-u.width):0,e.style.top=h+"px",e.style.left=b+"px"}static absolutePosition(e,n){let E,R,s=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),r=s.height,o=s.width,u=n.offsetHeight,h=n.offsetWidth,b=n.getBoundingClientRect(),y=this.getWindowScrollTop(),w=this.getWindowScrollLeft(),M=this.getViewport();b.top+u+r>M.height?(E=b.top+y-r,e.style.transformOrigin="bottom",E<0&&(E=y)):(E=u+b.top+y,e.style.transformOrigin="top"),R=b.left+o>M.width?Math.max(0,b.left+w+h-o):b.left+w,e.style.top=E+"px",e.style.left=R+"px"}static getParents(e,n=[]){return null===e.parentNode?n:this.getParents(e.parentNode,n.concat([e.parentNode]))}static getScrollableParents(e){let n=[];if(e){let s=this.getParents(e);const r=/(auto|scroll)/,o=u=>{let h=window.getComputedStyle(u,null);return r.test(h.getPropertyValue("overflow"))||r.test(h.getPropertyValue("overflowX"))||r.test(h.getPropertyValue("overflowY"))};for(let u of s){let h=1===u.nodeType&&u.dataset.scrollselectors;if(h){let b=h.split(",");for(let y of b){let w=this.findSingle(u,y);w&&o(w)&&n.push(w)}}9!==u.nodeType&&o(u)&&n.push(u)}}return n}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementDimensions(e){let n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}static scrollInView(e,n){let s=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=s?parseFloat(s):0,o=getComputedStyle(e).getPropertyValue("paddingTop"),u=o?parseFloat(o):0,h=e.getBoundingClientRect(),y=n.getBoundingClientRect().top+document.body.scrollTop-(h.top+document.body.scrollTop)-r-u,w=e.scrollTop,M=e.clientHeight,E=this.getOuterHeight(n);y<0?e.scrollTop=w+y:y+E>M&&(e.scrollTop=w+y-M+E)}static fadeIn(e,n){e.style.opacity=0;let s=+new Date,r=0,o=function(){r=+e.style.opacity.replace(",",".")+((new Date).getTime()-s)/n,e.style.opacity=r,s=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))};o()}static fadeOut(e,n){var s=1,u=50/n;let h=setInterval(()=>{(s-=u)<=0&&(s=0,clearInterval(h)),e.style.opacity=s},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,n){var s=Element.prototype;return(s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||function(o){return-1!==[].indexOf.call(document.querySelectorAll(o),this)}).call(e,n)}static getOuterWidth(e,n){let s=e.offsetWidth;if(n){let r=getComputedStyle(e);s+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return s}static getHorizontalPadding(e){let n=getComputedStyle(e);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(e){let n=getComputedStyle(e);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(e){let n=e.offsetWidth,s=getComputedStyle(e);return n+=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),n}static width(e){let n=e.offsetWidth,s=getComputedStyle(e);return n-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),n}static getInnerHeight(e){let n=e.offsetHeight,s=getComputedStyle(e);return n+=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),n}static getOuterHeight(e,n){let s=e.offsetHeight;if(n){let r=getComputedStyle(e);s+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return s}static getHeight(e){let n=e.offsetHeight,s=getComputedStyle(e);return n-=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)+parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),n}static getWidth(e){let n=e.offsetWidth,s=getComputedStyle(e);return n-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight)+parseFloat(s.borderLeftWidth)+parseFloat(s.borderRightWidth),n}static getViewport(){let e=window,n=document,s=n.documentElement,r=n.getElementsByTagName("body")[0];return{width:e.innerWidth||s.clientWidth||r.clientWidth,height:e.innerHeight||s.clientHeight||r.clientHeight}}static getOffset(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,n){let s=e.parentNode;if(!s)throw"Can't replace element";return s.replaceChild(n,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,n){if(this.isElement(n))n.appendChild(e);else{if(!n.el||!n.el.nativeElement)throw"Cannot append "+n+" to "+e;n.el.nativeElement.appendChild(e)}}static removeChild(e,n){if(this.isElement(n))n.removeChild(e);else{if(!n.el||!n.el.nativeElement)throw"Cannot remove "+e+" from "+n;n.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let n=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let s=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=s,s}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(e,n,s){e[n].apply(e,s)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return null===e.offsetParent}static getFocusableElements(e){let n=t.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),s=[];for(let r of n)"none"!=getComputedStyle(r).display&&"hidden"!=getComputedStyle(r).visibility&&s.push(r);return s}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return t.zindex=1e3,t.calculatedScrollbarWidth=null,t.calculatedScrollbarHeight=null,t})();class Qs{constructor(i,e=(()=>{})){this.element=i,this.listener=e}bindScrollListener(){this.scrollableParents=L.getScrollableParents(this.element);for(let i=0;i{class t{constructor(e,n,s){this.el=e,this.zone=n,this.config=s}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let n=this.getInk();if(!n||"none"===getComputedStyle(n,null).display)return;if(L.removeClass(n,"p-ink-active"),!L.getHeight(n)&&!L.getWidth(n)){let u=Math.max(L.getOuterWidth(this.el.nativeElement),L.getOuterHeight(this.el.nativeElement));n.style.height=u+"px",n.style.width=u+"px"}let s=L.getOffset(this.el.nativeElement),r=e.pageX-s.left+document.body.scrollTop-L.getWidth(n)/2,o=e.pageY-s.top+document.body.scrollLeft-L.getHeight(n)/2;n.style.top=o+"px",n.style.left=r+"px",L.addClass(n,"p-ink-active")}getInk(){for(let e=0;e{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function tN(t,i){1&t&&Y(0)}const nN=function(t,i,e,n){return{"p-button-icon":!0,"p-button-icon-left":t,"p-button-icon-right":i,"p-button-icon-top":e,"p-button-icon-bottom":n}};function iN(t,i){if(1&t&&k(0,"span",4),2&t){const e=d();me(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),p("ngClass",_i(4,nN,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),ne("aria-hidden",!0)}}function sN(t,i){if(1&t&&(l(0,"span",5),g(1),c()),2&t){const e=d();ne("aria-hidden",e.icon&&!e.label),a(1),S(e.label||"\xa0")}}function rN(t,i){if(1&t&&(l(0,"span",4),g(1),c()),2&t){const e=d();me(e.badgeClass),p("ngClass",e.badgeStyleClass()),a(1),S(e.badge)}}const oN=function(t,i,e,n,s){return{"p-button p-component":!0,"p-button-icon-only":t,"p-button-vertical":i,"p-disabled":e,"p-button-loading":n,"p-button-loading-label-only":s}},aN=["*"];let Ln=(()=>{class t{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1}ngAfterViewInit(){this._initialStyleClass=this.el.nativeElement.className,L.addMultipleClasses(this.el.nativeElement,this.getStyleClass()),(this.icon||this.loading)&&this.createIconEl();let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",this.label?e.appendChild(document.createTextNode(this.label)):e.innerHTML=" ",this.el.nativeElement.appendChild(e),this.initialized=!0}getStyleClass(){let e="p-button p-component";return this.icon&&!this.label&&(e+=" p-button-icon-only"),this.loading&&(e+=" p-disabled p-button-loading",!this.icon&&this.label&&(e+=" p-button-loading-label-only")),e}setStyleClass(){let e=this.getStyleClass();this.el.nativeElement.className=e+" "+this._initialStyleClass}createIconEl(){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let n=this.label?"p-button-icon-"+this.iconPos:null;n&&L.addClass(e,n);let s=this.getIconClass();s&&L.addMultipleClasses(e,s);let r=L.findSingle(this.el.nativeElement,".p-button-label");r?this.el.nativeElement.insertBefore(e,r):this.el.nativeElement.appendChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}setIconClass(){let e=L.findSingle(this.el.nativeElement,".p-button-icon");e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIconEl()}removeIconElement(){let e=L.findSingle(this.el.nativeElement,".p-button-icon");this.el.nativeElement.removeChild(e)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(L.findSingle(this.el.nativeElement,".p-button-label").textContent=this._label||" ",(this.loading||this.icon)&&this.setIconClass(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.setIconClass(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.loading||this.icon?this.setIconClass():this.removeIconElement(),this.setStyleClass())}ngOnDestroy(){this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),t})(),ve=(()=>{class t{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new H,this.onFocus=new H,this.onBlur=new H}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-button"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:aN,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(e,n){1&e&&(yn(),l(0,"button",0),C("click",function(r){return n.onClick.emit(r)})("focus",function(r){return n.onFocus.emit(r)})("blur",function(r){return n.onBlur.emit(r)}),St(1),_(2,tN,1,0,"ng-container",1),_(3,iN,1,9,"span",2),_(4,sN,2,2,"span",3),_(5,rN,2,4,"span",2),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("disabled",n.disabled||n.loading)("ngClass",pr(11,oN,n.icon&&!n.label,("top"===n.iconPos||"bottom"===n.iconPos)&&n.label,n.disabled||n.loading,n.loading,n.loading&&!n.icon&&n.label)),ne("type",n.type)("aria-label",n.ariaLabel),a(2),p("ngTemplateOutlet",n.contentTemplate),a(1),p("ngIf",!n.contentTemplate&&(n.icon||n.loading)),a(1),p("ngIf",!n.contentTemplate),a(1),p("ngIf",!n.contentTemplate&&n.badge))},directives:[vt,lt,Oe,Lt,Q],encapsulation:2,changeDetection:0}),t})(),gl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();const lN=["container"],cN=["inputfield"],uN=["contentWrapper"];function dN(t,i){if(1&t){const e=I();l(0,"i",8),C("click",function(){return v(e),d(2).clear()}),c()}}function pN(t,i){if(1&t){const e=I();l(0,"button",9),C("click",function(s){v(e),d();const r=F(1);return d().onButtonClick(s,r)}),c()}if(2&t){const e=d(2);p("icon",e.icon)("disabled",e.disabled),ne("aria-label",e.iconAriaLabel)}}function hN(t,i){if(1&t){const e=I();l(0,"input",4,5),C("focus",function(s){return v(e),d().onInputFocus(s)})("keydown",function(s){return v(e),d().onInputKeydown(s)})("click",function(){return v(e),d().onInputClick()})("blur",function(s){return v(e),d().onInputBlur(s)})("input",function(s){return v(e),d().onUserInput(s)}),c(),_(2,dN,1,0,"i",6),_(3,pN,1,3,"button",7)}if(2&t){const e=d();me(e.inputStyleClass),p("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),ne("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),a(2),p("ngIf",e.showClear&&!e.disabled&&null!=e.value),a(1),p("ngIf",e.showIcon)}}function mN(t,i){1&t&&Y(0)}function fN(t,i){if(1&t){const e=I();l(0,"button",30),C("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(4).onPrevButtonClick(s)}),k(1,"span",31),c()}}function gN(t,i){if(1&t){const e=I();l(0,"button",32),C("click",function(s){return v(e),d(4).switchToMonthView(s)})("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)}),g(1),c()}if(2&t){const e=d().$implicit,n=d(3);p("disabled",n.switchViewButtonDisabled()),a(1),T(" ",n.getMonthName(e.month)," ")}}function _N(t,i){if(1&t){const e=I();l(0,"button",33),C("click",function(s){return v(e),d(4).switchToYearView(s)})("keydown",function(s){return v(e),d(4).onContainerButtonKeydown(s)}),g(1),c()}if(2&t){const e=d().$implicit,n=d(3);p("disabled",n.switchViewButtonDisabled()),a(1),T(" ",n.getYear(e)," ")}}function bN(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(5);a(1),$e("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function vN(t,i){1&t&&Y(0)}const rT=function(t){return{$implicit:t}};function CN(t,i){if(1&t&&(l(0,"span",34),_(1,bN,2,2,"ng-container",13),_(2,vN,1,0,"ng-container",35),c()),2&t){const e=d(4);a(1),p("ngIf",!e.decadeTemplate),a(1),p("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",z(3,rT,e.yearPickerValues))}}function yN(t,i){if(1&t&&(l(0,"th",41)(1,"span"),g(2),c()()),2&t){const e=d(5);a(2),S(e.getTranslation("weekHeader"))}}function wN(t,i){if(1&t&&(l(0,"th",42)(1,"span"),g(2),c()()),2&t){const e=i.$implicit;a(2),S(e)}}function TN(t,i){if(1&t&&(l(0,"td",45)(1,"span",46),g(2),c()()),2&t){const e=d().index,n=d(2).$implicit;a(2),T(" ",n.weekNumbers[e]," ")}}function SN(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2).$implicit;a(1),S(e.day)}}function xN(t,i){1&t&&Y(0)}const DN=function(t,i){return{"p-highlight":t,"p-disabled":i}};function MN(t,i){if(1&t){const e=I();ce(0),l(1,"span",48),C("click",function(s){v(e);const r=d().$implicit;return d(6).onDateSelect(s,r)})("keydown",function(s){v(e);const r=d().$implicit,o=d(3).index;return d(3).onDateCellKeydown(s,r,o)}),_(2,SN,2,1,"ng-container",13),_(3,xN,1,0,"ng-container",35),c(),ue()}if(2&t){const e=d().$implicit,n=d(6);a(1),p("ngClass",We(4,DN,n.isSelected(e),!e.selectable)),a(1),p("ngIf",!n.dateTemplate),a(1),p("ngTemplateOutlet",n.dateTemplate)("ngTemplateOutletContext",z(7,rT,e))}}const kN=function(t,i){return{"p-datepicker-other-month":t,"p-datepicker-today":i}};function IN(t,i){if(1&t&&(l(0,"td",47),_(1,MN,4,9,"ng-container",13),c()),2&t){const e=i.$implicit,n=d(6);p("ngClass",We(2,kN,e.otherMonth,e.today)),a(1),p("ngIf",!e.otherMonth||n.showOtherMonths)}}function EN(t,i){if(1&t&&(l(0,"tr"),_(1,TN,3,1,"td",43),_(2,IN,2,5,"td",44),c()),2&t){const e=i.$implicit,n=d(5);a(1),p("ngIf",n.showWeek),a(1),p("ngForOf",e)}}function RN(t,i){if(1&t&&(l(0,"div",36)(1,"table",37)(2,"thead")(3,"tr"),_(4,yN,3,1,"th",38),_(5,wN,3,1,"th",39),c()(),l(6,"tbody"),_(7,EN,3,2,"tr",40),c()()()),2&t){const e=d().$implicit,n=d(3);a(4),p("ngIf",n.showWeek),a(1),p("ngForOf",n.weekDays),a(2),p("ngForOf",e.dates)}}function LN(t,i){if(1&t){const e=I();l(0,"div",20)(1,"div",21),_(2,fN,2,0,"button",22),l(3,"div",23),_(4,gN,2,2,"button",24),_(5,_N,2,2,"button",25),_(6,CN,3,5,"span",26),c(),l(7,"button",27),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).onNextButtonClick(s)}),k(8,"span",28),c()(),_(9,RN,8,3,"div",29),c()}if(2&t){const e=i.index,n=d(3);a(2),p("ngIf",0===e),a(2),p("ngIf","date"===n.currentView),a(1),p("ngIf","year"!==n.currentView),a(1),p("ngIf","year"===n.currentView),a(1),Hn("display",1===n.numberOfMonths||e===n.numberOfMonths-1?"inline-flex":"none"),a(2),p("ngIf","date"===n.currentView)}}const oT=function(t){return{"p-highlight":t}};function ON(t,i){if(1&t){const e=I();l(0,"span",51),C("click",function(s){const o=v(e).index;return d(4).onMonthSelect(s,o)})("keydown",function(s){const o=v(e).index;return d(4).onMonthCellKeydown(s,o)}),g(1),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(4);p("ngClass",z(2,oT,s.isMonthSelected(n))),a(1),T(" ",e," ")}}function AN(t,i){if(1&t&&(l(0,"div",49),_(1,ON,2,4,"span",50),c()),2&t){const e=d(3);a(1),p("ngForOf",e.monthPickerValues())}}function PN(t,i){if(1&t){const e=I();l(0,"span",54),C("click",function(s){const o=v(e).$implicit;return d(4).onYearSelect(s,o)})("keydown",function(s){const o=v(e).$implicit;return d(4).onYearCellKeydown(s,o)}),g(1),c()}if(2&t){const e=i.$implicit,n=d(4);p("ngClass",z(2,oT,n.isYearSelected(e))),a(1),T(" ",e," ")}}function FN(t,i){if(1&t&&(l(0,"div",52),_(1,PN,2,4,"span",53),c()),2&t){const e=d(3);a(1),p("ngForOf",e.yearPickerValues())}}function NN(t,i){if(1&t&&(ce(0),l(1,"div",16),_(2,LN,10,7,"div",17),c(),_(3,AN,2,1,"div",18),_(4,FN,2,1,"div",19),ue()),2&t){const e=d(2);a(2),p("ngForOf",e.months),a(1),p("ngIf","month"===e.currentView),a(1),p("ngIf","year"===e.currentView)}}function VN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function BN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function HN(t,i){if(1&t&&(l(0,"div",60)(1,"span"),g(2),c()()),2&t){const e=d(3);a(2),S(e.timeSeparator)}}function qN(t,i){1&t&&(ce(0),g(1,"0"),ue())}function UN(t,i){if(1&t){const e=I();l(0,"div",65)(1,"button",57),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(3).incrementSecond(s)})("keydown.space",function(s){return v(e),d(3).incrementSecond(s)})("mousedown",function(s){return v(e),d(3).onTimePickerElementMouseDown(s,2,1)})("mouseup",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(3).onTimePickerElementMouseLeave()}),k(2,"span",58),c(),l(3,"span"),_(4,qN,2,0,"ng-container",13),g(5),c(),l(6,"button",57),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(3).decrementSecond(s)})("keydown.space",function(s){return v(e),d(3).decrementSecond(s)})("mousedown",function(s){return v(e),d(3).onTimePickerElementMouseDown(s,2,-1)})("mouseup",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(3).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(3).onTimePickerElementMouseLeave()}),k(7,"span",59),c()()}if(2&t){const e=d(3);a(4),p("ngIf",e.currentSecond<10),a(1),S(e.currentSecond)}}function GN(t,i){if(1&t){const e=I();l(0,"div",66)(1,"button",67),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).toggleAMPM(s)})("keydown.enter",function(s){return v(e),d(3).toggleAMPM(s)}),k(2,"span",58),c(),l(3,"span"),g(4),c(),l(5,"button",67),C("keydown",function(s){return v(e),d(3).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(3).toggleAMPM(s)})("keydown.enter",function(s){return v(e),d(3).toggleAMPM(s)}),k(6,"span",59),c()()}if(2&t){const e=d(3);a(4),S(e.pm?"PM":"AM")}}function zN(t,i){if(1&t){const e=I();l(0,"div",55)(1,"div",56)(2,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).incrementHour(s)})("keydown.space",function(s){return v(e),d(2).incrementHour(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,0,1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(3,"span",58),c(),l(4,"span"),_(5,VN,2,0,"ng-container",13),g(6),c(),l(7,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).decrementHour(s)})("keydown.space",function(s){return v(e),d(2).decrementHour(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,0,-1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(8,"span",59),c()(),l(9,"div",60)(10,"span"),g(11),c()(),l(12,"div",61)(13,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).incrementMinute(s)})("keydown.space",function(s){return v(e),d(2).incrementMinute(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,1,1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(14,"span",58),c(),l(15,"span"),_(16,BN,2,0,"ng-container",13),g(17),c(),l(18,"button",57),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("keydown.enter",function(s){return v(e),d(2).decrementMinute(s)})("keydown.space",function(s){return v(e),d(2).decrementMinute(s)})("mousedown",function(s){return v(e),d(2).onTimePickerElementMouseDown(s,1,-1)})("mouseup",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.enter",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("keyup.space",function(s){return v(e),d(2).onTimePickerElementMouseUp(s)})("mouseleave",function(){return v(e),d(2).onTimePickerElementMouseLeave()}),k(19,"span",59),c()(),_(20,HN,3,1,"div",62),_(21,UN,8,2,"div",63),_(22,GN,7,1,"div",64),c()}if(2&t){const e=d(2);a(5),p("ngIf",e.currentHour<10),a(1),S(e.currentHour),a(5),S(e.timeSeparator),a(5),p("ngIf",e.currentMinute<10),a(1),S(e.currentMinute),a(3),p("ngIf",e.showSeconds),a(1),p("ngIf",e.showSeconds),a(1),p("ngIf","12"==e.hourFormat)}}const aT=function(t){return[t]};function jN(t,i){if(1&t){const e=I();l(0,"div",68)(1,"button",69),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(2).onTodayButtonClick(s)}),c(),l(2,"button",69),C("keydown",function(s){return v(e),d(2).onContainerButtonKeydown(s)})("click",function(s){return v(e),d(2).onClearButtonClick(s)}),c()()}if(2&t){const e=d(2);a(1),p("label",e.getTranslation("today"))("ngClass",z(4,aT,e.todayButtonStyleClass)),a(1),p("label",e.getTranslation("clear"))("ngClass",z(6,aT,e.clearButtonStyleClass))}}function $N(t,i){1&t&&Y(0)}const WN=function(t,i,e,n,s,r){return{"p-datepicker p-component":!0,"p-datepicker-inline":t,"p-disabled":i,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":n,"p-datepicker-monthpicker":s,"p-datepicker-touch-ui":r}},lT=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},KN=function(t){return{value:"visibleTouchUI",params:t}},QN=function(t){return{value:"visible",params:t}};function JN(t,i){if(1&t){const e=I();l(0,"div",10,11),C("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationDone(s)})("click",function(s){return v(e),d().onOverlayClick(s)}),St(2),_(3,mN,1,0,"ng-container",12),_(4,NN,5,3,"ng-container",13),_(5,zN,23,8,"div",14),_(6,jN,3,8,"div",15),St(7,1),_(8,$N,1,0,"ng-container",12),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngStyle",e.panelStyle)("ngClass",Do(11,WN,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?z(21,KN,We(18,lT,e.showTransitionOptions,e.hideTransitionOptions)):z(26,QN,We(23,lT,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),a(3),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",!e.timeOnly),a(1),p("ngIf",(e.showTime||e.timeOnly)&&"date"===e.currentView),a(1),p("ngIf",e.showButtonBar),a(2),p("ngTemplateOutlet",e.footerTemplate)}}const YN=[[["p-header"]],[["p-footer"]]],ZN=function(t,i,e,n){return{"p-calendar":!0,"p-calendar-w-btn":t,"p-calendar-timeonly":i,"p-calendar-disabled":e,"p-focus":n}},XN=["p-header","p-footer"],e5={provide:dn,useExisting:Ue(()=>xr),multi:!0};let xr=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.config=o,this.overlayService=u,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.showClear=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new H,this.onBlur=new H,this.onClose=new H,this.onSelect=new H,this.onClear=new H,this.onInput=new H,this.onTodayClick=new H,this.onClearClick=new H,this.onMonthChange=new H,this.onYearChange=new H,this.onClickOutside=new H,this.onShow=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(h,b){return"12"==this.hourFormat?12===h?b?12:0:b?h+12:h:h}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const n=e.split(":"),s=parseInt(n[0]),r=parseInt(n[1]);this.populateYearOptions(s,r)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=pl();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=L.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let s=e;s<=n;s++)this.yearOptions.push(s)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Ft.DAY_NAMES_MIN);for(let s=0;s<7;s++)this.weekDays.push(n[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let s=0;s<10;s++)e.push(n+s);return e}createMonths(e,n){this.months=this.months=[];for(let s=0;s11&&(r=r%11-1,o=n+1),this.months.push(this.createMonth(r,o))}}getWeekNumber(e){let n=new Date(e.getTime());n.setDate(n.getDate()+4-(n.getDay()||7));let s=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((s-n.getTime())/864e5)/7)+1}createMonth(e,n){let s=[],r=this.getFirstDayOfMonthIndex(e,n),o=this.getDaysCountInMonth(e,n),u=this.getDaysCountInPrevMonth(e,n),h=1,b=new Date,y=[],w=Math.ceil((o+r)/7);for(let M=0;Mo){let O=this.getNextMonthAndYear(e,n);E.push({day:h-o,month:O.month,year:O.year,otherMonth:!0,today:this.isToday(b,h-o,O.month,O.year),selectable:this.isSelectable(h-o,O.month,O.year,!0)})}else E.push({day:h,month:e,year:n,today:this.isToday(b,h,e,n),selectable:this.isSelectable(h,e,n,!1)});h++}this.showWeek&&y.push(this.getWeekNumber(new Date(E[0].year,E[0].month,E[0].day))),s.push(E)}return{month:e,year:n,dates:s,weekNumbers:y}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){!this.disabled&&n.selectable?(this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((s,r)=>!this.isDateEquals(s,n)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,n){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){"year"===this.view?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=new Date(e.year,e.month,e.day);if(this.showTime&&(n.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate=s.getTime()?r=n:(s=n,r=null),this.updateModel([s,r])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;this.value&&(n=this.value.map(s=>this.formatDateTime(s))),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let s=new Date;s.setDate(1),s.setMonth(e),s.setFullYear(n);let r=s.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let s=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(s.month,s.year)}getPreviousMonthAndYear(e,n){let s,r;return 0===e?(s=11,r=n-1):(s=e-1,r=n),{month:s,year:r}}getNextMonthAndYear(e,n){let s,r;return 11===e?(s=0,r=n+1):(s=e+1,r=n),{month:s,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let s of this.value)if(n=this.isDateEquals(s,e),n)break;return n}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getMonth()===e&&n.getFullYear()===this.currentYear}return!1}isYearSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getFullYear()===e}return!1}isDateEquals(e,n){return!!(e&&e instanceof Date)&&e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year}isDateBetween(e,n,s){if(e&&n){let o=new Date(s.year,s.month,s.day);return e.getTime()<=o.getTime()&&n.getTime()>=o.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,n,s,r){return e.getDate()===n&&e.getMonth()===s&&e.getFullYear()===r}isSelectable(e,n,s,r){let o=!0,u=!0,h=!0,b=!0;return!(r&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>s||this.minDate.getFullYear()===s&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(o=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(L.getFocusableElements(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,s){const r=e.currentTarget,o=r.parentElement;switch(e.which){case 40:{r.tabIndex="-1";let u=L.index(o),h=o.parentElement.nextElementSibling;h?L.hasClass(h.children[u].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(h.children[u].children[0].tabIndex="0",h.children[u].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{r.tabIndex="-1";let u=L.index(o),h=o.parentElement.previousElementSibling;if(h){let b=h.children[u].children[0];L.hasClass(b,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(b.tabIndex="0",b.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let u=o.previousElementSibling;if(u){let h=u.children[0];L.hasClass(h,"p-disabled")||L.hasClass(h.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,s):(h.tabIndex="0",h.focus())}else this.navigateToMonth(!0,s);e.preventDefault();break}case 39:{r.tabIndex="-1";let u=o.nextElementSibling;if(u){let h=u.children[0];L.hasClass(h,"p-disabled")?this.navigateToMonth(!1,s):(h.tabIndex="0",h.focus())}else this.navigateToMonth(!1,s);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,n),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,n){const s=e.currentTarget;switch(e.which){case 38:case 40:{s.tabIndex="-1";var r=s.parentElement.children,o=L.index(s);let u=r[40===e.which?o+3:o-3];u&&(u.tabIndex="0",u.focus()),e.preventDefault();break}case 37:{s.tabIndex="-1";let u=s.previousElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{s.tabIndex="-1";let u=s.nextElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,n),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,n){const s=e.currentTarget;switch(e.which){case 38:case 40:{s.tabIndex="-1";var r=s.parentElement.children,o=L.index(s);let u=r[40===e.which?o+2:o-2];u&&(u.tabIndex="0",u.focus()),e.preventDefault();break}case 37:{s.tabIndex="-1";let u=s.previousElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{s.tabIndex="-1";let u=s.nextElementSibling;u?(u.tabIndex="0",u.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,n),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,n){if(e)if(1===this.numberOfMonths||0===n)this.navigationState={backward:!0},this.navBackward(event);else{let r=L.find(this.contentViewChild.nativeElement.children[n-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),o=r[r.length-1];o.tabIndex="0",o.focus()}else if(1===this.numberOfMonths||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let r=L.findSingle(this.contentViewChild.nativeElement.children[n+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");r.tabIndex="0",r.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let n;n=L.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else e=L.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let e;if("month"===this.currentView){let n=L.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),s=L.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month.p-highlight");n.forEach(r=>r.tabIndex=-1),e=s||n[0],0===n.length&&L.find(this.contentViewChild.nativeElement,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(o=>o.tabIndex=-1)}else if("year"===this.currentView){let n=L.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),s=L.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year.p-highlight");n.forEach(r=>r.tabIndex=-1),e=s||n[0],0===n.length&&L.find(this.contentViewChild.nativeElement,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(o=>o.tabIndex=-1)}else if(e=L.findSingle(this.contentViewChild.nativeElement,"span.p-highlight"),!e){let n=L.findSingle(this.contentViewChild.nativeElement,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");e=n||L.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}e&&(e.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{e.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=L.getFocusableElements(this.contentViewChild.nativeElement);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==s||0===s)if(this.focusTrap)n[n.length-1].focus();else{if(-1===s)return this.hideOverlay();if(0===s)return}else n[s-1].focus();else if(-1==s||s===n.length-1){if(!this.focusTrap&&-1!=s)return this.hideOverlay();n[0].focus()}else n[s+1].focus()}else n[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,n,s,r){let o=this.value;const u=this.convertTo24Hour(e,r);this.isRangeSelection()&&(o=this.value[1]||this.value[0]),this.isMultipleSelection()&&(o=this.value[this.value.length-1]);const h=o?o.toDateString():null;return!(this.minDate&&h&&this.minDate.toDateString()===h&&(this.minDate.getHours()>u||this.minDate.getHours()===u&&(this.minDate.getMinutes()>n||this.minDate.getMinutes()===n&&this.minDate.getSeconds()>s))||this.maxDate&&h&&this.maxDate.toDateString()===h&&(this.maxDate.getHours()=24?s-24:s:"12"==this.hourFormat&&(this.currentHour<12&&s>11&&(r=!this.pm),s=s>=13?s-12:s),this.validateTime(s,this.currentMinute,this.currentSecond,r)&&(this.currentHour=s,this.pm=r),e.preventDefault()}onTimePickerElementMouseDown(e,n,s){this.disabled||(this.repeat(e,null,n,s),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,s,r){let o=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,s,r),this.cd.markForCheck()},o),s){case 0:1===r?this.incrementHour(e):this.decrementHour(e);break;case 1:1===r?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===r?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=this.currentHour-this.stepHour,s=this.pm;"24"==this.hourFormat?n=n<0?24+n:n:"12"==this.hourFormat&&(12===this.currentHour&&(s=!this.pm),n=n<=0?12+n:n),this.validateTime(n,this.currentMinute,this.currentSecond,s)&&(this.currentHour=n,this.pm=s),e.preventDefault()}incrementMinute(e){let n=this.currentMinute+this.stepMinute;n=n>59?n-60:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}decrementMinute(e){let n=this.currentMinute-this.stepMinute;n=n<0?60+n:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const n=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,n)&&(this.pm=n,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let s=this.parseValueFromString(n);this.isValidSelection(s)&&(this.updateModel(s),this.updateUI())}catch(s){this.updateModel(this.keepInvalid?n:null)}this.filled=null!=n&&n.length,this.onInput.emit(e)}isValidSelection(e){let n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(s=>this.isSelectable(s.getDate(),s.getMonth(),s.getFullYear(),!1))&&this.isRangeSelection()&&(n=e.length>1&&e[1]>e[0]),n}parseValueFromString(e){if(!e||0===e.trim().length)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let s=e.split(this.multipleSeparator);n=[];for(let r of s)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let s=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r{this.disableModality()}),document.body.appendChild(this.mask),L.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(L.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){document.body.removeChild(this.mask);let n,e=document.body.children;for(let s=0;s{const w=s+1{let E=""+w;if(r(y))for(;E.lengthr(y)?E[w]:M[w];let h="",b=!1;if(e)for(s=0;s11&&12!=s&&(s-=12),n+="12"==this.hourFormat&&0===s?12:s<10?"0"+s:s,n+=":",n+=r<10?"0"+r:r,this.showSeconds&&(n+=":",n+=o<10?"0"+o:o),"12"==this.hourFormat&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":");if(n.length!==(this.showSeconds?3:2))throw"Invalid time";let r=parseInt(n[0]),o=parseInt(n[1]),u=this.showSeconds?parseInt(n[2]):null;if(isNaN(r)||isNaN(o)||r>23||o>59||"12"==this.hourFormat&&r>12||this.showSeconds&&(isNaN(u)||u>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==r&&this.pm?r+=12:!this.pm&&12===r&&(r-=12)),{hour:r,minute:o,second:u}}parseDate(e,n){if(null==n||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let s,r,o,R,u=0,h="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),b=-1,y=-1,w=-1,M=-1,E=!1,O=J=>{let se=s+1{let se=O(J),Me="@"===J?14:"!"===J?20:"y"===J&&se?4:"o"===J?3:2,Ct=new RegExp("^\\d{"+("y"===J?Me:1)+","+Me+"}"),zt=e.substring(u).match(Ct);if(!zt)throw"Missing number at position "+u;return u+=zt[0].length,parseInt(zt[0],10)},U=(J,se,Me)=>{let ht=-1,Ct=O(J)?Me:se,zt=[];for(let At=0;At-(At[1].length-pn[1].length));for(let At=0;At{if(e.charAt(u)!==n.charAt(s))throw"Unexpected literal at position "+u;u++};for("month"===this.view&&(w=1),s=0;s-1)for(y=1,w=M;r=this.getDaysCountInMonth(b,y-1),!(w<=r);)y++,w-=r;if(R=this.daylightSavingAdjust(new Date(b,y-1,w)),R.getFullYear()!==b||R.getMonth()+1!==y||R.getDate()!==w)throw"Invalid date";return R}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let n=new Date,s={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,s),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(s=>!(!s.breakpoint||!s.numMonths)).sort((s,r)=>-1*s.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let s=0;s{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return L.hasClass(e.target,"p-datepicker-prev")||L.hasClass(e.target,"p-datepicker-prev-icon")||L.hasClass(e.target,"p-datepicker-next")||L.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!L.isAndroid()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&>.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-calendar"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(lN,5),j(cN,5),j(uN,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.inputfieldViewChild=s.first),V(s=B())&&(n.content=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focus)("p-calendar-clearable",n.showClear&&!n.disabled)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Ne([e5])],ngContentSelectors:XN,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["class","p-calendar-clear-icon pi pi-times",3,"click",4,"ngIf"],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],[1,"p-calendar-clear-icon","pi","pi-times",3,"click"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,n){1&e&&(yn(YN),l(0,"span",0,1),_(2,hN,4,17,"ng-template",2),_(3,JN,9,28,"div",3),c()),2&e&&(me(n.styleClass),p("ngClass",_i(6,ZN,n.showIcon,n.timeOnly,n.disabled,n.focus))("ngStyle",n.style),a(2),p("ngIf",!n.inline),a(1),p("ngIf",n.inline||n.overlayVisible))},directives:[Oe,lt,Q,Ln,vt,Lt,at],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-calendar-clearable{position:relative}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Cs("visibleTouchUI",it({transform:"translate(-50%,-50%)",opacity:1})),Ot("void => visible",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}",it({opacity:1,transform:"*"}))]),Ot("visible => void",[kt("{{hideTransitionParams}}",it({opacity:0}))]),Ot("void => visibleTouchUI",[it({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),kt("{{showTransitionParams}}")]),Ot("visibleTouchUI => void",[kt("{{hideTransitionParams}}",it({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),t})(),cT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gl,Nt,gn],gl,Nt]}),t})();function t5(t,i){1&t&&Y(0)}function n5(t,i){if(1&t&&(l(0,"div",8),St(1,1),_(2,t5,1,0,"ng-container",6),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}function s5(t,i){1&t&&Y(0)}function r5(t,i){if(1&t&&(l(0,"div",9),g(1),_(2,s5,1,0,"ng-container",6),c()),2&t){const e=d();a(1),T(" ",e.header," "),a(1),p("ngTemplateOutlet",e.titleTemplate)}}function o5(t,i){1&t&&Y(0)}function a5(t,i){if(1&t&&(l(0,"div",10),g(1),_(2,o5,1,0,"ng-container",6),c()),2&t){const e=d();a(1),T(" ",e.subheader," "),a(1),p("ngTemplateOutlet",e.subtitleTemplate)}}function l5(t,i){1&t&&Y(0)}function c5(t,i){1&t&&Y(0)}function u5(t,i){if(1&t&&(l(0,"div",11),St(1,2),_(2,c5,1,0,"ng-container",6),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const d5=["*",[["p-header"]],[["p-footer"]]],p5=["*","p-header","p-footer"];let Pe=(()=>{class t{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275cmp=G({type:t,selectors:[["p-card"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:p5,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(e,n){1&e&&(yn(d5),l(0,"div",0),_(1,n5,3,1,"div",1),l(2,"div",2),_(3,r5,3,2,"div",3),_(4,a5,3,2,"div",4),l(5,"div",5),St(6),_(7,l5,1,0,"ng-container",6),c(),_(8,u5,3,1,"div",7),c()()),2&e&&(me(n.styleClass),p("ngClass","p-card p-component")("ngStyle",n.style),a(1),p("ngIf",n.headerFacet||n.headerTemplate),a(2),p("ngIf",n.header||n.titleTemplate),a(1),p("ngIf",n.subheader||n.subtitleTemplate),a(3),p("ngTemplateOutlet",n.contentTemplate),a(1),p("ngIf",n.footerFacet||n.footerTemplate))},directives:[Oe,lt,Q,Lt],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),h5=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be],Nt]}),t})();const m5=["cb"],f5=function(t,i,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":t,"p-disabled":i,"p-checkbox-label-focus":e}};function g5(t,i){if(1&t){const e=I();l(0,"label",7),C("click",function(s){v(e);const r=d(),o=F(3);return r.onClick(s,o,!0)}),g(1),c()}if(2&t){const e=d();me(e.labelStyleClass),p("ngClass",Rt(5,f5,e.checked(),e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const _5=function(t,i,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":t,"p-checkbox-disabled":i,"p-checkbox-focused":e}},b5=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-focus":e}},v5={provide:dn,useExisting:Ue(()=>rn),multi:!0};let rn=(()=>{class t{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,n,s){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),s&&n.focus())}updateModel(e){let n;this.binary?(n=this.checked()?this.falseValue:this.trueValue,this.model=n,this.onModelChange(n)):(n=this.checked()?this.model.filter(s=>!Z.equals(s,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(n),this.model=n,this.formControl&&this.formControl.setValue(n)),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Z.contains(this.value,this.model)}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-checkbox"]],viewQuery:function(e,n){if(1&e&&j(m5,5),2&e){let s;V(s=B())&&(n.inputViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Ne([v5])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()})("change",function(o){return n.handleChange(o)}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.onClick(o,u,!0)}),k(5,"span",5),c()(),_(6,g5,2,9,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Rt(18,_5,n.checked(),n.disabled,n.focused)),a(2),p("readonly",n.readonly)("value",n.value)("checked",n.checked())("disabled",n.disabled),ne("id",n.inputId)("name",n.name)("tabindex",n.tabindex)("aria-labelledby",n.ariaLabelledBy)("aria-label",n.ariaLabel)("aria-checked",n.checked())("required",n.required),a(2),p("ngClass",Rt(22,b5,n.checked(),n.disabled,n.focused)),a(1),p("ngClass",n.checked()?n.checkboxIcon:null),a(1),p("ngIf",n.label))},directives:[lt,Oe,Q],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),t})(),C5=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function Wu(t,i=0){return function w5(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):i}function Gf(t,i,e,n){return Ms(e)&&(n=e,e=void 0),n?Gf(t,i,e).pipe(et(s=>Nr(s)?n(...s):n(s))):new Je(s=>{uT(t,i,function r(o){s.next(arguments.length>1?Array.prototype.slice.call(arguments):o)},s,e)})}function uT(t,i,e,n,s){let r;if(function D5(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const o=t;t.addEventListener(i,e,s),r=()=>o.removeEventListener(i,e,s)}else if(function x5(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const o=t;t.on(i,e),r=()=>o.off(i,e)}else if(function S5(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const o=t;t.addListener(i,e),r=()=>o.removeListener(i,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,u=t.length;o0?super.requestAsyncId(i,e,n):(i.actions.push(this),i.scheduled||(i.scheduled=requestAnimationFrame(()=>i.flush(null))))}recycleAsyncId(i,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(i,e,n);0===i.actions.length&&(cancelAnimationFrame(e),i.scheduled=void 0)}});let E5=1;const R5=Promise.resolve(),Ku={};function dT(t){return t in Ku&&(delete Ku[t],!0)}const pT={setImmediate(t){const i=E5++;return Ku[i]=!0,R5.then(()=>dT(i)&&t()),i},clearImmediate(t){dT(t)}},A5=new class O5 extends Hi{flush(i){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,s=-1,r=e.length;i=i||e.shift();do{if(n=i.execute(i.state,i.delay))break}while(++s0?super.requestAsyncId(i,e,n):(i.actions.push(this),i.scheduled||(i.scheduled=pT.setImmediate(i.flush.bind(i,null))))}recycleAsyncId(i,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(i,e,n);0===i.actions.length&&(pT.clearImmediate(e),i.scheduled=void 0)}});class F5{constructor(i,e){this.compare=i,this.keySelector=e}call(i,e){return e.subscribe(new N5(i,this.compare,this.keySelector))}}class N5 extends yt{constructor(i,e,n){super(i),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(i,e){return i===e}_next(i){let e;try{const{keySelector:s}=this;e=s?s(i):i}catch(s){return this.destination.error(s)}let n=!1;if(this.hasKey)try{const{compare:s}=this;n=s(this.key,e)}catch(s){return this.destination.error(s)}else this.hasKey=!0;n||(this.key=e,this.destination.next(i))}}const zf=new Hi(cu);class B5{constructor(i){this.durationSelector=i}call(i,e){return e.subscribe(new H5(i,this.durationSelector))}}class H5 extends Zo{constructor(i,e){super(i),this.durationSelector=e,this.hasValue=!1}_next(i){if(this.value=i,this.hasValue=!0,!this.throttled){let e;try{const{durationSelector:s}=this;e=s(i)}catch(s){return this.destination.error(s)}const n=Xo(e,new Yo(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:i,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(i))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function hT(t){return!Nr(t)&&t-parseFloat(t)+1>=0}function U5(t){const{index:i,period:e,subscriber:n}=t;if(n.next(i),!n.closed){if(-1===e)return n.complete();t.index=i+1,this.schedule(t,e)}}function jf(t,i=zf){return function V5(t){return function(e){return e.lift(new B5(t))}}(()=>function q5(t=0,i,e){let n=-1;return hT(i)?n=Number(i)<1?1:Number(i):Vr(i)&&(e=i),Vr(e)||(e=zf),new Je(s=>{const r=hT(t)?t:+t-e.now();return e.schedule(U5,r,{index:0,period:n,subscriber:s})})}(t,i))}function $f(t){return i=>i.lift(new G5(t))}class G5{constructor(i){this.notifier=i}call(i,e){const n=new z5(i),s=Xo(this.notifier,new Yo(n));return s&&!n.seenValue?(n.add(s),e.subscribe(n)):n}}class z5 extends Zo{constructor(i){super(i),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function Qu(...t){const i=t[t.length-1];return Vr(i)?(t.pop(),e=>el(t,e,i)):e=>el(t,e)}class $5{call(i,e){return e.subscribe(new W5(i))}}class W5 extends yt{constructor(i){super(i),this.hasPrev=!1}_next(i){let e;this.hasPrev?e=[this.prev,i]:this.hasPrev=!0,this.prev=i,e&&this.destination.next(e)}}let Wf;try{Wf="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(t){Wf=!1}let Ju,Dr,mT=(()=>{class t{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function D4(t){return t===ky}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Wf)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(K(Hc))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function bl(){if("object"!=typeof document||!document)return 0;if(null==Ju){const t=document.createElement("div"),i=t.style;t.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";const e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",t.appendChild(e),document.body.appendChild(t),Ju=0,0===t.scrollLeft&&(t.scrollLeft=1,Ju=0===t.scrollLeft?1:2),t.remove()}return Ju}const Y5=new be("cdk-dir-doc",{providedIn:"root",factory:function Z5(){return O_(en)}}),X5=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let gT=(()=>{class t{constructor(e){if(this.value="ltr",this.change=new H,e){const s=e.documentElement?e.documentElement.dir:null;this.value=function eV(t){const i=(null==t?void 0:t.toLowerCase())||"";return"auto"===i&&"undefined"!=typeof navigator&&(null==navigator?void 0:navigator.language)?X5.test(navigator.language)?"rtl":"ltr":"rtl"===i?"rtl":"ltr"}((e.body?e.body.dir:null)||s||"ltr")}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(K(Y5,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();class iV extends class tV{}{constructor(i){super(),this._data=i}connect(){return ns(this._data)?this._data:oe(this._data)}disconnect(){}}class sV{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(i,e,n,s,r){i.forEachOperation((o,u,h)=>{let b,y;null==o.previousIndex?(b=this._insertView(()=>n(o,u,h),h,e,s(o)),y=b?1:0):null==h?(this._detachAndCacheView(u,e),y=3):(b=this._moveView(u,h,e,s(o)),y=2),r&&r({context:null==b?void 0:b.context,operation:y,record:o})})}detach(){for(const i of this._viewCache)i.destroy();this._viewCache=[]}_insertView(i,e,n,s){const r=this._insertViewFromCache(e,n);if(r)return void(r.context.$implicit=s);const o=i();return n.createEmbeddedView(o.templateRef,o.context,o.index)}_detachAndCacheView(i,e){const n=e.detach(i);this._maybeCacheView(n,e)}_moveView(i,e,n,s){const r=n.get(i);return n.move(r,e),r.context.$implicit=s,r}_maybeCacheView(i,e){if(this._viewCache.lengthe.lift(new F5(t,i))}()),this._viewport=null,this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=n}attach(i){this._viewport=i,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(i,e,n){this._itemSize=i,this._minBufferPx=e,this._maxBufferPx=n,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(i,e){this._viewport&&this._viewport.scrollToOffset(i*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const i=this._viewport.getRenderedRange(),e={start:i.start,end:i.end},n=this._viewport.getViewportSize(),s=this._viewport.getDataLength();let r=this._viewport.measureScrollOffset(),o=this._itemSize>0?r/this._itemSize:0;if(e.end>s){const h=Math.ceil(n/this._itemSize),b=Math.max(0,Math.min(o,s-h));o!=b&&(o=b,r=b*this._itemSize,e.start=Math.floor(o)),e.end=Math.max(0,Math.min(s,e.start+h))}const u=r-e.start*this._itemSize;if(u0&&(e.end=Math.min(s,e.end+b),e.start=Math.max(0,Math.floor(o-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(o))}}function lV(t){return t._scrollStrategy}let Qf=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new aV(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Wu(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Wu(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Wu(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=le({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ne([{provide:vT,useFactory:lV,deps:[Ue(()=>t)]}]),mn]}),t})(),CT=(()=>{class t{constructor(e,n,s){this._ngZone=e,this._platform=n,this._scrolled=new ct,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const n=this.scrollContainers.get(e);n&&(n.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Je(n=>{this._globalSubscription||this._addGlobalListener();const s=e>0?this._scrolled.pipe(jf(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):oe()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(e,n){const s=this.getAncestorScrollContainers(e);return this.scrolled(n).pipe(qs(r=>!r||s.indexOf(r)>-1))}getAncestorScrollContainers(e){const n=[];return this.scrollContainers.forEach((s,r)=>{this._scrollableContainsElement(r,e)&&n.push(r)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,n){let s=function T5(t){return t instanceof Re?t.nativeElement:t}(n),r=e.getElementRef().nativeElement;do{if(s==r)return!0}while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Gf(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(K(nt),K(mT),K(en,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yT=(()=>{class t{constructor(e,n,s,r){this.elementRef=e,this.scrollDispatcher=n,this.ngZone=s,this.dir=r,this._destroyed=new ct,this._elementScrolled=new Je(o=>this.ngZone.runOutsideAngular(()=>Gf(this.elementRef.nativeElement,"scroll").pipe($f(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const n=this.elementRef.nativeElement,s=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=s?e.end:e.start),null==e.right&&(e.right=s?e.start:e.end),null!=e.bottom&&(e.top=n.scrollHeight-n.clientHeight-e.bottom),s&&0!=bl()?(null!=e.left&&(e.right=n.scrollWidth-n.clientWidth-e.left),2==bl()?e.left=e.right:1==bl()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=n.scrollWidth-n.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const n=this.elementRef.nativeElement;!function Q5(){if(null==Dr){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Dr=!1,Dr;if("scrollBehavior"in document.documentElement.style)Dr=!0;else{const t=Element.prototype.scrollTo;Dr=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Dr}()?(null!=e.top&&(n.scrollTop=e.top),null!=e.left&&(n.scrollLeft=e.left)):n.scrollTo(e)}measureScrollOffset(e){const n="left",s="right",r=this.elementRef.nativeElement;if("top"==e)return r.scrollTop;if("bottom"==e)return r.scrollHeight-r.clientHeight-r.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==e?e=o?s:n:"end"==e&&(e=o?n:s),o&&2==bl()?e==n?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:o&&1==bl()?e==n?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==n?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(CT),x(nt),x(gT,8))},t.\u0275dir=le({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),dV=(()=>{class t{constructor(e,n,s){this._platform=e,this._change=new ct,this._changeListener=r=>{this._change.next(r)},this._document=s,n.runOutsideAngular(()=>{if(e.isBrowser){const r=this._getWindow();r.addEventListener("resize",this._changeListener),r.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:n,height:s}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+s,right:e.left+n,height:s,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,n=this._getWindow(),s=e.documentElement,r=s.getBoundingClientRect();return{top:-r.top||e.body.scrollTop||n.scrollY||s.scrollTop||0,left:-r.left||e.body.scrollLeft||n.scrollX||s.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(jf(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(K(mT),K(nt),K(en,8))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const hV="undefined"!=typeof requestAnimationFrame?I5:A5;let Po=(()=>{class t extends yT{constructor(e,n,s,r,o,u,h){super(e,u,s,o),this.elementRef=e,this._changeDetectorRef=n,this._scrollStrategy=r,this._detachedSubject=new ct,this._renderedRangeSubject=new ct,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Je(b=>this._scrollStrategy.scrolledIndexChange.subscribe(y=>Promise.resolve().then(()=>this.ngZone.run(()=>b.next(y))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=Et.EMPTY,this._viewportChanges=h.change().subscribe(()=>{this.checkViewportSize()})}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=function y5(t){return null!=t&&"false"!=`${t}`}(e)}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(Qu(null),jf(0,hV)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe($f(this._detachedSubject)).subscribe(n=>{const s=n.length;s!==this._dataLength&&(this._dataLength=s,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function pV(t,i){return t.start==i.start&&t.end==i.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,n="to-start"){const r="horizontal"==this.orientation,o=r?"X":"Y";let h=`translate${o}(${Number((r&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e=this.appendOnly&&"to-start"===n?0:e,"to-end"===n&&(h+=` translate${o}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=h&&(this._renderedContentTransform=h,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,n="auto"){const s={behavior:n};"horizontal"===this.orientation?s.start=e:s.top=e,this.scrollTo(s)}scrollToIndex(e,n="auto"){this._scrollStrategy.scrollToIndex(e,n)}measureScrollOffset(e){return super.measureScrollOffset(e||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const e=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?e.clientWidth:e.clientHeight}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const n of e)n()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(nt),x(vT,8),x(gT,8),x(CT),x(dV))},t.\u0275cmp=G({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,n){if(1&e&&j(rV,7),2&e){let s;V(s=B())&&(n._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,n){2&e&&ii("cdk-virtual-scroll-orientation-horizontal","horizontal"===n.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==n.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ne([{provide:yT,useExisting:t}]),ut],ngContentSelectors:oV,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,n){1&e&&(yn(),l(0,"div",0,1),St(2),c(),k(3,"div",2)),2&e&&(a(3),Hn("width",n._totalContentWidth)("height",n._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"],encapsulation:2,changeDetection:0}),t})();function wT(t,i,e){if(!e.getBoundingClientRect)return 0;const s=e.getBoundingClientRect();return"horizontal"===t?"start"===i?s.left:s.right:"start"===i?s.top:s.bottom}let Jf=(()=>{class t{constructor(e,n,s,r,o,u){this._viewContainerRef=e,this._template=n,this._differs=s,this._viewRepeater=r,this._viewport=o,this.viewChange=new ct,this._dataSourceChanges=new ct,this.dataStream=this._dataSourceChanges.pipe(Qu(null),function j5(){return t=>t.lift(new $5)}(),qi(([h,b])=>this._changeDataSource(h,b)),Gm(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new ct,this.dataStream.subscribe(h=>{this._data=h,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe($f(this._destroyed)).subscribe(h=>{this._renderedRange=h,this.viewChange.observers.length&&u.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function nV(t){return t&&"function"==typeof t.connect}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new iV(ns(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(n,s)=>e(n+(this._renderedRange?this._renderedRange.start:0),s):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=Wu(e)}measureRangeSize(e,n){if(e.start>=e.end)return 0;const s=e.start-this._renderedRange.start,r=e.end-e.start;let o,u;for(let h=0;h-1;h--){const b=this._viewContainerRef.get(h+s);if(b&&b.rootNodes.length){u=b.rootNodes[b.rootNodes.length-1];break}}return o&&u?wT(n,"end",u)-wT(n,"start",o):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,n)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,n):n)),this._needsUpdate=!0)}_changeDataSource(e,n){return e&&e.disconnect(this),this._needsUpdate=!0,n?n.connect(this):oe()}_updateContext(){const e=this._data.length;let n=this._viewContainerRef.length;for(;n--;){const s=this._viewContainerRef.get(n);s.context.index=this._renderedRange.start+n,s.context.count=e,this._updateComputedContextProperties(s.context),s.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(r,o,u)=>this._getEmbeddedViewArgs(r,u),r=>r.item),e.forEachIdentityChange(r=>{this._viewContainerRef.get(r.currentIndex).context.$implicit=r.item});const n=this._data.length;let s=this._viewContainerRef.length;for(;s--;){const r=this._viewContainerRef.get(s);r.context.index=this._renderedRange.start+s,r.context.count=n,this._updateComputedContextProperties(r.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,n){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:n}}}return t.\u0275fac=function(e){return new(e||t)(x(vi),x(bi),x($a),x(bT),x(Po,4),x(nt))},t.\u0275dir=le({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Ne([{provide:bT,useClass:sV}])]}),t})(),TT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})(),Fo=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[_T,TT],_T,TT]}),t})(),Jt=(()=>{class t{constructor(e,n,s){this.el=e,this.zone=n,this.config=s,this.escape=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.addEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.tooltipOptions&&(this._tooltipOptions=Object.assign(Object.assign({},this._tooltipOptions),e.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?L.appendChild(this.container,this.el.nativeElement):L.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block"}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),L.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?gt.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&>.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+L.getWindowScrollLeft(),top:e.top+L.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),n=e.left+L.getOuterWidth(this.el.nativeElement),s=e.top+(L.getOuterHeight(this.el.nativeElement)-L.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),n=e.left-L.getOuterWidth(this.container),s=e.top+(L.getOuterHeight(this.el.nativeElement)-L.getOuterHeight(this.container))/2;this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),n=e.left+(L.getOuterWidth(this.el.nativeElement)-L.getOuterWidth(this.container))/2,s=e.top-L.getOuterHeight(this.container);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),n=e.left+(L.getOuterWidth(this.el.nativeElement)-L.getOuterWidth(this.container))/2,s=e.top+L.getOuterHeight(this.el.nativeElement);this.container.style.left=n+this.getOption("positionLeft")+"px",this.container.style.top=s+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=Object.assign(Object.assign({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return L.hasClass(e,"p-inputwrapper")?L.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let n="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?n+" "+this.getOption("tooltipStyleClass"):n}isOutOfBounds(){let e=this.container.getBoundingClientRect(),n=e.top,s=e.left,r=L.getOuterWidth(this.container),o=L.getOuterHeight(this.container),u=L.getViewport();return s+r>u.width||s<0||n<0||n+o>u.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):L.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&>.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(zn))},t.\u0275dir=le({type:t,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[mn]}),t})(),ai=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function mV(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d();a(1),S(e.label||"empty")}}function fV(t,i){1&t&&Y(0)}const ST=function(t){return{height:t}},gV=function(t,i){return{"p-dropdown-item":!0,"p-highlight":t,"p-disabled":i}},Yf=function(t){return{$implicit:t}},_V=["container"],bV=["filter"],vV=["in"],CV=["editableInput"];function yV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),S(e.label||"empty")}}function wV(t,i){1&t&&Y(0)}const TV=function(t){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":t}};function SV(t,i){if(1&t&&(l(0,"span",12),_(1,yV,2,1,"ng-container",13),_(2,wV,1,0,"ng-container",14),c()),2&t){const e=d();p("ngClass",z(9,TV,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),ne("id",e.labelId),a(1),p("ngIf",!e.selectedItemTemplate),a(1),p("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",z(11,Yf,e.selectedOption))}}const xV=function(t){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":t}};function DV(t,i){if(1&t&&(l(0,"span",15),g(1),c()),2&t){const e=d();p("ngClass",z(2,xV,null==e.placeholder||0===e.placeholder.length)),a(1),S(e.placeholder||"empty")}}function MV(t,i){if(1&t){const e=I();l(0,"input",16,17),C("click",function(){return v(e),d().onEditableInputClick()})("input",function(s){return v(e),d().onEditableInputChange(s)})("focus",function(s){return v(e),d().onEditableInputFocus(s)})("blur",function(s){return v(e),d().onInputBlur(s)}),c()}if(2&t){const e=d();p("disabled",e.disabled),ne("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function kV(t,i){if(1&t){const e=I();l(0,"i",18),C("click",function(s){return v(e),d().clear(s)}),c()}}function IV(t,i){1&t&&Y(0)}function EV(t,i){if(1&t){const e=I();l(0,"div",26)(1,"div",27),C("click",function(s){return s.stopPropagation()}),l(2,"input",28,29),C("keydown.enter",function(s){return s.preventDefault()})("keydown",function(s){return v(e),d(2).onKeydown(s,!1)})("input",function(s){return v(e),d(2).onFilterInputChange(s)}),c(),k(4,"span",30),c()()}if(2&t){const e=d(2);a(2),p("value",e.filterValue||""),ne("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function RV(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(3);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function LV(t,i){1&t&&Y(0)}function OV(t,i){1&t&&Y(0)}const xT=function(t,i){return{$implicit:t,selectedOption:i}};function AV(t,i){if(1&t&&(l(0,"li",32),_(1,RV,2,1,"span",13),_(2,LV,1,0,"ng-container",14),c(),_(3,OV,1,0,"ng-container",14)),2&t){const e=i.$implicit;d(2);const n=F(8),s=d();a(1),p("ngIf",!s.groupTemplate),a(1),p("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",z(5,Yf,e)),a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",We(7,xT,s.getOptionGroupChildren(e),s.selectedOption))}}function PV(t,i){if(1&t&&(ce(0),_(1,AV,4,10,"ng-template",31),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.optionsToDisplay)}}function FV(t,i){1&t&&Y(0)}function NV(t,i){if(1&t&&(ce(0),_(1,FV,1,0,"ng-container",14),ue()),2&t){d();const e=F(8),n=d();a(1),p("ngTemplateOutlet",e)("ngTemplateOutletContext",We(2,xT,n.optionsToDisplay,n.selectedOption))}}function VV(t,i){if(1&t){const e=I();l(0,"p-dropdownItem",35),C("onClick",function(s){return v(e),d(4).onItemClick(s)}),c()}if(2&t){const e=i.$implicit,n=d(2).selectedOption,s=d(2);p("option",e)("selected",n==e)("label",s.getOptionLabel(e))("disabled",s.isOptionDisabled(e))("template",s.itemTemplate)}}function BV(t,i){if(1&t&&(ce(0),_(1,VV,1,5,"ng-template",31),ue()),2&t){const e=d().$implicit;a(1),p("ngForOf",e)}}function HV(t,i){if(1&t){const e=I();ce(0),l(1,"p-dropdownItem",35),C("onClick",function(s){return v(e),d(5).onItemClick(s)}),c(),ue()}if(2&t){const e=i.$implicit,n=d(3).selectedOption,s=d(2);a(1),p("option",e)("selected",n==e)("label",s.getOptionLabel(e))("disabled",s.isOptionDisabled(e))("template",s.itemTemplate)}}function qV(t,i){if(1&t){const e=I();l(0,"cdk-virtual-scroll-viewport",37,38),C("scrolledIndexChange",function(){return v(e),d(4).scrollToSelectedVirtualScrollElement()}),_(2,HV,2,5,"ng-container",39),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("ngStyle",z(3,ST,n.scrollHeight))("itemSize",n.itemSize),a(2),p("cdkVirtualForOf",e)}}function UV(t,i){if(1&t&&_(0,qV,3,5,"cdk-virtual-scroll-viewport",36),2&t){const e=d(3);p("ngIf",e.virtualScroll&&e.optionsToDisplay&&e.optionsToDisplay.length)}}function GV(t,i){if(1&t&&(_(0,BV,2,1,"ng-container",33),_(1,UV,1,1,"ng-template",null,34,we)),2&t){const e=F(2);p("ngIf",!d(2).virtualScroll)("ngIfElse",e)}}function zV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function jV(t,i){1&t&&Y(0,null,41)}function $V(t,i){if(1&t&&(l(0,"li",40),_(1,zV,2,1,"ng-container",33),_(2,jV,2,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function WV(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyMessageLabel," ")}}function KV(t,i){1&t&&Y(0,null,42)}function QV(t,i){if(1&t&&(l(0,"li",40),_(1,WV,2,1,"ng-container",33),_(2,KV,2,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function JV(t,i){1&t&&Y(0)}const YV=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},ZV=function(t){return{value:"visible",params:t}},XV=function(t){return{"p-dropdown-virtualscroll":t}};function e6(t,i){if(1&t){const e=I();l(0,"div",19),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationEnd(s)}),_(1,IV,1,0,"ng-container",20),_(2,EV,5,4,"div",21),l(3,"div",22)(4,"ul",23),_(5,PV,2,1,"ng-container",13),_(6,NV,2,5,"ng-container",13),_(7,GV,3,2,"ng-template",null,24,we),_(9,$V,3,3,"li",25),_(10,QV,3,3,"li",25),c()(),_(11,JV,1,0,"ng-container",20),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngClass","p-dropdown-panel p-component")("@overlayAnimation",z(19,ZV,We(16,YV,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),a(1),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",e.filter),a(1),Hn("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),a(1),p("ngClass",z(21,XV,e.virtualScroll)),ne("id",e.listId),a(1),p("ngIf",e.group),a(1),p("ngIf",!e.group),a(3),p("ngIf",e.filterValue&&e.isEmpty()),a(1),p("ngIf",!e.filterValue&&e.isEmpty()),a(1),p("ngTemplateOutlet",e.footerTemplate)}}const t6=function(t,i,e,n){return{"p-dropdown p-component":!0,"p-disabled":t,"p-dropdown-open":i,"p-focus":e,"p-dropdown-clearable":n}},n6={provide:dn,useExisting:Ue(()=>Vt),multi:!0};let i6=(()=>{class t{constructor(){this.onClick=new H}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"li",0),C("click",function(r){return n.onOptionClick(r)}),_(1,mV,2,1,"span",1),_(2,fV,1,0,"ng-container",2),c()),2&e&&(p("ngStyle",z(8,ST,n.itemSize+"px"))("id",n.selected?"p-highlighted-option":"")("ngClass",We(10,gV,n.selected,n.disabled)),ne("aria-label",n.label)("aria-selected",n.selected),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(13,Yf,n.option)))},directives:[vt,lt,Oe,Q,Lt],encapsulation:2}),t})(),Vt=(()=>{class t{constructor(e,n,s,r,o,u,h){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.filterService=o,this.config=u,this.overlayService=h,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.onChange=new H,this.onFilter=new H,this.onFocus=new H,this.onBlur=new H,this.onClick=new H,this.onShow=new H,this.onHide=new H,this.onClear=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.viewPortOffsetTop=0,this.id=pl()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list"}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),this.selectedOption||(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ft.EMPTY_FILTER_MESSAGE)}get filled(){return this.value||null!=this.value||null!=this.value}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const n=e.option;this.isOptionDisabled(n)||(this.selectItem(e.originalEvent,n),this.accessibleViewChild.nativeElement.focus()),setTimeout(()=>{this.hide()},150)}selectItem(e,n){this.selectedOption!=n&&(this.selectedOption=n,this.value=this.getOptionValue(n),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}),this.virtualScroll&&setTimeout(()=>{this.viewPortOffsetTop=this.viewPort?this.viewPort.measureScrollOffset():0},1))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.virtualScroll&&this.updateVirtualScrollSelectedIndex(!0),this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){if(this.virtualScroll&&this.viewPort){let n=this.viewPort.getRenderedRange();this.updateVirtualScrollSelectedIndex(!1),(n.start>this.virtualScrollSelectedIndex||n.end-1&&this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex)),this.virtualAutoScrolled=!0}updateVirtualScrollSelectedIndex(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay))}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):L.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=L.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.virtualScroll&&(this.virtualAutoScrolled=!1),this.cd.markForCheck()}alignOverlay(){this.overlay&&(this.appendTo?L.absolutePosition(this.overlay,this.containerViewChild.nativeElement):L.relativePosition(this.overlay,this.containerViewChild.nativeElement))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let n;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let s=e-1;0<=s;s--){let r=this.optionsToDisplay[s];if(!this.isOptionDisabled(r)){n=r;break}}if(!n)for(let s=this.optionsToDisplay.length-1;s>=e;s--){let r=this.optionsToDisplay[s];if(!this.isOptionDisabled(r)){n=r;break}}}return n}findNextEnabledOption(e){let n;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let s=e+1;s0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let s=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,r=this.findNextEnabledOption(s);r&&(this.selectItem(e,r),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let s=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==s){let r=s.itemIndex-1;if(r>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[s.groupIndex])[r]),this.selectedOptionUpdated=!0;else if(r<0){let o=this.optionsToDisplay[s.groupIndex-1];o&&(this.selectItem(e,this.getOptionGroupChildren(o)[this.getOptionGroupChildren(o).length-1]),this.selectedOptionUpdated=!0)}}}else{let s=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,r=this.findPrevEnabledOption(s);r&&(this.selectItem(e,r),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:n&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:n&&!e.metaKey&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const n=e.key;let s;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=n,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+n:n,this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};s=this.searchOptionWithinGroup(r)}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;s=this.searchOption(++r)}s&&!this.isOptionDisabled(s)&&(this.selectItem(e,s),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let n;return this.searchValue&&(n=this.searchOptionInRange(e,this.optionsToDisplay.length),n||(n=this.searchOptionInRange(0,e))),n}searchOptionInRange(e,n){for(let s=e;s{!this.preventDocumentDefault&&this.isOutsideClicked(n)&&(this.hide(),this.unbindDocumentClickListener()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){this.overlayVisible&&!L.isTouchDevice()&&this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,e=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}clear(e){this.value=null,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel(),this.onClear.emit(e)}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&>.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(hl),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-dropdown"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(_V,5),j(bV,5),j(vV,5),j(Po,5),j(CV,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.filterViewChild=s.first),V(s=B())&&(n.accessibleViewChild=s.first),V(s=B())&&(n.viewPort=s.first),V(s=B())&&(n.editableInputViewChild=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focused||n.overlayVisible)},inputs:{scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",selectId:"selectId",dataKey:"dataKey",filterBy:"filterBy",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",virtualScroll:"virtualScroll",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",disabled:"disabled",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear"},features:[Ne([n6])],decls:12,vars:25,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","","aria-haspopup","listbox","aria-haspopup","listbox","role","combobox",3,"disabled","focus","blur","keydown"],["in",""],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],["type","text","class","p-dropdown-label p-inputtext","aria-haspopup","listbox",3,"disabled","click","input","focus","blur",4,"ngIf"],["class","p-dropdown-clear-icon pi pi-times",3,"click",4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-dropdown-trigger"],[1,"p-dropdown-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],["type","text","aria-haspopup","listbox",1,"p-dropdown-label","p-inputtext",3,"disabled","click","input","focus","blur"],["editableInput",""],[1,"p-dropdown-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","click"],[4,"ngTemplateOutlet"],["class","p-dropdown-header",4,"ngIf"],[1,"p-dropdown-items-wrapper"],["role","listbox",1,"p-dropdown-items",3,"ngClass"],["itemslist",""],["class","p-dropdown-empty-message",4,"ngIf"],[1,"p-dropdown-header"],[1,"p-dropdown-filter-container",3,"click"],["type","text","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"value","keydown.enter","keydown","input"],["filter",""],[1,"p-dropdown-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-dropdown-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],[3,"option","selected","label","disabled","template","onClick"],[3,"ngStyle","itemSize","scrolledIndexChange",4,"ngIf"],[3,"ngStyle","itemSize","scrolledIndexChange"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[1,"p-dropdown-empty-message"],["emptyFilter",""],["empty",""]],template:function(e,n){1&e&&(l(0,"div",0,1),C("click",function(r){return n.onMouseclick(r)}),l(2,"div",2)(3,"input",3,4),C("focus",function(r){return n.onInputFocus(r)})("blur",function(r){return n.onInputBlur(r)})("keydown",function(r){return n.onKeydown(r,!0)}),c()(),_(5,SV,3,13,"span",5),_(6,DV,2,4,"span",6),_(7,MV,2,4,"input",7),_(8,kV,1,0,"i",8),l(9,"div",9),k(10,"span",10),c(),_(11,e6,12,23,"div",11),c()),2&e&&(me(n.styleClass),p("ngClass",_i(20,t6,n.disabled,n.overlayVisible,n.focused,n.showClear&&!n.disabled))("ngStyle",n.style),a(3),p("disabled",n.disabled),ne("id",n.inputId)("placeholder",n.placeholder)("aria-label",n.ariaLabel)("aria-expanded",!1)("aria-labelledby",n.ariaLabelledBy)("tabindex",n.tabindex)("autofocus",n.autofocus)("aria-activedescendant",n.overlayVisible?n.labelId:null),a(2),p("ngIf",!n.editable&&null!=n.label),a(1),p("ngIf",!n.editable&&null==n.label),a(1),p("ngIf",n.editable),a(1),p("ngIf",null!=n.value&&n.showClear&&!n.disabled),a(1),ne("aria-expanded",n.overlayVisible),a(1),p("ngClass",n.dropdownIcon),a(1),p("ngIf",n.overlayVisible))},directives:[i6,Po,Oe,lt,Q,Jt,Lt,at,Qf,Jf],styles:[".p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;visibility:hidden}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-panel{position:absolute;top:0;left:0}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),Yu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,Fo,ai,gn],Nt,Fo]}),t})(),DT=(()=>{class t{constructor(e,n,s){this.el=e,this.ngModel=n,this.cd=s}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(_e,8),x(ot))},t.\u0275dir=le({type:t,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,n){1&e&&C("input",function(r){return n.onInput(r)}),2&e&&ii("p-filled",n.filled)}}),t})(),MT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const s6=["input"];function r6(t,i){if(1&t){const e=I();l(0,"i",6),C("click",function(){return v(e),d().clear()}),c()}}const kT=function(){return{"p-inputnumber-button p-inputnumber-button-up":!0}},IT=function(){return{"p-inputnumber-button p-inputnumber-button-down":!0}};function o6(t,i){if(1&t){const e=I();l(0,"span",7)(1,"button",8),C("mousedown",function(s){return v(e),d().onUpButtonMouseDown(s)})("mouseup",function(){return v(e),d().onUpButtonMouseUp()})("mouseleave",function(){return v(e),d().onUpButtonMouseLeave()})("keydown",function(s){return v(e),d().onUpButtonKeyDown(s)})("keyup",function(){return v(e),d().onUpButtonKeyUp()}),c(),l(2,"button",8),C("mousedown",function(s){return v(e),d().onDownButtonMouseDown(s)})("mouseup",function(){return v(e),d().onDownButtonMouseUp()})("mouseleave",function(){return v(e),d().onDownButtonMouseLeave()})("keydown",function(s){return v(e),d().onDownButtonKeyDown(s)})("keyup",function(){return v(e),d().onDownButtonKeyUp()}),c()()}if(2&t){const e=d();a(1),me(e.incrementButtonClass),p("ngClass",A(10,kT))("icon",e.incrementButtonIcon)("disabled",e.disabled),a(1),me(e.decrementButtonClass),p("ngClass",A(11,IT))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}function a6(t,i){if(1&t){const e=I();l(0,"button",8),C("mousedown",function(s){return v(e),d().onUpButtonMouseDown(s)})("mouseup",function(){return v(e),d().onUpButtonMouseUp()})("mouseleave",function(){return v(e),d().onUpButtonMouseLeave()})("keydown",function(s){return v(e),d().onUpButtonKeyDown(s)})("keyup",function(){return v(e),d().onUpButtonKeyUp()}),c()}if(2&t){const e=d();me(e.incrementButtonClass),p("ngClass",A(5,kT))("icon",e.incrementButtonIcon)("disabled",e.disabled)}}function l6(t,i){if(1&t){const e=I();l(0,"button",8),C("mousedown",function(s){return v(e),d().onDownButtonMouseDown(s)})("mouseup",function(){return v(e),d().onDownButtonMouseUp()})("mouseleave",function(){return v(e),d().onDownButtonMouseLeave()})("keydown",function(s){return v(e),d().onDownButtonKeyDown(s)})("keyup",function(){return v(e),d().onDownButtonKeyUp()}),c()}if(2&t){const e=d();me(e.decrementButtonClass),p("ngClass",A(5,IT))("icon",e.decrementButtonIcon)("disabled",e.disabled)}}const c6=function(t,i,e){return{"p-inputnumber p-component":!0,"p-inputnumber-buttons-stacked":t,"p-inputnumber-buttons-horizontal":i,"p-inputnumber-buttons-vertical":e}},u6={provide:dn,useExisting:Ue(()=>dt),multi:!0};let dt=(()=>{class t{constructor(e,n){this.el=e,this.cd=n,this.showButtons=!1,this.format=!0,this.buttonLayout="stacked",this.incrementButtonIcon="pi pi-angle-up",this.decrementButtonIcon="pi pi-angle-down",this.readonly=!1,this.step=1,this.allowEmpty=!0,this.mode="decimal",this.useGrouping=!0,this.showClear=!1,this.onInput=new H,this.onFocus=new H,this.onBlur=new H,this.onKeyDown=new H,this.onClear=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.groupChar="",this.prefixChar="",this.suffixChar=""}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1),this._disabled=e,this.timer&&this.clearTimer()}ngOnChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(s=>!!e[s])&&this.updateConstructParser()}ngOnInit(){this.constructParser(),this.initialized=!0}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),n=new Map(e.map((s,r)=>[s,r]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=s=>n.get(s)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,Object.assign(Object.assign({},this.getOptions()),{useGrouping:!1}));return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")}getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let s=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(s=this.prefix+s),this.suffix&&(s+=this.suffix),s}return e.toString()}return""}parseValue(e){let n=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(n){if("-"===n)return n;let s=+n;return isNaN(s)?null:s}return null}repeat(e,n,s){if(this.readonly)return;let r=n||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,s)},r),this.spin(e,s)}spin(e,n){let s=this.step*n,r=this.parseValue(this.input.nativeElement.value)||0,o=this.validateValue(r+s);this.maxlength&&this.maxlength0&&n>h){const w=this.isDecimalMode()&&(this.minFractionDigits||0)0?o:""):o=r.slice(0,n-1)+r.slice(n)}this.updateValue(e,o,null,"delete-single")}else o=this.deleteRange(r,n,s),this.updateValue(e,o,null,"delete-range");break;case 46:if(e.preventDefault(),n===s){const u=r.charAt(n),{decimalCharIndex:h,decimalCharIndexWithoutPrefix:b}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(u)){const y=this.getDecimalLength(r);if(this._group.test(u))this._group.lastIndex=0,o=r.slice(0,n)+r.slice(n+2);else if(this._decimal.test(u))this._decimal.lastIndex=0,y?this.input.nativeElement.setSelectionRange(n+1,n+1):o=r.slice(0,n)+r.slice(n+1);else if(h>0&&n>h){const w=this.isDecimalMode()&&(this.minFractionDigits||0)0?o:""):o=r.slice(0,n)+r.slice(n+1)}this.updateValue(e,o,null,"delete-back-single")}else o=this.deleteRange(r,n,s),this.updateValue(e,o,null,"delete-range")}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let n=e.which||e.keyCode,s=String.fromCharCode(n);const r=this.isDecimalSign(s),o=this.isMinusSign(s);(48<=n&&n<=57||o||r)&&this.insert(e,s,{isDecimalSign:r,isMinusSign:o})}onPaste(e){if(!this.disabled&&!this.readonly){e.preventDefault();let n=(e.clipboardData||window.clipboardData).getData("Text");if(n){let s=this.parseValue(n);null!=s&&this.insert(e,s.toString())}}}allowMinusSign(){return null==this.min||this.min<0}isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e||(this._minusSign.lastIndex=0,0))}isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)}isDecimalMode(){return"decimal"===this.mode}getDecimalCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;const r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){const n=e.search(this._decimal);this._decimal.lastIndex=0;const s=e.search(this._minusSign);this._minusSign.lastIndex=0;const r=e.search(this._suffix);this._suffix.lastIndex=0;const o=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:s,suffixCharIndex:r,currencyCharIndex:o}}insert(e,n,s={isDecimalSign:!1,isMinusSign:!1}){const r=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==r)return;let o=this.input.nativeElement.selectionStart,u=this.input.nativeElement.selectionEnd,h=this.input.nativeElement.value.trim();const{decimalCharIndex:b,minusCharIndex:y,suffixCharIndex:w,currencyCharIndex:M}=this.getCharIndexes(h);let E;if(s.isMinusSign)0===o&&(E=h,(-1===y||0!==u)&&(E=this.insertText(h,n,0,u)),this.updateValue(e,E,n,"insert"));else if(s.isDecimalSign)b>0&&o===b?this.updateValue(e,h,n,"insert"):(b>o&&b0&&o>b){if(o+n.length-(b+1)<=R){const N=M>=o?M-1:w>=o?w:h.length;E=h.slice(0,o)+n+h.slice(o+n.length,N)+h.slice(N),this.updateValue(e,E,n,O)}}else E=this.insertText(h,n,o,u),this.updateValue(e,E,n,O)}}insertText(e,n,s,r){if(2===("."===n?n:n.split(".")).length){const u=e.slice(s,r).search(this._decimal);return this._decimal.lastIndex=0,u>0?e.slice(0,s)+this.formatValue(n)+e.slice(r):e||this.formatValue(n)}return r-s===e.length?this.formatValue(n):0===s?n+e.slice(r):r===e.length?e.slice(0,s)+n:e.slice(0,s)+n+e.slice(r)}deleteRange(e,n,s){let r;return r=s-n===e.length?"":0===n?e.slice(s):s===e.length?e.slice(0,n):e.slice(0,n)+e.slice(s),r}initCursor(){let e=this.input.nativeElement.selectionStart,n=this.input.nativeElement.value,s=n.length,r=null,o=(this.prefixChar||"").length;n=n.replace(this._prefix,""),e-=o;let u=n.charAt(e);if(this.isNumeralChar(u))return e+o;let h=e-1;for(;h>=0;){if(u=n.charAt(h),this.isNumeralChar(u)){r=h+o;break}h--}if(null!==r)this.input.nativeElement.setSelectionRange(r+1,r+1);else{for(h=e;hthis.max?this.max:e}updateInput(e,n,s,r){n=n||"";let o=this.input.nativeElement.value,u=this.formatValue(e),h=o.length;if(u!==r&&(u=this.concatValues(u,r)),0===h){this.input.nativeElement.value=u,this.input.nativeElement.setSelectionRange(0,0);const y=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(y,y)}else{let b=this.input.nativeElement.selectionStart,y=this.input.nativeElement.selectionEnd;if(this.maxlength&&this.maxlength0}clearTimer(){this.timer&&clearInterval(this.timer)}getFormatter(){return this.numberFormat}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-inputNumber"]],viewQuery:function(e,n){if(1&e&&j(s6,5),2&e){let s;V(s=B())&&(n.input=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focused)("p-inputnumber-clearable",n.showClear&&"vertical"!=n.buttonLayout)},inputs:{showButtons:"showButtons",format:"format",buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",style:"style",placeholder:"placeholder",size:"size",maxlength:"maxlength",tabindex:"tabindex",title:"title",ariaLabel:"ariaLabel",ariaRequired:"ariaRequired",name:"name",required:"required",autocomplete:"autocomplete",min:"min",max:"max",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:"readonly",step:"step",allowEmpty:"allowEmpty",locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:"showClear",disabled:"disabled"},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[Ne([u6]),mn],decls:7,vars:32,consts:[[3,"ngClass","ngStyle"],["pInputText","","inputmode","decimal",3,"ngClass","ngStyle","value","disabled","readonly","input","keydown","keypress","paste","click","focus","blur"],["input",""],["class","p-inputnumber-clear-icon pi pi-times",3,"click",4,"ngIf"],["class","p-inputnumber-button-group",4,"ngIf"],["type","button","pButton","",3,"ngClass","class","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],[1,"p-inputnumber-clear-icon","pi","pi-times",3,"click"],[1,"p-inputnumber-button-group"],["type","button","pButton","",3,"ngClass","icon","disabled","mousedown","mouseup","mouseleave","keydown","keyup"]],template:function(e,n){1&e&&(l(0,"span",0)(1,"input",1,2),C("input",function(r){return n.onUserInput(r)})("keydown",function(r){return n.onInputKeyDown(r)})("keypress",function(r){return n.onInputKeyPress(r)})("paste",function(r){return n.onPaste(r)})("click",function(){return n.onInputClick()})("focus",function(r){return n.onInputFocus(r)})("blur",function(r){return n.onInputBlur(r)}),c(),_(3,r6,1,0,"i",3),_(4,o6,3,12,"span",4),_(5,a6,1,6,"button",5),_(6,l6,1,6,"button",5),c()),2&e&&(me(n.styleClass),p("ngClass",Rt(28,c6,n.showButtons&&"stacked"===n.buttonLayout,n.showButtons&&"horizontal"===n.buttonLayout,n.showButtons&&"vertical"===n.buttonLayout))("ngStyle",n.style),a(1),me(n.inputStyleClass),p("ngClass","p-inputnumber-input")("ngStyle",n.inputStyle)("value",n.formattedValue())("disabled",n.disabled)("readonly",n.readonly),ne("placeholder",n.placeholder)("title",n.title)("id",n.inputId)("size",n.size)("name",n.name)("autocomplete",n.autocomplete)("maxlength",n.maxlength)("tabindex",n.tabindex)("aria-label",n.ariaLabel)("aria-required",n.ariaRequired)("required",n.required)("min",n.min)("max",n.max),a(2),p("ngIf","vertical"!=n.buttonLayout&&n.showClear&&n.value),a(1),p("ngIf",n.showButtons&&"stacked"===n.buttonLayout),a(1),p("ngIf",n.showButtons&&"stacked"!==n.buttonLayout),a(1),p("ngIf",n.showButtons&&"stacked"!==n.buttonLayout))},directives:[Oe,lt,DT,Q,Ln],styles:["p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}.p-inputnumber-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-inputnumber-clearable{position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),Zu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,MT,gl]]}),t})();function d6(t,i){1&t&&Y(0)}const Zf=function(t){return{$implicit:t}};function p6(t,i){if(1&t&&(l(0,"div",15),_(1,d6,1,0,"ng-container",16),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",z(2,Zf,e.paginatorState))}}function h6(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(2);a(1),S(e.currentPageReport)}}const Xu=function(t){return{"p-disabled":t}};function m6(t,i){if(1&t){const e=I();l(0,"button",18),C("click",function(s){return v(e),d(2).changePageToFirst(s)}),k(1,"span",19),c()}if(2&t){const e=d(2);p("disabled",e.isFirstPage()||e.empty())("ngClass",z(2,Xu,e.isFirstPage()||e.empty()))}}const f6=function(t){return{"p-highlight":t}};function g6(t,i){if(1&t){const e=I();l(0,"button",22),C("click",function(s){const o=v(e).$implicit;return d(3).onPageLinkClick(s,o-1)}),g(1),c()}if(2&t){const e=i.$implicit,n=d(3);p("ngClass",z(2,f6,e-1==n.getPage())),a(1),S(e)}}function _6(t,i){if(1&t&&(l(0,"span",20),_(1,g6,2,4,"button",21),c()),2&t){const e=d(2);a(1),p("ngForOf",e.pageLinks)}}function b6(t,i){1&t&&g(0),2&t&&S(d(3).currentPageReport)}function v6(t,i){if(1&t){const e=I();l(0,"p-dropdown",23),C("onChange",function(s){return v(e),d(2).onPageDropdownChange(s)}),_(1,b6,1,1,"ng-template",24),c()}if(2&t){const e=d(2);p("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight)}}function C6(t,i){if(1&t){const e=I();l(0,"button",25),C("click",function(s){return v(e),d(2).changePageToLast(s)}),k(1,"span",26),c()}if(2&t){const e=d(2);p("disabled",e.isLastPage()||e.empty())("ngClass",z(2,Xu,e.isLastPage()||e.empty()))}}function y6(t,i){if(1&t){const e=I();l(0,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d(2).changePage(s-1)}),c()}if(2&t){const e=d(2);p("ngModel",e.currentPage())("disabled",e.empty())}}function w6(t,i){1&t&&Y(0)}function T6(t,i){if(1&t&&_(0,w6,1,0,"ng-container",16),2&t){const e=i.$implicit;p("ngTemplateOutlet",d(4).dropdownItemTemplate)("ngTemplateOutletContext",z(2,Zf,e))}}function S6(t,i){1&t&&(ce(0),_(1,T6,1,4,"ng-template",30),ue())}function x6(t,i){if(1&t){const e=I();l(0,"p-dropdown",28),C("ngModelChange",function(s){return v(e),d(2).rows=s})("onChange",function(s){return v(e),d(2).onRppChange(s)}),_(1,S6,2,0,"ng-container",29),c()}if(2&t){const e=d(2);p("options",e.rowsPerPageItems)("ngModel",e.rows)("disabled",e.empty())("appendTo",e.dropdownAppendTo)("scrollHeight",e.dropdownScrollHeight),a(1),p("ngIf",e.dropdownItemTemplate)}}function D6(t,i){1&t&&Y(0)}function M6(t,i){if(1&t&&(l(0,"div",31),_(1,D6,1,0,"ng-container",16),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",z(2,Zf,e.paginatorState))}}function k6(t,i){if(1&t){const e=I();l(0,"div",1),_(1,p6,2,4,"div",2),_(2,h6,2,1,"span",3),_(3,m6,2,4,"button",4),l(4,"button",5),C("click",function(s){return v(e),d().changePageToPrev(s)}),k(5,"span",6),c(),_(6,_6,2,1,"span",7),_(7,v6,2,5,"p-dropdown",8),l(8,"button",9),C("click",function(s){return v(e),d().changePageToNext(s)}),k(9,"span",10),c(),_(10,C6,2,4,"button",11),_(11,y6,1,2,"p-inputNumber",12),_(12,x6,2,6,"p-dropdown",13),_(13,M6,2,4,"div",14),c()}if(2&t){const e=d();me(e.styleClass),p("ngStyle",e.style)("ngClass","p-paginator p-component"),a(1),p("ngIf",e.templateLeft),a(1),p("ngIf",e.showCurrentPageReport),a(1),p("ngIf",e.showFirstLastIcon),a(1),p("disabled",e.isFirstPage()||e.empty())("ngClass",z(17,Xu,e.isFirstPage()||e.empty())),a(2),p("ngIf",e.showPageLinks),a(1),p("ngIf",e.showJumpToPageDropdown),a(1),p("disabled",e.isLastPage()||e.empty())("ngClass",z(19,Xu,e.isLastPage()||e.empty())),a(2),p("ngIf",e.showFirstLastIcon),a(1),p("ngIf",e.showJumpToPageInput),a(1),p("ngIf",e.rowsPerPageOptions),a(1),p("ngIf",e.templateRight)}}let ET=(()=>{class t{constructor(e){this.cd=e,this.pageLinkSize=5,this.onPageChange=new H,this.alwaysShow=!0,this.dropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.totalRecords=0,this.rows=0,this.showPageLinks=!0,this._first=0,this._page=0}ngOnInit(){this.updatePaginatorState()}ngOnChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions()}get first(){return this._first}set first(e){this._first=e}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];for(let e of this.rowsPerPageOptions)"object"==typeof e&&e.showAll?this.rowsPerPageItems.unshift({label:e.showAll,value:this.totalRecords}):this.rowsPerPageItems.push({label:String(e),value:e})}}isFirstPage(){return 0===this.getPage()}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),n=Math.min(this.pageLinkSize,e),s=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,s+n-1);return s=Math.max(0,s-(this.pageLinkSize-(r-s+1))),[s,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),s=e[1];for(let r=e[0];r<=s;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,n){this.changePage(n),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return 0===this.getPageCount()}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-paginator"]],hostAttrs:[1,"p-element"],inputs:{pageLinkSize:"pageLinkSize",style:"style",styleClass:"styleClass",alwaysShow:"alwaysShow",templateLeft:"templateLeft",templateRight:"templateRight",dropdownAppendTo:"dropdownAppendTo",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showFirstLastIcon:"showFirstLastIcon",totalRecords:"totalRecords",rows:"rows",rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showPageLinks:"showPageLinks",dropdownItemTemplate:"dropdownItemTemplate",first:"first"},outputs:{onPageChange:"onPageChange"},features:[mn],decls:1,vars:1,consts:[[3,"class","ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","ngClass"],["class","p-paginator-left-content",4,"ngIf"],["class","p-paginator-current",4,"ngIf"],["type","button","pRipple","","class","p-paginator-first p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-prev","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-left"],["class","p-paginator-pages",4,"ngIf"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange",4,"ngIf"],["type","button","pRipple","",1,"p-paginator-next","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-right"],["type","button","pRipple","","class","p-paginator-last p-paginator-element p-link",3,"disabled","ngClass","click",4,"ngIf"],["class","p-paginator-page-input",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange",4,"ngIf"],["class","p-paginator-right-content",4,"ngIf"],[1,"p-paginator-left-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-paginator-current"],["type","button","pRipple","",1,"p-paginator-first","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-left"],[1,"p-paginator-pages"],["type","button","class","p-paginator-page p-paginator-element p-link","pRipple","",3,"ngClass","click",4,"ngFor","ngForOf"],["type","button","pRipple","",1,"p-paginator-page","p-paginator-element","p-link",3,"ngClass","click"],["styleClass","p-paginator-page-options",3,"options","ngModel","disabled","appendTo","scrollHeight","onChange"],["pTemplate","selectedItem"],["type","button","pRipple","",1,"p-paginator-last","p-paginator-element","p-link",3,"disabled","ngClass","click"],[1,"p-paginator-icon","pi","pi-angle-double-right"],[1,"p-paginator-page-input",3,"ngModel","disabled","ngModelChange"],["styleClass","p-paginator-rpp-options",3,"options","ngModel","disabled","appendTo","scrollHeight","ngModelChange","onChange"],[4,"ngIf"],["pTemplate","item"],[1,"p-paginator-right-content"]],template:function(e,n){1&e&&_(0,k6,14,21,"div",0),2&e&&p("ngIf",!!n.alwaysShow||n.pageLinks&&n.pageLinks.length>1)},directives:[Vt,dt,Q,lt,Oe,Lt,vt,at,Te,_e,ie],styles:[".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"],encapsulation:2,changeDetection:0}),t})(),RT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Yu,Zu,Du,Nt,gn],Yu,Zu,Du,Nt]}),t})();function I6(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),k(2,"i"),c()()),2&t){const e=d();a(2),me("p-dataview-loading-icon pi-spin "+e.loadingIcon)}}function E6(t,i){1&t&&Y(0)}function R6(t,i){if(1&t&&(l(0,"div",12),St(1),_(2,E6,1,0,"ng-container",13),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}function L6(t,i){if(1&t){const e=I();l(0,"p-paginator",14),C("onPageChange",function(s){return v(e),d().paginate(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)}}function O6(t,i){1&t&&Y(0)}const A6=function(t,i){return{$implicit:t,rowIndex:i}};function P6(t,i){if(1&t&&_(0,O6,1,0,"ng-container",15),2&t){const e=i.$implicit,n=i.index;p("ngTemplateOutlet",d().itemTemplate)("ngTemplateOutletContext",We(2,A6,e,n))}}function F6(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),T(" ",e.emptyMessageLabel," ")}}function N6(t,i){1&t&&Y(0,null,19)}function V6(t,i){if(1&t&&(l(0,"div",16)(1,"div",17),_(2,F6,2,1,"ng-container",18),_(3,N6,2,0,"ng-container",13),c()()),2&t){const e=d();a(2),p("ngIf",!e.emptyMessageTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyMessageTemplate)}}function B6(t,i){if(1&t){const e=I();l(0,"p-paginator",20),C("onPageChange",function(s){return v(e),d().paginate(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)}}function H6(t,i){1&t&&Y(0)}function q6(t,i){if(1&t&&(l(0,"div",21),St(1,1),_(2,H6,1,0,"ng-container",13),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const U6=[[["p-header"]],[["p-footer"]]],G6=function(t,i){return{"p-dataview p-component":!0,"p-dataview-list":t,"p-dataview-grid":i}},z6=["p-header","p-footer"];let j6=(()=>{class t{constructor(e,n,s,r){this.el=e,this.cd=n,this.filterService=s,this.config=r,this.pageLinks=5,this.paginatorPosition="bottom",this.alwaysShowPaginator=!0,this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.emptyMessage="",this.onLazyLoad=new H,this.trackBy=(o,u)=>u,this.loadingIcon="pi pi-spinner",this.first=0,this.onPage=new H,this.onSort=new H,this.onChangeLayout=new H,this._layout="list"}get layout(){return this._layout}set layout(e){this._layout=e,this.initialized&&this.changeLayout(e)}ngOnInit(){this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.initialized=!0}ngOnChanges(e){e.value&&(this._value=e.value.currentValue,this.updateTotalRecords(),!this.lazy&&this.hasFilter()&&this.filter(this.filterValue)),(e.sortField||e.sortOrder)&&(!this.lazy||this.initialized)&&this.sort()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"listItem":this.listItemTemplate=e.template;break;case"gridItem":this.gridItemTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"empty":this.emptyMessageTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}}),this.updateItemTemplate()}updateItemTemplate(){switch(this.layout){case"list":this.itemTemplate=this.listItemTemplate;break;case"grid":this.itemTemplate=this.gridItemTemplate}}changeLayout(e){this._layout=e,this.onChangeLayout.emit({layout:this.layout}),this.updateItemTemplate(),this.cd.markForCheck()}updateTotalRecords(){this.totalRecords=this.lazy?this.totalRecords:this._value?this._value.length:0}paginate(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows})}sort(){this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.value.sort((e,n)=>{let s=Z.resolveFieldData(e,this.sortField),r=Z.resolveFieldData(n,this.sortField),o=null;return o=null==s&&null!=r?-1:null!=s&&null==r?1:null==s&&null==r?0:"string"==typeof s&&"string"==typeof r?s.localeCompare(r):sr?1:0,this.sortOrder*o}),this.hasFilter()&&this.filter(this.filterValue)),this.onSort.emit({sortField:this.sortField,sortOrder:this.sortOrder})}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder}}getBlockableElement(){return this.el.nativeElement.children[0]}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}filter(e,n="contains"){if(this.filterValue=e,this.value&&this.value.length){let s=this.filterBy.split(",");this.filteredValue=this.filterService.filter(this.value,s,e,n,this.filterLocale),this.filteredValue.length===this.value.length&&(this.filteredValue=null),this.paginator&&(this.first=0,this.totalRecords=this.filteredValue?this.filteredValue.length:this.value?this.value.length:0),this.cd.markForCheck()}}hasFilter(){return this.filterValue&&this.filterValue.trim().length>0}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(hl),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-dataView"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.header=r.first),V(r=B())&&(n.footer=r.first),V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{paginator:"paginator",rows:"rows",totalRecords:"totalRecords",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",paginatorPosition:"paginatorPosition",alwaysShowPaginator:"alwaysShowPaginator",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",lazy:"lazy",emptyMessage:"emptyMessage",style:"style",styleClass:"styleClass",trackBy:"trackBy",filterBy:"filterBy",filterLocale:"filterLocale",loading:"loading",loadingIcon:"loadingIcon",first:"first",sortField:"sortField",sortOrder:"sortOrder",value:"value",layout:"layout"},outputs:{onLazyLoad:"onLazyLoad",onPage:"onPage",onSort:"onSort",onChangeLayout:"onChangeLayout"},features:[mn],ngContentSelectors:z6,decls:11,vars:19,consts:[[3,"ngClass","ngStyle"],["class","p-dataview-loading",4,"ngIf"],["class","p-dataview-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange",4,"ngIf"],[1,"p-dataview-content"],[1,"p-grid","p-nogutter","grid","grid-nogutter"],["ngFor","",3,"ngForOf","ngForTrackBy"],["class","p-col col",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange",4,"ngIf"],["class","p-dataview-footer",4,"ngIf"],[1,"p-dataview-loading"],[1,"p-dataview-loading-overlay","p-component-overlay"],[1,"p-dataview-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-col","col"],[1,"p-dataview-emptymessage"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","dropdownAppendTo","dropdownScrollHeight","templateLeft","templateRight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","onPageChange"],[1,"p-dataview-footer"]],template:function(e,n){1&e&&(yn(U6),l(0,"div",0),_(1,I6,3,2,"div",1),_(2,R6,3,1,"div",2),_(3,L6,1,16,"p-paginator",3),l(4,"div",4)(5,"div",5),_(6,P6,1,5,"ng-template",6),m(7,"slice"),_(8,V6,4,3,"div",7),c()(),_(9,B6,1,16,"p-paginator",8),_(10,q6,3,1,"div",9),c()),2&e&&(me(n.styleClass),p("ngClass",We(16,G6,"list"===n.layout,"grid"===n.layout))("ngStyle",n.style),a(1),p("ngIf",n.loading),a(1),p("ngIf",n.header||n.headerTemplate),a(1),p("ngIf",n.paginator&&("top"===n.paginatorPosition||"both"==n.paginatorPosition)),a(3),p("ngForOf",n.paginator?function hC(t,i,e,n,s){const r=t+20,o=W(),u=zr(o,r);return Ga(o,r)?uC(o,Fn(),i,u.transform,e,n,s,u):u.transform(e,n,s)}(7,12,n.filteredValue||n.value,n.lazy?0:n.first,(n.lazy?0:n.first)+n.rows):n.filteredValue||n.value)("ngForTrackBy",n.trackBy),a(2),p("ngIf",n.isEmpty()),a(1),p("ngIf",n.paginator&&("bottom"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngIf",n.footer||n.footerTemplate))},directives:[ET,Oe,lt,Q,Lt,at],pipes:[My],styles:[".p-dataview{position:relative}.p-dataview .p-dataview-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}\n"],encapsulation:2,changeDetection:0}),t})(),$6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,RT],Nt]}),t})(),W6=(()=>{class t{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();let n=L.getFocusableElements(this.el.nativeElement);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?-1==s||0===s?n[n.length-1].focus():n[s-1].focus():-1==s||s===n.length-1?n[0].focus():n[s+1].focus()}else n[0].focus()}}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,n){1&e&&C("keydown.tab",function(r){return n.onkeydown(r)})("keydown.shift.tab",function(r){return n.onkeydown(r)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),t})(),K6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const Q6=["titlebar"],J6=["content"],Y6=["footer"];function Z6(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(4);ne("id",e.id+"-label"),a(1),S(e.header)}}function X6(t,i){1&t&&(l(0,"span",17),St(1,1),c()),2&t&&ne("id",d(4).id+"-label")}function e7(t,i){1&t&&Y(0)}const t7=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function n7(t,i){if(1&t){const e=I();l(0,"button",18),C("click",function(){return v(e),d(4).maximize()})("keydown.enter",function(){return v(e),d(4).maximize()}),k(1,"span",19),c()}if(2&t){const e=d(4);p("ngClass",A(2,t7)),a(1),p("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const i7=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function s7(t,i){if(1&t){const e=I();l(0,"button",20),C("click",function(s){return v(e),d(4).close(s)})("keydown.enter",function(s){return v(e),d(4).close(s)}),k(1,"span",21),c()}if(2&t){const e=d(4);p("ngClass",A(4,i7)),ne("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),a(1),p("ngClass",e.closeIcon)}}function r7(t,i){if(1&t){const e=I();l(0,"div",11,12),C("mousedown",function(s){return v(e),d(3).initDrag(s)}),_(2,Z6,2,2,"span",13),_(3,X6,2,1,"span",13),_(4,e7,1,0,"ng-container",8),l(5,"div",14),_(6,n7,2,3,"button",15),_(7,s7,2,5,"button",16),c()()}if(2&t){const e=d(3);a(2),p("ngIf",!e.headerFacet&&!e.headerTemplate),a(1),p("ngIf",e.headerFacet),a(1),p("ngTemplateOutlet",e.headerTemplate),a(2),p("ngIf",e.maximizable),a(1),p("ngIf",e.closable)}}function o7(t,i){1&t&&Y(0)}function a7(t,i){1&t&&Y(0)}function l7(t,i){if(1&t&&(l(0,"div",22,23),St(2,2),_(3,a7,1,0,"ng-container",8),c()),2&t){const e=d(3);a(3),p("ngTemplateOutlet",e.footerTemplate)}}function c7(t,i){if(1&t){const e=I();l(0,"div",24),C("mousedown",function(s){return v(e),d(3).initResize(s)}),c()}}const u7=function(t,i,e,n){return{"p-dialog p-component":!0,"p-dialog-rtl":t,"p-dialog-draggable":i,"p-dialog-resizable":e,"p-dialog-maximized":n}},d7=function(t,i){return{transform:t,transition:i}},p7=function(t){return{value:"visible",params:t}};function h7(t,i){if(1&t){const e=I();l(0,"div",3,4),C("@animation.start",function(s){return v(e),d(2).onAnimationStart(s)})("@animation.done",function(s){return v(e),d(2).onAnimationEnd(s)}),_(2,r7,8,5,"div",5),l(3,"div",6,7),St(5),_(6,o7,1,0,"ng-container",8),c(),_(7,l7,4,1,"div",9),_(8,c7,1,0,"div",10),c()}if(2&t){const e=d(2);me(e.styleClass),p("ngClass",_i(15,u7,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",z(23,p7,We(20,d7,e.transformOptions,e.transitionOptions))),ne("aria-labelledby",e.id+"-label"),a(2),p("ngIf",e.showHeader),a(1),me(e.contentStyleClass),p("ngClass","p-dialog-content")("ngStyle",e.contentStyle),a(3),p("ngTemplateOutlet",e.contentTemplate),a(1),p("ngIf",e.footerFacet||e.footerTemplate),a(1),p("ngIf",e.resizable)}}const m7=function(t,i,e,n,s,r,o,u,h,b){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":t,"p-dialog-mask-scrollblocker":i,"p-dialog-left":e,"p-dialog-right":n,"p-dialog-top":s,"p-dialog-top-left":r,"p-dialog-top-right":o,"p-dialog-bottom":u,"p-dialog-bottom-left":h,"p-dialog-bottom-right":b}};function f7(t,i){if(1&t&&(l(0,"div",1),_(1,h7,9,25,"div",2),c()),2&t){const e=d();me(e.maskStyleClass),p("ngClass",Hh(4,m7,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),a(1),p("ngIf",e.visible)}}const g7=["*",[["p-header"]],[["p-footer"]]],_7=["*","p-header","p-footer"],b7=Mu([it({transform:"{{transform}}",opacity:0}),kt("{{transition}}")]),v7=Mu([kt("{{transition}}",it({transform:"{{transform}}",opacity:0}))]);let Tn=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.zone=s,this.cd=r,this.config=o,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new H,this.onHide=new H,this.visibleChange=new H,this.onResizeInit=new H,this.onResizeEnd=new H,this.onDragEnd=new H,this.onMaximize=new H,this.id=pl(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style=Object.assign({},e),this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=L.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&L.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&L.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?L.addClass(document.body,"p-overflow-hidden"):L.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(gt.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let n in this.breakpoints)e+=`\n @media screen and (max-width: ${n}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[n]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){L.hasClass(e.target,"p-dialog-header-icon")||L.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",L.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let n=L.getFocusableElements(this.container);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let s=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?-1==s||0===s?n[n.length-1].focus():n[s-1].focus():-1==s||s===n.length-1?n[0].focus():n[s+1].focus()}else n[0].focus()}}onDrag(e){if(this.dragging){let n=L.getOuterWidth(this.container),s=L.getOuterHeight(this.container),r=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,u=this.container.getBoundingClientRect(),h=u.left+r,b=u.top+o,y=L.getViewport();this.container.style.position="fixed",this.keepInViewport?(h>=this.minX&&h+n=this.minY&&b+sparseInt(y))&&M.left+hparseInt(w))&&M.top+b{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",n=>{27==n.which&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):L.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&L.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&L.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({});break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(L.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&L.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&>.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?Object.assign({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(nt),x(ot),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-dialog"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Q6,5),j(J6,5),j(Y6,5)),2&e){let s;V(s=B())&&(n.headerViewChild=s.first),V(s=B())&&(n.contentViewChild=s.first),V(s=B())&&(n.footerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:_7,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"]],template:function(e,n){1&e&&(yn(g7),_(0,f7,2,15,"div",0)),2&e&&p("ngIf",n.maskVisible)},directives:[Q,Oe,W6,lt,Lt,vt],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translate(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0px!important;left:0px!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[wi("animation",[Ot("void => visible",[fw(b7)]),Ot("visible => void",[fw(v7)])])]},changeDetection:0}),t})(),C7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,K6,gn],Nt]}),t})();const y7=["*"];let w7=(()=>{class t{constructor(){this.layout="horizontal",this.type="solid"}containerClass(){return{"p-divider p-component":!0,"p-divider-horizontal":"horizontal"===this.layout,"p-divider-vertical":"vertical"===this.layout,"p-divider-solid":"solid"===this.type,"p-divider-dashed":"dashed"===this.type,"p-divider-dotted":"dotted"===this.type,"p-divider-left":"horizontal"===this.layout&&(!this.align||"left"===this.align),"p-divider-center":"horizontal"===this.layout&&"center"===this.align||"vertical"===this.layout&&(!this.align||"center"===this.align),"p-divider-right":"horizontal"===this.layout&&"right"===this.align,"p-divider-top":"vertical"===this.layout&&"top"===this.align,"p-divider-bottom":"vertical"===this.layout&&"bottom"===this.align}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-divider"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",layout:"layout",type:"type",align:"align"},ngContentSelectors:y7,decls:3,vars:4,consts:[["role","separator",3,"ngClass","ngStyle"],[1,"p-divider-content"]],template:function(e,n){1&e&&(yn(),l(0,"div",0)(1,"div",1),St(2),c()()),2&e&&(me(n.styleClass),p("ngClass",n.containerClass())("ngStyle",n.style))},directives:[Oe,lt],styles:['.p-divider-horizontal{display:flex;width:100%;position:relative;align-items:center}.p-divider-horizontal:before{position:absolute;display:block;top:50%;left:0;width:100%;content:""}.p-divider-horizontal.p-divider-left{justify-content:flex-start}.p-divider-horizontal.p-divider-right{justify-content:flex-end}.p-divider-horizontal.p-divider-center{justify-content:center}.p-divider-content{z-index:1}.p-divider-vertical{min-height:100%;margin:0 1rem;display:flex;position:relative;justify-content:center}.p-divider-vertical:before{position:absolute;display:block;top:0;left:50%;height:100%;content:""}.p-divider-vertical.p-divider-top{align-items:flex-start}.p-divider-vertical.p-divider-center{align-items:center}.p-divider-vertical.p-divider-bottom{align-items:flex-end}.p-divider-solid.p-divider-horizontal:before{border-top-style:solid}.p-divider-solid.p-divider-vertical:before{border-left-style:solid}.p-divider-dashed.p-divider-horizontal:before{border-top-style:dashed}.p-divider-dashed.p-divider-vertical:before{border-left-style:dashed}.p-divider-dotted.p-divider-horizontal:before{border-top-style:dotted}.p-divider-dotted.p-divider-horizontal:before{border-left-style:dotted}\n'],encapsulation:2,changeDetection:0}),t})(),T7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const S7=function(t,i){return{"pi-minus":t,"pi-plus":i}};function x7(t,i){if(1&t&&k(0,"span",9),2&t){const e=d(2);p("ngClass",We(1,S7,!e.collapsed,e.collapsed))}}function D7(t,i){1&t&&Y(0)}function M7(t,i){if(1&t){const e=I();ce(0),l(1,"a",7),C("click",function(s){return v(e),d().toggle(s)})("keydown.enter",function(s){return v(e),d().toggle(s)}),_(2,x7,1,4,"span",8),_(3,D7,1,0,"ng-container",6),c(),ue()}if(2&t){const e=d(),n=F(4);a(1),ne("aria-controls",e.id+"-content")("aria-expanded",!e.collapsed),a(1),p("ngIf",e.toggleable),a(1),p("ngTemplateOutlet",n)}}function k7(t,i){1&t&&Y(0)}function I7(t,i){if(1&t&&(l(0,"span",10),g(1),c(),St(2,1),_(3,k7,1,0,"ng-container",6)),2&t){const e=d();a(1),S(e.legend),a(2),p("ngTemplateOutlet",e.headerTemplate)}}function E7(t,i){1&t&&Y(0)}const R7=["*",[["p-header"]]],L7=function(t){return{"p-fieldset p-component":!0,"p-fieldset-toggleable":t}},O7=function(t){return{transitionParams:t,height:"0"}},A7=function(t){return{value:"hidden",params:t}},P7=function(t){return{transitionParams:t,height:"*"}},F7=function(t){return{value:"visible",params:t}},N7=["*","p-header"];let V7=0,Ui=(()=>{class t{constructor(e){this.el=e,this.collapsed=!1,this.collapsedChange=new H,this.onBeforeToggle=new H,this.onAfterToggle=new H,this.transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)",this.id="p-fieldset-"+V7++}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":this.contentTemplate=e.template}})}toggle(e){if(this.animating)return!1;this.animating=!0,this.onBeforeToggle.emit({originalEvent:e,collapsed:this.collapsed}),this.collapsed?this.expand(e):this.collapse(e),this.onAfterToggle.emit({originalEvent:e,collapsed:this.collapsed}),e.preventDefault()}expand(e){this.collapsed=!1,this.collapsedChange.emit(this.collapsed)}collapse(e){this.collapsed=!0,this.collapsedChange.emit(this.collapsed)}getBlockableElement(){return this.el.nativeElement.children[0]}onToggleDone(){this.animating=!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275cmp=G({type:t,selectors:[["p-fieldset"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{legend:"legend",toggleable:"toggleable",collapsed:"collapsed",style:"style",styleClass:"styleClass",transitionOptions:"transitionOptions"},outputs:{collapsedChange:"collapsedChange",onBeforeToggle:"onBeforeToggle",onAfterToggle:"onAfterToggle"},ngContentSelectors:N7,decls:9,vars:22,consts:[[3,"ngClass","ngStyle"],[1,"p-fieldset-legend"],[4,"ngIf","ngIfElse"],["legendContent",""],["role","region",1,"p-toggleable-content"],[1,"p-fieldset-content"],[4,"ngTemplateOutlet"],["tabindex","0","pRipple","",3,"click","keydown.enter"],["class","p-fieldset-toggler pi",3,"ngClass",4,"ngIf"],[1,"p-fieldset-toggler","pi",3,"ngClass"],[1,"p-fieldset-legend-text"]],template:function(e,n){if(1&e&&(yn(R7),l(0,"fieldset",0)(1,"legend",1),_(2,M7,4,4,"ng-container",2),_(3,I7,4,2,"ng-template",null,3,we),c(),l(5,"div",4),C("@fieldsetContent.done",function(){return n.onToggleDone()}),l(6,"div",5),St(7),_(8,E7,1,0,"ng-container",6),c()()()),2&e){const s=F(4);me(n.styleClass),p("ngClass",z(12,L7,n.toggleable))("ngStyle",n.style),ne("id",n.id),a(2),p("ngIf",n.toggleable)("ngIfElse",s),a(3),p("@fieldsetContent",n.collapsed?z(16,A7,z(14,O7,n.transitionOptions)):z(20,F7,z(18,P7,n.animating?n.transitionOptions:"0ms"))),ne("id",n.id+"-content")("aria-labelledby",n.id)("aria-hidden",n.collapsed),a(3),p("ngTemplateOutlet",n.contentTemplate)}},directives:[Oe,lt,Q,vt,Lt],styles:[".p-fieldset-legend>a,.p-fieldset-legend>span{display:flex;align-items:center;justify-content:center}.p-fieldset-toggleable .p-fieldset-legend a{cursor:pointer;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-fieldset-legend-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("fieldsetContent",[Cs("hidden",it({height:"0",overflow:"hidden"})),Cs("visible",it({height:"*"})),Ot("visible <=> hidden",[it({overflow:"hidden"}),kt("{{transitionParams}}")]),Ot("void => *",kt(0))])]},changeDetection:0}),t})(),B7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn],Nt]}),t})();const H7=["headerchkbox"];function q7(t,i){1&t&&Y(0)}function U7(t,i){if(1&t&&(l(0,"div",6),St(1),_(2,q7,1,0,"ng-container",7),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.headerTemplate)}}const LT=function(t){return{"p-checkbox-disabled":t}},G7=function(t,i,e){return{"p-highlight":t,"p-focus":i,"p-disabled":e}},OT=function(t){return{"pi pi-check":t}};function z7(t,i){if(1&t){const e=I();l(0,"div",10)(1,"div",11)(2,"input",12),C("focus",function(){return v(e),d(2).onHeaderCheckboxFocus()})("blur",function(){return v(e),d(2).onHeaderCheckboxBlur()})("keydown.space",function(s){return v(e),d(2).toggleAll(s)}),c()(),l(3,"div",13,14),C("click",function(s){return v(e),d(2).toggleAll(s)}),k(5,"span",15),c()()}if(2&t){const e=d(2);p("ngClass",z(5,LT,e.disabled||e.toggleAllDisabled)),a(2),p("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),a(1),p("ngClass",Rt(7,G7,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),a(2),p("ngClass",z(11,OT,e.allChecked))}}function j7(t,i){if(1&t){const e=I();l(0,"div",16)(1,"input",17),C("input",function(s){return v(e),d(2).onFilter(s)}),c(),k(2,"span",18),c()}if(2&t){const e=d(2);a(1),p("value",e.filterValue||"")("disabled",e.disabled),ne("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function $7(t,i){if(1&t&&(l(0,"div",6),_(1,z7,6,13,"div",8),_(2,j7,3,4,"div",9),c()),2&t){const e=d();a(1),p("ngIf",e.checkbox&&e.multiple&&e.showToggleAll),a(1),p("ngIf",e.filter)}}function W7(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(2);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function K7(t,i){1&t&&Y(0)}function Q7(t,i){1&t&&Y(0)}const Xf=function(t){return{$implicit:t}};function J7(t,i){if(1&t&&(l(0,"li",20),_(1,W7,2,1,"span",3),_(2,K7,1,0,"ng-container",21),c(),_(3,Q7,1,0,"ng-container",21)),2&t){const e=i.$implicit,n=d(2),s=F(8);a(1),p("ngIf",!n.groupTemplate),a(1),p("ngTemplateOutlet",n.groupTemplate)("ngTemplateOutletContext",z(5,Xf,e)),a(1),p("ngTemplateOutlet",s)("ngTemplateOutletContext",z(7,Xf,n.getOptionGroupChildren(e)))}}function Y7(t,i){if(1&t&&(ce(0),_(1,J7,4,9,"ng-template",19),ue()),2&t){const e=d();a(1),p("ngForOf",e.optionsToRender)}}function Z7(t,i){1&t&&Y(0)}function X7(t,i){if(1&t&&(ce(0),_(1,Z7,1,0,"ng-container",21),ue()),2&t){const e=d(),n=F(8);a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",z(2,Xf,e.optionsToRender))}}const eB=function(t){return{"p-highlight":t}};function tB(t,i){if(1&t&&(l(0,"div",10)(1,"div",25),k(2,"span",15),c()()),2&t){const e=d().$implicit,n=d(2);p("ngClass",z(3,LT,n.disabled||n.isOptionDisabled(e))),a(1),p("ngClass",z(5,eB,n.isSelected(e))),a(1),p("ngClass",z(7,OT,n.isSelected(e)))}}function nB(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(2);a(1),S(n.getOptionLabel(e))}}function iB(t,i){1&t&&Y(0)}const sB=function(t,i){return{"p-listbox-item":!0,"p-highlight":t,"p-disabled":i}},rB=function(t,i){return{$implicit:t,index:i}};function oB(t,i){if(1&t){const e=I();l(0,"li",24),C("click",function(s){const o=v(e).$implicit;return d(2).onOptionClick(s,o)})("dblclick",function(s){const o=v(e).$implicit;return d(2).onOptionDoubleClick(s,o)})("touchend",function(){const r=v(e).$implicit;return d(2).onOptionTouchEnd(r)})("keydown",function(s){const o=v(e).$implicit;return d(2).onOptionKeyDown(s,o)}),_(1,tB,3,9,"div",8),_(2,nB,2,1,"span",3),_(3,iB,1,0,"ng-container",21),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngClass",We(8,sB,s.isSelected(e),s.isOptionDisabled(e))),ne("tabindex",s.disabled||s.isOptionDisabled(e)?null:"0")("aria-label",s.getOptionLabel(e))("aria-selected",s.isSelected(e)),a(1),p("ngIf",s.checkbox&&s.multiple),a(1),p("ngIf",!s.itemTemplate),a(1),p("ngTemplateOutlet",s.itemTemplate)("ngTemplateOutletContext",We(11,rB,e,n))}}function aB(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function lB(t,i){1&t&&Y(0,null,28)}function cB(t,i){if(1&t&&(l(0,"li",26),_(1,aB,2,1,"ng-container",27),_(2,lB,2,0,"ng-container",7),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function uB(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),T(" ",e.emptyMessageLabel," ")}}function dB(t,i){1&t&&Y(0,null,29)}function pB(t,i){if(1&t&&(l(0,"li",26),_(1,uB,2,1,"ng-container",27),_(2,dB,2,0,"ng-container",7),c()),2&t){const e=d(2);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function hB(t,i){if(1&t&&(_(0,oB,4,14,"li",22),_(1,cB,3,3,"li",23),_(2,pB,3,3,"li",23)),2&t){const e=i.$implicit,n=d();p("ngForOf",e),a(1),p("ngIf",n.hasFilter()&&n.isEmpty(e)),a(1),p("ngIf",!n.hasFilter()&&n.isEmpty(e))}}function mB(t,i){1&t&&Y(0)}function fB(t,i){if(1&t&&(l(0,"div",30),St(1,1),_(2,mB,1,0,"ng-container",7),c()),2&t){const e=d();a(2),p("ngTemplateOutlet",e.footerTemplate)}}const gB=[[["p-header"]],[["p-footer"]]],_B=function(t){return{"p-listbox p-component":!0,"p-disabled":t}},bB=["p-header","p-footer"],vB={provide:dn,useExisting:Ue(()=>ws),multi:!0};let ws=(()=>{class t{constructor(e,n,s,r){this.el=e,this.cd=n,this.filterService=s,this.config=r,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new H,this.onClick=new H,this.onDblClick=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,n){this.disabled||this.isOptionDisabled(n)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,n):this.onOptionClickMultiple(e,n):this.onOptionClickSingle(e,n),this.onClick.emit({originalEvent:e,option:n,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,n){this.disabled||this.isOptionDisabled(n)||this.readonly||this.onDblClick.emit({originalEvent:e,option:n,value:this.value})}onOptionClickSingle(e,n){let s=this.isSelected(n),r=!1;if(!this.optionTouched&&this.metaKeySelection){let u=e.metaKey||e.ctrlKey;s?u&&(this.value=null,r=!0):(this.value=this.getOptionValue(n),r=!0)}else this.value=s?null:this.getOptionValue(n),r=!0;r&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickMultiple(e,n){let s=this.isSelected(n),r=!1;if(!this.optionTouched&&this.metaKeySelection){let u=e.metaKey||e.ctrlKey;s?(u?this.removeOption(n):this.value=[this.getOptionValue(n)],r=!0):(this.value=u&&this.value||[],this.value=[...this.value,this.getOptionValue(n)],r=!0)}else s?this.removeOption(n):this.value=[...this.value||[],this.getOptionValue(n)],r=!0;r&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickCheckbox(e,n){this.disabled||this.readonly||(this.isSelected(n)?this.removeOption(n):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(n)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}removeOption(e){this.value=this.value.filter(n=>!Z.equals(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,s=this.getOptionValue(e);if(this.multiple){if(this.value)for(let r of this.value)if(Z.equals(r,s,this.dataKey)){n=!0;break}}else n=Z.equals(this.value,s,this.dataKey);return n}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let n=0,s=0,r=0,o=this.group?0:this.optionsToRender.length;for(let u of e)if(this.group)for(let h of this.getOptionGroupChildren(u)){let b=this.isOptionDisabled(h),y=this.isSelected(h);if(b)y?n++:s++;else{if(!y)return!1;r++}o++}else{let h=this.isOptionDisabled(u),b=this.isSelected(u);if(h)b?n++:s++;else{if(!b)return!1;r++}}return o===n||o===r||r&&o===r+s+n}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ft.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ft.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(e){return!e||e&&0===e.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.optionLabel||"label").split(","),n=[];for(let s of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(s),e,this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&n.push(Object.assign(Object.assign({},s),{[this.optionGroupChildren]:r}))}this._filteredOptions=n}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),this._filterValue,this.filterLocale));else this._filteredOptions=null}get toggleAllDisabled(){let e=this.optionsToRender;if(!e||0===e.length)return!0;for(let n of e)if(!this.isOptionDisabled(n))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.preventDefault())}checkAll(){let n=[];this.optionsToRender.forEach(s=>{if(this.group){let r=this.getOptionGroupChildren(s);r&&r.forEach(o=>{let u=this.isOptionDisabled(o);(!u||u&&this.isSelected(o))&&n.push(this.getOptionValue(o))})}else{let r=this.isOptionDisabled(s);(!r||r&&this.isSelected(s))&&n.push(this.getOptionValue(s))}}),this.value=n}uncheckAll(){let n=[];this.optionsToRender.forEach(s=>{this.group?s.items&&s.items.forEach(r=>{this.isOptionDisabled(r)&&this.isSelected(r)&&n.push(this.getOptionValue(r))}):this.isOptionDisabled(s)&&this.isSelected(s)&&n.push(this.getOptionValue(s))}),this.value=n}onOptionKeyDown(e,n){if(this.readonly)return;let s=e.currentTarget;switch(e.which){case 40:var r=this.findNextItem(s);r&&r.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(s);o&&o.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,n),e.preventDefault()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-disabled")||L.isHidden(n)||L.hasClass(n,"p-listbox-item-group")?this.findNextItem(n):n:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-disabled")||L.isHidden(n)||L.hasClass(n,"p-listbox-item-group")?this.findPrevItem(n):n:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(ot),x(hl),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-listbox"]],contentQueries:function(e,n,s){if(1&e&&(st(s,Oo,5),st(s,fl,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(H7,5),2&e){let s;V(s=B())&&(n.headerCheckboxViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ne([vB])],ngContentSelectors:bB,decls:10,vars:15,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox","aria-multiselectable","multiple",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["class","p-listbox-empty-message",4,"ngIf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(e,n){1&e&&(yn(gB),l(0,"div",0),_(1,U7,3,1,"div",1),_(2,$7,3,2,"div",1),l(3,"div",0)(4,"ul",2),_(5,Y7,2,1,"ng-container",3),_(6,X7,2,4,"ng-container",3),_(7,hB,3,3,"ng-template",null,4,we),c()(),_(9,fB,3,1,"div",5),c()),2&e&&(me(n.styleClass),p("ngClass",z(13,_B,n.disabled))("ngStyle",n.style),a(1),p("ngIf",n.headerFacet||n.headerTemplate),a(1),p("ngIf",n.checkbox&&n.multiple&&n.showToggleAll||n.filter),a(1),me(n.listStyleClass),p("ngClass","p-listbox-list-wrapper")("ngStyle",n.listStyle),a(2),p("ngIf",n.group),a(1),p("ngIf",!n.group),a(3),p("ngIf",n.footerFacet||n.footerTemplate))},directives:[Oe,lt,Q,Lt,at,vt],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),CB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,gn],Nt]}),t})();class Gi extends ct{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){const e=super._subscribe(i);return e&&!e.closed&&i.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new nr;return this._value}next(i){super.next(this._value=i)}}class yB extends yt{notifyNext(i,e,n,s,r){this.destination.next(e)}notifyError(i,e){this.destination.error(i)}notifyComplete(i){this.destination.complete()}}class wB extends yt{constructor(i,e,n){super(),this.parent=i,this.outerValue=e,this.outerIndex=n,this.index=0}_next(i){this.parent.notifyNext(this.outerValue,i,this.outerIndex,this.index++,this)}_error(i){this.parent.notifyError(i,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function TB(t,i,e,n,s=new wB(t,e,n)){if(!s.closed)return i instanceof Je?i.subscribe(s):Od(i)(s)}const AT={};class xB{constructor(i){this.resultSelector=i}call(i,e){return e.subscribe(new DB(i,this.resultSelector))}}class DB extends yB{constructor(i,e){super(i),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(i){this.values.push(AT),this.observables.push(i)}_complete(){const i=this.observables,e=i.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();function PT(t,i){let e=!1;return arguments.length>=2&&(e=!0),function(s){return s.lift(new MB(t,i,e))}}class MB{constructor(i,e,n=!1){this.accumulator=i,this.seed=e,this.hasSeed=n}call(i,e){return e.subscribe(new kB(i,this.accumulator,this.seed,this.hasSeed))}}class kB extends yt{constructor(i,e,n,s){super(i),this.accumulator=e,this._seed=n,this.hasSeed=s,this.index=0}get seed(){return this._seed}set seed(i){this.hasSeed=!0,this._seed=i}_next(i){if(this.hasSeed)return this._tryNext(i);this.seed=i,this.destination.next(i)}_tryNext(i){const e=this.index++;let n;try{n=this.accumulator(this.seed,i,e)}catch(s){this.destination.error(s)}this.seed=n,this.destination.next(n)}}function Mr(t){return function(e){const n=new IB(t),s=e.lift(n);return n.caught=s}}class IB{constructor(i){this.selector=i}call(i,e){return e.subscribe(new EB(i,this.selector,this.caught))}}class EB extends Zo{constructor(i,e,n){super(i),this.selector=e,this.caught=n}error(i){if(!this.isStopped){let e;try{e=this.selector(i,this.caught)}catch(r){return void super.error(r)}this._unsubscribeAndRecycle();const n=new Yo(this);this.add(n);const s=Xo(e,n);s!==n&&this.add(s)}}}function eg(t){return function(e){return 0===t?au():e.lift(new RB(t))}}class RB{constructor(i){if(this.total=i,this.total<0)throw new s0}call(i,e){return e.subscribe(new LB(i,this.total))}}class LB extends yt{constructor(i,e){super(i),this.total=e,this.ring=new Array,this.count=0}_next(i){const e=this.ring,n=this.total,s=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,s=this.ring;for(let r=0;ri.lift(new OB(t))}class OB{constructor(i){this.errorFactory=i}call(i,e){return e.subscribe(new AB(i,this.errorFactory))}}class AB extends yt{constructor(i,e){super(i),this.errorFactory=e,this.hasValue=!1}_next(i){this.hasValue=!0,this.destination.next(i)}_complete(){if(this.hasValue)return this.destination.complete();{let i;try{i=this.errorFactory()}catch(e){i=e}this.destination.error(i)}}}function PB(){return new ed}function NT(t=null){return i=>i.lift(new FB(t))}class FB{constructor(i){this.defaultValue=i}call(i,e){return e.subscribe(new NB(i,this.defaultValue))}}class NB extends yt{constructor(i,e){super(i),this.defaultValue=e,this.isEmpty=!0}_next(i){this.isEmpty=!1,this.destination.next(i)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function No(t,i){const e=arguments.length>=2;return n=>n.pipe(t?qs((s,r)=>t(s,r,n)):Vl,br(1),e?NT(i):FT(()=>new ed))}function Js(){}function li(t,i,e){return function(s){return s.lift(new BB(t,i,e))}}class BB{constructor(i,e,n){this.nextOrObserver=i,this.error=e,this.complete=n}call(i,e){return e.subscribe(new HB(i,this.nextOrObserver,this.error,this.complete))}}class HB extends yt{constructor(i,e,n,s){super(i),this._tapNext=Js,this._tapError=Js,this._tapComplete=Js,this._tapError=n||Js,this._tapComplete=s||Js,Ms(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Js,this._tapError=e.error||Js,this._tapComplete=e.complete||Js)}_next(i){try{this._tapNext.call(this._context,i)}catch(e){return void this.destination.error(e)}this.destination.next(i)}_error(i){try{this._tapError.call(this._context,i)}catch(e){return void this.destination.error(e)}this.destination.error(i)}_complete(){try{this._tapComplete.call(this._context)}catch(i){return void this.destination.error(i)}return this.destination.complete()}}class UB{constructor(i){this.callback=i}call(i,e){return e.subscribe(new GB(i,this.callback))}}class GB extends yt{constructor(i,e){super(i),this.add(new Et(e))}}class Ts{constructor(i,e){this.id=i,this.url=e}}class tg extends Ts{constructor(i,e,n="imperative",s=null){super(i,e),this.navigationTrigger=n,this.restoredState=s}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class vl extends Ts{constructor(i,e,n){super(i,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class VT extends Ts{constructor(i,e,n){super(i,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class zB extends Ts{constructor(i,e,n){super(i,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $B extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class WB extends Ts{constructor(i,e,n,s,r){super(i,e),this.urlAfterRedirects=n,this.state=s,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class KB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class QB extends Ts{constructor(i,e,n,s){super(i,e),this.urlAfterRedirects=n,this.state=s}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class BT{constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class HT{constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class JB{constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class YB{constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZB{constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class XB{constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qT{constructor(i,e,n){this.routerEvent=i,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Ke="primary";class e8{constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){const e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){const e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Vo(t){return new e8(t)}const UT="ngNavigationCancelingError";function ng(t){const i=Error("NavigationCancelingError: "+t);return i[UT]=!0,i}function n8(t,i,e){const n=e.path.split("/");if(n.length>t.length||"full"===e.pathMatch&&(i.hasChildren()||n.lengthn[r]===s)}return t===i}function zT(t){return Array.prototype.concat.apply([],t)}function jT(t){return t.length>0?t[t.length-1]:null}function Sn(t,i){for(const e in t)t.hasOwnProperty(e)&&i(t[e],e)}function os(t){return Dh(t)?t:Ra(t)?Dn(Promise.resolve(t)):oe(t)}const r8={exact:function KT(t,i,e){if(!Ir(t.segments,i.segments)||!td(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children)if(!t.children[n]||!KT(t.children[n],i.children[n],e))return!1;return!0},subset:QT},$T={exact:function o8(t,i){return rs(t,i)},subset:function a8(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>GT(t[e],i[e]))},ignored:()=>!0};function WT(t,i,e){return r8[e.paths](t.root,i.root,e.matrixParams)&&$T[e.queryParams](t.queryParams,i.queryParams)&&!("exact"===e.fragment&&t.fragment!==i.fragment)}function QT(t,i,e){return JT(t,i,i.segments,e)}function JT(t,i,e,n){if(t.segments.length>e.length){const s=t.segments.slice(0,e.length);return!(!Ir(s,e)||i.hasChildren()||!td(s,e,n))}if(t.segments.length===e.length){if(!Ir(t.segments,e)||!td(t.segments,e,n))return!1;for(const s in i.children)if(!t.children[s]||!QT(t.children[s],i.children[s],n))return!1;return!0}{const s=e.slice(0,t.segments.length),r=e.slice(t.segments.length);return!!(Ir(t.segments,s)&&td(t.segments,s,n)&&t.children[Ke])&&JT(t.children[Ke],i,r,n)}}function td(t,i,e){return i.every((n,s)=>$T[e](t[s].parameters,n.parameters))}class kr{constructor(i,e,n){this.root=i,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){return u8.serialize(this)}}class Xe{constructor(i,e){this.segments=i,this.children=e,this.parent=null,Sn(e,(n,s)=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return nd(this)}}class Cl{constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Vo(this.parameters)),this._parameterMap}toString(){return t2(this)}}function Ir(t,i){return t.length===i.length&&t.every((e,n)=>e.path===i[n].path)}class YT{}class ZT{parse(i){const e=new v8(i);return new kr(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){const e=`/${yl(i.root,!0)}`,n=function h8(t){const i=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(s=>`${id(e)}=${id(s)}`).join("&"):`${id(e)}=${id(n)}`}).filter(e=>!!e);return i.length?`?${i.join("&")}`:""}(i.queryParams),s="string"==typeof i.fragment?`#${function d8(t){return encodeURI(t)}(i.fragment)}`:"";return`${e}${n}${s}`}}const u8=new ZT;function nd(t){return t.segments.map(i=>t2(i)).join("/")}function yl(t,i){if(!t.hasChildren())return nd(t);if(i){const e=t.children[Ke]?yl(t.children[Ke],!1):"",n=[];return Sn(t.children,(s,r)=>{r!==Ke&&n.push(`${r}:${yl(s,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=function c8(t,i){let e=[];return Sn(t.children,(n,s)=>{s===Ke&&(e=e.concat(i(n,s)))}),Sn(t.children,(n,s)=>{s!==Ke&&(e=e.concat(i(n,s)))}),e}(t,(n,s)=>s===Ke?[yl(t.children[Ke],!1)]:[`${s}:${yl(n,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[Ke]?`${nd(t)}/${e[0]}`:`${nd(t)}/(${e.join("//")})`}}function XT(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function id(t){return XT(t).replace(/%3B/gi,";")}function ig(t){return XT(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function sd(t){return decodeURIComponent(t)}function e2(t){return sd(t.replace(/\+/g,"%20"))}function t2(t){return`${ig(t.path)}${function p8(t){return Object.keys(t).map(i=>`;${ig(i)}=${ig(t[i])}`).join("")}(t.parameters)}`}const m8=/^[^\/()?;=#]+/;function rd(t){const i=t.match(m8);return i?i[0]:""}const f8=/^[^=?&#]+/,_8=/^[^&#]+/;class v8{constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Xe([],{}):new Xe([],this.parseChildren())}parseQueryParams(){const i={};if(this.consumeOptional("?"))do{this.parseQueryParam(i)}while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(e).length>0)&&(n[Ke]=new Xe(i,e)),n}parseSegment(){const i=rd(this.remaining);if(""===i&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(i),new Cl(sd(i),this.parseMatrixParams())}parseMatrixParams(){const i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){const e=rd(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const s=rd(this.remaining);s&&(n=s,this.capture(n))}i[sd(e)]=sd(n)}parseQueryParam(i){const e=function g8(t){const i=t.match(f8);return i?i[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const o=function b8(t){const i=t.match(_8);return i?i[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const s=e2(e),r=e2(n);if(i.hasOwnProperty(s)){let o=i[s];Array.isArray(o)||(o=[o],i[s]=o),o.push(r)}else i[s]=r}parseParens(i){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=rd(this.remaining),s=this.remaining[n.length];if("/"!==s&&")"!==s&&";"!==s)throw new Error(`Cannot parse url '${this.url}'`);let r;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):i&&(r=Ke);const o=this.parseChildren();e[r]=1===Object.keys(o).length?o[Ke]:new Xe([],o),this.consumeOptional("//")}return e}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return!!this.peekStartsWith(i)&&(this.remaining=this.remaining.substring(i.length),!0)}capture(i){if(!this.consumeOptional(i))throw new Error(`Expected "${i}".`)}}class n2{constructor(i){this._root=i}get root(){return this._root.value}parent(i){const e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){const e=sg(i,this._root);return e?e.children.map(n=>n.value):[]}firstChild(i){const e=sg(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){const e=rg(i,this._root);return e.length<2?[]:e[e.length-2].children.map(s=>s.value).filter(s=>s!==i)}pathFromRoot(i){return rg(i,this._root).map(e=>e.value)}}function sg(t,i){if(t===i.value)return i;for(const e of i.children){const n=sg(t,e);if(n)return n}return null}function rg(t,i){if(t===i.value)return[i];for(const e of i.children){const n=rg(t,e);if(n.length)return n.unshift(i),n}return[]}class Ss{constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}}function Bo(t){const i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}class s2 extends n2{constructor(i,e){super(i),this.snapshot=e,og(this,i)}toString(){return this.snapshot.toString()}}function r2(t,i){const e=function C8(t,i){const o=new od([],{},{},"",{},Ke,i,null,t.root,-1,{});return new a2("",new Ss(o,[]))}(t,i),n=new Gi([new Cl("",{})]),s=new Gi({}),r=new Gi({}),o=new Gi({}),u=new Gi(""),h=new Er(n,s,o,u,r,Ke,i,e.root);return h.snapshot=e.root,new s2(new Ss(h,[]),e)}class Er{constructor(i,e,n,s,r,o,u,h){this.url=i,this.params=e,this.queryParams=n,this.fragment=s,this.data=r,this.outlet=o,this.component=u,this._futureSnapshot=h}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(et(i=>Vo(i)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(et(i=>Vo(i)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function o2(t,i="emptyOnly"){const e=t.pathFromRoot;let n=0;if("always"!==i)for(n=e.length-1;n>=1;){const s=e[n],r=e[n-1];if(s.routeConfig&&""===s.routeConfig.path)n--;else{if(r.component)break;n--}}return function y8(t){return t.reduce((i,e)=>({params:Object.assign(Object.assign({},i.params),e.params),data:Object.assign(Object.assign({},i.data),e.data),resolve:Object.assign(Object.assign({},i.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(e.slice(n))}class od{constructor(i,e,n,s,r,o,u,h,b,y,w){this.url=i,this.params=e,this.queryParams=n,this.fragment=s,this.data=r,this.outlet=o,this.component=u,this.routeConfig=h,this._urlSegment=b,this._lastPathIndex=y,this._resolve=w}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Vo(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class a2 extends n2{constructor(i,e){super(e),this.url=i,og(this,e)}toString(){return l2(this._root)}}function og(t,i){i.value._routerState=t,i.children.forEach(e=>og(t,e))}function l2(t){const i=t.children.length>0?` { ${t.children.map(l2).join(", ")} } `:"";return`${t.value}${i}`}function ag(t){if(t.snapshot){const i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,rs(i.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),i.fragment!==e.fragment&&t.fragment.next(e.fragment),rs(i.params,e.params)||t.params.next(e.params),function i8(t,i){if(t.length!==i.length)return!1;for(let e=0;ers(e.parameters,i[n].parameters))}(t.url,i.url);return e&&!(!t.parent!=!i.parent)&&(!t.parent||lg(t.parent,i.parent))}function wl(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){const n=e.value;n._futureSnapshot=i.value;const s=function T8(t,i,e){return i.children.map(n=>{for(const s of e.children)if(t.shouldReuseRoute(n.value,s.value.snapshot))return wl(t,n,s);return wl(t,n)})}(t,i,e);return new Ss(n,s)}{if(t.shouldAttach(i.value)){const r=t.retrieve(i.value);if(null!==r){const o=r.route;return o.value._futureSnapshot=i.value,o.children=i.children.map(u=>wl(t,u)),o}}const n=function S8(t){return new Er(new Gi(t.url),new Gi(t.params),new Gi(t.queryParams),new Gi(t.fragment),new Gi(t.data),t.outlet,t.component,t)}(i.value),s=i.children.map(r=>wl(t,r));return new Ss(n,s)}}function ad(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Tl(t){return"object"==typeof t&&null!=t&&t.outlets}function cg(t,i,e,n,s){let r={};if(n&&Sn(n,(u,h)=>{r[h]=Array.isArray(u)?u.map(b=>`${b}`):`${u}`}),t===i)return new kr(e,r,s);const o=c2(t,i,e);return new kr(o,r,s)}function c2(t,i,e){const n={};return Sn(t.children,(s,r)=>{n[r]=s===i?e:c2(s,i,e)}),new Xe(t.segments,n)}class u2{constructor(i,e,n){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=n,i&&n.length>0&&ad(n[0]))throw new Error("Root segment cannot have matrix parameters");const s=n.find(Tl);if(s&&s!==jT(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ug{constructor(i,e,n){this.segmentGroup=i,this.processChildren=e,this.index=n}}function d2(t,i,e){if(t||(t=new Xe([],{})),0===t.segments.length&&t.hasChildren())return ld(t,i,e);const n=function E8(t,i,e){let n=0,s=i;const r={match:!1,pathIndex:0,commandIndex:0};for(;s=e.length)return r;const o=t.segments[s],u=e[n];if(Tl(u))break;const h=`${u}`,b=n0&&void 0===h)break;if(h&&b&&"object"==typeof b&&void 0===b.outlets){if(!h2(h,b,o))return r;n+=2}else{if(!h2(h,{},o))return r;n++}s++}return{match:!0,pathIndex:s,commandIndex:n}}(t,i,e),s=e.slice(n.commandIndex);if(n.match&&n.pathIndex{"string"==typeof r&&(r=[r]),null!==r&&(s[o]=d2(t.children[o],i,r))}),Sn(t.children,(r,o)=>{void 0===n[o]&&(s[o]=r)}),new Xe(t.segments,s)}}function dg(t,i,e){const n=t.segments.slice(0,i);let s=0;for(;s{"string"==typeof e&&(e=[e]),null!==e&&(i[n]=dg(new Xe([],{}),0,e))}),i}function p2(t){const i={};return Sn(t,(e,n)=>i[n]=`${e}`),i}function h2(t,i,e){return t==e.path&&rs(i,e.parameters)}class O8{constructor(i,e,n,s){this.routeReuseStrategy=i,this.futureState=e,this.currState=n,this.forwardEvent=s}activate(i){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,i),ag(this.futureState.root),this.activateChildRoutes(e,n,i)}deactivateChildRoutes(i,e,n){const s=Bo(e);i.children.forEach(r=>{const o=r.value.outlet;this.deactivateRoutes(r,s[o],n),delete s[o]}),Sn(s,(r,o)=>{this.deactivateRouteAndItsChildren(r,n)})}deactivateRoutes(i,e,n){const s=i.value,r=e?e.value:null;if(s===r)if(s.component){const o=n.getContext(s.outlet);o&&this.deactivateChildRoutes(i,e,o.children)}else this.deactivateChildRoutes(i,e,n);else r&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){const n=e.getContext(i.value.outlet),s=n&&i.value.component?n.children:e,r=Bo(i);for(const o of Object.keys(r))this.deactivateRouteAndItsChildren(r[o],s);if(n&&n.outlet){const o=n.outlet.detach(),u=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:o,route:i,contexts:u})}}deactivateRouteAndOutlet(i,e){const n=e.getContext(i.value.outlet),s=n&&i.value.component?n.children:e,r=Bo(i);for(const o of Object.keys(r))this.deactivateRouteAndItsChildren(r[o],s);n&&n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated(),n.attachRef=null,n.resolver=null,n.route=null)}activateChildRoutes(i,e,n){const s=Bo(e);i.children.forEach(r=>{this.activateRoutes(r,s[r.value.outlet],n),this.forwardEvent(new XB(r.value.snapshot))}),i.children.length&&this.forwardEvent(new YB(i.value.snapshot))}activateRoutes(i,e,n){const s=i.value,r=e?e.value:null;if(ag(s),s===r)if(s.component){const o=n.getOrCreateContext(s.outlet);this.activateChildRoutes(i,e,o.children)}else this.activateChildRoutes(i,e,n);else if(s.component){const o=n.getOrCreateContext(s.outlet);if(this.routeReuseStrategy.shouldAttach(s.snapshot)){const u=this.routeReuseStrategy.retrieve(s.snapshot);this.routeReuseStrategy.store(s.snapshot,null),o.children.onOutletReAttached(u.contexts),o.attachRef=u.componentRef,o.route=u.route.value,o.outlet&&o.outlet.attach(u.componentRef,u.route.value),ag(u.route.value),this.activateChildRoutes(i,null,o.children)}else{const u=function A8(t){for(let i=t.parent;i;i=i.parent){const e=i.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(s.snapshot),h=u?u.module.componentFactoryResolver:null;o.attachRef=null,o.route=s,o.resolver=h,o.outlet&&o.outlet.activateWith(s,h),this.activateChildRoutes(i,null,o.children)}}else this.activateChildRoutes(i,null,n)}}class pg{constructor(i,e){this.routes=i,this.module=e}}function Ys(t){return"function"==typeof t}function Rr(t){return t instanceof kr}const Sl=Symbol("INITIAL_VALUE");function xl(){return qi(t=>function SB(...t){let i,e;return Vr(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(i=t.pop()),1===t.length&&Nr(t[0])&&(t=t[0]),Pd(t,e).lift(new xB(i))}(t.map(i=>i.pipe(br(1),Qu(Sl)))).pipe(PT((i,e)=>{let n=!1;return e.reduce((s,r,o)=>s!==Sl?s:(r===Sl&&(n=!0),n||!1!==r&&o!==e.length-1&&!Rr(r)?s:r),i)},Sl),qs(i=>i!==Sl),et(i=>Rr(i)?i:!0===i),br(1)))}class H8{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Dl,this.attachRef=null}}class Dl{constructor(){this.contexts=new Map}onChildOutletCreated(i,e){const n=this.getOrCreateContext(i);n.outlet=e,this.contexts.set(i,n)}onChildOutletDestroyed(i){const e=this.getContext(i);e&&(e.outlet=null,e.attachRef=null)}onOutletDeactivated(){const i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let e=this.getContext(i);return e||(e=new H8,this.contexts.set(i,e)),e}getContext(i){return this.contexts.get(i)||null}}let Ml=(()=>{class t{constructor(e,n,s,r,o){this.parentContexts=e,this.location=n,this.resolver=s,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new H,this.deactivateEvents=new H,this.attachEvents=new H,this.detachEvents=new H,this.name=r||Ke,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const o=(n=n||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),u=this.parentContexts.getOrCreateContext(this.name).children,h=new q8(e,u,this.location.injector);this.activated=this.location.createComponent(o,this.location.length,h),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(x(Dl),x(vi),x(Va),ua("name"),x(ot))},t.\u0275dir=le({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),t})();class q8{constructor(i,e,n){this.route=i,this.childContexts=e,this.parent=n}get(i,e){return i===Er?this.route:i===Dl?this.childContexts:this.parent.get(i,e)}}let m2=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,n){1&e&&k(0,"router-outlet")},directives:[Ml],encapsulation:2}),t})();function f2(t,i=""){for(let e=0;exi(n)===i);return e.push(...t.filter(n=>xi(n)!==i)),e}const _2={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function cd(t,i,e){var n;if(""===i.path)return"full"===i.pathMatch&&(t.hasChildren()||e.length>0)?Object.assign({},_2):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(i.matcher||n8)(e,t,i);if(!r)return Object.assign({},_2);const o={};Sn(r.posParams,(h,b)=>{o[b]=h.path});const u=r.consumed.length>0?Object.assign(Object.assign({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:u,positionalParamSegments:null!==(n=r.posParams)&&void 0!==n?n:{}}}function ud(t,i,e,n,s="corrected"){if(e.length>0&&function $8(t,i,e){return e.some(n=>dd(t,i,n)&&xi(n)!==Ke)}(t,e,n)){const o=new Xe(i,function j8(t,i,e,n){const s={};s[Ke]=n,n._sourceSegment=t,n._segmentIndexShift=i.length;for(const r of e)if(""===r.path&&xi(r)!==Ke){const o=new Xe([],{});o._sourceSegment=t,o._segmentIndexShift=i.length,s[xi(r)]=o}return s}(t,i,n,new Xe(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=i.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function W8(t,i,e){return e.some(n=>dd(t,i,n))}(t,e,n)){const o=new Xe(t.segments,function z8(t,i,e,n,s,r){const o={};for(const u of n)if(dd(t,e,u)&&!s[xi(u)]){const h=new Xe([],{});h._sourceSegment=t,h._segmentIndexShift="legacy"===r?t.segments.length:i.length,o[xi(u)]=h}return Object.assign(Object.assign({},s),o)}(t,i,e,n,t.children,s));return o._sourceSegment=t,o._segmentIndexShift=i.length,{segmentGroup:o,slicedSegments:e}}const r=new Xe(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=i.length,{segmentGroup:r,slicedSegments:e}}function dd(t,i,e){return(!(t.hasChildren()||i.length>0)||"full"!==e.pathMatch)&&""===e.path}function b2(t,i,e,n){return!!(xi(t)===n||n!==Ke&&dd(i,e,t))&&("**"===t.path||cd(i,t,e).matched)}function v2(t,i,e){return 0===i.length&&!t.children[e]}class pd{constructor(i){this.segmentGroup=i||null}}class C2{constructor(i){this.urlTree=i}}function kl(t){return tl(new pd(t))}function y2(t){return tl(new C2(t))}function K8(t){return tl(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class Y8{constructor(i,e,n,s,r){this.configLoader=e,this.urlSerializer=n,this.urlTree=s,this.config=r,this.allowRedirects=!0,this.ngModule=i.get(fs)}apply(){const i=ud(this.urlTree.root,[],[],this.config).segmentGroup,e=new Xe(i.segments,i.children);return this.expandSegmentGroup(this.ngModule,this.config,e,Ke).pipe(et(r=>this.createUrlTree(mg(r),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Mr(r=>{if(r instanceof C2)return this.allowRedirects=!1,this.match(r.urlTree);throw r instanceof pd?this.noMatchError(r):r}))}match(i){return this.expandSegmentGroup(this.ngModule,this.config,i.root,Ke).pipe(et(s=>this.createUrlTree(mg(s),i.queryParams,i.fragment))).pipe(Mr(s=>{throw s instanceof pd?this.noMatchError(s):s}))}noMatchError(i){return new Error(`Cannot match any routes. URL Segment: '${i.segmentGroup}'`)}createUrlTree(i,e,n){const s=i.segments.length>0?new Xe([],{[Ke]:i}):i;return new kr(s,e,n)}expandSegmentGroup(i,e,n,s){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(i,e,n).pipe(et(r=>new Xe([],r))):this.expandSegment(i,n,e,n.segments,s,!0)}expandChildren(i,e,n){const s=[];for(const r of Object.keys(n.children))"primary"===r?s.unshift(r):s.push(r);return Dn(s).pipe(_r(r=>{const o=n.children[r],u=g2(e,r);return this.expandSegmentGroup(i,u,o,r).pipe(et(h=>({segment:h,outlet:r})))}),PT((r,o)=>(r[o.outlet]=o.segment,r),{}),function VB(t,i){const e=arguments.length>=2;return n=>n.pipe(t?qs((s,r)=>t(s,r,n)):Vl,eg(1),e?NT(i):FT(()=>new ed))}())}expandSegment(i,e,n,s,r,o){return Dn(n).pipe(_r(u=>this.expandSegmentAgainstRoute(i,e,n,u,s,r,o).pipe(Mr(b=>{if(b instanceof pd)return oe(null);throw b}))),No(u=>!!u),Mr((u,h)=>{if(u instanceof ed||"EmptyError"===u.name)return v2(e,s,r)?oe(new Xe([],{})):kl(e);throw u}))}expandSegmentAgainstRoute(i,e,n,s,r,o,u){return b2(s,e,r,o)?void 0===s.redirectTo?this.matchSegmentAgainstRoute(i,e,s,r,o):u&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o):kl(e):kl(e)}expandSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o){return"**"===s.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(i,n,s,o):this.expandRegularSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(i,e,n,s){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?y2(r):this.lineralizeSegments(n,r).pipe(bn(o=>{const u=new Xe(o,{});return this.expandSegment(i,u,e,o,s,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(i,e,n,s,r,o){const{matched:u,consumedSegments:h,remainingSegments:b,positionalParamSegments:y}=cd(e,s,r);if(!u)return kl(e);const w=this.applyRedirectCommands(h,s.redirectTo,y);return s.redirectTo.startsWith("/")?y2(w):this.lineralizeSegments(s,w).pipe(bn(M=>this.expandSegment(i,e,n,M.concat(b),o,!1)))}matchSegmentAgainstRoute(i,e,n,s,r){if("**"===n.path)return n.loadChildren?(n._loadedConfig?oe(n._loadedConfig):this.configLoader.load(i.injector,n)).pipe(et(w=>(n._loadedConfig=w,new Xe(s,{})))):oe(new Xe(s,{}));const{matched:o,consumedSegments:u,remainingSegments:h}=cd(e,n,s);return o?this.getChildConfig(i,n,s).pipe(bn(y=>{const w=y.module,M=y.routes,{segmentGroup:E,slicedSegments:R}=ud(e,u,h,M),O=new Xe(E.segments,E.children);if(0===R.length&&O.hasChildren())return this.expandChildren(w,M,O).pipe(et(J=>new Xe(u,J)));if(0===M.length&&0===R.length)return oe(new Xe(u,{}));const N=xi(n)===r;return this.expandSegment(w,O,M,R,N?Ke:r,!0).pipe(et(P=>new Xe(u.concat(P.segments),P.children)))})):kl(e)}getChildConfig(i,e,n){return e.children?oe(new pg(e.children,i)):e.loadChildren?void 0!==e._loadedConfig?oe(e._loadedConfig):this.runCanLoadGuards(i.injector,e,n).pipe(bn(s=>s?this.configLoader.load(i.injector,e).pipe(et(r=>(e._loadedConfig=r,r))):function Q8(t){return tl(ng(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`))}(e))):oe(new pg([],i))}runCanLoadGuards(i,e,n){const s=e.canLoad;if(!s||0===s.length)return oe(!0);const r=s.map(o=>{const u=i.get(o);let h;if(function F8(t){return t&&Ys(t.canLoad)}(u))h=u.canLoad(e,n);else{if(!Ys(u))throw new Error("Invalid CanLoad guard");h=u(e,n)}return os(h)});return oe(r).pipe(xl(),li(o=>{if(!Rr(o))return;const u=ng(`Redirecting to "${this.urlSerializer.serialize(o)}"`);throw u.url=o,u}),et(o=>!0===o))}lineralizeSegments(i,e){let n=[],s=e.root;for(;;){if(n=n.concat(s.segments),0===s.numberOfChildren)return oe(n);if(s.numberOfChildren>1||!s.children[Ke])return K8(i.redirectTo);s=s.children[Ke]}}applyRedirectCommands(i,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),i,n)}applyRedirectCreatreUrlTree(i,e,n,s){const r=this.createSegmentGroup(i,e.root,n,s);return new kr(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){const n={};return Sn(i,(s,r)=>{if("string"==typeof s&&s.startsWith(":")){const u=s.substring(1);n[r]=e[u]}else n[r]=s}),n}createSegmentGroup(i,e,n,s){const r=this.createSegments(i,e.segments,n,s);let o={};return Sn(e.children,(u,h)=>{o[h]=this.createSegmentGroup(i,u,n,s)}),new Xe(r,o)}createSegments(i,e,n,s){return e.map(r=>r.path.startsWith(":")?this.findPosParam(i,r,s):this.findOrReturn(r,n))}findPosParam(i,e,n){const s=n[e.path.substring(1)];if(!s)throw new Error(`Cannot redirect to '${i}'. Cannot find '${e.path}'.`);return s}findOrReturn(i,e){let n=0;for(const s of e){if(s.path===i.path)return e.splice(n),s;n++}return i}}function mg(t){const i={};for(const n of Object.keys(t.children)){const r=mg(t.children[n]);(r.segments.length>0||r.hasChildren())&&(i[n]=r)}return function Z8(t){if(1===t.numberOfChildren&&t.children[Ke]){const i=t.children[Ke];return new Xe(t.segments.concat(i.segments),i.children)}return t}(new Xe(t.segments,i))}class w2{constructor(i){this.path=i,this.route=this.path[this.path.length-1]}}class hd{constructor(i,e){this.component=i,this.route=e}}function eH(t,i,e){const n=t._root;return Il(n,i?i._root:null,e,[n.value])}function md(t,i,e){const n=function nH(t){if(!t)return null;for(let i=t.parent;i;i=i.parent){const e=i.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(i);return(n?n.module.injector:e).get(t)}function Il(t,i,e,n,s={canDeactivateChecks:[],canActivateChecks:[]}){const r=Bo(i);return t.children.forEach(o=>{(function iH(t,i,e,n,s={canDeactivateChecks:[],canActivateChecks:[]}){const r=t.value,o=i?i.value:null,u=e?e.getContext(t.value.outlet):null;if(o&&r.routeConfig===o.routeConfig){const h=function sH(t,i,e){if("function"==typeof e)return e(t,i);switch(e){case"pathParamsChange":return!Ir(t.url,i.url);case"pathParamsOrQueryParamsChange":return!Ir(t.url,i.url)||!rs(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!lg(t,i)||!rs(t.queryParams,i.queryParams);default:return!lg(t,i)}}(o,r,r.routeConfig.runGuardsAndResolvers);h?s.canActivateChecks.push(new w2(n)):(r.data=o.data,r._resolvedData=o._resolvedData),Il(t,i,r.component?u?u.children:null:e,n,s),h&&u&&u.outlet&&u.outlet.isActivated&&s.canDeactivateChecks.push(new hd(u.outlet.component,o))}else o&&El(i,u,s),s.canActivateChecks.push(new w2(n)),Il(t,null,r.component?u?u.children:null:e,n,s)})(o,r[o.value.outlet],e,n.concat([o.value]),s),delete r[o.value.outlet]}),Sn(r,(o,u)=>El(o,e.getContext(u),s)),s}function El(t,i,e){const n=Bo(t),s=t.value;Sn(n,(r,o)=>{El(r,s.component?i?i.children.getContext(o):null:i,e)}),e.canDeactivateChecks.push(new hd(s.component&&i&&i.outlet&&i.outlet.isActivated?i.outlet.component:null,s))}class hH{}function T2(t){return new Je(i=>i.error(t))}class fH{constructor(i,e,n,s,r,o){this.rootComponentType=i,this.config=e,this.urlTree=n,this.url=s,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=o}recognize(){const i=ud(this.urlTree.root,[],[],this.config.filter(o=>void 0===o.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,i,Ke);if(null===e)return null;const n=new od([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Ke,this.rootComponentType,null,this.urlTree.root,-1,{}),s=new Ss(n,e),r=new a2(this.url,s);return this.inheritParamsAndData(r._root),r}inheritParamsAndData(i){const e=i.value,n=o2(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),i.children.forEach(s=>this.inheritParamsAndData(s))}processSegmentGroup(i,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(i,e):this.processSegment(i,e,e.segments,n)}processChildren(i,e){const n=[];for(const r of Object.keys(e.children)){const o=e.children[r],u=g2(i,r),h=this.processSegmentGroup(u,o,r);if(null===h)return null;n.push(...h)}const s=S2(n);return function gH(t){t.sort((i,e)=>i.value.outlet===Ke?-1:e.value.outlet===Ke?1:i.value.outlet.localeCompare(e.value.outlet))}(s),s}processSegment(i,e,n,s){for(const r of i){const o=this.processSegmentAgainstRoute(r,e,n,s);if(null!==o)return o}return v2(e,n,s)?[]:null}processSegmentAgainstRoute(i,e,n,s){if(i.redirectTo||!b2(i,e,n,s))return null;let r,o=[],u=[];if("**"===i.path){const E=n.length>0?jT(n).parameters:{};r=new od(n,E,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,M2(i),xi(i),i.component,i,x2(e),D2(e)+n.length,k2(i))}else{const E=cd(e,i,n);if(!E.matched)return null;o=E.consumedSegments,u=E.remainingSegments,r=new od(o,E.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,M2(i),xi(i),i.component,i,x2(e),D2(e)+o.length,k2(i))}const h=function _H(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(i),{segmentGroup:b,slicedSegments:y}=ud(e,o,u,h.filter(E=>void 0===E.redirectTo),this.relativeLinkResolution);if(0===y.length&&b.hasChildren()){const E=this.processChildren(h,b);return null===E?null:[new Ss(r,E)]}if(0===h.length&&0===y.length)return[new Ss(r,[])];const w=xi(i)===s,M=this.processSegment(h,b,y,w?Ke:s);return null===M?null:[new Ss(r,M)]}}function bH(t){const i=t.value.routeConfig;return i&&""===i.path&&void 0===i.redirectTo}function S2(t){const i=[],e=new Set;for(const n of t){if(!bH(n)){i.push(n);continue}const s=i.find(r=>n.value.routeConfig===r.value.routeConfig);void 0!==s?(s.children.push(...n.children),e.add(s)):i.push(n)}for(const n of e){const s=S2(n.children);i.push(new Ss(n.value,s))}return i.filter(n=>!e.has(n))}function x2(t){let i=t;for(;i._sourceSegment;)i=i._sourceSegment;return i}function D2(t){let i=t,e=i._segmentIndexShift?i._segmentIndexShift:0;for(;i._sourceSegment;)i=i._sourceSegment,e+=i._segmentIndexShift?i._segmentIndexShift:0;return e-1}function M2(t){return t.data||{}}function k2(t){return t.resolve||{}}function I2(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function fg(t){return qi(i=>{const e=t(i);return e?Dn(e).pipe(et(()=>i)):oe(i)})}class DH extends class xH{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}}{}const gg=new be("ROUTES");class E2{constructor(i,e,n,s){this.injector=i,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=s}load(i,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const s=this.loadModuleFactory(e.loadChildren).pipe(et(r=>{this.onLoadEndListener&&this.onLoadEndListener(e);const o=r.create(i);return new pg(zT(o.injector.get(gg,void 0,xe.Self|xe.Optional)).map(hg),o)}),Mr(r=>{throw e._loader$=void 0,r}));return e._loader$=new Fg(s,()=>new ct).pipe(Fd()),e._loader$}loadModuleFactory(i){return os(i()).pipe(bn(e=>e instanceof iC?oe(e):Dn(this.compiler.compileModuleAsync(e))))}}class kH{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,e){return i}}function IH(t){throw t}function EH(t,i,e){return i.parse("/")}function R2(t,i){return oe(null)}const RH={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},LH={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let It=(()=>{class t{constructor(e,n,s,r,o,u,h){this.rootComponentType=e,this.urlSerializer=n,this.rootContexts=s,this.location=r,this.config=h,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new ct,this.errorHandler=IH,this.malformedUriErrorHandler=EH,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:R2,afterPreactivation:R2},this.urlHandlingStrategy=new kH,this.routeReuseStrategy=new DH,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=o.get(fs),this.console=o.get(wR);const w=o.get(nt);this.isNgZoneEnabled=w instanceof nt&&nt.isInAngularZone(),this.resetConfig(h),this.currentUrlTree=function s8(){return new kr(new Xe([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new E2(o,u,M=>this.triggerEvent(new BT(M)),M=>this.triggerEvent(new HT(M))),this.routerState=r2(this.currentUrlTree,this.rootComponentType),this.transitions=new Gi({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var e;return null===(e=this.location.getState())||void 0===e?void 0:e.\u0275routerPageId}setupNavigations(e){const n=this.events;return e.pipe(qs(s=>0!==s.id),et(s=>Object.assign(Object.assign({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),qi(s=>{let r=!1,o=!1;return oe(s).pipe(li(u=>{this.currentNavigation={id:u.id,initialUrl:u.currentRawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),qi(u=>{const h=this.browserUrlTree.toString(),b=!this.navigated||u.extractedUrl.toString()!==h||h!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||b)&&this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return L2(u.source)&&(this.browserUrlTree=u.extractedUrl),oe(u).pipe(qi(w=>{const M=this.transitions.getValue();return n.next(new tg(w.id,this.serializeUrl(w.extractedUrl),w.source,w.restoredState)),M!==this.transitions.getValue()?Io:Promise.resolve(w)}),function X8(t,i,e,n){return qi(s=>function J8(t,i,e,n,s){return new Y8(t,i,e,n,s).apply()}(t,i,e,s.extractedUrl,n).pipe(et(r=>Object.assign(Object.assign({},s),{urlAfterRedirects:r}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),li(w=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:w.urlAfterRedirects})}),function vH(t,i,e,n,s){return bn(r=>function mH(t,i,e,n,s="emptyOnly",r="legacy"){try{const o=new fH(t,i,e,n,s,r).recognize();return null===o?T2(new hH):oe(o)}catch(o){return T2(o)}}(t,i,r.urlAfterRedirects,e(r.urlAfterRedirects),n,s).pipe(et(o=>Object.assign(Object.assign({},r),{targetSnapshot:o}))))}(this.rootComponentType,this.config,w=>this.serializeUrl(w),this.paramsInheritanceStrategy,this.relativeLinkResolution),li(w=>{if("eager"===this.urlUpdateStrategy){if(!w.extras.skipLocationChange){const E=this.urlHandlingStrategy.merge(w.urlAfterRedirects,w.rawUrl);this.setBrowserUrl(E,w)}this.browserUrlTree=w.urlAfterRedirects}const M=new jB(w.id,this.serializeUrl(w.extractedUrl),this.serializeUrl(w.urlAfterRedirects),w.targetSnapshot);n.next(M)}));if(b&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:M,extractedUrl:E,source:R,restoredState:O,extras:N}=u,U=new tg(M,this.serializeUrl(E),R,O);n.next(U);const P=r2(E,this.rootComponentType).snapshot;return oe(Object.assign(Object.assign({},u),{targetSnapshot:P,urlAfterRedirects:E,extras:Object.assign(Object.assign({},N),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=u.rawUrl,u.resolve(null),Io}),fg(u=>{const{targetSnapshot:h,id:b,extractedUrl:y,rawUrl:w,extras:{skipLocationChange:M,replaceUrl:E}}=u;return this.hooks.beforePreactivation(h,{navigationId:b,appliedUrlTree:y,rawUrlTree:w,skipLocationChange:!!M,replaceUrl:!!E})}),li(u=>{const h=new $B(u.id,this.serializeUrl(u.extractedUrl),this.serializeUrl(u.urlAfterRedirects),u.targetSnapshot);this.triggerEvent(h)}),et(u=>Object.assign(Object.assign({},u),{guards:eH(u.targetSnapshot,u.currentSnapshot,this.rootContexts)})),function rH(t,i){return bn(e=>{const{targetSnapshot:n,currentSnapshot:s,guards:{canActivateChecks:r,canDeactivateChecks:o}}=e;return 0===o.length&&0===r.length?oe(Object.assign(Object.assign({},e),{guardsResult:!0})):function oH(t,i,e,n){return Dn(t).pipe(bn(s=>function pH(t,i,e,n,s){const r=i&&i.routeConfig?i.routeConfig.canDeactivate:null;return r&&0!==r.length?oe(r.map(u=>{const h=md(u,i,s);let b;if(function B8(t){return t&&Ys(t.canDeactivate)}(h))b=os(h.canDeactivate(t,i,e,n));else{if(!Ys(h))throw new Error("Invalid CanDeactivate guard");b=os(h(t,i,e,n))}return b.pipe(No())})).pipe(xl()):oe(!0)}(s.component,s.route,e,i,n)),No(s=>!0!==s,!0))}(o,n,s,t).pipe(bn(u=>u&&function P8(t){return"boolean"==typeof t}(u)?function aH(t,i,e,n){return Dn(i).pipe(_r(s=>el(function cH(t,i){return null!==t&&i&&i(new JB(t)),oe(!0)}(s.route.parent,n),function lH(t,i){return null!==t&&i&&i(new ZB(t)),oe(!0)}(s.route,n),function dH(t,i,e){const n=i[i.length-1],r=i.slice(0,i.length-1).reverse().map(o=>function tH(t){const i=t.routeConfig?t.routeConfig.canActivateChild:null;return i&&0!==i.length?{node:t,guards:i}:null}(o)).filter(o=>null!==o).map(o=>lu(()=>oe(o.guards.map(h=>{const b=md(h,o.node,e);let y;if(function V8(t){return t&&Ys(t.canActivateChild)}(b))y=os(b.canActivateChild(n,t));else{if(!Ys(b))throw new Error("Invalid CanActivateChild guard");y=os(b(n,t))}return y.pipe(No())})).pipe(xl())));return oe(r).pipe(xl())}(t,s.path,e),function uH(t,i,e){const n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||0===n.length)return oe(!0);const s=n.map(r=>lu(()=>{const o=md(r,i,e);let u;if(function N8(t){return t&&Ys(t.canActivate)}(o))u=os(o.canActivate(i,t));else{if(!Ys(o))throw new Error("Invalid CanActivate guard");u=os(o(i,t))}return u.pipe(No())}));return oe(s).pipe(xl())}(t,s.route,e))),No(s=>!0!==s,!0))}(n,r,t,i):oe(u)),et(u=>Object.assign(Object.assign({},e),{guardsResult:u})))})}(this.ngModule.injector,u=>this.triggerEvent(u)),li(u=>{if(Rr(u.guardsResult)){const b=ng(`Redirecting to "${this.serializeUrl(u.guardsResult)}"`);throw b.url=u.guardsResult,b}const h=new WB(u.id,this.serializeUrl(u.extractedUrl),this.serializeUrl(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.triggerEvent(h)}),qs(u=>!!u.guardsResult||(this.restoreHistory(u),this.cancelNavigationTransition(u,""),!1)),fg(u=>{if(u.guards.canActivateChecks.length)return oe(u).pipe(li(h=>{const b=new KB(h.id,this.serializeUrl(h.extractedUrl),this.serializeUrl(h.urlAfterRedirects),h.targetSnapshot);this.triggerEvent(b)}),qi(h=>{let b=!1;return oe(h).pipe(function CH(t,i){return bn(e=>{const{targetSnapshot:n,guards:{canActivateChecks:s}}=e;if(!s.length)return oe(e);let r=0;return Dn(s).pipe(_r(o=>function yH(t,i,e,n){return function wH(t,i,e,n){const s=I2(t);if(0===s.length)return oe({});const r={};return Dn(s).pipe(bn(o=>function TH(t,i,e,n){const s=md(t,i,n);return os(s.resolve?s.resolve(i,e):s(i,e))}(t[o],i,e,n).pipe(li(u=>{r[o]=u}))),eg(1),bn(()=>I2(r).length===s.length?oe(r):Io))}(t._resolve,t,i,n).pipe(et(r=>(t._resolvedData=r,t.data=Object.assign(Object.assign({},t.data),o2(t,e).resolve),null)))}(o.route,n,t,i)),li(()=>r++),eg(1),bn(o=>r===s.length?oe(e):Io))})}(this.paramsInheritanceStrategy,this.ngModule.injector),li({next:()=>b=!0,complete:()=>{b||(this.restoreHistory(h),this.cancelNavigationTransition(h,"At least one route resolver didn't emit any value."))}}))}),li(h=>{const b=new QB(h.id,this.serializeUrl(h.extractedUrl),this.serializeUrl(h.urlAfterRedirects),h.targetSnapshot);this.triggerEvent(b)}))}),fg(u=>{const{targetSnapshot:h,id:b,extractedUrl:y,rawUrl:w,extras:{skipLocationChange:M,replaceUrl:E}}=u;return this.hooks.afterPreactivation(h,{navigationId:b,appliedUrlTree:y,rawUrlTree:w,skipLocationChange:!!M,replaceUrl:!!E})}),et(u=>{const h=function w8(t,i,e){const n=wl(t,i._root,e?e._root:void 0);return new s2(n,i)}(this.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return Object.assign(Object.assign({},u),{targetRouterState:h})}),li(u=>{this.currentUrlTree=u.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl),this.routerState=u.targetRouterState,"deferred"===this.urlUpdateStrategy&&(u.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,u),this.browserUrlTree=u.urlAfterRedirects)}),((t,i,e)=>et(n=>(new O8(i,n.targetRouterState,n.currentRouterState,e).activate(t),n)))(this.rootContexts,this.routeReuseStrategy,u=>this.triggerEvent(u)),li({next(){r=!0},complete(){r=!0}}),function qB(t){return i=>i.lift(new UB(t))}(()=>{var u;r||o||this.cancelNavigationTransition(s,`Navigation ID ${s.id} is not equal to the current navigation id ${this.navigationId}`),(null===(u=this.currentNavigation)||void 0===u?void 0:u.id)===s.id&&(this.currentNavigation=null)}),Mr(u=>{if(o=!0,function t8(t){return t&&t[UT]}(u)){const h=Rr(u.url);h||(this.navigated=!0,this.restoreHistory(s,!0));const b=new VT(s.id,this.serializeUrl(s.extractedUrl),u.message);n.next(b),h?setTimeout(()=>{const y=this.urlHandlingStrategy.merge(u.url,this.rawUrlTree),w={skipLocationChange:s.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||L2(s.source)};this.scheduleNavigation(y,"imperative",null,w,{resolve:s.resolve,reject:s.reject,promise:s.promise})},0):s.resolve(!1)}else{this.restoreHistory(s,!0);const h=new zB(s.id,this.serializeUrl(s.extractedUrl),u);n.next(h);try{s.resolve(this.errorHandler(u))}catch(b){s.reject(b)}}return Io}))}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const n="popstate"===e.type?"popstate":"hashchange";"popstate"===n&&setTimeout(()=>{var s;const r={replaceUrl:!0},o=(null===(s=e.state)||void 0===s?void 0:s.navigationId)?e.state:null;if(o){const h=Object.assign({},o);delete h.navigationId,delete h.\u0275routerPageId,0!==Object.keys(h).length&&(r.state=h)}const u=this.parseUrl(e.url);this.scheduleNavigation(u,n,o,r)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){f2(e),this.config=e.map(hg),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,n={}){const{relativeTo:s,queryParams:r,fragment:o,queryParamsHandling:u,preserveFragment:h}=n,b=s||this.routerState.root,y=h?this.currentUrlTree.fragment:o;let w=null;switch(u){case"merge":w=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":w=this.currentUrlTree.queryParams;break;default:w=r||null}return null!==w&&(w=this.removeEmptyProps(w)),function x8(t,i,e,n,s){if(0===e.length)return cg(i.root,i.root,i.root,n,s);const r=function D8(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new u2(!0,0,t);let i=0,e=!1;const n=t.reduce((s,r,o)=>{if("object"==typeof r&&null!=r){if(r.outlets){const u={};return Sn(r.outlets,(h,b)=>{u[b]="string"==typeof h?h.split("/"):h}),[...s,{outlets:u}]}if(r.segmentPath)return[...s,r.segmentPath]}return"string"!=typeof r?[...s,r]:0===o?(r.split("/").forEach((u,h)=>{0==h&&"."===u||(0==h&&""===u?e=!0:".."===u?i++:""!=u&&s.push(u))}),s):[...s,r]},[]);return new u2(e,i,n)}(e);if(r.toRoot())return cg(i.root,i.root,new Xe([],{}),n,s);const o=function M8(t,i,e){if(t.isAbsolute)return new ug(i.root,!0,0);if(-1===e.snapshot._lastPathIndex){const r=e.snapshot._urlSegment;return new ug(r,r===i.root,0)}const n=ad(t.commands[0])?0:1;return function k8(t,i,e){let n=t,s=i,r=e;for(;r>s;){if(r-=s,n=n.parent,!n)throw new Error("Invalid number of '../'");s=n.segments.length}return new ug(n,!1,s-r)}(e.snapshot._urlSegment,e.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(r,i,t),u=o.processChildren?ld(o.segmentGroup,o.index,r.commands):d2(o.segmentGroup,o.index,r.commands);return cg(i.root,o.segmentGroup,u,n,s)}(b,this.currentUrlTree,e,w,null!=y?y:null)}navigateByUrl(e,n={skipLocationChange:!1}){const s=Rr(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,n)}navigate(e,n={skipLocationChange:!1}){return function OH(t){for(let i=0;i{const r=e[s];return null!=r&&(n[s]=r),n},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId,this.events.next(new vl(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,e.resolve(!0)},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}scheduleNavigation(e,n,s,r,o){var u,h;if(this.disposed)return Promise.resolve(!1);let b,y,w;o?(b=o.resolve,y=o.reject,w=o.promise):w=new Promise((R,O)=>{b=R,y=O});const M=++this.navigationId;let E;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(s=this.location.getState()),E=s&&s.\u0275routerPageId?s.\u0275routerPageId:r.replaceUrl||r.skipLocationChange?null!==(u=this.browserPageId)&&void 0!==u?u:0:(null!==(h=this.browserPageId)&&void 0!==h?h:0)+1):E=0,this.setTransition({id:M,targetPageId:E,source:n,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:r,resolve:b,reject:y,promise:w,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),w.catch(R=>Promise.reject(R))}setBrowserUrl(e,n){const s=this.urlSerializer.serialize(e),r=Object.assign(Object.assign({},n.extras.state),this.generateNgRouterState(n.id,n.targetPageId));this.location.isCurrentPathEqualTo(s)||n.extras.replaceUrl?this.location.replaceState(s,"",r):this.location.go(s,"",r)}restoreHistory(e,n=!1){var s,r;if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)||0===o?this.currentUrlTree===(null===(r=this.currentNavigation)||void 0===r?void 0:r.finalUrl)&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(o)}else"replace"===this.canceledNavigationResolution&&(n&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(e,n){const s=new VT(e.id,this.serializeUrl(e.extractedUrl),n);this.triggerEvent(s),e.resolve(!1)}generateNgRouterState(e,n){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}}return t.\u0275fac=function(e){Sh()},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function L2(t){return"imperative"!==t}let fd=(()=>{class t{constructor(e,n,s,r,o){this.router=e,this.route=n,this.tabIndexAttribute=s,this.renderer=r,this.el=o,this.commands=null,this.onChanges=new ct,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){if(null!=this.tabIndexAttribute)return;const n=this.renderer,s=this.el.nativeElement;null!==e?n.setAttribute(s,"tabindex",e):n.removeAttribute(s,"tabindex")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const e={skipLocationChange:qo(this.skipLocationChange),replaceUrl:qo(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:qo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),ua("tabindex"),x(wn),x(Re))},t.\u0275dir=le({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,n){1&e&&C("click",function(){return n.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[mn]}),t})(),Ho=(()=>{class t{constructor(e,n,s){this.router=e,this.route=n,this.locationStrategy=s,this.commands=null,this.href=null,this.onChanges=new ct,this.subscription=e.events.subscribe(r=>{r instanceof vl&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:null}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,n,s,r,o){if(0!==e||n||s||r||o||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const u={skipLocationChange:qo(this.skipLocationChange),replaceUrl:qo(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,u),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:qo(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),x(ko))},t.\u0275dir=le({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r.button,r.ctrlKey,r.shiftKey,r.altKey,r.metaKey)}),2&e&&ne("target",n.target)("href",n.href,Xt)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[mn]}),t})();function qo(t){return""===t||!!t}let gd=(()=>{class t{constructor(e,n,s,r,o,u){this.router=e,this.element=n,this.renderer=s,this.cdr=r,this.link=o,this.linkWithHref=u,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new H,this.routerEventsSubscription=e.events.subscribe(h=>{h instanceof vl&&this.update()})}ngAfterContentInit(){oe(this.links.changes,this.linksWithHrefs.changes,oe(null)).pipe(ea()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const n=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(s=>!!s).map(s=>s.onChanges);this.linkInputChangesSubscription=Dn(n).pipe(ea()).subscribe(s=>{this.isActive!==this.isLinkActive(this.router)(s)&&this.update()})}set routerLinkActive(e){const n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(s=>!!s)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),this.isActiveChange.emit(e))})}isLinkActive(e){const n=function AH(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return s=>!!s.urlTree&&e.isActive(s.urlTree,n)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Re),x(wn),x(ot),x(fd,8),x(Ho,8))},t.\u0275dir=le({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,n,s){if(1&e&&(st(s,fd,5),st(s,Ho,5)),2&e){let r;V(r=B())&&(n.links=r),V(r=B())&&(n.linksWithHrefs=r)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[mn]}),t})();class O2{}class A2{preload(i,e){return oe(null)}}let P2=(()=>{class t{constructor(e,n,s,r){this.router=e,this.injector=s,this.preloadingStrategy=r,this.loader=new E2(s,n,h=>e.triggerEvent(new BT(h)),h=>e.triggerEvent(new HT(h)))}setUpPreloading(){this.subscription=this.router.events.pipe(qs(e=>e instanceof vl),_r(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(fs);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,n){const s=[];for(const r of n)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const o=r._loadedConfig;s.push(this.processRoutes(o.module,o.routes))}else r.loadChildren&&!r.canLoad?s.push(this.preloadConfig(e,r)):r.children&&s.push(this.processRoutes(e,r.children));return Dn(s).pipe(ea(),et(r=>{}))}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>(n._loadedConfig?oe(n._loadedConfig):this.loader.load(e.injector,n)).pipe(bn(r=>(n._loadedConfig=r,this.processRoutes(r.module,r.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(K(It),K(qC),K(In),K(O2))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),_g=(()=>{class t{constructor(e,n,s={}){this.router=e,this.viewportScroller=n,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof tg?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof vl&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof qT&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,n){this.router.triggerEvent(new qT(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){Sh()},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();const Lr=new be("ROUTER_CONFIGURATION"),F2=new be("ROUTER_FORROOT_GUARD"),FH=[_m,{provide:YT,useClass:ZT},{provide:It,useFactory:function qH(t,i,e,n,s,r,o={},u,h){const b=new It(null,t,i,e,n,s,zT(r));return u&&(b.urlHandlingStrategy=u),h&&(b.routeReuseStrategy=h),function UH(t,i){t.errorHandler&&(i.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(i.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(i.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(i.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(i.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(i.urlUpdateStrategy=t.urlUpdateStrategy),t.canceledNavigationResolution&&(i.canceledNavigationResolution=t.canceledNavigationResolution)}(o,b),o.enableTracing&&b.events.subscribe(y=>{var w,M;null===(w=console.group)||void 0===w||w.call(console,`Router Event: ${y.constructor.name}`),console.log(y.toString()),console.log(y),null===(M=console.groupEnd)||void 0===M||M.call(console)}),b},deps:[YT,Dl,_m,In,qC,gg,Lr,[class MH{},new Ps],[class SH{},new Ps]]},Dl,{provide:Er,useFactory:function GH(t){return t.routerState.root},deps:[It]},P2,A2,class PH{preload(i,e){return e().pipe(Mr(()=>oe(null)))}},{provide:Lr,useValue:{enableTracing:!1}}];function NH(){return new $C("Router",It)}let On=(()=>{class t{constructor(e,n){}static forRoot(e,n){return{ngModule:t,providers:[FH,N2(e),{provide:F2,useFactory:HH,deps:[[It,new Ps,new _a]]},{provide:Lr,useValue:n||{}},{provide:ko,useFactory:BH,deps:[fr,[new uc(gm),new Ps],Lr]},{provide:_g,useFactory:VH,deps:[It,M4,Lr]},{provide:O2,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:A2},{provide:$C,multi:!0,useFactory:NH},[bg,{provide:em,multi:!0,useFactory:zH,deps:[bg]},{provide:V2,useFactory:jH,deps:[bg]},{provide:HC,multi:!0,useExisting:V2}]]}}static forChild(e){return{ngModule:t,providers:[N2(e)]}}}return t.\u0275fac=function(e){return new(e||t)(K(F2,8),K(It,8))},t.\u0275mod=he({type:t}),t.\u0275inj=pe({}),t})();function VH(t,i,e){return e.scrollOffset&&i.setOffset(e.scrollOffset),new _g(t,i,e)}function BH(t,i,e={}){return e.useHash?new fL(t,i):new dy(t,i)}function HH(t){return"guarded"}function N2(t){return[{provide:pD,multi:!0,useValue:t},{provide:gg,multi:!0,useValue:t}]}let bg=(()=>{class t{constructor(e){this.injector=e,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new ct}appInitializer(){return this.injector.get(pL,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let n=null;const s=new Promise(u=>n=u),r=this.injector.get(It),o=this.injector.get(Lr);return"disabled"===o.initialNavigation?(r.setUpLocationChangeListener(),n(!0)):"enabled"===o.initialNavigation||"enabledBlocking"===o.initialNavigation?(r.hooks.afterPreactivation=()=>this.initNavigation?oe(null):(this.initNavigation=!0,n(!0),this.resultOfPreactivationDone),r.initialNavigation()):n(!0),s})}bootstrapListener(e){const n=this.injector.get(Lr),s=this.injector.get(P2),r=this.injector.get(_g),o=this.injector.get(It),u=this.injector.get(cm);e===u.components[0]&&(("enabledNonBlocking"===n.initialNavigation||void 0===n.initialNavigation)&&o.initialNavigation(),s.setUpPreloading(),r.init(),o.resetRootComponentType(u.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return t.\u0275fac=function(e){return new(e||t)(K(In))},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})();function zH(t){return t.appInitializer.bind(t)}function jH(t){return t.bootstrapListener.bind(t)}const V2=new be("Router Initializer");let d9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,gn,ai],On,ai]}),t})();function p9(t,i){1&t&&k(0,"span",6),2&t&&p("innerHTML",d(3).text,Ht)}function h9(t,i){if(1&t&&(l(0,"div"),_(1,p9,1,1,"span",5),c()),2&t){const e=d(2);a(1),p("ngIf",!e.escape)}}function m9(t,i){if(1&t&&(l(0,"span",8),g(1),c()),2&t){const e=d(3);a(1),S(e.text)}}function f9(t,i){1&t&&_(0,m9,2,1,"span",7),2&t&&p("ngIf",d(2).escape)}const g9=function(t,i,e,n,s){return{"p-inline-message-info":t,"p-inline-message-warn":i,"p-inline-message-error":e,"p-inline-message-success":n,"p-inline-message-icon-only":s}};function _9(t,i){if(1&t&&(l(0,"div",1),k(1,"span",2),_(2,h9,2,1,"div",3),_(3,f9,1,1,"ng-template",null,4,we),c()),2&t){const e=F(4),n=d();me(n.styleClass),p("ngStyle",n.style)("ngClass",pr(7,g9,"info"===n.severity,"warn"===n.severity,"error"===n.severity,"success"===n.severity,null==n.text)),a(1),p("ngClass",n.icon),a(1),p("ngIf",!n.escape)("ngIfElse",e)}}let qe=(()=>{class t{constructor(){this.escape=!0}get icon(){let e=null;if(this.severity)switch(this.severity){case"success":e="pi pi-check";break;case"info":default:e="pi pi-info-circle";break;case"error":e="pi pi-times-circle";break;case"warn":e="pi pi-exclamation-triangle"}return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-message"]],hostAttrs:[1,"p-element"],inputs:{severity:"severity",text:"text",escape:"escape",style:"style",styleClass:"styleClass"},decls:1,vars:1,consts:[["aria-live","polite","class","p-inline-message p-component p-inline-message",3,"ngStyle","class","ngClass",4,"ngIf"],["aria-live","polite",1,"p-inline-message","p-component","p-inline-message",3,"ngStyle","ngClass"],[1,"p-inline-message-icon",3,"ngClass"],[4,"ngIf","ngIfElse"],["escapeOut",""],["class","p-inline-message-text",3,"innerHTML",4,"ngIf"],[1,"p-inline-message-text",3,"innerHTML"],["class","p-inline-message-text",4,"ngIf"],[1,"p-inline-message-text"]],template:function(e,n){1&e&&_(0,_9,5,13,"div",0),2&e&&p("ngIf",n.severity)},directives:[Q,lt,Oe],styles:[".p-inline-message{display:inline-flex;align-items:center;justify-content:center;vertical-align:top}.p-inline-message-icon-only .p-inline-message-text{visibility:hidden;width:0}.p-fluid .p-inline-message{display:flex}\n"],encapsulation:2,changeDetection:0}),t})(),b9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),R9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();function L9(t,i){1&t&&Y(0)}function O9(t,i){if(1&t){const e=I();l(0,"button",5),C("click",function(s){return v(e),d(2).onCloseClick(s)})("keydown.enter",function(){return v(e),d(2).hide()}),k(1,"span",6),c()}2&t&&ne("aria-label",d(2).ariaCloseLabel)}const A9=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},P9=function(t,i){return{value:t,params:i}};function F9(t,i){if(1&t){const e=I();l(0,"div",1),C("click",function(s){return v(e),d().onOverlayClick(s)})("@animation.start",function(s){return v(e),d().onAnimationStart(s)})("@animation.done",function(s){return v(e),d().onAnimationEnd(s)}),l(1,"div",2),C("click",function(){return v(e),d().onContentClick()})("mousedown",function(){return v(e),d().onContentClick()}),St(2),_(3,L9,1,0,"ng-container",3),c(),_(4,O9,2,1,"button",4),c()}if(2&t){const e=d();me(e.styleClass),p("ngClass","p-overlaypanel p-component")("ngStyle",e.style)("@animation",We(10,P9,e.overlayVisible?"open":"close",We(7,A9,e.showTransitionOptions,e.hideTransitionOptions))),a(3),p("ngTemplateOutlet",e.contentTemplate),a(1),p("ngIf",e.showCloseIcon)}}const N9=["*"];let V9=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.zone=r,this.config=o,this.overlayService=u,this.dismissable=!0,this.appendTo="body",this.autoZIndex=!0,this.baseZIndex=0,this.focusOnShow=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H,this.overlayVisible=!1,this.render=!1,this.selfClick=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template,this.cd.markForCheck()})}bindDocumentClickListener(){!this.documentClickListener&&this.dismissable&&this.zone.runOutsideAngular(()=>{let e=L.isIOS()?"touchstart":"click";this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document",e,s=>{!this.container.contains(s.target)&&this.target!==s.target&&!this.target.contains(s.target)&&!this.selfClick&&this.zone.run(()=>{this.hide()}),this.selfClick=!1,this.cd.markForCheck()})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,n){this.overlayVisible?(this.hasTargetChanged(e,n)&&(this.destroyCallback=()=>{this.show(null,n||e.currentTarget||e.target)}),this.hide()):this.show(e,n)}show(e,n){this.target=n||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(){this.selfClick=!0}hasTargetChanged(e,n){return null!=this.target&&this.target!==(n||e.currentTarget||e.target)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):L.appendChild(this.container,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}align(){this.autoZIndex&>.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay),L.absolutePosition(this.container,this.target);const e=L.getOffset(this.container),n=L.getOffset(this.target);let s=0;e.left{this.container&&this.container.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener))}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&>.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1}}focus(){let e=L.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&>.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(nt),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-overlayPanel"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],inputs:{dismissable:"dismissable",showCloseIcon:"showCloseIcon",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",ariaCloseLabel:"ariaCloseLabel",baseZIndex:"baseZIndex",focusOnShow:"focusOnShow",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},ngContentSelectors:N9,decls:1,vars:1,consts:[[3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],[1,"p-overlaypanel-content",3,"click","mousedown"],[4,"ngTemplateOutlet"],["type","button","class","p-overlaypanel-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],["type","button","pRipple","",1,"p-overlaypanel-close","p-link",3,"click","keydown.enter"],[1,"p-overlaypanel-close-icon","pi","pi-times"]],template:function(e,n){1&e&&(yn(),_(0,F9,5,13,"div",0)),2&e&&p("ngIf",n.render)},directives:[Q,Oe,lt,Lt,vt],styles:['.p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:" ";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n'],encapsulation:2,data:{animation:[wi("animation",[Cs("void",it({transform:"scaleY(0.8)",opacity:0})),Cs("close",it({opacity:0})),Cs("open",it({transform:"translateY(0)",opacity:1})),Ot("void => open",kt("{{showTransitionParams}}")),Ot("open => close",kt("{{hideTransitionParams}}"))])]},changeDetection:0}),t})(),B9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn,Nt],Nt]}),t})(),W9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,gn],Nt]}),t})(),Uo=(()=>{class t{constructor(){this.strokeWidth="2",this.fill="none",this.animationDuration="2s"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-progressSpinner"]],hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration"},decls:3,vars:6,consts:[["role","alert","aria-busy","true",1,"p-progress-spinner",3,"ngStyle","ngClass"],["viewBox","25 25 50 50",1,"p-progress-spinner-svg"],["cx","50","cy","50","r","20","stroke-miterlimit","10",1,"p-progress-spinner-circle"]],template:function(e,n){1&e&&(l(0,"div",0),function d_(){Ie.lFrame.currentNamespace="svg"}(),l(1,"svg",1),k(2,"circle",2),c()()),2&e&&(p("ngStyle",n.style)("ngClass",n.styleClass),a(1),Hn("animation-duration",n.animationDuration),a(1),ne("fill",n.fill)("stroke-width",n.strokeWidth))},directives:[lt,Oe],styles:['.p-progress-spinner{position:relative;margin:0 auto;width:100px;height:100px;display:inline-block}.p-progress-spinner:before{content:"";display:block;padding-top:100%}.p-progress-spinner-svg{animation:p-progress-spinner-rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.p-progress-spinner-circle{stroke-dasharray:89,200;stroke-dashoffset:0;stroke:#d62d20;animation:p-progress-spinner-dash 1.5s ease-in-out infinite,p-progress-spinner-color 6s ease-in-out infinite;stroke-linecap:round}@keyframes p-progress-spinner-rotate{to{transform:rotate(360deg)}}@keyframes p-progress-spinner-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes p-progress-spinner-color{to,0%{stroke:#d62d20}40%{stroke:#0057e7}66%{stroke:#008744}80%,90%{stroke:#ffa700}}\n'],encapsulation:2,changeDetection:0}),t})(),K9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();Mu([it({transform:"{{transform}}",opacity:0}),kt("{{transition}}")]),Mu([kt("{{transition}}",it({transform:"{{transform}}",opacity:0}))]);let eq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})(),tq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),uq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,ai],On,ai]}),t})();function dq(t,i){1&t&&k(0,"span",8),2&t&&(me(d(2).$implicit.icon),p("ngClass","p-button-icon p-button-icon-left"))}function pq(t,i){if(1&t&&(ce(0),_(1,dq,1,3,"span",6),l(2,"span",7),g(3),c(),ue()),2&t){const e=d().$implicit,n=d();a(1),p("ngIf",e.icon),a(2),S(n.getOptionLabel(e))}}function hq(t,i){1&t&&Y(0)}const mq=function(t,i){return{$implicit:t,index:i}};function fq(t,i){if(1&t&&_(0,hq,1,0,"ng-container",9),2&t){const e=d(),n=e.$implicit,s=e.index;p("ngTemplateOutlet",d().itemTemplate)("ngTemplateOutletContext",We(2,mq,n,s))}}const gq=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-button-icon-only":e}};function _q(t,i){if(1&t){const e=I();l(0,"div",2,3),C("click",function(s){const r=v(e),o=r.$implicit,u=r.index;return d().onItemClick(s,o,u)})("keydown.enter",function(s){const r=v(e),o=r.$implicit,u=r.index;return d().onItemClick(s,o,u)})("blur",function(){return v(e),d().onBlur()}),_(2,pq,4,2,"ng-container",4),_(3,fq,1,5,"ng-template",null,5,we),c()}if(2&t){const e=i.$implicit,n=F(4),s=d();me(e.styleClass),p("ngClass",Rt(10,gq,s.isSelected(e),s.disabled||s.isOptionDisabled(e),e.icon&&!s.getOptionLabel(e))),ne("aria-pressed",s.isSelected(e))("title",e.title)("aria-label",e.label)("tabindex",s.disabled?null:s.tabindex)("aria-labelledby",s.getOptionLabel(e)),a(2),p("ngIf",!s.itemTemplate)("ngIfElse",n)}}const bq={provide:dn,useExisting:Ue(()=>vq),multi:!0};let vq=(()=>{class t{constructor(e){this.cd=e,this.tabindex=0,this.onOptionClick=new H,this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onItemClick(e,n,s){if(!this.disabled&&!this.isOptionDisabled(n)){if(this.multiple)this.isSelected(n)?this.removeOption(n):this.value=[...this.value||[],this.getOptionValue(n)],this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value});else{let r=this.getOptionValue(n);this.value!==r&&(this.value=this.getOptionValue(n),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}this.onOptionClick.emit({originalEvent:e,option:n,index:s})}}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(n=>!Z.equals(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,s=this.getOptionValue(e);if(this.multiple){if(this.value)for(let r of this.value)if(Z.equals(r,s,this.dataKey)){n=!0;break}}else n=Z.equals(this.getOptionValue(e),this.value,this.dataKey);return n}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-selectButton"]],contentQueries:function(e,n,s){if(1&e&&st(s,bi,5),2&e){let r;V(r=B())&&(n.itemTemplate=r.first)}},hostAttrs:[1,"p-element"],inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",tabindex:"tabindex",multiple:"multiple",style:"style",styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",disabled:"disabled",dataKey:"dataKey"},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[Ne([bq])],decls:2,vars:5,consts:[["role","group",3,"ngClass","ngStyle"],["class","p-button p-component","role","button","pRipple","",3,"class","ngClass","click","keydown.enter","blur",4,"ngFor","ngForOf"],["role","button","pRipple","",1,"p-button","p-component",3,"ngClass","click","keydown.enter","blur"],["btn",""],[4,"ngIf","ngIfElse"],["customcontent",""],[3,"ngClass","class",4,"ngIf"],[1,"p-button-label"],[3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,_q,5,14,"div",1),c()),2&e&&(me(n.styleClass),p("ngClass","p-selectbutton p-buttonset p-component")("ngStyle",n.style),a(1),p("ngForOf",n.options))},directives:[Oe,lt,at,vt,Q,Lt],styles:[".p-button{margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}\n"],encapsulation:2,changeDetection:0}),t})(),Cq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn]]}),t})();const yq=function(t,i,e){return{"p-checkbox-label-active":t,"p-disabled":i,"p-checkbox-label-focus":e}};function wq(t,i){if(1&t){const e=I();l(0,"label",7),C("click",function(s){v(e);const r=d(),o=F(3);return r.onClick(s,o)}),g(1),c()}if(2&t){const e=d();p("ngClass",Rt(3,yq,null!=e.value,e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const Tq=function(t,i){return{"p-checkbox p-component":!0,"p-checkbox-disabled":t,"p-checkbox-focused":i}},Sq=function(t,i,e){return{"p-highlight":t,"p-disabled":i,"p-focus":e}},xq={provide:dn,useExisting:Ue(()=>q2),multi:!0};let q2=(()=>{class t{constructor(e){this.cd=e,this.checkboxTrueIcon="pi pi-check",this.checkboxFalseIcon="pi pi-times",this.onChange=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}onClick(e,n){!this.disabled&&!this.readonly&&(this.toggle(e),this.focused=!0,n.focus())}onKeydown(e){32==e.keyCode&&e.preventDefault()}onKeyup(e){32==e.keyCode&&!this.readonly&&(this.toggle(e),e.preventDefault())}toggle(e){null==this.value||null==this.value?this.value=!0:1==this.value?this.value=!1:0==this.value&&(this.value=null),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}writeValue(e){this.value=e,this.cd.markForCheck()}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-triStateCheckbox"]],hostAttrs:[1,"p-element"],inputs:{disabled:"disabled",name:"name",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",label:"label",readonly:"readonly",checkboxTrueIcon:"checkboxTrueIcon",checkboxFalseIcon:"checkboxFalseIcon"},outputs:{onChange:"onChange"},features:[Ne([xq])],decls:7,vars:21,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","text","inputmode","none",3,"name","readonly","disabled","keyup","keydown","focus","blur"],["input",""],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],["class","p-checkbox-label",3,"ngClass","click",4,"ngIf"],[1,"p-checkbox-label",3,"ngClass","click"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("keyup",function(o){return n.onKeyup(o)})("keydown",function(o){return n.onKeydown(o)})("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.onClick(o,u)}),k(5,"span",5),c()(),_(6,wq,2,7,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",We(14,Tq,n.disabled,n.focused)),a(2),p("name",n.name)("readonly",n.readonly)("disabled",n.disabled),ne("id",n.inputId)("tabindex",n.tabindex)("aria-labelledby",n.ariaLabelledBy),a(2),p("ngClass",Rt(17,Sq,null!=n.value,n.disabled,n.focused)),ne("aria-checked",!0===n.value),a(1),p("ngClass",!0===n.value?n.checkboxTrueIcon:!1===n.value?n.checkboxFalseIcon:""),a(1),p("ngIf",n.label))},directives:[lt,Oe,Q],encapsulation:2,changeDetection:0}),t})(),Dq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const Mq=["container"],kq=["resizeHelper"],Iq=["reorderIndicatorUp"],Eq=["reorderIndicatorDown"],Rq=["wrapper"],Lq=["table"],Oq=["tableHeader"];function Aq(t,i){if(1&t&&(l(0,"div",14),k(1,"i"),c()),2&t){const e=d();a(1),me("p-datatable-loading-icon pi-spin "+e.loadingIcon)}}function Pq(t,i){1&t&&Y(0)}function Fq(t,i){if(1&t&&(l(0,"div",15),_(1,Pq,1,0,"ng-container",16),c()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.captionTemplate)}}function Nq(t,i){if(1&t){const e=I();l(0,"p-paginator",17),C("onPageChange",function(s){return v(e),d().onPageChange(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function Vq(t,i){1&t&&Y(0)}function Bq(t,i){1&t&&Y(0)}function Hq(t,i){if(1&t&&k(0,"tbody",25),2&t){const e=d(2);p("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.frozenBodyTemplate)("frozen",!0)}}function qq(t,i){1&t&&Y(0)}const Zs=function(t){return{$implicit:t}};function Uq(t,i){if(1&t&&(l(0,"tfoot",26),_(1,qq,1,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",z(2,Zs,e.columns))}}function Gq(t,i){if(1&t&&(l(0,"table",18,19),_(2,Vq,1,0,"ng-container",20),l(3,"thead",21),_(4,Bq,1,0,"ng-container",20),c(),_(5,Hq,1,5,"tbody",22),k(6,"tbody",23),_(7,Uq,2,4,"tfoot",24),c()),2&t){const e=d();p("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),a(2),p("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(12,Zs,e.columns)),a(2),p("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",z(14,Zs,e.columns)),a(1),p("ngIf",e.frozenValue||e.frozenBodyTemplate),a(1),p("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),a(1),p("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function zq(t,i){1&t&&Y(0)}function jq(t,i){1&t&&Y(0)}function $q(t,i){if(1&t&&k(0,"tbody",25),2&t){const e=d(2);p("value",e.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate)("frozen",!0)}}function Wq(t,i){1&t&&Y(0)}function Kq(t,i){if(1&t&&(l(0,"tfoot",26),_(1,Wq,1,0,"ng-container",20),c()),2&t){const e=d(2);a(1),p("ngTemplateOutlet",e.footerGroupedTemplate||e.footerTemplate)("ngTemplateOutletContext",z(2,Zs,e.columns))}}function Qq(t,i){if(1&t){const e=I();l(0,"cdk-virtual-scroll-viewport",27),C("scrolledIndexChange",function(s){return v(e),d().onScrollIndexChange(s)}),l(1,"table",18,19),_(3,zq,1,0,"ng-container",20),l(4,"thead",21,28),_(6,jq,1,0,"ng-container",20),c(),_(7,$q,1,5,"tbody",22),k(8,"tbody",23),_(9,Kq,2,4,"tfoot",24),c()()}if(2&t){const e=d();Hn("height","flex"!==e.scrollHeight?e.scrollHeight:void 0),p("itemSize",e.virtualRowHeight)("minBufferPx",e.minBufferPx)("maxBufferPx",e.maxBufferPx),a(1),p("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),ne("id",e.id+"-table"),a(2),p("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(17,Zs,e.columns)),a(3),p("ngTemplateOutlet",e.headerGroupedTemplate||e.headerTemplate)("ngTemplateOutletContext",z(19,Zs,e.columns)),a(1),p("ngIf",e.frozenValue||e.frozenBodyTemplate),a(1),p("value",e.dataToRender)("pTableBody",e.columns)("pTableBodyTemplate",e.bodyTemplate),a(1),p("ngIf",e.footerGroupedTemplate||e.footerTemplate)}}function Jq(t,i){if(1&t){const e=I();l(0,"p-paginator",29),C("onPageChange",function(s){return v(e),d().onPageChange(s)}),c()}if(2&t){const e=d();p("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)}}function Yq(t,i){1&t&&Y(0)}function Zq(t,i){if(1&t&&(l(0,"div",30),_(1,Yq,1,0,"ng-container",16),c()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.summaryTemplate)}}function Xq(t,i){1&t&&k(0,"div",31,32)}function eU(t,i){1&t&&k(0,"span",33,34)}function tU(t,i){1&t&&k(0,"span",35,36)}const nU=function(t,i,e,n,s,r,o,u,h,b,y,w,M,E){return{"p-datatable p-component":!0,"p-datatable-hoverable-rows":t,"p-datatable-auto-layout":i,"p-datatable-resizable":e,"p-datatable-resizable-fit":n,"p-datatable-scrollable":s,"p-datatable-scrollable-vertical":r,"p-datatable-scrollable-horizontal":o,"p-datatable-scrollable-both":u,"p-datatable-flex-scrollable":h,"p-datatable-responsive-stack":b,"p-datatable-responsive-scroll":y,"p-datatable-responsive":w,"p-datatable-grouped-header":M,"p-datatable-grouped-footer":E}},iU=function(t){return{height:t}},sU=["pTableBody",""];function rU(t,i){1&t&&Y(0)}const _d=function(t,i,e,n,s){return{$implicit:t,rowIndex:i,columns:e,editing:n,frozen:s}};function oU(t,i){if(1&t&&(ce(0,3),_(1,rU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupHeaderTemplate)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function aU(t,i){1&t&&Y(0)}function lU(t,i){if(1&t&&(ce(0),_(1,aU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function cU(t,i){1&t&&Y(0)}const uU=function(t,i,e,n,s,r,o){return{$implicit:t,rowIndex:i,columns:e,editing:n,frozen:s,rowgroup:r,rowspan:o}};function dU(t,i){if(1&t&&(ce(0),_(1,cU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",function aC(t,i,e,n,s,r,o,u,h,b){const y=Fn()+t,w=W();let M=gi(w,y,e,n,s,r);return Dc(w,y+4,o,u,h)||M?Xi(w,y+7,b?i.call(b,e,n,s,r,o,u,h):i(e,n,s,r,o,u,h)):Ea(w,y+7)}(2,uU,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,s),r.calculateRowGroupSize(r.value,n,s)))}}function pU(t,i){1&t&&Y(0)}function hU(t,i){if(1&t&&(ce(0,3),_(1,pU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupFooterTemplate)("ngTemplateOutletContext",pr(2,_d,n,r.dt.paginator?r.dt.first+s:s,r.columns,"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function mU(t,i){if(1&t&&(_(0,oU,2,8,"ng-container",2),_(1,lU,2,8,"ng-container",0),_(2,dU,2,10,"ng-container",0),_(3,hU,2,8,"ng-container",2)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngIf",s.dt.groupHeaderTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupHeader(s.value,e,n)),a(1),p("ngIf","rowspan"!==s.dt.rowGroupMode),a(1),p("ngIf","rowspan"===s.dt.rowGroupMode),a(1),p("ngIf",s.dt.groupFooterTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupFooter(s.value,e,n))}}function fU(t,i){if(1&t&&(ce(0),_(1,mU,4,4,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function gU(t,i){1&t&&Y(0)}function _U(t,i){if(1&t&&_(0,gU,1,0,"ng-container",4),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngTemplateOutlet",e?s.template:s.dt.loadingBodyTemplate)("ngTemplateOutletContext",pr(2,_d,e,s.dt.paginator?s.dt.first+n:n,s.columns,"row"===s.dt.editMode&&s.dt.isRowEditing(e),s.frozen))}}function bU(t,i){if(1&t&&(ce(0),_(1,_U,1,8,"ng-template",5),ue()),2&t){const e=d();a(1),p("cdkVirtualForOf",e.dt.filteredValue||e.dt.value)("cdkVirtualForTrackBy",e.dt.rowTrackBy)("cdkVirtualForTemplateCacheSize",0)}}function vU(t,i){1&t&&Y(0)}const bd=function(t,i,e,n,s,r){return{$implicit:t,rowIndex:i,columns:e,expanded:n,editing:s,frozen:r}};function CU(t,i){if(1&t&&(ce(0),_(1,vU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function yU(t,i){1&t&&Y(0)}function wU(t,i){if(1&t&&(ce(0,3),_(1,yU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupHeaderTemplate)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}function TU(t,i){1&t&&Y(0)}function SU(t,i){1&t&&Y(0)}function xU(t,i){if(1&t&&(ce(0,3),_(1,SU,1,0,"ng-container",4),ue()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.groupFooterTemplate)("ngTemplateOutletContext",Do(2,bd,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.dt.isRowExpanded(n),"row"===r.dt.editMode&&r.dt.isRowEditing(n),r.frozen))}}const U2=function(t,i,e,n){return{$implicit:t,rowIndex:i,columns:e,frozen:n}};function DU(t,i){if(1&t&&(ce(0),_(1,TU,1,0,"ng-container",4),_(2,xU,2,9,"ng-container",2),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.expandedRowTemplate)("ngTemplateOutletContext",_i(3,U2,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.frozen)),a(1),p("ngIf",r.dt.groupFooterTemplate&&"subheader"===r.dt.rowGroupMode&&r.shouldRenderRowGroupFooter(r.value,n,s))}}function MU(t,i){if(1&t&&(_(0,CU,2,9,"ng-container",0),_(1,wU,2,9,"ng-container",2),_(2,DU,3,8,"ng-container",0)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngIf",!s.dt.groupHeaderTemplate),a(1),p("ngIf",s.dt.groupHeaderTemplate&&"subheader"===s.dt.rowGroupMode&&s.shouldRenderRowGroupHeader(s.value,e,n)),a(1),p("ngIf",s.dt.isRowExpanded(e))}}function kU(t,i){if(1&t&&(ce(0),_(1,MU,3,3,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function IU(t,i){1&t&&Y(0)}function EU(t,i){1&t&&Y(0)}function RU(t,i){if(1&t&&(ce(0),_(1,EU,1,0,"ng-container",4),ue()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);a(1),p("ngTemplateOutlet",r.dt.frozenExpandedRowTemplate)("ngTemplateOutletContext",_i(2,U2,n,r.dt.paginator?r.dt.first+s:s,r.columns,r.frozen))}}function LU(t,i){if(1&t&&(_(0,IU,1,0,"ng-container",4),_(1,RU,2,7,"ng-container",0)),2&t){const e=i.$implicit,n=i.index,s=d(2);p("ngTemplateOutlet",s.template)("ngTemplateOutletContext",Do(3,bd,e,s.dt.paginator?s.dt.first+n:n,s.columns,s.dt.isRowExpanded(e),"row"===s.dt.editMode&&s.dt.isRowEditing(e),s.frozen)),a(1),p("ngIf",s.dt.isRowExpanded(e))}}function OU(t,i){if(1&t&&(ce(0),_(1,LU,2,10,"ng-template",1),ue()),2&t){const e=d();a(1),p("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function AU(t,i){1&t&&Y(0)}const G2=function(t,i){return{$implicit:t,frozen:i}};function PU(t,i){if(1&t&&(ce(0),_(1,AU,1,0,"ng-container",4),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.dt.loadingBodyTemplate)("ngTemplateOutletContext",We(2,G2,e.columns,e.frozen))}}function FU(t,i){1&t&&Y(0)}function NU(t,i){if(1&t&&(ce(0),_(1,FU,1,0,"ng-container",4),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.dt.emptyMessageTemplate)("ngTemplateOutletContext",We(2,G2,e.columns,e.frozen))}}function VU(t,i){if(1&t&&(l(0,"span",2),g(1),c()),2&t){const e=d();a(1),S(e.getBadgeValue())}}const BU=function(t,i,e){return{"pi-sort-amount-up-alt":t,"pi-sort-amount-down":i,"pi-sort-alt":e}};function HU(t,i){1&t&&Y(0)}function qU(t,i){if(1&t&&(ce(0),_(1,HU,1,0,"ng-container",1),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.inputTemplate)}}function UU(t,i){1&t&&Y(0)}function GU(t,i){if(1&t&&(ce(0),_(1,UU,1,0,"ng-container",1),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.outputTemplate)}}function zU(t,i){1&t&&Y(0)}const jU=function(t,i){return{$implicit:t,filterCallback:i}};function $U(t,i){if(1&t&&(ce(0),_(1,zU,1,0,"ng-container",2),ue()),2&t){const e=d();a(1),p("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",We(2,jU,e.filterConstraint.value,e.filterCallback))}}function WU(t,i){if(1&t){const e=I();l(0,"input",8),C("input",function(s){return v(e),d(2).onModelChange(s.target.value)})("keydown.enter",function(s){return v(e),d(2).onTextInputEnterKeyDown(s)}),c()}if(2&t){const e=d(2);p("value",null==e.filterConstraint?null:e.filterConstraint.value),ne("placeholder",e.placeholder)}}function KU(t,i){if(1&t){const e=I();l(0,"p-inputNumber",9),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)})("onKeyDown",function(s){return v(e),d(2).onNumericInputKeyDown(s)}),c()}if(2&t){const e=d(2);p("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)("showButtons",!0)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits)("prefix",e.prefix)("suffix",e.suffix)("placeholder",e.placeholder)("mode",e.currency?"currency":"decimal")("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)}}function QU(t,i){if(1&t){const e=I();l(0,"p-triStateCheckbox",10),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)}),c()}if(2&t){const e=d(2);p("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)}}function JU(t,i){if(1&t){const e=I();l(0,"p-calendar",11),C("ngModelChange",function(s){return v(e),d(2).onModelChange(s)}),c()}if(2&t){const e=d(2);p("placeholder",e.placeholder)("ngModel",null==e.filterConstraint?null:e.filterConstraint.value)}}function YU(t,i){1&t&&(ce(0,3),_(1,WU,1,2,"input",4),_(2,KU,1,13,"p-inputNumber",5),_(3,QU,1,1,"p-triStateCheckbox",6),_(4,JU,1,2,"p-calendar",7),ue()),2&t&&(p("ngSwitch",d().type),a(1),p("ngSwitchCase","text"),a(1),p("ngSwitchCase","numeric"),a(1),p("ngSwitchCase","boolean"),a(1),p("ngSwitchCase","date"))}const ZU=["icon"];function XU(t,i){if(1&t&&k(0,"p-columnFilterFormElement",5),2&t){const e=d();p("type",e.type)("field",e.field)("filterConstraint",e.dt.filters[e.field])("filterTemplate",e.filterTemplate)("placeholder",e.placeholder)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits)("prefix",e.prefix)("suffix",e.suffix)("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)}}const eG=function(t,i){return{"p-column-filter-menu-button-open":t,"p-column-filter-menu-button-active":i}};function tG(t,i){if(1&t){const e=I();l(0,"button",6,7),C("click",function(){return v(e),d().toggleMenu()})("keydown",function(s){return v(e),d().onToggleButtonKeyDown(s)}),k(2,"span",8),c()}if(2&t){const e=d();p("ngClass",We(2,eG,e.overlayVisible,e.hasFilter())),ne("aria-expanded",e.overlayVisible)}}const nG=function(t){return{"p-hidden-space":t}};function iG(t,i){if(1&t){const e=I();l(0,"button",9,7),C("click",function(){return v(e),d().clearFilter()}),k(2,"span",10),c()}if(2&t){const e=d();p("ngClass",z(1,nG,!e.hasRowFilter()))}}function sG(t,i){1&t&&Y(0)}const rG=function(t){return{"p-highlight":t}};function oG(t,i){if(1&t){const e=I();l(0,"li",19),C("click",function(){const r=v(e).$implicit;return d(3).onRowMatchModeChange(r.value)})("keydown",function(s){return v(e),d(3).onRowMatchModeKeyDown(s)})("keydown.enter",function(){const r=v(e).$implicit;return d(3).onRowMatchModeChange(r.value)}),g(1),c()}if(2&t){const e=i.$implicit,n=i.index,s=d(3);p("ngClass",z(3,rG,s.isRowMatchModeSelected(e.value))),ne("tabindex",0===n?"0":null),a(1),S(e.label)}}function aG(t,i){if(1&t){const e=I();l(0,"ul",15),_(1,oG,2,5,"li",16),k(2,"li",17),l(3,"li",18),C("click",function(){return v(e),d(2).onRowClearItemClick()})("keydown",function(s){return v(e),d(2).onRowMatchModeKeyDown(s)})("keydown.enter",function(){return v(e),d(2).onRowClearItemClick()}),g(4),c()()}if(2&t){const e=d(2);a(1),p("ngForOf",e.matchModes),a(3),S(e.noFilterLabel)}}function lG(t,i){if(1&t){const e=I();l(0,"div",27)(1,"p-dropdown",28),C("ngModelChange",function(s){return v(e),d(3).onOperatorChange(s)}),c()()}if(2&t){const e=d(3);a(1),p("options",e.operatorOptions)("ngModel",e.operator)}}function cG(t,i){if(1&t){const e=I();l(0,"p-dropdown",33),C("ngModelChange",function(s){v(e);const r=d().$implicit;return d(3).onMenuMatchModeChange(s,r)}),c()}if(2&t){const e=d().$implicit;p("options",d(3).matchModes)("ngModel",e.matchMode)}}function uG(t,i){if(1&t){const e=I();l(0,"button",34),C("click",function(){v(e);const s=d().$implicit;return d(3).removeConstraint(s)}),c()}2&t&&p("label",d(4).removeRuleButtonLabel)}function dG(t,i){if(1&t&&(l(0,"div",29),_(1,cG,1,2,"p-dropdown",30),k(2,"p-columnFilterFormElement",31),l(3,"div"),_(4,uG,1,1,"button",32),c()()),2&t){const e=i.$implicit,n=d(3);a(1),p("ngIf",n.showMatchModes&&n.matchModes),a(1),p("type",n.type)("field",n.field)("filterConstraint",e)("filterTemplate",n.filterTemplate)("placeholder",n.placeholder)("minFractionDigits",n.minFractionDigits)("maxFractionDigits",n.maxFractionDigits)("prefix",n.prefix)("suffix",n.suffix)("locale",n.locale)("localeMatcher",n.localeMatcher)("currency",n.currency)("currencyDisplay",n.currencyDisplay)("useGrouping",n.useGrouping),a(2),p("ngIf",n.showRemoveIcon)}}function pG(t,i){if(1&t){const e=I();l(0,"div",35)(1,"button",36),C("click",function(){return v(e),d(3).addConstraint()}),c()()}if(2&t){const e=d(3);a(1),p("label",e.addRuleButtonLabel)}}function hG(t,i){if(1&t){const e=I();l(0,"button",37),C("click",function(){return v(e),d(3).clearFilter()}),c()}2&t&&p("label",d(3).clearButtonLabel)}function mG(t,i){if(1&t){const e=I();l(0,"button",38),C("click",function(){return v(e),d(3).applyFilter()}),c()}2&t&&p("label",d(3).applyButtonLabel)}function fG(t,i){if(1&t&&(_(0,lG,2,2,"div",20),l(1,"div",21),_(2,dG,5,16,"div",22),c(),_(3,pG,2,1,"div",23),l(4,"div",24),_(5,hG,1,1,"button",25),_(6,mG,1,1,"button",26),c()),2&t){const e=d(2);p("ngIf",e.isShowOperator),a(2),p("ngForOf",e.fieldConstraints),a(1),p("ngIf",e.isShowAddConstraint),a(2),p("ngIf",e.showClearButton),a(1),p("ngIf",e.showApplyButton)}}function gG(t,i){1&t&&Y(0)}const _G=function(t){return{"p-column-filter-overlay p-component p-fluid":!0,"p-column-filter-overlay-menu":t}};function bG(t,i){if(1&t){const e=I();l(0,"div",11),C("click",function(){return v(e),d().onContentClick()})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)})("keydown.escape",function(){return v(e),d().onEscape()}),_(1,sG,1,0,"ng-container",12),_(2,aG,5,2,"ul",13),_(3,fG,7,5,"ng-template",null,14,we),_(5,gG,1,0,"ng-container",12),c()}if(2&t){const e=F(4),n=d();p("ngClass",z(8,_G,"menu"===n.display))("@overlayAnimation","visible"),a(1),p("ngTemplateOutlet",n.headerTemplate)("ngTemplateOutletContext",z(10,Zs,n.field)),a(1),p("ngIf","row"===n.display)("ngIfElse",e),a(3),p("ngTemplateOutlet",n.footerTemplate)("ngTemplateOutletContext",z(12,Zs,n.field))}}const vG=function(t,i){return{"p-column-filter-row":t,"p-column-filter-menu":i}};let vd=(()=>{class t{constructor(){this.sortSource=new ct,this.selectionSource=new ct,this.contextMenuSource=new ct,this.valueSource=new ct,this.totalRecordsSource=new ct,this.columnsSource=new ct,this.resetSource=new ct,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable(),this.resetSource$=this.resetSource.asObservable()}onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onResetChange(){this.resetSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac}),t})(),xn=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.zone=n,this.tableService=s,this.cd=r,this.filterService=o,this.overlayService=u,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showFirstLastIcon=!0,this.showPageLinks=!0,this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectAllChange=new H,this.selectionChange=new H,this.contextMenuSelectionChange=new H,this.contextMenuSelectionMode="separate",this.rowTrackBy=(h,b)=>b,this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.editingRowKeys={},this.rowExpandMode="multiple",this.scrollDirection="vertical",this.virtualScrollDelay=250,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.showLoader=!0,this.showInitialSortBadge=!0,this.stateStorage="session",this.editMode="cell",this.groupRowsByOrder=1,this.responsiveLayout="stack",this.breakpoint="960px",this.onRowSelect=new H,this.onRowUnselect=new H,this.onPage=new H,this.onSort=new H,this.onFilter=new H,this.onLazyLoad=new H,this.onRowExpand=new H,this.onRowCollapse=new H,this.onContextMenuSelect=new H,this.onColResize=new H,this.onColReorder=new H,this.onRowReorder=new H,this.onEditInit=new H,this.onEditComplete=new H,this.onEditCancel=new H,this.onHeaderCheckboxToggle=new H,this.sortFunction=new H,this.firstChange=new H,this.rowsChange=new H,this.onStateSave=new H,this.onStateRestore=new H,this._value=[],this._totalRecords=0,this._first=0,this.selectionKeys={},this._sortOrder=1,this._selectAll=null,this.columnResizing=!1,this.rowGroupHeaderStyleObject={},this.id=pl(),this.virtualScrollInitialized=!1}ngOnInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),"stack"===this.responsiveLayout&&!this.scrollable&&this.createResponsiveStyle(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"rowexpansion":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"rowspan":this.rowspanTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenrows":this.frozenRowsTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenrowexpansion":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template}})}ngAfterViewInit(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths(),this.scrollable&&this.virtualScroll&&(this.virtualScrollSubscription=this.virtualScrollBody.renderedRangeStream.subscribe(e=>{this.tableHeaderViewChild.nativeElement.style.top=e.start*this.virtualRowHeight*-1+"px"}))}ngOnChanges(e){e.value&&(this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&(this.sortField||this.groupRowsBy)?this.sortSingle():"multiple"==this.sortMode&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&"single"===this.sortMode&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,"multiple"===this.sortMode&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}get dataToRender(){let e=this.filteredValue||this.value;return e?this.paginator&&!this.lazy?e.slice(this.first,this.first+this.rows):e:[]}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Z.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Z.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows}),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let n=e.originalEvent;if("single"===this.sortMode&&(this._sortOrder=this.sortField===e.field?-1*this.sortOrder:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),"multiple"===this.sortMode){let s=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?s?r.order=-1*r.order:(this._multiSortMeta=[{field:e.field,order:-1*r.order}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!s||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,n=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField)return this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],void this.sortMultiple();if(e&&n){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:n}):(this.value.sort((r,o)=>{let u=Z.resolveFieldData(r,e),h=Z.resolveFieldData(o,e),b=null;return b=null==u&&null!=h?-1:null!=u&&null==h?1:null==u&&null==h?0:"string"==typeof u&&"string"==typeof h?u.localeCompare(h):uh?1:0,n*b}),this._value=[...this.value]),this.hasFilter()&&this._filter());let s={field:e,order:n};this.onSort.emit(s),this.tableService.onSort(s)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,n)=>this.multisortField(e,n,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,n,s,r){let o=Z.resolveFieldData(e,s[r].field),u=Z.resolveFieldData(n,s[r].field),h=null;if(null==o&&null!=u)h=-1;else if(null!=o&&null==u)h=1;else if(null==o&&null==u)h=0;else if("string"==typeof o||o instanceof String){if(o.localeCompare&&o!=u)return s[r].order*o.localeCompare(u)}else h=or?this.multisortField(e,n,s,r+1):0:s[r].order*h}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(let n=0;nR!=M),this.selectionChange.emit(this.selection),y&&delete this.selectionKeys[y]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row"})}else this.isSingleSelectionMode()?(this._selection=o,this.selectionChange.emit(o),y&&(this.selectionKeys={},this.selectionKeys[y]=1)):this.isMultipleSelectionMode()&&(w?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,o],this.selectionChange.emit(this.selection),y&&(this.selectionKeys[y]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u})}else if("single"===this.selectionMode)h?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u})):(this._selection=o,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&(this.selectionKeys={},this.selectionKeys[y]=1));else if("multiple"===this.selectionMode)if(h){let w=this.findIndexInSelection(o);this._selection=this.selection.filter((M,E)=>E!=w),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&delete this.selectionKeys[y]}else this._selection=this.selection?[...this.selection,o]:[o],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:u}),y&&(this.selectionKeys[y]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){const n=e.rowData,s=e.rowIndex;if("separate"===this.contextMenuSelectionMode)this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:n,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(n);else if("joint"===this.contextMenuSelectionMode){this.preventSelectionSetterPropagation=!0;let r=this.isSelected(n),o=this.dataKey?String(Z.resolveFieldData(n,this.dataKey)):null;if(!r){if(!this.isRowSelectable(n,s))return;this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n),o&&(this.selectionKeys={},this.selectionKeys[o]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),o&&(this.selectionKeys[o]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:n,index:e.rowIndex})}}}selectRange(e,n){let s,r;this.anchorRowIndex>n?(s=n,r=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(n=this.anchorRowIndex,s=this.rangeRowIndex):this.rangeRowIndexy!=u);let h=this.dataKey?String(Z.resolveFieldData(o,this.dataKey)):null;h&&delete this.selectionKeys[h],this.onRowUnselect.emit({originalEvent:e,data:o,type:"row"})}}isSelected(e){return!(!e||!this.selection)&&(this.dataKey?void 0!==this.selectionKeys[Z.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length)for(let s=0;sh!=o),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox(e,n){if(null!==this._selectAll)this.selectAllChange.emit({originalEvent:e,checked:n});else{const s=this.selectionPageOnly?this.dataToRender:this.filteredValue||this.value||[];let r=this.selectionPageOnly&&this._selection?this._selection.filter(o=>!s.some(u=>this.equals(o,u))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...s]:[...r,...s],r=this.rowSelectable?r.filter((o,u)=>this.rowSelectable({data:o,index:u})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n}),this.isStateful()&&this.saveState()}}equals(e,n){return"equals"===this.compareSelectionBy?e===n:Z.equals(e,n,this.dataKey)}filter(e,n,s){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:s},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,n){this.filter(e,"global",n)}isFilterBlank(e){return null==e||"string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(this.hasFilter()){let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let n=0;n{s+="\n";for(let y=0;y{let n=Math.floor(e/this.rows),s=0===n?0:(n-1)*this.rows,r=0===n?2*this.rows:3*this.rows;n!==this.virtualPage&&(this.virtualPage=n,this.lazyLoadOnInit||this.virtualScrollInitialized?this.onLazyLoad.emit({first:s,rows:r,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta}):this.virtualScrollInitialized=!0)},this.virtualScrollDelay))}scrollTo(e){this.virtualScrollBody?this.virtualScrollBody.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,n,s,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=s,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&0===L.find(this.editingCell,".ng-invalid.ng-dirty").length}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(L.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))}unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null)}initRowEdit(e){let n=String(Z.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(0===L.find(n,".ng-invalid.ng-dirty").length){let s=String(Z.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[s]}}cancelRowEdit(e){let n=String(Z.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[n]}toggleRow(e,n){if(!this.dataKey)throw new Error("dataKey must be defined to use row expansion");let s=String(Z.resolveFieldData(e,this.dataKey));null!=this.expandedRowKeys[s]?(delete this.expandedRowKeys[s],this.onRowCollapse.emit({originalEvent:n,data:e})):("single"===this.rowExpandMode&&(this.expandedRowKeys={}),this.expandedRowKeys[s]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return!0===this.expandedRowKeys[String(Z.resolveFieldData(e,this.dataKey))]}isRowEditing(e){return!0===this.editingRowKeys[String(Z.resolveFieldData(e,this.dataKey))]}isSingleSelectionMode(){return"single"===this.selectionMode}isMultipleSelectionMode(){return"multiple"===this.selectionMode}onColumnResizeBegin(e){let n=L.getOffset(this.containerViewChild.nativeElement).left;this.resizeColumnElement=e.target.parentElement,this.columnResizing=!0,this.lastResizerHelperX=e.pageX-n+this.containerViewChild.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let n=L.getOffset(this.containerViewChild.nativeElement).left;L.addClass(this.containerViewChild.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-n+this.containerViewChild.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,s=this.resizeColumnElement.offsetWidth+e;if(s>=(this.resizeColumnElement.style.minWidth||15)){if("fit"===this.columnResizeMode){let u=this.resizeColumnElement.nextElementSibling.offsetWidth-e;s>15&&u>15&&this.resizeTableCells(s,u)}else if("expand"===this.columnResizeMode){let o=this.tableViewChild.nativeElement.offsetWidth+e;this.tableViewChild.nativeElement.style.width=o+"px",this.tableViewChild.nativeElement.style.minWidth=o+"px",this.resizeTableCells(s,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",L.removeClass(this.containerViewChild.nativeElement,"p-unselectable-text")}resizeTableCells(e,n){let s=L.index(this.resizeColumnElement),r=[];const o=L.findSingle(this.containerViewChild.nativeElement,".p-datatable-thead");L.find(o,"tr > th").forEach(b=>r.push(L.getOuterWidth(b))),this.destroyStyleElement(),this.createStyleElement();let h="";r.forEach((b,y)=>{let w=y===s?e:n&&y===s+1?n:b;h+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${y+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${y+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${y+1}) {\n ${this.scrollable?`flex: 1 1 ${w}px !important`:`width: ${w}px !important`}\n }\n `}),this.styleElement.innerHTML=h}onColumnDragStart(e,n){this.reorderIconWidth=L.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=L.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let s=L.getOffset(this.containerViewChild.nativeElement),r=L.getOffset(n);if(this.draggedColumn!=n){let o=L.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),u=L.indexWithinGroup(n,"preorderablecolumn"),h=r.left-s.left,y=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-s.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-s.top+n.offsetHeight+"px",e.pageX>y?(this.reorderIndicatorUpViewChild.nativeElement.style.left=h+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=h+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=h-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=h-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),u-o==1&&-1===this.dropPosition||u-o==-1&&1===this.dropPosition?(this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none"):(this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block")}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,n){if(e.preventDefault(),this.draggedColumn){let s=L.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=L.indexWithinGroup(n,"preorderablecolumn"),o=s!=r;o&&(r-s==1&&-1===this.dropPosition||s-r==1&&1===this.dropPosition)&&(o=!1),o&&rs&&-1===this.dropPosition&&(r-=1),o&&(Z.reorderArray(this.columns,s,r),this.onColReorder.emit({dragIndex:s,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,s){if(this.rowDragging&&this.draggedRowIndex!==n){let r=L.getOffset(s).top+L.getWindowScrollTop(),o=e.pageY,u=r+L.getOuterHeight(s)/2,h=s.previousElementSibling;othis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1;Z.reorderArray(this.value,this.draggedRowIndex,s),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:s})}this.onRowDragLeave(e,n),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return null==e||0==e.length}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}}isStateful(){return null!=this.stateKey}saveState(){const e=this.getStorage();let n={};this.paginator&&(n.first=this.first,n.rows=this.rows),this.sortField&&(n.sortField=this.sortField,n.sortOrder=this.sortOrder),this.multiSortMeta&&(n.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(n.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(n),this.reorderableColumns&&this.saveColumnOrder(n),this.selection&&(n.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(n.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(n)),this.onStateSave.emit(n)}clearState(){const e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){const n=this.getStorage().getItem(this.stateKey),s=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;if(n){let o=JSON.parse(n,function(o,u){return"string"==typeof u&&s.test(u)?new Date(u):u});this.paginator&&(void 0!==this.first&&(this.first=o.first,this.firstChange.emit(this.first)),void 0!==this.rows&&(this.rows=o.rows,this.rowsChange.emit(this.rows))),o.sortField&&(this.restoringSort=!0,this._sortField=o.sortField,this._sortOrder=o.sortOrder),o.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=o.multiSortMeta),o.filters&&(this.restoringFilter=!0,this.filters=o.filters),this.resizableColumns&&(this.columnWidthsState=o.columnWidths,this.tableWidthState=o.tableWidth),o.expandedRowKeys&&(this.expandedRowKeys=o.expandedRowKeys),o.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(o.selection)),this.stateRestored=!0,this.onStateRestore.emit(o)}}saveColumnWidths(e){let n=[];L.find(this.containerViewChild.nativeElement,".p-datatable-thead > tr > th").forEach(r=>n.push(L.getOuterWidth(r))),e.columnWidths=n.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=L.getOuterWidth(this.tableViewChild.nativeElement)+"px")}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState&&(this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.tableViewChild.nativeElement.style.minWidth=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState),Z.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((s,r)=>{n+=`\n #${this.id} .p-datatable-thead > tr > th:nth-child(${r+1}),\n #${this.id} .p-datatable-tbody > tr > td:nth-child(${r+1}),\n #${this.id} .p-datatable-tfoot > tr > td:nth-child(${r+1}) {\n ${this.scrollable?`flex: 1 1 ${s}px !important`:`width: ${s}px !important`}\n }\n `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(s=>{n.push(s.field||s.key)}),e.columnOrder=n}}restoreColumnOrder(){const n=this.getStorage().getItem(this.stateKey);if(n){let r=JSON.parse(n).columnOrder;if(r){let o=[];r.map(u=>{let h=this.findColumnByKey(u);h&&o.push(h)}),this.columnOrderStateRestored=!0,this.columns=o}}}findColumnByKey(e){if(!this.columns)return null;for(let n of this.columns)if(n.key===e||n.field===e)return n}createStyleElement(){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.head.appendChild(this.responsiveStyleElement),this.responsiveStyleElement.innerHTML=`\n@media screen and (max-width: ${this.breakpoint}) {\n #${this.id} .p-datatable-thead > tr > th,\n #${this.id} .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n #${this.id} .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n #${this.id} .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n #${this.id}.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n #${this.id} .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n`)}destroyResponsiveStyle(){this.responsiveStyleElement&&(document.head.removeChild(this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.virtualScrollInitialized=null,this.virtualScrollSubscription&&this.virtualScrollSubscription.unsubscribe(),this.destroyStyleElement(),this.destroyResponsiveStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(vd),x(ot),x(hl),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-table"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Mq,5),j(kq,5),j(Iq,5),j(Eq,5),j(Rq,5),j(Lq,5),j(Oq,5),j(Po,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.resizeHelperViewChild=s.first),V(s=B())&&(n.reorderIndicatorUpViewChild=s.first),V(s=B())&&(n.reorderIndicatorDownViewChild=s.first),V(s=B())&&(n.wrapperViewChild=s.first),V(s=B())&&(n.tableViewChild=s.first),V(s=B())&&(n.tableHeaderViewChild=s.first),V(s=B())&&(n.virtualScrollBody=s.first)}},hostAttrs:[1,"p-element"],inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:"paginator",pageLinks:"pageLinks",rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:"alwaysShowPaginator",paginatorPosition:"paginatorPosition",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:"showCurrentPageReport",showJumpToPageDropdown:"showJumpToPageDropdown",showJumpToPageInput:"showJumpToPageInput",showFirstLastIcon:"showFirstLastIcon",showPageLinks:"showPageLinks",defaultSortOrder:"defaultSortOrder",sortMode:"sortMode",resetPageOnSort:"resetPageOnSort",selectionMode:"selectionMode",selectionPageOnly:"selectionPageOnly",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:"metaKeySelection",rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:"lazy",lazyLoadOnInit:"lazyLoadOnInit",compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:"filterDelay",filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:"scrollable",scrollDirection:"scrollDirection",rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:"virtualScroll",virtualScrollDelay:"virtualScrollDelay",virtualRowHeight:"virtualRowHeight",frozenWidth:"frozenWidth",responsive:"responsive",contextMenu:"contextMenu",resizableColumns:"resizableColumns",columnResizeMode:"columnResizeMode",reorderableColumns:"reorderableColumns",loading:"loading",loadingIcon:"loadingIcon",showLoader:"showLoader",rowHover:"rowHover",customSort:"customSort",showInitialSortBadge:"showInitialSortBadge",autoLayout:"autoLayout",exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",groupRowsByOrder:"groupRowsByOrder",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx",responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{selectAllChange:"selectAllChange",selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},features:[Ne([vd]),mn],decls:14,vars:33,consts:[[3,"ngStyle","ngClass"],["container",""],["class","p-datatable-loading-overlay p-component-overlay",4,"ngIf"],["class","p-datatable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],[1,"p-datatable-wrapper",3,"ngStyle"],["wrapper",""],["role","table","class","p-datatable-table",3,"ngClass","ngStyle",4,"ngIf"],["tabindex","0","class","p-datatable-virtual-scrollable-body",3,"itemSize","height","minBufferPx","maxBufferPx","scrolledIndexChange",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange",4,"ngIf"],["class","p-datatable-footer",4,"ngIf"],["class","p-column-resizer-helper","style","display:none",4,"ngIf"],["class","pi pi-arrow-down p-datatable-reorder-indicator-up","style","display:none",4,"ngIf"],["class","pi pi-arrow-up p-datatable-reorder-indicator-down","style","display:none",4,"ngIf"],[1,"p-datatable-loading-overlay","p-component-overlay"],[1,"p-datatable-header"],[4,"ngTemplateOutlet"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],["role","table",1,"p-datatable-table",3,"ngClass","ngStyle"],["table",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datatable-thead"],["class","p-datatable-tbody p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],[1,"p-datatable-tbody",3,"value","pTableBody","pTableBodyTemplate"],["class","p-datatable-tfoot",4,"ngIf"],[1,"p-datatable-tbody","p-datatable-frozen-tbody",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],[1,"p-datatable-tfoot"],["tabindex","0",1,"p-datatable-virtual-scrollable-body",3,"itemSize","minBufferPx","maxBufferPx","scrolledIndexChange"],["tableHeader",""],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","onPageChange"],[1,"p-datatable-footer"],[1,"p-column-resizer-helper",2,"display","none"],["resizeHelper",""],[1,"pi","pi-arrow-down","p-datatable-reorder-indicator-up",2,"display","none"],["reorderIndicatorUp",""],[1,"pi","pi-arrow-up","p-datatable-reorder-indicator-down",2,"display","none"],["reorderIndicatorDown",""]],template:function(e,n){1&e&&(l(0,"div",0,1),_(2,Aq,2,2,"div",2),_(3,Fq,2,1,"div",3),_(4,Nq,1,17,"p-paginator",4),l(5,"div",5,6),_(7,Gq,8,16,"table",7),_(8,Qq,10,21,"cdk-virtual-scroll-viewport",8),c(),_(9,Jq,1,17,"p-paginator",9),_(10,Zq,2,1,"div",10),_(11,Xq,2,0,"div",11),_(12,eU,2,0,"span",12),_(13,tU,2,0,"span",13),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Hh(16,nU,[n.rowHover||n.selectionMode,n.autoLayout,n.resizableColumns,n.resizableColumns&&"fit"===n.columnResizeMode,n.scrollable,n.scrollable&&"vertical"===n.scrollDirection,n.scrollable&&"horizontal"===n.scrollDirection,n.scrollable&&"both"===n.scrollDirection,n.scrollable&&"flex"===n.scrollHeight,"stack"===n.responsiveLayout,"scroll"===n.responsiveLayout,n.responsive,null!=n.headerGroupedTemplate,null!=n.footerGroupedTemplate])),ne("id",n.id),a(2),p("ngIf",n.loading&&n.showLoader),a(1),p("ngIf",n.captionTemplate),a(1),p("ngIf",n.paginator&&("top"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngStyle",z(31,iU,n.scrollHeight)),a(2),p("ngIf",!n.virtualScroll),a(1),p("ngIf",n.virtualScroll),a(1),p("ngIf",n.paginator&&("bottom"===n.paginatorPosition||"both"==n.paginatorPosition)),a(1),p("ngIf",n.summaryTemplate),a(1),p("ngIf",n.resizableColumns),a(1),p("ngIf",n.reorderableColumns),a(1),p("ngIf",n.reorderableColumns))},directives:function(){return[ET,CG,Po,lt,Oe,Q,Lt,Qf]},styles:[".p-datatable{position:relative}.p-datatable table{border-collapse:collapse;min-width:100%;table-layout:fixed}.p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-datatable .p-sortable-column .p-column-title,.p-datatable .p-sortable-column .p-sortable-column-icon,.p-datatable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-datatable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-datatable-auto-layout>.p-datatable-wrapper{overflow-x:auto}.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper{overflow-x:auto}.p-datatable-responsive-scroll>.p-datatable-wrapper>table,.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-hoverable-rows .p-selectable-row{cursor:pointer}.p-datatable-scrollable .p-datatable-wrapper{position:relative;overflow:auto}.p-datatable-scrollable .p-datatable-thead,.p-datatable-scrollable .p-datatable-tbody,.p-datatable-scrollable .p-datatable-tfoot{display:block}.p-datatable-scrollable .p-datatable-thead>tr,.p-datatable-scrollable .p-datatable-tbody>tr,.p-datatable-scrollable .p-datatable-tfoot>tr{display:flex;flex-wrap:nowrap;width:100%}.p-datatable-scrollable .p-datatable-thead>tr>th,.p-datatable-scrollable .p-datatable-tbody>tr>td,.p-datatable-scrollable .p-datatable-tfoot>tr>td{display:flex;flex:1 1 0;align-items:center}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-virtual-scrollable-body>.cdk-virtual-scroll-content-wrapper>.p-datatable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-frozen-tbody{position:sticky;z-index:1}.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot{position:sticky;bottom:0;z-index:1}.p-datatable-scrollable .p-frozen-column{position:sticky;background:inherit}.p-datatable-scrollable th.p-frozen-column{z-index:1}.p-datatable-scrollable-both .p-datatable-thead>tr>th,.p-datatable-scrollable-both .p-datatable-tbody>tr>td,.p-datatable-scrollable-both .p-datatable-tfoot>tr>td,.p-datatable-scrollable-horizontal .p-datatable-thead>tr>th .p-datatable-scrollable-horizontal .p-datatable-tbody>tr>td,.p-datatable-scrollable-horizontal .p-datatable-tfoot>tr>td{flex:0 0 auto}.p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.p-datatable-flex-scrollable .p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-scrollable .p-rowgroup-header{position:sticky;z-index:1}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr{display:table-row}.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead>tr>th,.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot>tr>td{display:table-cell}.p-datatable-flex-scrollable{display:flex;flex-direction:column;flex:1;height:100%}.p-datatable-flex-scrollable .p-datatable-virtual-scrollable-body{flex:1}.p-datatable-resizable>.p-datatable-wrapper{overflow-x:auto}.p-datatable-resizable .p-datatable-thead>tr>th,.p-datatable-resizable .p-datatable-tfoot>tr>td,.p-datatable-resizable .p-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.p-datatable-resizable .p-resizable-column:not(.p-frozen-column){background-clip:padding-box;position:relative}.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-datatable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-datatable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-datatable .p-row-editor-init,.p-datatable .p-row-editor-save,.p-datatable .p-row-editor-cancel,.p-datatable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-datatable-reorder-indicator-up,.p-datatable-reorder-indicator-down{position:absolute;display:none}.p-datatable-reorderablerow-handle,[pReorderableColumn]{cursor:move}.p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-column-filter-row{display:flex;align-items:center;width:100%}.p-column-filter-menu{display:inline-flex}.p-column-filter-row p-columnfilterformelement{flex:1 1 auto;width:1%}.p-column-filter-menu-button,.p-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.p-column-filter-overlay{position:absolute;top:0;left:0}.p-column-filter-row-items{margin:0;padding:0;list-style:none}.p-column-filter-row-item{cursor:pointer}.p-column-filter-add-button,.p-column-filter-remove-button{justify-content:center}.p-column-filter-add-button .p-button-label,.p-column-filter-remove-button .p-button-label{flex-grow:0}.p-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between}.p-column-filter-buttonbar .p-button{width:auto}.p-datatable .p-datatable-tbody>tr>td>.p-column-title{display:none}cdk-virtual-scroll-viewport{outline:0 none}\n"],encapsulation:2}),t})(),CG=(()=>{class t{constructor(e,n,s,r){this.dt=e,this.tableService=n,this.cd=s,this.el=r,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&"subheader"===this.dt.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()}shouldRenderRowGroupHeader(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s-1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}shouldRenderRowGroupFooter(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s+1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}shouldRenderRowspan(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=e[s-1];return!o||r!==Z.resolveFieldData(o,this.dt.groupRowsBy)}calculateRowGroupSize(e,n,s){let r=Z.resolveFieldData(n,this.dt.groupRowsBy),o=r,u=0;for(;r===o;){u++;let h=e[++s];if(!h)break;o=Z.resolveFieldData(h,this.dt.groupRowsBy)}return 1===u?null:u}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=L.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=L.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(vd),x(ot),x(Re))},t.\u0275cmp=G({type:t,selectors:[["","pTableBody",""]],hostAttrs:[1,"p-element"],inputs:{columns:["pTableBody","columns"],template:["pTableBodyTemplate","template"],value:"value",frozen:"frozen",frozenRows:"frozenRows"},attrs:sU,decls:6,vars:6,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"]],template:function(e,n){1&e&&(_(0,fU,2,2,"ng-container",0),_(1,bU,2,3,"ng-container",0),_(2,kU,2,2,"ng-container",0),_(3,OU,2,2,"ng-container",0),_(4,PU,2,5,"ng-container",0),_(5,NU,2,5,"ng-container",0)),2&e&&(p("ngIf",!n.dt.expandedRowTemplate&&!n.dt.virtualScroll),a(1),p("ngIf",!n.dt.expandedRowTemplate&&n.dt.virtualScroll),a(1),p("ngIf",n.dt.expandedRowTemplate&&!(n.frozen&&n.dt.frozenExpandedRowTemplate)),a(1),p("ngIf",n.dt.frozenExpandedRowTemplate&&n.frozen),a(1),p("ngIf",n.dt.loading),a(1),p("ngIf",n.dt.isEmpty()&&!n.dt.loading))},directives:[Q,at,Lt,Jf],encapsulation:2}),t})(),yG=(()=>{class t{constructor(e){this.dt=e}get getFrozenRowGroupHeaderStickyPosition(){return this.dt.rowGroupHeaderStyleObject?this.dt.rowGroupHeaderStyleObject.top:""}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275dir=le({type:t,selectors:[["","pRowGroupHeader",""]],hostAttrs:[1,"p-rowgroup-header","p-element"],hostVars:2,hostBindings:function(e,n){2&e&&Hn("top",n.getFrozenRowGroupHeaderStickyPosition)}}),t})(),Cd=(()=>{class t{constructor(e){this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(n=>{this.updateSortState()}))}ngOnInit(){this.isEnabled()&&this.updateSortState()}updateSortState(){this.sorted=this.dt.isSorted(this.field),this.sortOrder=this.sorted?1===this.dt.sortOrder?"ascending":"descending":"none"}onClick(e){this.isEnabled()&&!this.isFilterElement(e.target)&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),L.clearSelection())}onEnterKey(e){this.onClick(e)}isEnabled(){return!0!==this.pSortableColumnDisabled}isFilterElement(e){return L.hasClass(e,"pi-filter-icon")||L.hasClass(e,"p-column-filter-menu-button")}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275dir=le({type:t,selectors:[["","pSortableColumn",""]],hostAttrs:[1,"p-element"],hostVars:7,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("keydown.enter",function(r){return n.onEnterKey(r)}),2&e&&(ne("tabindex",n.isEnabled()?"0":null)("role","columnheader")("aria-sort",n.sortOrder),ii("p-sortable-column",n.isEnabled())("p-highlight",n.sorted))},inputs:{field:["pSortableColumn","field"],pSortableColumnDisabled:"pSortableColumnDisabled"}}),t})(),yd=(()=>{class t{constructor(e,n){this.dt=e,this.cd=n,this.subscription=this.dt.tableService.sortSource$.subscribe(s=>{this.updateSortState()})}ngOnInit(){this.updateSortState()}onClick(e){e.preventDefault()}updateSortState(){if("single"===this.dt.sortMode)this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if("multiple"===this.dt.sortMode){let e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}this.cd.markForCheck()}getMultiSortMetaIndex(){let e=this.dt._multiSortMeta,n=-1;if(e&&"multiple"===this.dt.sortMode&&(this.dt.showInitialSortBadge||e.length>1))for(let s=0;s-1?e:e+1}isMultiSorted(){return"multiple"===this.dt.sortMode&&this.getMultiSortMetaIndex()>-1}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-sortIcon"]],hostAttrs:[1,"p-element"],inputs:{field:"field"},decls:2,vars:6,consts:[[1,"p-sortable-column-icon","pi","pi-fw",3,"ngClass"],["class","p-sortable-column-badge",4,"ngIf"],[1,"p-sortable-column-badge"]],template:function(e,n){1&e&&(k(0,"i",0),_(1,VU,2,1,"span",1)),2&e&&(p("ngClass",Rt(2,BU,1===n.sortOrder,-1===n.sortOrder,0===n.sortOrder)),a(1),p("ngIf",n.isMultiSorted()))},directives:[Oe,Q],encapsulation:2,changeDetection:0}),t})(),wG=(()=>{class t{constructor(e,n){this.dt=e,this.tableService=n,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.selected=this.dt.isSelected(this.data)}))}ngOnInit(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))}onClick(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onTouchEnd(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)}onArrowDownKeyDown(e){if(!this.isEnabled())return;const s=this.findNextSelectableRow(e.currentTarget);s&&s.focus(),e.preventDefault()}onArrowUpKeyDown(e){if(!this.isEnabled())return;const s=this.findPrevSelectableRow(e.currentTarget);s&&s.focus(),e.preventDefault()}onEnterKeyDown(e){!this.isEnabled()||this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onPageDownKeyDown(){this.dt.virtualScroll&&this.dt.virtualScrollBody.elementRef.nativeElement.focus()}onSpaceKeydown(){this.dt.virtualScroll&&!this.dt.editingCell&&this.dt.virtualScrollBody.elementRef.nativeElement.focus()}findNextSelectableRow(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-selectable-row")?n:this.findNextSelectableRow(n):null}findPrevSelectableRow(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-selectable-row")?n:this.findPrevSelectableRow(n):null}isEnabled(){return!0!==this.pSelectableRowDisabled}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(vd))},t.\u0275dir=le({type:t,selectors:[["","pSelectableRow",""]],hostAttrs:[1,"p-element"],hostVars:5,hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("touchend",function(r){return n.onTouchEnd(r)})("keydown.arrowdown",function(r){return n.onArrowDownKeyDown(r)})("keydown.arrowup",function(r){return n.onArrowUpKeyDown(r)})("keydown.enter",function(r){return n.onEnterKeyDown(r)})("keydown.shift.enter",function(r){return n.onEnterKeyDown(r)})("keydown.meta.enter",function(r){return n.onEnterKeyDown(r)})("keydown.pagedown",function(){return n.onPageDownKeyDown()})("keydown.pageup",function(){return n.onPageDownKeyDown()})("keydown.home",function(){return n.onPageDownKeyDown()})("keydown.end",function(){return n.onPageDownKeyDown()})("keydown.space",function(){return n.onSpaceKeydown()}),2&e&&(ne("tabindex",n.isEnabled()?0:void 0),ii("p-selectable-row",n.isEnabled())("p-highlight",n.selected))},inputs:{data:["pSelectableRow","data"],index:["pSelectableRowIndex","index"],pSelectableRowDisabled:"pSelectableRowDisabled"}}),t})(),z2=(()=>{class t{constructor(e,n,s){this.dt=e,this.el=n,this.zone=s}ngAfterViewInit(){this.isEnabled()&&L.addClass(this.el.nativeElement,"p-editable-column")}onClick(e){if(this.isEnabled())if(this.dt.selfClick=!0,this.dt.editingCell){if(this.dt.editingCell!==this.el.nativeElement){if(!this.dt.isEditingCellValid())return;this.closeEditingCell(!0,e),this.openCell()}}else this.openCell()}openCell(){this.dt.updateEditingCell(this.el.nativeElement,this.data,this.field,this.rowIndex),L.addClass(this.el.nativeElement,"p-cell-editing"),this.dt.onEditInit.emit({field:this.field,data:this.data,index:this.rowIndex}),this.zone.runOutsideAngular(()=>{setTimeout(()=>{let n=L.findSingle(this.el.nativeElement,this.pFocusCellSelector||"input, textarea, select");n&&n.focus()},50)}),this.overlayEventListener=e=>{this.el&&this.el.nativeElement.contains(e.target)&&(this.dt.selfClick=!0)},this.dt.overlaySubscription=this.dt.overlayService.clickObservable.subscribe(this.overlayEventListener)}closeEditingCell(e,n){e?this.dt.onEditComplete.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:n,index:this.dt.editingCellRowIndex}):this.dt.onEditCancel.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:n,index:this.dt.editingCellRowIndex}),L.removeClass(this.dt.editingCell,"p-cell-editing"),this.dt.editingCell=null,this.dt.editingCellData=null,this.dt.editingCellField=null,this.dt.unbindDocumentEditListener(),this.dt.overlaySubscription&&this.dt.overlaySubscription.unsubscribe()}onEnterKeyDown(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),e.preventDefault())}onEscapeKeyDown(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!1,e),e.preventDefault())}onShiftKeyDown(e){this.isEnabled()&&(e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e))}onArrowDown(e){if(this.isEnabled()){let n=this.findCell(e.target);if(n){let s=L.index(n),r=this.findNextEditableColumnByIndex(n,s);r&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(r,"click")),e.preventDefault()}}}onArrowUp(e){if(this.isEnabled()){let n=this.findCell(e.target);if(n){let s=L.index(n),r=this.findPrevEditableColumnByIndex(n,s);r&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(r,"click")),e.preventDefault()}}}onArrowLeft(e){this.isEnabled()&&this.moveToPreviousCell(e)}onArrowRight(e){this.isEnabled()&&this.moveToNextCell(e)}findCell(e){if(e){let n=e;for(;n&&!L.hasClass(n,"p-cell-editing");)n=n.parentElement;return n}return null}moveToPreviousCell(e){let n=this.findCell(e.target);if(n){let s=this.findPreviousEditableColumn(n);s&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(s,"click"),e.preventDefault())}}moveToNextCell(e){let n=this.findCell(e.target);if(n){let s=this.findNextEditableColumn(n);s&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),L.invokeElementMethod(e.target,"blur"),L.invokeElementMethod(s,"click"),e.preventDefault())}}findPreviousEditableColumn(e){let n=e.previousElementSibling;if(!n){let s=e.parentElement.previousElementSibling;s&&(n=s.lastElementChild)}return n?L.hasClass(n,"p-editable-column")?n:this.findPreviousEditableColumn(n):null}findNextEditableColumn(e){let n=e.nextElementSibling;if(!n){let s=e.parentElement.nextElementSibling;s&&(n=s.firstElementChild)}return n?L.hasClass(n,"p-editable-column")?n:this.findNextEditableColumn(n):null}findNextEditableColumnByIndex(e,n){let s=e.parentElement.nextElementSibling;if(s){let r=s.children[n];return r&&L.hasClass(r,"p-editable-column")?r:null}return null}findPrevEditableColumnByIndex(e,n){let s=e.parentElement.previousElementSibling;if(s){let r=s.children[n];return r&&L.hasClass(r,"p-editable-column")?r:null}return null}isEnabled(){return!0!==this.pEditableColumnDisabled}ngOnDestroy(){this.dt.overlaySubscription&&this.dt.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(Re),x(nt))},t.\u0275dir=le({type:t,selectors:[["","pEditableColumn",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,n){1&e&&C("click",function(r){return n.onClick(r)})("keydown.enter",function(r){return n.onEnterKeyDown(r)})("keydown.escape",function(r){return n.onEscapeKeyDown(r)})("keydown.tab",function(r){return n.onShiftKeyDown(r)})("keydown.shift.tab",function(r){return n.onShiftKeyDown(r)})("keydown.meta.tab",function(r){return n.onShiftKeyDown(r)})("keydown.arrowdown",function(r){return n.onArrowDown(r)})("keydown.arrowup",function(r){return n.onArrowUp(r)})("keydown.arrowleft",function(r){return n.onArrowLeft(r)})("keydown.arrowright",function(r){return n.onArrowRight(r)})},inputs:{data:["pEditableColumn","data"],field:["pEditableColumnField","field"],rowIndex:["pEditableColumnRowIndex","rowIndex"],pEditableColumnDisabled:"pEditableColumnDisabled",pFocusCellSelector:"pFocusCellSelector"}}),t})(),TG=(()=>{class t{constructor(e){this.el=e}isEnabled(){return!0!==this.pEditableRowDisabled}}return t.\u0275fac=function(e){return new(e||t)(x(Re))},t.\u0275dir=le({type:t,selectors:[["","pEditableRow",""]],hostAttrs:[1,"p-element"],inputs:{data:["pEditableRow","data"],pEditableRowDisabled:"pEditableRowDisabled"}}),t})(),SG=(()=>{class t{constructor(e,n,s){this.dt=e,this.editableColumn=n,this.editableRow=s}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"input":this.inputTemplate=e.template;break;case"output":this.outputTemplate=e.template}})}get editing(){return this.dt.editingCell&&this.editableColumn&&this.dt.editingCell===this.editableColumn.el.nativeElement||this.editableRow&&"row"===this.dt.editMode&&this.dt.isRowEditing(this.editableRow.data)}}return t.\u0275fac=function(e){return new(e||t)(x(xn),x(z2,8),x(TG,8))},t.\u0275cmp=G({type:t,selectors:[["p-cellEditor"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},hostAttrs:[1,"p-element"],decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(e,n){1&e&&(_(0,qU,2,1,"ng-container",0),_(1,GU,2,1,"ng-container",0)),2&e&&(p("ngIf",n.editing),a(1),p("ngIf",!n.editing))},directives:[Q,Lt],encapsulation:2}),t})(),xG=(()=>{class t{constructor(e){this.dt=e,this.useGrouping=!0}ngOnInit(){this.filterCallback=e=>{this.filterConstraint.value=e,this.dt._filter()}}onModelChange(e){this.filterConstraint.value=e,("boolean"===this.type||""===e)&&this.dt._filter()}onTextInputEnterKeyDown(e){this.dt._filter(),e.preventDefault()}onNumericInputKeyDown(e){"Enter"===e.key&&(this.dt._filter(),e.preventDefault())}}return t.\u0275fac=function(e){return new(e||t)(x(xn))},t.\u0275cmp=G({type:t,selectors:[["p-columnFilterFormElement"]],hostAttrs:[1,"p-element"],inputs:{field:"field",type:"type",filterConstraint:"filterConstraint",filterTemplate:"filterTemplate",placeholder:"placeholder",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["builtInElement",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["type","text","pInputText","",3,"value","input","keydown.enter",4,"ngSwitchCase"],[3,"ngModel","showButtons","minFractionDigits","maxFractionDigits","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping","ngModelChange","onKeyDown",4,"ngSwitchCase"],[3,"ngModel","ngModelChange",4,"ngSwitchCase"],[3,"placeholder","ngModel","ngModelChange",4,"ngSwitchCase"],["type","text","pInputText","",3,"value","input","keydown.enter"],[3,"ngModel","showButtons","minFractionDigits","maxFractionDigits","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping","ngModelChange","onKeyDown"],[3,"ngModel","ngModelChange"],[3,"placeholder","ngModel","ngModelChange"]],template:function(e,n){if(1&e&&(_(0,$U,2,5,"ng-container",0),_(1,YU,5,5,"ng-template",null,1,we)),2&e){const s=F(2);p("ngIf",n.filterTemplate)("ngIfElse",s)}},directives:[dt,q2,xr,Q,Lt,gr,Ja,DT,Te,_e],encapsulation:2}),t})(),vg=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.dt=n,this.renderer=s,this.config=r,this.overlayService=o,this.type="text",this.display="row",this.showMenu=!0,this.operator=ml.AND,this.showOperator=!0,this.showClearButton=!0,this.showApplyButton=!0,this.showMatchModes=!0,this.showAddButton=!0,this.hideOnClear=!1,this.maxConstraints=2,this.useGrouping=!0}ngOnInit(){this.dt.filters[this.field]||this.initFieldFilterConstraint(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.generateMatchModeOptions(),this.generateOperatorOptions()}),this.resetSubscription=this.dt.tableService.resetSource$.subscribe(()=>{this.initFieldFilterConstraint()}),this.generateMatchModeOptions(),this.generateOperatorOptions()}generateMatchModeOptions(){var e;this.matchModes=this.matchModeOptions||(null===(e=this.config.filterMatchModeOptions[this.type])||void 0===e?void 0:e.map(n=>({label:this.config.getTranslation(n),value:n})))}generateOperatorOptions(){this.operatorOptions=[{label:this.config.getTranslation(Ft.MATCH_ALL),value:ml.AND},{label:this.config.getTranslation(Ft.MATCH_ANY),value:ml.OR}]}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"filter":default:this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}initFieldFilterConstraint(){let e=this.getDefaultMatchMode();this.dt.filters[this.field]="row"==this.display?{value:null,matchMode:e}:[{value:null,matchMode:e,operator:this.operator}]}onMenuMatchModeChange(e,n){n.matchMode=e,this.showApplyButton||this.dt._filter()}onRowMatchModeChange(e){this.dt.filters[this.field].matchMode=e,this.dt._filter(),this.hide()}onRowMatchModeKeyDown(e){let n=e.target;switch(e.key){case"ArrowDown":var s=this.findNextItem(n);s&&(n.removeAttribute("tabindex"),s.tabIndex="0",s.focus()),e.preventDefault();break;case"ArrowUp":var r=this.findPrevItem(n);r&&(n.removeAttribute("tabindex"),r.tabIndex="0",r.focus()),e.preventDefault()}}onRowClearItemClick(){this.clearFilter(),this.hide()}isRowMatchModeSelected(e){return this.dt.filters[this.field].matchMode===e}addConstraint(){this.dt.filters[this.field].push({value:null,matchMode:this.getDefaultMatchMode(),operator:this.getDefaultOperator()}),this.dt._filter()}removeConstraint(e){this.dt.filters[this.field]=this.dt.filters[this.field].filter(n=>n!==e),this.dt._filter()}onOperatorChange(e){this.dt.filters[this.field].forEach(n=>{n.operator=e,this.operator=e}),this.showApplyButton||this.dt._filter()}toggleMenu(){this.overlayVisible=!this.overlayVisible}onToggleButtonKeyDown(e){switch(e.key){case"Escape":case"Tab":this.overlayVisible=!1;break;case"ArrowDown":if(this.overlayVisible){let n=L.getFocusableElements(this.overlay);n&&n[0].focus(),e.preventDefault()}else e.altKey&&(this.overlayVisible=!0,e.preventDefault())}}onEscape(){this.overlayVisible=!1,this.icon.nativeElement.focus()}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-column-filter-separator")?this.findNextItem(n):n:e.parentElement.firstElementChild}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-column-filter-separator")?this.findPrevItem(n):n:e.parentElement.lastElementChild}onContentClick(){this.selfClick=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,document.body.appendChild(this.overlay),gt.set("overlay",this.overlay,this.config.zIndex.overlay),L.absolutePosition(this.overlay,this.icon.nativeElement),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.overlayEventListener=n=>{this.overlay&&this.overlay.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener);break;case"void":this.onOverlayHide(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}getDefaultMatchMode(){return this.matchMode?this.matchMode:"text"===this.type?_t.STARTS_WITH:"numeric"===this.type?_t.EQUALS:"date"===this.type?_t.DATE_IS:_t.CONTAINS}getDefaultOperator(){return this.dt.filters?this.dt.filters[this.field][0].operator:this.operator}hasRowFilter(){return this.dt.filters[this.field]&&!this.dt.isFilterBlank(this.dt.filters[this.field].value)}get fieldConstraints(){return this.dt.filters?this.dt.filters[this.field]:null}get showRemoveIcon(){return!!this.fieldConstraints&&this.fieldConstraints.length>1}get showMenuButton(){return this.showMenu&&("row"!==this.display||"boolean"!==this.type)}get isShowOperator(){return this.showOperator&&"boolean"!==this.type}get isShowAddConstraint(){return this.showAddButton&&"boolean"!==this.type&&this.fieldConstraints&&this.fieldConstraints.length{this.overlayVisible&&!this.selfClick&&this.isOutsideClicked(n)&&this.hide(),this.selfClick=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}bindDocumentResizeListener(){this.documentResizeListener=()=>this.hide(),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.icon.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}hide(){this.overlayVisible=!1}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}clearFilter(){this.initFieldFilterConstraint(),this.dt._filter(),this.hideOnClear&&this.hide()}applyFilter(){this.dt._filter(),this.hide()}ngOnDestroy(){this.overlay&&(this.el.nativeElement.appendChild(this.overlay),gt.clear(this.overlay),this.onOverlayHide()),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.resetSubscription&&this.resetSubscription.unsubscribe(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(xn),x(wn),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-columnFilter"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(ZU,5),2&e){let s;V(s=B())&&(n.icon=s.first)}},hostAttrs:[1,"p-element"],inputs:{field:"field",type:"type",display:"display",showMenu:"showMenu",matchMode:"matchMode",operator:"operator",showOperator:"showOperator",showClearButton:"showClearButton",showApplyButton:"showApplyButton",showMatchModes:"showMatchModes",showAddButton:"showAddButton",hideOnClear:"hideOnClear",placeholder:"placeholder",matchModeOptions:"matchModeOptions",maxConstraints:"maxConstraints",minFractionDigits:"minFractionDigits",maxFractionDigits:"maxFractionDigits",prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:"useGrouping"},decls:5,vars:8,consts:[[1,"p-column-filter",3,"ngClass"],["class","p-fluid",3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping",4,"ngIf"],["type","button","class","p-column-filter-menu-button p-link","aria-haspopup","true",3,"ngClass","click","keydown",4,"ngIf"],["type","button","class","p-column-filter-clear-button p-link",3,"ngClass","click",4,"ngIf"],[3,"ngClass","click","keydown.escape",4,"ngIf"],[1,"p-fluid",3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping"],["type","button","aria-haspopup","true",1,"p-column-filter-menu-button","p-link",3,"ngClass","click","keydown"],["icon",""],[1,"pi","pi-filter-icon","pi-filter"],["type","button",1,"p-column-filter-clear-button","p-link",3,"ngClass","click"],[1,"pi","pi-filter-slash"],[3,"ngClass","click","keydown.escape"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-column-filter-row-items",4,"ngIf","ngIfElse"],["menu",""],[1,"p-column-filter-row-items"],["class","p-column-filter-row-item",3,"ngClass","click","keydown","keydown.enter",4,"ngFor","ngForOf"],[1,"p-column-filter-separator"],[1,"p-column-filter-row-item",3,"click","keydown","keydown.enter"],[1,"p-column-filter-row-item",3,"ngClass","click","keydown","keydown.enter"],["class","p-column-filter-operator",4,"ngIf"],[1,"p-column-filter-constraints"],["class","p-column-filter-constraint",4,"ngFor","ngForOf"],["class","p-column-filter-add-rule",4,"ngIf"],[1,"p-column-filter-buttonbar"],["type","button","pButton","","class","p-button-outlined p-button-sm","pRipple","",3,"label","click",4,"ngIf"],["type","button","pButton","","class","p-button-sm","pRipple","",3,"label","click",4,"ngIf"],[1,"p-column-filter-operator"],["styleClass","p-column-filter-operator-dropdown",3,"options","ngModel","ngModelChange"],[1,"p-column-filter-constraint"],["styleClass","p-column-filter-matchmode-dropdown",3,"options","ngModel","ngModelChange",4,"ngIf"],[3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping"],["type","button","pButton","","icon","pi pi-trash","class","p-column-filter-remove-button p-button-text p-button-danger p-button-sm","pRipple","",3,"label","click",4,"ngIf"],["styleClass","p-column-filter-matchmode-dropdown",3,"options","ngModel","ngModelChange"],["type","button","pButton","","icon","pi pi-trash","pRipple","",1,"p-column-filter-remove-button","p-button-text","p-button-danger","p-button-sm",3,"label","click"],[1,"p-column-filter-add-rule"],["type","button","pButton","","icon","pi pi-plus","pRipple","",1,"p-column-filter-add-button","p-button-text","p-button-sm",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-outlined","p-button-sm",3,"label","click"],["type","button","pButton","","pRipple","",1,"p-button-sm",3,"label","click"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,XU,1,14,"p-columnFilterFormElement",1),_(2,tG,3,5,"button",2),_(3,iG,3,3,"button",3),_(4,bG,6,14,"div",4),c()),2&e&&(p("ngClass",We(5,vG,"row"===n.display,"menu"===n.display)),a(1),p("ngIf","row"===n.display),a(1),p("ngIf",n.showMenuButton),a(1),p("ngIf",n.showClearButton&&"row"===n.display),a(1),p("ngIf",n.showMenu&&n.overlayVisible))},directives:[xG,Vt,Oe,Q,Lt,at,Te,_e,Ln],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt(".12s cubic-bezier(0, 0, 0.2, 1)")]),Ot(":leave",[kt(".1s linear",it({opacity:0}))])])]}}),t})(),DG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,RT,MT,Yu,Fo,Du,gl,Cq,cT,Zu,Dq],Nt,Fo]}),t})();const j2=["container"],MG=function(t,i,e,n){return{"pi-info-circle":t,"pi-exclamation-triangle":i,"pi-times-circle":e,"pi-check":n}};function kG(t,i){if(1&t&&(ce(0),k(1,"span",6),l(2,"div",7)(3,"div",8),g(4),c(),l(5,"div",9),g(6),c()(),ue()),2&t){const e=d();a(1),me("p-toast-message-icon pi"+(e.message.icon?" "+e.message.icon:"")),p("ngClass",_i(5,MG,"info"==e.message.severity,"warn"==e.message.severity,"error"==e.message.severity,"success"==e.message.severity)),a(3),S(e.message.summary),a(2),S(e.message.detail)}}function IG(t,i){1&t&&Y(0)}function EG(t,i){if(1&t){const e=I();l(0,"button",10),C("click",function(s){return v(e),d().onCloseIconClick(s)})("keydown.enter",function(s){return v(e),d().onCloseIconClick(s)}),k(1,"span",11),c()}}const RG=function(t){return[t,"p-toast-message"]},LG=function(t,i,e,n){return{showTransformParams:t,hideTransformParams:i,showTransitionParams:e,hideTransitionParams:n}},OG=function(t){return{value:"visible",params:t}},AG=function(t){return{$implicit:t}};function PG(t,i){if(1&t){const e=I();l(0,"p-toastItem",3),C("onClose",function(s){return v(e),d().onMessageClose(s)})("@toastAnimation.start",function(s){return v(e),d().onAnimationStart(s)})("@toastAnimation.done",function(s){return v(e),d().onAnimationEnd(s)}),c()}if(2&t){const e=i.$implicit,n=i.index,s=d();p("message",e)("index",n)("template",s.template)("@toastAnimation",void 0)("showTransformOptions",s.showTransformOptions)("hideTransformOptions",s.hideTransformOptions)("showTransitionOptions",s.showTransitionOptions)("hideTransitionOptions",s.hideTransitionOptions)}}let FG=(()=>{class t{constructor(e){this.zone=e,this.onClose=new H}ngAfterViewInit(){this.initTimeout()}initTimeout(){this.message.sticky||this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message.life||3e3)})}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick(e){this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),e.preventDefault()}ngOnDestroy(){this.clearTimeout()}}return t.\u0275fac=function(e){return new(e||t)(x(nt))},t.\u0275cmp=G({type:t,selectors:[["p-toastItem"]],viewQuery:function(e,n){if(1&e&&j(j2,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{message:"message",index:"index",template:"template",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},decls:6,vars:21,consts:[[3,"ngClass","mouseenter","mouseleave"],["container",""],["role","alert","aria-live","assertive","aria-atomic","true",1,"p-toast-message-content",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","class","p-toast-icon-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],[3,"ngClass"],[1,"p-toast-message-text"],[1,"p-toast-summary"],[1,"p-toast-detail"],["type","button","pRipple","",1,"p-toast-icon-close","p-link",3,"click","keydown.enter"],[1,"p-toast-icon-close-icon","pi","pi-times"]],template:function(e,n){1&e&&(l(0,"div",0,1),C("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()}),l(2,"div",2),_(3,kG,7,10,"ng-container",3),_(4,IG,1,0,"ng-container",4),_(5,EG,2,0,"button",5),c()()),2&e&&(me(n.message.styleClass),p("ngClass",z(10,RG,"p-toast-message-"+n.message.severity))("@messageState",z(17,OG,_i(12,LG,n.showTransformOptions,n.hideTransformOptions,n.showTransitionOptions,n.hideTransitionOptions))),ne("id",n.message.id),a(2),p("ngClass",n.message.contentStyleClass),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(19,AG,n.message)),a(1),p("ngIf",!1!==n.message.closable))},directives:[Oe,Q,Lt,vt],encapsulation:2,data:{animation:[wi("messageState",[Cs("visible",it({transform:"translateY(0)",opacity:1})),Ot("void => *",[it({transform:"{{showTransformParams}}",opacity:0}),kt("{{showTransitionParams}}")]),Ot("* => void",[kt("{{hideTransitionParams}}",it({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0}),t})(),wd=(()=>{class t{constructor(e,n,s){this.messageService=e,this.cd=n,this.config=s,this.autoZIndex=!0,this.baseZIndex=0,this.position="top-right",this.preventOpenDuplicates=!1,this.preventDuplicates=!1,this.showTransformOptions="translateY(100%)",this.hideTransformOptions="translateY(-100%)",this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="250ms ease-in",this.onClose=new H,this.id=pl()}ngOnInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e)if(e instanceof Array){const n=e.filter(s=>this.canAdd(s));this.add(n)}else this.canAdd(e)&&this.add([e])}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}ngAfterViewInit(){this.breakpoints&&this.createStyle()}add(e){this.messages=this.messages?[...this.messages,...e]:[...e],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...e]:[...e]),this.cd.markForCheck()}canAdd(e){let n=this.key===e.key;return n&&this.preventOpenDuplicates&&(n=!this.containsMessage(this.messages,e)),n&&this.preventDuplicates&&(n=!this.containsMessage(this.messagesArchieve,e)),n}containsMessage(e,n){return!!e&&null!=e.find(s=>s.summary===n.summary&&s.detail==n.detail&&s.severity===n.severity)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.template=e.template})}onMessageClose(e){this.messages.splice(e.index,1),this.onClose.emit({message:e.message}),this.cd.detectChanges()}onAnimationStart(e){"void"===e.fromState&&(this.containerViewChild.nativeElement.setAttribute(this.id,""),this.autoZIndex&>.set("modal",this.containerViewChild.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(e){"void"===e.toState&&this.autoZIndex&&Z.isEmpty(this.messages)&>.clear(this.containerViewChild.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let n in this.breakpoints){let s="";for(let r in this.breakpoints[n])s+=r+":"+this.breakpoints[n][r]+" !important;";e+=`\n @media screen and (max-width: ${n}) {\n .p-toast[${this.id}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.containerViewChild&&this.autoZIndex&>.clear(this.containerViewChild.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}}return t.\u0275fac=function(e){return new(e||t)(x(ys),x(ot),x(zn))},t.\u0275cmp=G({type:t,selectors:[["p-toast"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&j(j2,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{key:"key",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",style:"style",styleClass:"styleClass",position:"position",preventOpenDuplicates:"preventOpenDuplicates",preventDuplicates:"preventDuplicates",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},decls:3,vars:5,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose",4,"ngFor","ngForOf"],[3,"message","index","template","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","onClose"]],template:function(e,n){1&e&&(l(0,"div",0,1),_(2,PG,1,8,"p-toastItem",2),c()),2&e&&(me(n.styleClass),p("ngClass","p-toast p-component p-toast-"+n.position)("ngStyle",n.style),a(2),p("ngForOf",n.messages))},directives:[FG,Oe,lt,at],styles:[".p-toast{position:fixed;width:25rem}.p-toast-message{overflow:hidden}.p-toast-message-content{display:flex;align-items:flex-start}.p-toast-message-text{flex:1 1 auto}.p-toast-top-right{top:20px;right:20px}.p-toast-top-left{top:20px;left:20px}.p-toast-bottom-left{bottom:20px;left:20px}.p-toast-bottom-right{bottom:20px;right:20px}.p-toast-top-center{top:20px;left:50%;transform:translate(-50%)}.p-toast-bottom-center{bottom:20px;left:50%;transform:translate(-50%)}.p-toast-center{left:50%;top:50%;min-width:20vw;transform:translate(-50%,-50%)}.p-toast-icon-close{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-toast-icon-close.p-link{cursor:pointer}\n"],encapsulation:2,data:{animation:[wi("toastAnimation",[Ot(":enter, :leave",[UA("@*",qA())])])]},changeDetection:0}),t})(),NG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,gn],Nt]}),t})(),HG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const qG=["rb"],UG=function(t,i,e){return{"p-radiobutton-label":!0,"p-radiobutton-label-active":t,"p-disabled":i,"p-radiobutton-label-focus":e}};function GG(t,i){if(1&t){const e=I();l(0,"label",4),C("click",function(s){return v(e),d().select(s)}),g(1),c()}if(2&t){const e=d(),n=F(3);me(e.labelStyleClass),p("ngClass",Rt(5,UG,n.checked,e.disabled,e.focused)),ne("for",e.inputId),a(1),S(e.label)}}const zG=function(t,i,e){return{"p-radiobutton p-component":!0,"p-radiobutton-checked":t,"p-radiobutton-disabled":i,"p-radiobutton-focused":e}},jG=function(t,i,e){return{"p-radiobutton-box":!0,"p-highlight":t,"p-disabled":i,"p-focus":e}},$G={provide:dn,useExisting:Ue(()=>Td),multi:!0};let WG=(()=>{class t{constructor(){this.accessors=[]}add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return!!e[0].control&&e[0].control.root===n.control.control.root&&e[1].name===n.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Td=(()=>{class t{constructor(e,n,s){this.cd=e,this.injector=n,this.registry=s,this.onClick=new H,this.onFocus=new H,this.onBlur=new H,this.onModelChange=()=>{},this.onModelTouched=()=>{}}ngOnInit(){this.control=this.injector.get(is),this.checkName(),this.registry.add(this.control,this)}handleClick(e,n,s){e.preventDefault(),!this.disabled&&(this.select(e),s&&n.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit(e))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}onChange(e){this.select(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}return t.\u0275fac=function(e){return new(e||t)(x(ot),x(In),x(WG))},t.\u0275cmp=G({type:t,selectors:[["p-radioButton"]],viewQuery:function(e,n){if(1&e&&j(qG,5),2&e){let s;V(s=B())&&(n.inputViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Ne([$G])],decls:7,vars:23,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","change","focus","blur"],["rb",""],[3,"ngClass","click"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"]],template:function(e,n){if(1&e){const s=I();l(0,"div",0)(1,"div",1)(2,"input",2,3),C("change",function(o){return n.onChange(o)})("focus",function(o){return n.onInputFocus(o)})("blur",function(o){return n.onInputBlur(o)}),c()(),l(4,"div",4),C("click",function(o){v(s);const u=F(3);return n.handleClick(o,u,!0)}),k(5,"span",5),c()(),_(6,GG,2,9,"label",6)}2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",Rt(15,zG,n.checked,n.disabled,n.focused)),a(2),p("checked",n.checked)("disabled",n.disabled),ne("id",n.inputId)("name",n.name)("value",n.value)("tabindex",n.tabindex)("aria-checked",n.checked)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledBy),a(2),p("ngClass",Rt(19,jG,n.checked,n.disabled,n.focused)),a(2),p("ngIf",n.label))},directives:[lt,Oe,Q],encapsulation:2,changeDetection:0}),t})(),KG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();function QG(t,i){if(1&t&&(l(0,"div",5),g(1),c()),2&t){const e=d(2);Hn("display",null!=e.value&&0!==e.value?"flex":"none"),a(1),$e("",e.value,"",e.unit,"")}}function JG(t,i){if(1&t&&(l(0,"div",3),_(1,QG,2,4,"div",4),c()),2&t){const e=d();Hn("width",e.value+"%"),a(1),p("ngIf",e.showValue)}}function YG(t,i){1&t&&(l(0,"div",6),k(1,"div",7),c())}const ZG=function(t,i){return{"p-progressbar p-component":!0,"p-progressbar-determinate":t,"p-progressbar-indeterminate":i}};let XG=(()=>{class t{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(e,n){1&e&&(l(0,"div",0),_(1,JG,2,3,"div",1),_(2,YG,2,0,"div",2),c()),2&e&&(me(n.styleClass),p("ngStyle",n.style)("ngClass",We(7,ZG,"determinate"===n.mode,"indeterminate"===n.mode)),ne("aria-valuenow",n.value),a(1),p("ngIf","determinate"===n.mode),a(1),p("ngIf","indeterminate"===n.mode))},directives:[lt,Oe,Q],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const tz=["container"],nz=["content"],iz=["xBar"],sz=["yBar"];function rz(t,i){1&t&&Y(0)}const oz=["*"];let az=(()=>{class t{constructor(e,n,s){this.el=e,this.zone=n,this.cd=s,this.timeoutFrame=r=>setTimeout(r,0)}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{this.moveBar(),this.moveBar=this.moveBar.bind(this),this.onXBarMouseDown=this.onXBarMouseDown.bind(this),this.onYBarMouseDown=this.onYBarMouseDown.bind(this),this.onDocumentMouseMove=this.onDocumentMouseMove.bind(this),this.onDocumentMouseUp=this.onDocumentMouseUp.bind(this),window.addEventListener("resize",this.moveBar),this.contentViewChild.nativeElement.addEventListener("scroll",this.moveBar),this.contentViewChild.nativeElement.addEventListener("mouseenter",this.moveBar),this.xBarViewChild.nativeElement.addEventListener("mousedown",this.onXBarMouseDown),this.yBarViewChild.nativeElement.addEventListener("mousedown",this.onYBarMouseDown),this.calculateContainerHeight(),this.initialized=!0})}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}calculateContainerHeight(){let e=this.containerViewChild.nativeElement,n=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,r=getComputedStyle(e),o=getComputedStyle(s),u=L.getHeight(e)-parseInt(o.height,10);"none"!=r["max-height"]&&0==u&&(e.style.height=n.offsetHeight+parseInt(o.height,10)>parseInt(r["max-height"],10)?r["max-height"]:n.offsetHeight+parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth)+"px")}moveBar(){let e=this.containerViewChild.nativeElement,n=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,r=n.scrollWidth,o=n.clientWidth,u=-1*(e.clientHeight-s.clientHeight);this.scrollXRatio=o/r;let h=this.yBarViewChild.nativeElement,b=n.scrollHeight,y=n.clientHeight,w=-1*(e.clientWidth-h.clientWidth);this.scrollYRatio=y/b,this.requestAnimationFrame(()=>{if(this.scrollXRatio>=1)L.addClass(s,"p-scrollpanel-hidden");else{L.removeClass(s,"p-scrollpanel-hidden");const M=Math.max(100*this.scrollXRatio,10);s.style.cssText="width:"+M+"%; left:"+n.scrollLeft*(100-M)/(r-o)+"%;bottom:"+u+"px;"}if(this.scrollYRatio>=1)L.addClass(h,"p-scrollpanel-hidden");else{L.removeClass(h,"p-scrollpanel-hidden");const M=Math.max(100*this.scrollYRatio,10);h.style.cssText="height:"+M+"%; top: calc("+n.scrollTop*(100-M)/(b-y)+"% - "+s.clientHeight+"px);right:"+w+"px;"}}),this.cd.markForCheck()}onYBarMouseDown(e){this.isYBarClicked=!0,this.lastPageY=e.pageY,L.addClass(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}onXBarMouseDown(e){this.isXBarClicked=!0,this.lastPageX=e.pageX,L.addClass(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.addClass(document.body,"p-scrollpanel-grabbed"),document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp),e.preventDefault()}onDocumentMouseMove(e){this.isXBarClicked?this.onMouseMoveForXBar(e):(this.isYBarClicked||this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))}onMouseMoveForXBar(e){let n=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollLeft+=n/this.scrollXRatio})}onMouseMoveForYBar(e){let n=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollTop+=n/this.scrollYRatio})}scrollTop(e){let n=this.contentViewChild.nativeElement.scrollHeight-this.contentViewChild.nativeElement.clientHeight;this.contentViewChild.nativeElement.scrollTop=e=e>n?n:e>0?e:0}onDocumentMouseUp(e){L.removeClass(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.removeClass(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),L.removeClass(document.body,"p-scrollpanel-grabbed"),document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp),this.isXBarClicked=!1,this.isYBarClicked=!1}requestAnimationFrame(e){(window.requestAnimationFrame||this.timeoutFrame)(e)}ngOnDestroy(){this.initialized&&(window.removeEventListener("resize",this.moveBar),this.contentViewChild.nativeElement.removeEventListener("scroll",this.moveBar),this.contentViewChild.nativeElement.removeEventListener("mouseenter",this.moveBar),this.xBarViewChild.nativeElement.removeEventListener("mousedown",this.onXBarMouseDown),this.yBarViewChild.nativeElement.removeEventListener("mousedown",this.onYBarMouseDown))}refresh(){this.moveBar()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(nt),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-scrollPanel"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(tz,5),j(nz,5),j(iz,5),j(sz,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.contentViewChild=s.first),V(s=B())&&(n.xBarViewChild=s.first),V(s=B())&&(n.yBarViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass"},ngContentSelectors:oz,decls:11,vars:5,consts:[[3,"ngClass","ngStyle"],["container",""],[1,"p-scrollpanel-wrapper"],[1,"p-scrollpanel-content"],["content",""],[4,"ngTemplateOutlet"],[1,"p-scrollpanel-bar","p-scrollpanel-bar-x"],["xBar",""],[1,"p-scrollpanel-bar","p-scrollpanel-bar-y"],["yBar",""]],template:function(e,n){1&e&&(yn(),l(0,"div",0,1)(2,"div",2)(3,"div",3,4),St(5),_(6,rz,1,0,"ng-container",5),c()(),k(7,"div",6,7)(9,"div",8,9),c()),2&e&&(me(n.styleClass),p("ngClass","p-scrollpanel p-component")("ngStyle",n.style),a(6),p("ngTemplateOutlet",n.contentTemplate))},directives:[Oe,lt,Lt],styles:[".p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;z-index:1;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;z-index:2;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;user-select:none}\n"],encapsulation:2,changeDetection:0}),t})(),lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})();const cz=["content"],uz=["navbar"],dz=["inkbar"],pz=["prevBtn"],hz=["nextBtn"];function mz(t,i){if(1&t){const e=I();l(0,"button",11,12),C("click",function(){return v(e),d().navBackward()}),k(2,"span",13),c()}}function fz(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function gz(t,i){if(1&t&&(l(0,"span",24),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function _z(t,i){1&t&&k(0,"span",25),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function bz(t,i){if(1&t&&(ce(0),_(1,fz,1,2,"span",20),_(2,gz,2,1,"span",21),_(3,_z,1,1,"ng-template",null,22,we),ue()),2&t){const e=F(4),n=d(2).$implicit;a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function vz(t,i){1&t&&Y(0)}const $2=function(t,i){return{$implicit:t,index:i}};function Cz(t,i){if(1&t){const e=I();l(0,"a",17),C("click",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)})("keydown.enter",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)}),_(1,bz,5,3,"ng-container",18),_(2,vz,1,0,"ng-container",19),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d();p("target",n.target),ne("href",n.url,Xt)("tabindex",n.disabled?null:"0")("title",n.title)("id",n.id),a(1),p("ngIf",!r.itemTemplate),a(1),p("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(8,$2,n,s))}}function yz(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function wz(t,i){if(1&t&&(l(0,"span",24),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function Tz(t,i){1&t&&k(0,"span",25),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function Sz(t,i){if(1&t&&(ce(0),_(1,yz,1,2,"span",20),_(2,wz,2,1,"span",21),_(3,Tz,1,1,"ng-template",null,27,we),ue()),2&t){const e=F(4),n=d(2).$implicit;a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function xz(t,i){1&t&&Y(0)}const Dz=function(){return{exact:!1}};function Mz(t,i){if(1&t){const e=I();l(0,"a",26),C("click",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)})("keydown.enter",function(s){v(e);const r=d().$implicit;return d().itemClick(s,r)}),_(1,Sz,5,3,"ng-container",18),_(2,xz,1,0,"ng-container",19),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d();p("routerLink",n.routerLink)("queryParams",n.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.routerLinkActiveOptions||A(17,Dz))("target",n.target)("fragment",n.fragment)("queryParamsHandling",n.queryParamsHandling)("preserveFragment",n.preserveFragment)("skipLocationChange",n.skipLocationChange)("replaceUrl",n.replaceUrl)("state",n.state),ne("tabindex",n.disabled?null:"0")("title",n.title)("id",n.id),a(1),p("ngIf",!r.itemTemplate),a(1),p("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",We(18,$2,n,s))}}const kz=function(t,i,e){return{"p-tabmenuitem":!0,"p-disabled":t,"p-highlight":i,"p-hidden":e}};function Iz(t,i){if(1&t&&(l(0,"li",14),_(1,Cz,3,11,"a",15),_(2,Mz,3,21,"a",16),c()),2&t){const e=i.$implicit,n=d();me(e.styleClass),p("ngStyle",e.style)("ngClass",Rt(9,kz,e.disabled,n.isActive(e),!1===e.visible))("tooltipOptions",e.tooltipOptions),ne("aria-selected",n.isActive(e))("aria-expanded",n.isActive(e)),a(1),p("ngIf",!e.routerLink),a(1),p("ngIf",e.routerLink)}}function Ez(t,i){if(1&t){const e=I();l(0,"button",28,29),C("click",function(){return v(e),d().navForward()}),k(2,"span",30),c()}}const Rz=function(t){return{"p-tabmenu p-component":!0,"p-tabmenu-scrollable":t}};let W2=(()=>{class t{constructor(e,n,s){this.router=e,this.route=n,this.cd=s,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.itemTemplate=e.template})}ngAfterViewInit(){this.updateInkBar()}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}isActive(e){if(e.routerLink){let n=Array.isArray(e.routerLink)?e.routerLink:[e.routerLink];return this.router.isActive(this.router.createUrlTree(n,{relativeTo:this.route}).toString(),!1)}return e===this.activeItem}itemClick(e,n){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),this.activeItem=n,this.tabChanged=!0)}updateInkBar(){let e=L.findSingle(this.navbar.nativeElement,"li.p-highlight");e&&(this.inkbar.nativeElement.style.width=L.getWidth(e)+"px",this.inkbar.nativeElement.style.left=L.getOffset(e).left-L.getOffset(this.navbar.nativeElement).left+"px")}getVisibleButtonWidths(){var e,n;return[null===(e=this.prevBtn)||void 0===e?void 0:e.nativeElement,null===(n=this.nextBtn)||void 0===n?void 0:n.nativeElement].reduce((s,r)=>r?s+L.getWidth(r):s,0)}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:n,scrollWidth:s}=e,r=L.getWidth(e);this.backwardIsDisabled=0===n,this.forwardIsDisabled=parseInt(n)===s-r}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}navBackward(){const e=this.content.nativeElement,n=L.getWidth(e)-this.getVisibleButtonWidths(),s=e.scrollLeft-n;e.scrollLeft=s<=0?0:s}navForward(){const e=this.content.nativeElement,n=L.getWidth(e)-this.getVisibleButtonWidths(),s=e.scrollLeft+n,r=e.scrollWidth-n;e.scrollLeft=s>=r?r:s}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Er),x(ot))},t.\u0275cmp=G({type:t,selectors:[["p-tabMenu"]],contentQueries:function(e,n,s){if(1&e&&st(s,ie,4),2&e){let r;V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(cz,5),j(uz,5),j(dz,5),j(pz,5),j(hz,5)),2&e){let s;V(s=B())&&(n.content=s.first),V(s=B())&&(n.navbar=s.first),V(s=B())&&(n.inkbar=s.first),V(s=B())&&(n.prevBtn=s.first),V(s=B())&&(n.nextBtn=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",activeItem:"activeItem",scrollable:"scrollable",popup:"popup",style:"style",styleClass:"styleClass"},decls:11,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabmenu-nav-container"],["class","p-tabmenu-nav-prev p-tabmenu-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabmenu-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabmenu-nav","p-reset"],["navbar",""],["role","tab","pTooltip","",3,"ngStyle","class","ngClass","tooltipOptions",4,"ngFor","ngForOf"],[1,"p-tabmenu-ink-bar"],["inkbar",""],["class","p-tabmenu-nav-next p-tabmenu-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],["type","button","pRipple","",1,"p-tabmenu-nav-prev","p-tabmenu-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","tab","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],["class","p-menuitem-link","role","presentation","pRipple","",3,"target","click","keydown.enter",4,"ngIf"],["role","presentation","class","p-menuitem-link","pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","click","keydown.enter",4,"ngIf"],["role","presentation","pRipple","",1,"p-menuitem-link",3,"target","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-menuitem-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],["role","presentation","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","click","keydown.enter"],["htmlRouteLabel",""],["type","button","pRipple","",1,"p-tabmenu-nav-next","p-tabmenu-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1),_(2,mz,3,0,"button",2),l(3,"div",3,4),C("scroll",function(r){return n.onScroll(r)}),l(5,"ul",5,6),_(7,Iz,3,13,"li",7),k(8,"li",8,9),c()(),_(10,Ez,3,0,"button",10),c()()),2&e&&(me(n.styleClass),p("ngClass",z(7,Rz,n.scrollable))("ngStyle",n.style),a(2),p("ngIf",n.scrollable&&!n.backwardIsDisabled),a(5),p("ngForOf",n.model),a(3),p("ngIf",n.scrollable&&!n.forwardIsDisabled))},directives:[Oe,lt,Q,vt,at,Jt,Lt,Ho,gd],styles:[".p-tabmenu-nav-container{position:relative}.p-tabmenu-scrollable .p-tabmenu-nav-container{overflow:hidden}.p-tabmenu-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabmenu-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabmenu-nav-prev{left:0}.p-tabmenu-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabmenu-nav{display:flex;margin:0;padding:0;list-style-type:none;flex-wrap:nowrap}.p-tabmenu-nav a{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabmenu-nav a:focus{z-index:1}.p-tabmenu-nav .p-menuitem-text{line-height:1;white-space:nowrap}.p-tabmenu-ink-bar{display:none;z-index:1}.p-tabmenu-nav-content::-webkit-scrollbar{display:none}\n"],encapsulation:2,changeDetection:0}),t})(),Lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,Nt,gn,ai],On,Nt,ai]}),t})();function Oz(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d();a(1),S(e.label)}}function Az(t,i){1&t&&Y(0)}const K2=function(t){return{height:t}},Pz=function(t,i){return{"p-highlight":t,"p-disabled":i}},Fz=function(t){return{"p-highlight":t}},Q2=function(t){return{"pi pi-check":t}},Rl=function(t){return{$implicit:t}},Nz=["container"],Vz=["filterInput"],Bz=["in"];function Hz(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(2);a(1),S(e.valuesAsString||"empty")}}function qz(t,i){if(1&t){const e=I();l(0,"span",18),C("click",function(s){v(e);const r=d().$implicit;return d(3).removeChip(r,s)}),c()}}function Uz(t,i){if(1&t&&(l(0,"div",14,15)(2,"span",16),g(3),c(),_(4,qz,1,0,"span",17),c()),2&t){const e=i.$implicit,n=d(3);a(3),S(n.findLabelByValue(e)),a(1),p("ngIf",!n.disabled)}}function Gz(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(3);a(1),S(e.placeholder||e.defaultLabel||"empty")}}function zz(t,i){if(1&t&&(ce(0),_(1,Uz,5,2,"div",13),_(2,Gz,2,1,"ng-container",7),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.value),a(1),p("ngIf",!e.value||0===e.value.length)}}function jz(t,i){if(1&t&&(ce(0),_(1,Hz,2,1,"ng-container",7),_(2,zz,3,2,"ng-container",7),ue()),2&t){const e=d();a(1),p("ngIf","comma"===e.display),a(1),p("ngIf","chip"===e.display)}}function $z(t,i){1&t&&Y(0)}function Wz(t,i){if(1&t){const e=I();l(0,"i",19),C("click",function(s){return v(e),d().clear(s)}),c()}}function Kz(t,i){1&t&&Y(0)}const Qz=function(t){return{"p-checkbox-disabled":t}},Jz=function(t,i,e){return{"p-highlight":t,"p-focus":i,"p-disabled":e}};function Yz(t,i){if(1&t){const e=I();l(0,"div",32)(1,"div",2)(2,"input",33),C("focus",function(){return v(e),d(3).onHeaderCheckboxFocus()})("blur",function(){return v(e),d(3).onHeaderCheckboxBlur()})("keydown.space",function(s){return v(e),d(3).toggleAll(s)}),c()(),l(3,"div",34),C("click",function(s){return v(e),d(3).toggleAll(s)}),k(4,"span",35),c()()}if(2&t){const e=d(3);p("ngClass",z(6,Qz,e.disabled||e.toggleAllDisabled)),a(2),p("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),a(1),p("ngClass",Rt(8,Jz,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),ne("aria-checked",e.allChecked),a(1),p("ngClass",z(12,Q2,e.allChecked))}}function Zz(t,i){if(1&t){const e=I();l(0,"div",36)(1,"input",37,38),C("input",function(s){return v(e),d(3).onFilterInputChange(s)}),c(),k(3,"span",39),c()}if(2&t){const e=d(3);a(1),p("value",e.filterValue||"")("disabled",e.disabled),ne("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function Xz(t,i){if(1&t){const e=I();l(0,"div",26),St(1),_(2,Kz,1,0,"ng-container",27),_(3,Yz,5,14,"div",28),_(4,Zz,4,5,"div",29),l(5,"button",30),C("click",function(s){return v(e),d(2).close(s)}),k(6,"span",31),c()()}if(2&t){const e=d(2);a(2),p("ngTemplateOutlet",e.headerTemplate),a(1),p("ngIf",e.showToggleAll&&!e.selectionLimit),a(1),p("ngIf",e.filter)}}function ej(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d().$implicit,n=d(3);a(1),S(n.getOptionGroupLabel(e)||"empty")}}function tj(t,i){1&t&&Y(0)}function nj(t,i){1&t&&Y(0)}function ij(t,i){if(1&t&&(l(0,"li",41),_(1,ej,2,1,"span",7),_(2,tj,1,0,"ng-container",8),c(),_(3,nj,1,0,"ng-container",8)),2&t){const e=i.$implicit;d(2);const n=F(7),s=d();a(1),p("ngIf",!s.groupTemplate),a(1),p("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",z(5,Rl,e)),a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",z(7,Rl,s.getOptionGroupChildren(e)))}}function sj(t,i){if(1&t&&(ce(0),_(1,ij,4,9,"ng-template",40),ue()),2&t){const e=d(2);a(1),p("ngForOf",e.optionsToRender)}}function rj(t,i){1&t&&Y(0)}function oj(t,i){if(1&t&&(ce(0),_(1,rj,1,0,"ng-container",8),ue()),2&t){d();const e=F(7),n=d();a(1),p("ngTemplateOutlet",e)("ngTemplateOutletContext",z(2,Rl,n.optionsToRender))}}function aj(t,i){if(1&t){const e=I();l(0,"p-multiSelectItem",45),C("onClick",function(s){return v(e),d(4).onOptionClick(s)})("onKeydown",function(s){return v(e),d(4).onOptionKeydown(s)}),c()}if(2&t){const e=i.$implicit,n=d(4);p("option",e)("selected",n.isSelected(e))("label",n.getOptionLabel(e))("disabled",n.isOptionDisabled(e))("template",n.itemTemplate)}}function lj(t,i){if(1&t&&(ce(0),_(1,aj,1,5,"ng-template",40),ue()),2&t){const e=d().$implicit;a(1),p("ngForOf",e)}}function cj(t,i){if(1&t){const e=I();ce(0),l(1,"p-multiSelectItem",50),C("onClick",function(s){return v(e),d(5).onOptionClick(s)})("onKeydown",function(s){return v(e),d(5).onOptionKeydown(s)}),c(),ue()}if(2&t){const e=i.$implicit,n=d(5);a(1),p("option",e)("selected",n.isSelected(e))("label",n.getOptionLabel(e))("disabled",n.isOptionDisabled(e))("template",n.itemTemplate)("itemSize",n.itemSize)}}function uj(t,i){if(1&t&&(l(0,"cdk-virtual-scroll-viewport",47,48),_(2,cj,2,6,"ng-container",49),c()),2&t){const e=d(2).$implicit,n=d(2);p("ngStyle",z(3,K2,n.scrollHeight))("itemSize",n.itemSize),a(2),p("cdkVirtualForOf",e)}}function dj(t,i){if(1&t&&_(0,uj,3,5,"cdk-virtual-scroll-viewport",46),2&t){const e=d(3);p("ngIf",e.virtualScroll&&!e.emptyOptions)}}function pj(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(4);a(1),T(" ",e.emptyFilterMessageLabel," ")}}function hj(t,i){1&t&&Y(0,null,52)}function mj(t,i){if(1&t&&(l(0,"li",51),_(1,pj,2,1,"ng-container",42),_(2,hj,2,0,"ng-container",27),c()),2&t){const e=d(3);a(1),p("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),a(1),p("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function fj(t,i){if(1&t&&(ce(0),g(1),ue()),2&t){const e=d(4);a(1),T(" ",e.emptyMessageLabel," ")}}function gj(t,i){1&t&&Y(0,null,53)}function _j(t,i){if(1&t&&(l(0,"li",51),_(1,fj,2,1,"ng-container",42),_(2,gj,2,0,"ng-container",27),c()),2&t){const e=d(3);a(1),p("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),a(1),p("ngTemplateOutlet",e.emptyTemplate)}}function bj(t,i){if(1&t&&(_(0,lj,2,1,"ng-container",42),_(1,dj,1,1,"ng-template",null,43,we),_(3,mj,3,3,"li",44),_(4,_j,3,3,"li",44)),2&t){const e=F(2),n=d(2);p("ngIf",!n.virtualScroll)("ngIfElse",e),a(3),p("ngIf",n.hasFilter()&&n.emptyOptions),a(1),p("ngIf",!n.hasFilter()&&n.emptyOptions)}}function vj(t,i){1&t&&Y(0)}function Cj(t,i){if(1&t&&(l(0,"div",54),St(1,1),_(2,vj,1,0,"ng-container",27),c()),2&t){const e=d(2);a(2),p("ngTemplateOutlet",e.footerTemplate)}}const yj=function(){return["p-multiselect-panel p-component"]},wj=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},Tj=function(t){return{value:"visible",params:t}},Sj=function(t){return{"p-multiselect-virtualscroll":t}};function xj(t,i){if(1&t){const e=I();l(0,"div",20),C("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)})("keydown",function(s){return v(e),d().onKeydown(s)})("click",function(s){return v(e),d().onOverlayClick(s)}),_(1,Xz,7,3,"div",21),l(2,"div",22)(3,"ul",23),_(4,sj,2,1,"ng-container",7),_(5,oj,2,4,"ng-container",7),_(6,bj,5,4,"ng-template",null,24,we),c()(),_(8,Cj,3,1,"div",25),c()}if(2&t){const e=d();me(e.panelStyleClass),p("ngClass",A(12,yj))("@overlayAnimation",z(16,Tj,We(13,wj,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),a(1),p("ngIf",e.showHeader),a(1),Hn("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),a(1),p("ngClass",z(18,Sj,e.virtualScroll)),a(1),p("ngIf",e.group),a(1),p("ngIf",!e.group),a(3),p("ngIf",e.footerFacet||e.footerTemplate)}}const Dj=[[["p-header"]],[["p-footer"]]],Mj=function(t,i,e,n){return{"p-multiselect p-component":!0,"p-multiselect-open":t,"p-multiselect-chip":i,"p-focus":e,"p-disabled":n}},kj=function(t,i){return{"p-placeholder":t,"p-multiselect-label-empty":i}},Ij=function(){return{"p-multiselect-trigger":!0}},Ej=["p-header","p-footer"],Rj={provide:dn,useExisting:Ue(()=>J2),multi:!0};let Lj=(()=>{class t{constructor(){this.onClick=new H,this.onKeydown=new H}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}onOptionKeydown(e){this.onKeydown.emit({originalEvent:e,option:this.option})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick",onKeydown:"onKeydown"},decls:6,vars:20,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","click","keydown"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&(l(0,"li",0),C("click",function(r){return n.onOptionClick(r)})("keydown",function(r){return n.onOptionKeydown(r)}),l(1,"div",1)(2,"div",2),k(3,"span",3),c()(),_(4,Oz,2,1,"span",4),_(5,Az,1,0,"ng-container",5),c()),2&e&&(p("ngStyle",z(9,K2,n.itemSize+"px"))("ngClass",We(11,Pz,n.selected,n.disabled)),ne("aria-label",n.label)("tabindex",n.disabled?null:"0"),a(2),p("ngClass",z(14,Fz,n.selected)),a(1),p("ngClass",z(16,Q2,n.selected)),a(1),p("ngIf",!n.template),a(1),p("ngTemplateOutlet",n.template)("ngTemplateOutletContext",z(18,Rl,n.option)))},directives:[vt,lt,Oe,Q,Lt],encapsulation:2}),t})(),J2=(()=>{class t{constructor(e,n,s,r,o,u){this.el=e,this.renderer=n,this.cd=s,this.filterService=r,this.config=o,this.overlayService=u,this.filter=!0,this.displaySelectedLabel=!0,this.maxSelectedLabels=3,this.selectedItemsLabel="ellipsis",this.showToggleAll=!0,this.emptyFilterMessage="",this.emptyMessage="",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.showHeader=!0,this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.display="comma",this.autocomplete="on",this.showClear=!1,this.onChange=new H,this.onFilter=new H,this.onFocus=new H,this.onBlur=new H,this.onClick=new H,this.onClear=new H,this.onPanelShow=new H,this.onPanelHide=new H,this.scrollHeight="200px",this.onModelChange=()=>{},this.onModelTouched=()=>{}}set defaultLabel(e){this._defaultLabel=e,this.updateLabel()}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e,this.updateLabel()}get placeholder(){return this._placeholder}get options(){return this._options}set options(e){this._options=e,this.updateLabel()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.updateLabel()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.alignOverlay(),this.filtered=!1)}getOptionLabel(e){return this.optionLabel?Z.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Z.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}getOptionGroupLabel(e){return this.optionGroupLabel?Z.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Z.resolveFieldData(e,this.optionGroupChildren):e.items}isOptionDisabled(e){return(this.optionDisabled?Z.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled)||this.maxSelectionLimitReached&&!this.isSelected(e)}writeValue(e){this.value=e,this.updateLabel(),this.updateFilledState(),this.checkSelectionLimit(),this.cd.markForCheck()}checkSelectionLimit(){this.maxSelectionLimitReached=!(!this.selectionLimit||!this.value||this.value.length!==this.selectionLimit)}updateFilledState(){this.filled=this.value&&this.value.length>0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e){let n=e.option;if(this.isOptionDisabled(n))return;let s=this.getOptionValue(n),r=this.findSelectionIndex(s);-1!=r?(this.value=this.value.filter((o,u)=>u!=r),this.selectionLimit&&(this.maxSelectionLimitReached=!1)):((!this.selectionLimit||!this.value||this.value.length{if(this.group){let r=this.getOptionGroupChildren(s);r&&r.forEach(o=>{let u=this.isOptionDisabled(o);(!u||u&&this.isSelected(o))&&n.push(this.getOptionValue(o))})}else{let r=this.isOptionDisabled(s);(!r||r&&this.isSelected(s))&&n.push(this.getOptionValue(s))}}),this.value=n}uncheckAll(){let n=[];this.optionsToRender.forEach(s=>{this.group?s.items&&s.items.forEach(r=>{this.isOptionDisabled(r)&&this.isSelected(r)&&n.push(this.getOptionValue(r))}):this.isOptionDisabled(s)&&this.isSelected(s)&&n.push(this.getOptionValue(s))}),this.value=n}show(){this.overlayVisible||(this.overlayVisible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,this.appendOverlay(),this.autoZIndex&>.set("overlay",this.overlay,this.baseZIndex+this.config.zIndex.overlay),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();break;case"void":this.onOverlayHide()}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):L.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=L.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}alignOverlay(){this.overlay&&(this.appendTo?L.absolutePosition(this.overlay,this.containerViewChild.nativeElement):L.relativePosition(this.overlay,this.containerViewChild.nativeElement))}hide(){this.overlayVisible=!1,this.unbindDocumentClickListener(),this.resetFilterOnHide&&(this.filterInputChild.nativeElement.value="",this._filterValue=null,this._filteredOptions=null),this.onPanelHide.emit(),this.cd.markForCheck()}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateLabel(),this.updateFilledState(),this.onClear.emit(),this.onModelChange(this.value),e.stopPropagation()}onMouseclick(e,n){this.disabled||this.readonly||e.target.isSameNode(this.accessibleViewChild.nativeElement)||(this.onClick.emit(e),!this.isOverlayClick(e)&&!L.hasClass(e.target,"p-multiselect-token-icon")&&(this.overlayVisible?this.hide():(n.focus(),this.show())))}removeChip(e,n){this.value=this.value.filter(s=>!Z.equals(s,e,this.dataKey)),this.onModelChange(this.value),this.checkSelectionLimit(),this.onChange.emit({originalEvent:n,value:this.value,itemValue:e}),this.updateLabel(),this.updateFilledState()}isOverlayClick(e){let n=e.target;return!!this.overlay&&(this.overlay.isSameNode(n)||this.overlay.contains(n))}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.el.nativeElement.contains(e.target)||this.isOverlayClick(e))}onInputFocus(e){this.focus=!0,this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focus=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onOptionKeydown(e){if(!this.readonly)switch(e.originalEvent.which){case 40:var n=this.findNextItem(e.originalEvent.target.parentElement);n&&n.focus(),e.originalEvent.preventDefault();break;case 38:var s=this.findPrevItem(e.originalEvent.target.parentElement);s&&s.focus(),e.originalEvent.preventDefault();break;case 13:this.onOptionClick(e),e.originalEvent.preventDefault();break;case 9:this.hide()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n.children[0],"p-disabled")||L.isHidden(n.children[0])||L.hasClass(n,"p-multiselect-item-group")?this.findNextItem(n):n.children[0]:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n.children[0],"p-disabled")||L.isHidden(n.children[0])||L.hasClass(n,"p-multiselect-item-group")?this.findPrevItem(n):n.children[0]:null}onKeydown(e){switch(e.which){case 40:!this.overlayVisible&&e.altKey&&(this.show(),e.preventDefault());break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.hide()}}updateLabel(){if(this.value&&this.options&&this.value.length&&this.displaySelectedLabel){let e="";for(let n=0;n0&&(e+=", "),e+=s)}if(this.value.length<=this.maxSelectedLabels||"ellipsis"===this.selectedItemsLabel)this.valuesAsString=e;else{let n=/{(.*?)}/;this.valuesAsString=n.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(n)[0],this.value.length+""):this.selectedItemsLabel}}else this.valuesAsString=this.placeholder||this.defaultLabel}findLabelByValue(e){if(this.group){let n=null;for(let s=0;s0}onFilterInputChange(e){this._filterValue=e.target.value,this.activateFilter(),this.onFilter.emit({originalEvent:e,filter:this._filterValue}),this.cd.detectChanges(),this.alignOverlay()}activateFilter(){if(this.hasFilter()&&this._options){let e=(this.filterBy||this.optionLabel||"label").split(",");if(this.group){let n=[];for(let s of this.options){let r=this.filterService.filter(this.getOptionGroupChildren(s),e,this.filterValue,this.filterMatchMode,this.filterLocale);r&&r.length&&n.push(Object.assign(Object.assign({},s),{[this.optionGroupChildren]:r}))}this._filteredOptions=n}else this._filteredOptions=this.filterService.filter(this.options,e,this._filterValue,this.filterMatchMode,this.filterLocale)}else this._filteredOptions=null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",n=>{!this.preventDocumentDefault&&this.isOutsideClicked(n)&&this.hide(),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){L.isAndroid()||this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&>.clear(this.overlay),this.restoreOverlayAppend(),this.onOverlayHide()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(hl),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-multiSelect"]],contentQueries:function(e,n,s){if(1&e&&(st(s,fl,5),st(s,Oo,5),st(s,ie,4)),2&e){let r;V(r=B())&&(n.footerFacet=r.first),V(r=B())&&(n.headerFacet=r.first),V(r=B())&&(n.templates=r)}},viewQuery:function(e,n){if(1&e&&(j(Nz,5),j(Vz,5),j(Bz,5)),2&e){let s;V(s=B())&&(n.containerViewChild=s.first),V(s=B())&&(n.filterInputChild=s.first),V(s=B())&&(n.accessibleViewChild=s.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,n){2&e&&ii("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focus||n.overlayVisible)("p-multiselect-clearable",n.showClear&&!n.disabled)},inputs:{style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",label:"label",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",filterBy:"filterBy",virtualScroll:"virtualScroll",itemSize:"itemSize",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",scrollHeight:"scrollHeight",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide"},features:[Ne([Rj])],ngContentSelectors:Ej,decls:13,vars:34,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","readonly","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[1,"p-multiselect-label",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-multiselect-clear-icon pi pi-times",3,"click",4,"ngIf"],[3,"ngClass"],[1,"p-multiselect-trigger-icon",3,"ngClass"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","class","keydown","click",4,"ngIf"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],["class","p-multiselect-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-multiselect-token-icon","pi","pi-times-circle",3,"click"],[1,"p-multiselect-clear-icon","pi","pi-times",3,"click"],["onOverlayAnimationEnd","",3,"ngClass","ngStyle","keydown","click"],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["itemslist",""],["class","p-multiselect-footer",4,"ngIf"],[1,"p-multiselect-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link",3,"click"],[1,"p-multiselect-close-icon","pi","pi-times"],[1,"p-checkbox","p-component",3,"ngClass"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-multiselect-filter-container"],["type","text","role","textbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input"],["filterInput",""],[1,"p-multiselect-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-multiselect-item-group"],[4,"ngIf","ngIfElse"],["virtualScrollList",""],["class","p-multiselect-empty-message",4,"ngIf"],[3,"option","selected","label","disabled","template","onClick","onKeydown"],[3,"ngStyle","itemSize",4,"ngIf"],[3,"ngStyle","itemSize"],["viewport",""],[4,"cdkVirtualFor","cdkVirtualForOf"],[3,"option","selected","label","disabled","template","itemSize","onClick","onKeydown"],[1,"p-multiselect-empty-message"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(e,n){if(1&e){const s=I();yn(Dj),l(0,"div",0,1),C("click",function(o){v(s);const u=F(4);return n.onMouseclick(o,u)}),l(2,"div",2)(3,"input",3,4),C("focus",function(o){return n.onInputFocus(o)})("blur",function(o){return n.onInputBlur(o)})("keydown",function(o){return n.onKeydown(o)}),c()(),l(5,"div",5)(6,"div",6),_(7,jz,3,2,"ng-container",7),_(8,$z,1,0,"ng-container",8),c(),_(9,Wz,1,0,"i",9),c(),l(10,"div",10),k(11,"span",11),c(),_(12,xj,9,20,"div",12),c()}2&e&&(me(n.styleClass),p("ngClass",_i(23,Mj,n.overlayVisible,"chip"===n.display,n.focus,n.disabled))("ngStyle",n.style),a(3),p("disabled",n.disabled),ne("label",n.label)("id",n.inputId)("name",n.name)("tabindex",n.tabindex)("aria-expanded",n.overlayVisible)("aria-labelledby",n.ariaLabelledBy),a(2),p("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass),a(1),p("ngClass",We(28,kj,n.valuesAsString===(n.defaultLabel||n.placeholder),!(null!=n.valuesAsString&&0!==n.valuesAsString.length||null!=n.placeholder&&0!==n.placeholder.length))),a(1),p("ngIf",!n.selectedItemsTemplate),a(1),p("ngTemplateOutlet",n.selectedItemsTemplate)("ngTemplateOutletContext",z(31,Rl,n.value)),a(1),p("ngIf",null!=n.value&&n.filled&&!n.disabled&&n.showClear),a(1),p("ngClass",A(33,Ij)),a(1),p("ngClass",n.dropdownIcon),a(1),p("ngIf",n.overlayVisible))},directives:[Lj,Po,Oe,lt,Jt,Q,at,Lt,vt,Qf,Jf],styles:[".p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect .p-multiselect-panel{min-width:100%}.p-multiselect-panel{position:absolute;top:0;left:0}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),Oj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,Nt,Fo,ai,gn],Nt,Fo]}),t})();const Aj=["sublist"],Pj=function(t){return{"p-hidden":t}};function Fj(t,i){if(1&t&&k(0,"li",5),2&t){const e=d().$implicit;p("ngClass",z(1,Pj,!1===e.visible))}}function Nj(t,i){if(1&t&&k(0,"span",16),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function Vj(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function Bj(t,i){1&t&&k(0,"span",18),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function Hj(t,i){1&t&&k(0,"span",19)}const Y2=function(t){return{"p-disabled":t}};function qj(t,i){if(1&t){const e=I();l(0,"a",11),C("keydown",function(s){return v(e),d(3).onItemKeyDown(s)})("click",function(s){v(e),d();const r=F(1),o=d().$implicit;return d().itemClick(s,o,r)}),_(1,Nj,1,2,"span",12),_(2,Vj,2,1,"span",13),_(3,Bj,1,1,"ng-template",null,14,we),_(5,Hj,1,0,"span",15),c()}if(2&t){const e=F(4),n=d(2).$implicit,s=d();p("target",n.target)("ngClass",z(10,Y2,n.disabled)),ne("href",n.url,Xt)("title",n.title)("id",n.id)("tabindex",n.disabled||!s.isActive?null:"0"),a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e),a(3),p("ngIf",n.items)}}function Uj(t,i){if(1&t&&k(0,"span",16),2&t){const e=d(3).$implicit;p("ngClass",e.icon)("ngStyle",e.iconStyle)}}function Gj(t,i){if(1&t&&(l(0,"span",17),g(1),c()),2&t){const e=d(3).$implicit;a(1),S(e.label)}}function zj(t,i){1&t&&k(0,"span",18),2&t&&p("innerHTML",d(3).$implicit.label,Ht)}function jj(t,i){1&t&&k(0,"span",22)}const $j=function(){return{exact:!1}};function Wj(t,i){if(1&t){const e=I();l(0,"a",20),C("keydown",function(s){return v(e),d(3).onItemKeyDown(s)})("click",function(s){v(e),d();const r=F(1),o=d().$implicit;return d().itemClick(s,o,r)}),_(1,Uj,1,2,"span",12),_(2,Gj,2,1,"span",13),_(3,zj,1,1,"ng-template",null,14,we),_(5,jj,1,0,"span",21),c()}if(2&t){const e=F(4),n=d(2).$implicit,s=d();p("routerLink",n.routerLink)("queryParams",n.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.routerLinkActiveOptions||A(20,$j))("href",n.url,Xt)("target",n.target)("ngClass",z(21,Y2,n.disabled))("fragment",n.fragment)("queryParamsHandling",n.queryParamsHandling)("preserveFragment",n.preserveFragment)("skipLocationChange",n.skipLocationChange)("replaceUrl",n.replaceUrl)("state",n.state),ne("title",n.title)("id",n.id)("tabindex",n.disabled||!s.isActive?null:"0"),a(1),p("ngIf",n.icon),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e),a(3),p("ngIf",n.items)}}function Kj(t,i){if(1&t&&k(0,"p-slideMenuSub",23),2&t){const e=d(2).$implicit,n=d();p("item",e)("index",n.index+1)("menuWidth",n.menuWidth)}}const Qj=function(t,i){return{"p-menuitem":!0,"p-menuitem-active":t,"p-hidden":i}};function Jj(t,i){if(1&t&&(l(0,"li",6,7),_(2,qj,6,12,"a",8),_(3,Wj,6,23,"a",9),_(4,Kj,1,3,"p-slideMenuSub",10),c()),2&t){const e=F(1),n=d().$implicit,s=d();me(n.styleClass),p("ngClass",We(8,Qj,e==s.activeItem,!1===n.visible))("tooltipOptions",n.tooltipOptions)("ngStyle",n.style),a(2),p("ngIf",!n.routerLink),a(1),p("ngIf",n.routerLink),a(1),p("ngIf",n.items)}}function Yj(t,i){if(1&t&&(_(0,Fj,1,3,"li",3),_(1,Jj,5,11,"li",4)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}const Zj=function(t,i,e){return{"p-slidemenu-rootlist":t,"p-submenu-list":i,"p-active-submenu":e}},Xj=["container"],e$=["backward"],t$=["slideMenuContent"],n$=function(t){return{"p-slidemenu p-component":!0,"p-slidemenu-overlay":t}},i$=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},s$=function(t){return{value:"visible",params:t}};function r$(t,i){if(1&t){const e=I();l(0,"div",1,2),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)}),l(2,"div",3)(3,"div",4,5),k(5,"p-slideMenuSub",6),c(),l(6,"a",7,8),C("keydown.enter",function(s){return v(e),d().onBackwardKeydown(s)})("keydown.space",function(s){return v(e),d().onBackwardKeydown(s)})("click",function(){return v(e),d().goBack()}),k(8,"span",9),l(9,"span"),g(10),c()()()()}if(2&t){const e=d();me(e.styleClass),p("ngClass",z(18,n$,e.popup))("ngStyle",e.style)("@overlayAnimation",z(23,s$,We(20,i$,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0!==e.popup),a(2),Hn("height",e.left?e.viewportHeight+"px":"auto")("width",e.menuWidth+"px"),a(3),p("item",e.model)("index",0)("menuWidth",e.menuWidth)("effectDuration",e.effectDuration)("easing",e.easing),a(1),Hn("display",e.left?"block":"none"),a(4),S(e.backLabel)}}let o$=(()=>{class t{constructor(e){this.backLabel="Back",this.easing="ease-out",this.slideMenu=e}itemClick(e,n,s){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),n.items&&!this.slideMenu.animating&&(this.slideMenu.left-=this.slideMenu.menuWidth,this.activeItem=s,this.slideMenu.animating=!0,setTimeout(()=>this.slideMenu.animating=!1,this.effectDuration)),!n.items&&this.slideMenu.popup&&this.slideMenu.hide())}focusNextList(e){if(!this.slideMenu.animating){let n=L.getFocusableElements(e);n&&n.length>0&&n[0].focus(),this.unbindTransitionEndListener()}}onItemKeyDown(e){let n=e.currentTarget.parentElement;switch(e.code){case"Space":case"Enter":n&&!L.hasClass(n,"p-disabled")&&(n.children[0].click(),this.transitionEndListener=this.focusNextList.bind(this,n),this.sublistViewChild.nativeElement.addEventListener("transitionend",this.transitionEndListener)),e.preventDefault()}}unbindTransitionEndListener(){this.transitionEndListener&&this.sublistViewChild&&(this.sublistViewChild.nativeElement.removeEventListener("transitionend",this.transitionEndListener),this.transitionEndListener=null)}ngOnDestroy(){this.activeItem=null,this.unbindTransitionEndListener()}get isActive(){return-this.slideMenu.left==this.index*this.menuWidth}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>Z2)))},t.\u0275cmp=G({type:t,selectors:[["p-slideMenuSub"]],viewQuery:function(e,n){if(1&e&&j(Aj,5),2&e){let s;V(s=B())&&(n.sublistViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{item:"item",root:"root",backLabel:"backLabel",menuWidth:"menuWidth",effectDuration:"effectDuration",easing:"easing",index:"index"},decls:3,vars:16,consts:[[3,"ngClass"],["sublist",""],["ngFor","",3,"ngForOf"],["class","p-menu-separator",3,"ngClass",4,"ngIf"],["pTooltip","",3,"ngClass","tooltipOptions","class","ngStyle",4,"ngIf"],[1,"p-menu-separator",3,"ngClass"],["pTooltip","",3,"ngClass","tooltipOptions","ngStyle"],["listitem",""],["class","p-menuitem-link",3,"target","ngClass","keydown","click",4,"ngIf"],["class","p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","href","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click",4,"ngIf"],["class","p-submenu",3,"item","index","menuWidth",4,"ngIf"],[1,"p-menuitem-link",3,"target","ngClass","keydown","click"],["class","p-menuitem-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlRouteLabel",""],["class","p-submenu-icon pi pi-fw pi-angle-right",4,"ngIf"],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],[1,"p-submenu-icon","pi","pi-fw","pi-angle-right"],[1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","href","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click"],["class","p-submenu-icon pi pi-fw pi-caret-right",4,"ngIf"],[1,"p-submenu-icon","pi","pi-fw","pi-caret-right"],[1,"p-submenu",3,"item","index","menuWidth"]],template:function(e,n){1&e&&(l(0,"ul",0,1),_(2,Yj,2,2,"ng-template",2),c()),2&e&&(Hn("width",n.menuWidth,"px")("left",n.root?n.slideMenu.left:n.slideMenu.menuWidth,"px")("transition-property",n.root?"left":"none")("transition-duration",n.effectDuration+"ms")("transition-timing-function",n.easing),p("ngClass",Rt(12,Zj,n.root,!n.root,n.isActive)),a(2),p("ngForOf",n.root?n.item:n.item.items))},directives:[t,Oe,at,Q,Jt,lt,Ho,gd],encapsulation:2}),t})(),Z2=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.cd=s,this.config=r,this.overlayService=o,this.menuWidth=190,this.viewportHeight=180,this.effectDuration=250,this.easing="ease-out",this.backLabel="Back",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H,this.left=0,this.animating=!1}ngAfterViewChecked(){!this.viewportUpdated&&!this.popup&&this.containerViewChild&&(this.updateViewPort(),this.viewportUpdated=!0)}set container(e){this.containerViewChild=e}set backward(e){this.backwardViewChild=e}set slideMenuContent(e){this.slideMenuContentViewChild=e}updateViewPort(){this.slideMenuContentViewChild.nativeElement.style.height=this.viewportHeight-L.getHiddenElementOuterHeight(this.backwardViewChild.nativeElement)+"px"}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.visible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck()}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.updateViewPort(),this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),L.absolutePosition(this.containerViewChild.nativeElement,this.target),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.onOverlayHide(),this.onHide.emit({})}}onOverlayAnimationEnd(e){"void"===e.toState&>.clear(e.element)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.containerViewChild.nativeElement):L.appendChild(this.containerViewChild.nativeElement,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.containerViewChild.nativeElement)}moveOnTop(){this.autoZIndex&>.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.cd.markForCheck()}onWindowResize(){this.hide()}goBack(){this.left+=this.menuWidth}onBackwardKeydown(e){this.goBack(),this.left||setTimeout(()=>{let n=L.getFocusableElements(this.el.nativeElement);n&&n.length>0&&n[0].focus()},1),e.preventDefault()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",()=>{this.preventDocumentDefault||(this.hide(),this.cd.detectChanges()),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.left=0,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.restoreOverlayAppend(),this.onOverlayHide())}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-slideMenu"]],viewQuery:function(e,n){if(1&e&&(j(Xj,5),j(e$,5),j(t$,5)),2&e){let s;V(s=B())&&(n.container=s.first),V(s=B())&&(n.backward=s.first),V(s=B())&&(n.slideMenuContent=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",menuWidth:"menuWidth",viewportHeight:"viewportHeight",effectDuration:"effectDuration",easing:"easing",backLabel:"backLabel",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],[1,"p-slidemenu-wrapper"],[1,"p-slidemenu-content"],["slideMenuContent",""],["root","root",3,"item","index","menuWidth","effectDuration","easing"],["tabindex","0",1,"p-slidemenu-backward","p-menuitem-link",3,"keydown.enter","keydown.space","click"],["backward",""],[1,"p-slidemenu-backward-icon","pi","pi-fw","pi-caret-left"]],template:function(e,n){1&e&&_(0,r$,11,25,"div",0),2&e&&p("ngIf",!n.popup||n.visible)},directives:[o$,Q,Oe,lt],styles:[".p-slidemenu{width:12.5rem}.p-slidemenu.p-slidemenu-overlay{position:absolute;top:0;left:0}.p-slidemenu ul{list-style:none;margin:0;padding:0}.p-slidemenu .p-slidemenu-rootlist{position:absolute;top:0}.p-slidemenu .p-submenu-list{display:none;position:absolute;top:0;width:12.5rem}.p-slidemenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden}.p-slidemenu .p-menuitem-icon,.p-slidemenu .p-menuitem-text{vertical-align:middle}.p-slidemenu .p-menuitem{position:relative}.p-slidemenu .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-slidemenu .p-slidemenu-wrapper{position:relative}.p-slidemenu .p-slidemenu-content{overflow-x:hidden;overflow-y:auto;position:relative}.p-slidemenu-backward{position:absolute;bottom:0;width:100%;cursor:pointer;display:none}.p-slidemenu-backward .p-slidemenu-backward-icon,.p-slidemenu-backward span{vertical-align:middle}.p-slidemenu .p-menuitem-active{position:static}.p-slidemenu .p-menuitem-active>.p-submenu>.p-submenu-list{display:block}.p-slidemenu ul:not(.p-active-submenu)>.p-menuitem:not(.p-menuitem-active),.p-slidemenu .p-active-submenu>.p-menuitem-active>.p-submenu>.p-submenu-list{display:none}.p-slidemenu .p-active-submenu>.p-menuitem-active~.p-menuitem{display:block}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),a$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,ai],On,ai]}),t})(),X2=(()=>{class t{constructor(e,n,s,r){this.el=e,this.ngModel=n,this.control=s,this.cd=r,this.onResize=new H}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(e){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}onFocus(e){this.autoResize&&this.resize(e)}onBlur(e){this.autoResize&&this.resize(e)}resize(e){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(_e,8),x(is,8),x(ot))},t.\u0275dir=le({type:t,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(e,n){1&e&&C("input",function(r){return n.onInput(r)})("focus",function(r){return n.onFocus(r)})("blur",function(r){return n.onBlur(r)}),2&e&&ii("p-filled",n.filled)("p-inputtextarea-resizable",n.autoResize)},inputs:{autoResize:"autoResize"},outputs:{onResize:"onResize"}}),t})(),l$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be]]}),t})(),c$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[eN,gl,cT,h5,C5,$6,C7,T7,Yu,B7,Zu,CB,d9,b9,R9,B9,W9,K9,gn,eq,tq,uq,DG,NG,HG,ai,KG,ez,lz,Lz,Oj,a$,l$]}),t})();const u$=["pMenuItemContent",""];function d$(t,i){if(1&t&&k(0,"span",6),2&t){const e=d(2);me(e.item.iconClass),p("ngClass",e.item.icon)("ngStyle",e.item.iconStyle)}}function p$(t,i){if(1&t&&(l(0,"span",7),g(1),c()),2&t){const e=d(2);a(1),S(e.item.label)}}function h$(t,i){1&t&&k(0,"span",8),2&t&&p("innerHTML",d(2).item.label,Ht)}const eS=function(t){return{"p-disabled":t}};function m$(t,i){if(1&t){const e=I();l(0,"a",2),C("keydown",function(s){return v(e),d().onItemKeyDown(s)})("click",function(s){v(e);const r=d();return r.menu.itemClick(s,r.item)}),_(1,d$,1,4,"span",3),_(2,p$,2,1,"span",4),_(3,h$,1,1,"ng-template",null,5,we),c()}if(2&t){const e=F(4),n=d();p("target",n.item.target)("ngClass",z(11,eS,n.item.disabled))("target",n.item.target),ne("href",n.item.url||null,Xt)("tabindex",n.item.disabled?null:"0")("data-automationid",n.item.automationId)("title",n.item.title)("id",n.item.id),a(1),p("ngIf",n.item.icon),a(1),p("ngIf",!1!==n.item.escape)("ngIfElse",e)}}function f$(t,i){1&t&&k(0,"span",12),2&t&&p("ngClass",d(2).item.icon)}function g$(t,i){if(1&t&&(l(0,"span",7),g(1),c()),2&t){const e=d(2);a(1),S(e.item.label)}}function _$(t,i){1&t&&k(0,"span",8),2&t&&p("innerHTML",d(2).item.label,Ht)}const b$=function(){return{exact:!1}};function v$(t,i){if(1&t){const e=I();l(0,"a",9),C("keydown",function(s){return v(e),d().onItemKeyDown(s)})("click",function(s){v(e);const r=d();return r.menu.itemClick(s,r.item)}),_(1,f$,1,1,"span",10),_(2,g$,2,1,"span",4),_(3,_$,1,1,"ng-template",null,11,we),c()}if(2&t){const e=F(4),n=d();p("routerLink",n.item.routerLink)("queryParams",n.item.queryParams)("routerLinkActive","p-menuitem-link-active")("routerLinkActiveOptions",n.item.routerLinkActiveOptions||A(19,b$))("target",n.item.target)("ngClass",z(20,eS,n.item.disabled))("fragment",n.item.fragment)("queryParamsHandling",n.item.queryParamsHandling)("preserveFragment",n.item.preserveFragment)("skipLocationChange",n.item.skipLocationChange)("replaceUrl",n.item.replaceUrl)("state",n.item.state),ne("data-automationid",n.item.automationId)("id",n.item.id)("tabindex",n.item.disabled?null:"0")("title",n.item.title),a(1),p("ngIf",n.item.icon),a(1),p("ngIf",!1!==n.item.escape)("ngIfElse",e)}}const C$=["container"],Go=function(t){return{"p-hidden":t}};function y$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit;p("ngClass",z(1,Go,!1===e.visible))}}function w$(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d(2).$implicit;a(1),S(e.label)}}function T$(t,i){1&t&&k(0,"span",12),2&t&&p("innerHTML",d(2).$implicit.label,Ht)}function S$(t,i){if(1&t&&(l(0,"li",9),_(1,w$,2,1,"span",10),_(2,T$,1,1,"ng-template",null,11,we),c()),2&t){const e=F(3),n=d().$implicit;p("ngClass",z(5,Go,!1===n.visible))("tooltipOptions",n.tooltipOptions),ne("data-automationid",n.automationId),a(1),p("ngIf",!1!==n.escape)("ngIfElse",e)}}function x$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit,n=d().$implicit;p("ngClass",z(1,Go,!1===e.visible||!1===n.visible))}}function D$(t,i){if(1&t&&k(0,"li",14),2&t){const e=d().$implicit,n=d().$implicit;me(e.styleClass),p("pMenuItemContent",e)("ngClass",z(6,Go,!1===e.visible||!1===n.visible))("ngStyle",e.style)("tooltipOptions",e.tooltipOptions)}}function M$(t,i){if(1&t&&(_(0,x$,1,3,"li",6),_(1,D$,1,8,"li",13)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}function k$(t,i){if(1&t&&(_(0,y$,1,3,"li",6),_(1,S$,4,7,"li",7),_(2,M$,2,2,"ng-template",5)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator),a(1),p("ngForOf",e.items)}}function I$(t,i){1&t&&_(0,k$,3,3,"ng-template",5),2&t&&p("ngForOf",d(2).model)}function E$(t,i){if(1&t&&k(0,"li",8),2&t){const e=d().$implicit;p("ngClass",z(1,Go,!1===e.visible))}}function R$(t,i){if(1&t&&k(0,"li",14),2&t){const e=d().$implicit;me(e.styleClass),p("pMenuItemContent",e)("ngClass",z(6,Go,!1===e.visible))("ngStyle",e.style)("tooltipOptions",e.tooltipOptions)}}function L$(t,i){if(1&t&&(_(0,E$,1,3,"li",6),_(1,R$,1,8,"li",13)),2&t){const e=i.$implicit;p("ngIf",e.separator),a(1),p("ngIf",!e.separator)}}function O$(t,i){1&t&&_(0,L$,2,2,"ng-template",5),2&t&&p("ngForOf",d(2).model)}const A$=function(t){return{"p-menu p-component":!0,"p-menu-overlay":t}},P$=function(t,i){return{showTransitionParams:t,hideTransitionParams:i}},F$=function(t){return{value:"visible",params:t}};function N$(t,i){if(1&t){const e=I();l(0,"div",1,2),C("click",function(s){return v(e),d().onOverlayClick(s)})("@overlayAnimation.start",function(s){return v(e),d().onOverlayAnimationStart(s)})("@overlayAnimation.done",function(s){return v(e),d().onOverlayAnimationEnd(s)}),l(2,"ul",3),_(3,I$,1,1,null,4),_(4,O$,1,1,null,4),c()()}if(2&t){const e=d();me(e.styleClass),p("ngClass",z(8,A$,e.popup))("ngStyle",e.style)("@overlayAnimation",z(13,F$,We(10,P$,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0!==e.popup),a(3),p("ngIf",e.hasSubMenu()),a(1),p("ngIf",!e.hasSubMenu())}}let V$=(()=>{class t{constructor(e){this.menu=e}onItemKeyDown(e){let n=e.currentTarget.parentElement;switch(e.code){case"ArrowDown":var s=this.findNextItem(n);s&&s.children[0].focus(),e.preventDefault();break;case"ArrowUp":var r=this.findPrevItem(n);r&&r.children[0].focus(),e.preventDefault();break;case"Space":case"Enter":n&&!L.hasClass(n,"p-disabled")&&n.children[0].click(),e.preventDefault()}}findNextItem(e){let n=e.nextElementSibling;return n?L.hasClass(n,"p-disabled")||!L.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null}findPrevItem(e){let n=e.previousElementSibling;return n?L.hasClass(n,"p-disabled")||!L.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null}}return t.\u0275fac=function(e){return new(e||t)(x(Ue(()=>tS)))},t.\u0275cmp=G({type:t,selectors:[["","pMenuItemContent",""]],hostAttrs:[1,"p-element"],inputs:{item:["pMenuItemContent","item"]},attrs:u$,decls:2,vars:2,consts:[["class","p-menuitem-link","role","menuitem",3,"target","ngClass","keydown","click",4,"ngIf"],["class","p-menuitem-link","role","menuitem","pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click",4,"ngIf"],["role","menuitem",1,"p-menuitem-link",3,"target","ngClass","keydown","click"],["class","p-menuitem-icon",3,"ngClass","class","ngStyle",4,"ngIf"],["class","p-menuitem-text",4,"ngIf","ngIfElse"],["htmlLabel",""],[1,"p-menuitem-icon",3,"ngClass","ngStyle"],[1,"p-menuitem-text"],[1,"p-menuitem-text",3,"innerHTML"],["role","menuitem","pRipple","",1,"p-menuitem-link",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","keydown","click"],["class","p-menuitem-icon",3,"ngClass",4,"ngIf"],["htmlRouteLabel",""],[1,"p-menuitem-icon",3,"ngClass"]],template:function(e,n){1&e&&(_(0,m$,5,13,"a",0),_(1,v$,5,22,"a",1)),2&e&&(p("ngIf",!n.item.routerLink),a(1),p("ngIf",n.item.routerLink))},directives:[Q,Oe,lt,Ho,vt,gd],encapsulation:2}),t})(),tS=(()=>{class t{constructor(e,n,s,r,o){this.el=e,this.renderer=n,this.cd=s,this.config=r,this.overlayService=o,this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new H,this.onHide=new H}toggle(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0}show(e){this.target=e.currentTarget,this.relativeAlign=e.relativeAlign,this.visible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.onShow.emit({}),this.appendOverlay(),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.onOverlayHide(),this.onHide.emit({})}}onOverlayAnimationEnd(e){"void"===e.toState&&this.autoZIndex&>.clear(e.element)}alignOverlay(){this.relativeAlign?L.relativePosition(this.container,this.target):L.absolutePosition(this.container,this.target)}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):L.appendChild(this.container,this.appendTo))}restoreOverlayAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}moveOnTop(){this.autoZIndex&>.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(){this.visible=!1,this.relativeAlign=!1,this.cd.markForCheck()}onWindowResize(){this.hide()}itemClick(e,n){n.disabled?e.preventDefault():(!n.url&&!n.routerLink&&e.preventDefault(),n.command&&n.command({originalEvent:e,item:n}),this.popup&&this.hide())}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.preventDocumentDefault=!0}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",()=>{this.preventDocumentDefault||this.hide(),this.preventDocumentDefault=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Qs(this.target,()=>{this.visible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&>.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide())}hasSubMenu(){if(this.model)for(var e of this.model)if(e.items)return!0;return!1}}return t.\u0275fac=function(e){return new(e||t)(x(Re),x(wn),x(ot),x(zn),x($s))},t.\u0275cmp=G({type:t,selectors:[["p-menu"]],viewQuery:function(e,n){if(1&e&&j(C$,5),2&e){let s;V(s=B())&&(n.containerViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{model:"model",popup:"popup",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},decls:1,vars:1,consts:[[3,"ngClass","class","ngStyle","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],["container",""],["role","menu",1,"p-menu-list","p-reset"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["class","p-menu-separator","role","separator",3,"ngClass",4,"ngIf"],["class","p-submenu-header","pTooltip","","role","none",3,"ngClass","tooltipOptions",4,"ngIf"],["role","separator",1,"p-menu-separator",3,"ngClass"],["pTooltip","","role","none",1,"p-submenu-header",3,"ngClass","tooltipOptions"],[4,"ngIf","ngIfElse"],["htmlSubmenuLabel",""],[3,"innerHTML"],["class","p-menuitem","pTooltip","","role","none",3,"pMenuItemContent","ngClass","ngStyle","class","tooltipOptions",4,"ngIf"],["pTooltip","","role","none",1,"p-menuitem",3,"pMenuItemContent","ngClass","ngStyle","tooltipOptions"]],template:function(e,n){1&e&&_(0,N$,5,15,"div",0),2&e&&p("ngIf",!n.popup||n.visible)},directives:[V$,Q,Oe,lt,at,Jt],styles:[".p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}\n"],encapsulation:2,data:{animation:[wi("overlayAnimation",[Ot(":enter",[it({opacity:0,transform:"scaleY(0.8)"}),kt("{{showTransitionParams}}")]),Ot(":leave",[kt("{{hideTransitionParams}}",it({opacity:0}))])])]},changeDetection:0}),t})(),B$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[Be,On,gn,ai],On,ai]}),t})(),zo=(()=>{class t{constructor(e){this.httpClient=e}GetDatabaseStatus(){return this.httpClient.get("/Config/GetDatabaseStatus")}SetDatabaseCredentials(e){return this.httpClient.post("/Config/SetDatabaseCredentials",e)}GetCountries(){return this.httpClient.get("/Config/GetCountries")}GetLanguages(){return this.httpClient.get("/Config/GetLanguages")}GetIPAddresses(e){let n=(new ye).set("Protocol",e);return this.httpClient.get("/Config/GetIPAddresses",{params:n})}GetSystemEvents(e){let n=new ye;return e&&n.set("Host",e),this.httpClient.get("/Config/GetSystemEvents",{params:n})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ut=(()=>{class t{constructor(e){this.httpClient=e}AddStorageGroupDir(e){return this.httpClient.post("/Myth/AddStorageGroupDir",e)}BackupDatabase(){return this.httpClient.post("/Myth/BackupDatabase",{body:void 0})}CheckDatabase(e){return this.httpClient.post("/Myth/CheckDatabase",e)}DelayShutdown(){return this.httpClient.post("Myth/DelayShutdown",{body:void 0})}GetBackendInfo(){return this.httpClient.get("/Myth/GetBackendInfo")}GetConnectionInfo(e){let n=(new ye).set("Pin",e);return this.httpClient.get("/Myth/GetConnectionInfo",{params:n})}GetFrontends(e){let n=(new ye).set("OnLine",e);return this.httpClient.get("/Myth/GetFrontends",{params:n})}GetHostName(){return this.httpClient.get("/Myth/GetHostName")}GetHosts(){return this.httpClient.get("/Myth/GetHosts")}GetKeys(){return this.httpClient.get("/Myth/GetKeys")}GetSetting(e){let n=(new ye).set("HostName",e.HostName).set("Key",e.Key).set("Default",e.Default?e.Default:"");return this.httpClient.get("/Myth/GetSetting",{params:n})}GetSettingList(e){let n=(new ye).set("HostName",e);return this.httpClient.get("/Myth/GetSettingList",{params:n})}GetStorageGroupDirs(e){return void 0===e||void 0===e.GroupName&&void 0===e.HostName?this.httpClient.get("/Myth/GetStorageGroupDirs"):this.httpClient.post("/Myth/GetStorageGroupDirs",e)}GetDirListing(e){let n=(new ye).set("DirName",e);return this.httpClient.get("/Myth/GetDirListing",{params:n})}GetTimeZone(){return this.httpClient.get("/Myth/GetTimeZone")}ManageDigestUser(e){return this.httpClient.post("/Myth/ManageDigestUser",e)}ManageUrlProtection(e){return this.httpClient.post("/Myth/ManageUrlProtection",e)}ProfileDelete(){return this.httpClient.post("/Myth/ProfileDelete",{body:void 0})}ProfileSubmit(){return this.httpClient.post("/Myth/ProfileSubmit",{body:void 0})}ProfileText(){return this.httpClient.get("/Myth/ProfileText")}ProfileURL(){return this.httpClient.get("/Myth/ProfileURL")}ProfileUpdated(){return this.httpClient.get("/Myth/ProfileUpdated")}PutSetting(e){return this.httpClient.post("/Myth/PutSetting",e)}DeleteSetting(e){return this.httpClient.post("/Myth/DeleteSetting",e)}RemoveStorageGroupDir(e){return this.httpClient.post("/Myth/RemoveStorageGroupDir",e)}SetConnectionInfo(e){return this.httpClient.post("/Myth/SetConnectionInfo",e)}TestDBSettings(e){return this.httpClient.post("/Myth/TestDBSettings",e)}ManageScheduler(e){return this.httpClient.post("/Myth/ManageScheduler",e)}Shutdown(e){return this.httpClient.post("/Myth/Shutdown",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Sd=(()=>{class t{constructor(e,n){this.configService=e,this.mythService=n,this.m_wizardData={Country:{Code:"",Country:"",NativeCountry:"",Image:""},Language:{Code:"",Language:"",NativeLanguage:"",Image:""},Database:{Host:"localhost",Port:3306,UserName:"mythtv",Password:"mythtv",Ping:!1,Name:"mythconverg",Type:"QMYSQL",LocalHostName:"my-unique-identifier-goes-here",LocalEnabled:!1,DoTest:!0,WOLEnabled:!1,WOLReconnect:0,WOLRetry:0,WOLCommand:""},DatabaseStatus:{DatabaseStatus:{Host:"",Port:0,UserName:"",Password:"",Ping:!1,Name:"",Type:"",LocalHostName:"",LocalEnabled:!1,Connected:!1,HaveDatabase:!1,SchemaVersion:0,WOLEnabled:!1,WOLReconnect:0,WOLRetry:0,WOLCommand:""}}},this.m_topElement=null,this.m_hostName="",this.m_languageSetting="",this.m_languages=[],this.m_countrySetting="",this.m_countries=[],this.fullMenu=[],this.dbSetupMenu=[],this.wizardItems=[],this.mythService.GetHostName().subscribe(s=>{this.m_hostName=s.String})}ngOnInit(){}Init(){this.initDatabaseStatus(),this.initLanguages()}getWizardData(){return this.Init(),this.m_wizardData}initDatabaseStatus(){this.dbPromise=new Promise((e,n)=>{this.configService.GetDatabaseStatus().subscribe(s=>{this.m_wizardData.DatabaseStatus=s,this.m_wizardData.Database.Host=s.DatabaseStatus.Host,this.m_wizardData.Database.Port=s.DatabaseStatus.Port,this.m_wizardData.Database.UserName=s.DatabaseStatus.UserName,this.m_wizardData.Database.Password=s.DatabaseStatus.Password,this.m_wizardData.Database.Name=s.DatabaseStatus.Name,this.m_wizardData.Database.LocalEnabled=s.DatabaseStatus.LocalEnabled,this.m_wizardData.Database.LocalHostName=s.DatabaseStatus.LocalHostName,this.m_wizardData.Database.WOLEnabled=s.DatabaseStatus.WOLEnabled,this.m_wizardData.Database.WOLReconnect=s.DatabaseStatus.WOLReconnect,this.m_wizardData.Database.WOLRetry=s.DatabaseStatus.WOLRetry,this.m_wizardData.Database.WOLCommand=s.DatabaseStatus.WOLCommand,e(!0)},s=>{console.log("Failed to get database status",s.statusText),n(!0)})})}initLanguages(){this.configService.GetCountries().subscribe(e=>{this.m_countries=e.CountryList.Countries,this.initCountry()}),this.configService.GetLanguages().subscribe(e=>{this.m_languages=e.LanguageList.Languages,this.initLanguage()})}initCountry(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"Country",Default:"US"}).subscribe(e=>{this.m_wizardData.Country=this.findCountryByCode(e.String)})}findCountryByCode(e){for(var n=0;n{this.m_wizardData.Language=this.findLanguageByCode(e.String)})}findLanguageByCode(e){for(var n=0;n{this.m_wizardData.DatabaseStatus=e},e=>{console.log("Failed to get database status",e.statusText)})}}return t.\u0275fac=function(e){return new(e||t)(K(zo),K(Ut))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),De=(()=>{class t{constructor(e,n){this.mythService=e,this.translate=n,this.m_hostName="",this.m_initialized=!1,this.requesterForm=null,this.m_HostAddressData={successCount:0,errorCount:0,thisHostName:this.m_hostName,BackendServerPort:6543,BackendStatusPort:6544,SecurityPin:"0000",AllowConnFromAll:!1,ListenOnAllIps:!0,BackendServerIP:"127.0.0.1",BackendServerIP6:"::1",AllowLinkLocal:!0,BackendServerAddr:"",IsMasterBackend:!0,MasterServerName:this.m_hostName},this.HostAddressObs={next:s=>{s.bool?this.m_HostAddressData.successCount++:(this.m_HostAddressData.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty())},error:s=>{console.error(s),this.m_HostAddressData.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty()}},this.JobQCommandsObs={next:s=>{s.bool?this.m_JobQCommands.successCount++:(this.m_JobQCommands.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty())},error:s=>{console.error(s),this.m_JobQCommands.errorCount++,this.requesterForm&&this.requesterForm.form.markAsDirty()}},this.currentForm=null,this.schedulingEnabled=!0,this.isDatabaseIgnored=!1,this.DBTimezoneSupport=!1,this.pageType=""}Init(){this.m_initialized=!0}getHostAddressData(){return this.mythService.GetHostName().subscribe({next:e=>{this.m_hostName=e.String,this.m_HostAddressData.thisHostName=this.m_hostName,this.m_HostAddressData.MasterServerName=this.m_hostName,this.getHostSettings()},error:()=>this.m_HostAddressData.errorCount++}),this.m_HostAddressData}getHostSettings(){this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerPort",Default:"6543"}).subscribe({next:e=>this.m_HostAddressData.BackendServerPort=Number(e.String),error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendStatusPort",Default:"6544"}).subscribe({next:e=>this.m_HostAddressData.BackendStatusPort=Number(e.String),error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"SecurityPin",Default:"0000"}).subscribe({next:e=>this.m_HostAddressData.SecurityPin=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"AllowConnFromAll",Default:"0"}).subscribe({next:e=>this.m_HostAddressData.AllowConnFromAll="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"ListenOnAllIps",Default:"1"}).subscribe({next:e=>this.m_HostAddressData.ListenOnAllIps="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerIP"}).subscribe({next:e=>this.m_HostAddressData.BackendServerIP=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerIP6"}).subscribe({next:e=>this.m_HostAddressData.BackendServerIP6=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"UseLinkLocal"}).subscribe({next:e=>this.m_HostAddressData.AllowLinkLocal="1"==e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:this.m_hostName,Key:"BackendServerAddr"}).subscribe({next:e=>this.m_HostAddressData.BackendServerAddr=e.String,error:()=>this.m_HostAddressData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Default:this.m_hostName}).subscribe({next:e=>{this.m_HostAddressData.MasterServerName=e.String,this.m_HostAddressData.IsMasterBackend=this.m_HostAddressData.MasterServerName==this.m_hostName},error:()=>this.m_HostAddressData.errorCount++})}saveHostAddressData(e){this.requesterForm=e,this.m_HostAddressData.successCount=0,this.m_HostAddressData.errorCount=0,this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerPort",Value:String(this.m_HostAddressData.BackendServerPort)}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendStatusPort",Value:String(this.m_HostAddressData.BackendStatusPort)}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"SecurityPin",Value:this.m_HostAddressData.SecurityPin}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"AllowConnFromAll",Value:this.m_HostAddressData.AllowConnFromAll?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"ListenOnAllIps",Value:this.m_HostAddressData.ListenOnAllIps?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerIP",Value:this.m_HostAddressData.BackendServerIP}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerIP6",Value:this.m_HostAddressData.BackendServerIP6}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"AllowLinkLocal",Value:this.m_HostAddressData.AllowLinkLocal?"1":"0"}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:this.m_hostName,Key:"BackendServerAddr",Value:this.m_HostAddressData.BackendServerAddr}).subscribe(this.HostAddressObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Value:this.m_HostAddressData.MasterServerName}).subscribe(this.HostAddressObs)}getLocaleData(){return this.m_LocaleData={successCount:0,errorCount:0,TVFormat:"PAL",VbiFormat:"None",FreqTable:"us-bcast"},this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"TVFormat"}).subscribe({next:e=>this.m_LocaleData.TVFormat=e.String,error:()=>this.m_LocaleData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"VbiFormat"}).subscribe({next:e=>this.m_LocaleData.VbiFormat=e.String,error:()=>this.m_LocaleData.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"FreqTable"}).subscribe({next:e=>this.m_LocaleData.FreqTable=e.String,error:()=>this.m_LocaleData.errorCount++}),this.m_LocaleData}getSetupData(){return this.getHostAddressData(),this.getLocaleData(),this.m_setupData={General:{HostAddress:this.m_HostAddressData,Locale:this.m_LocaleData}},this.m_setupData}parseTime(e,n){let s=n.split(":");e.setHours(Number(s[0])),e.setMinutes(Number(s[1]))}formatTime(e){let n=e.getHours(),s=e.getMinutes(),r="";return n<10&&(r+="0"),r+=String(n),r+=":",s<10&&(r+="0"),r+=String(s),r}getJobQCommands(){if("object"==typeof this.m_JobQCommands)return this.m_JobQCommands;this.m_JobQCommands={successCount:0,errorCount:0,UserJobDesc:[],UserJob:[]};for(let e=0;e<4;e++){let n=e+1;this.translate.get("settings.services.job_default",{num:n}).subscribe(s=>this.m_JobQCommands.UserJobDesc[e]=s),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+n,Default:""}).subscribe({next:s=>{s.String&&s.String.length>0&&(this.m_JobQCommands.UserJobDesc[e]=s.String)},error:()=>this.m_JobQCommands.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJob"+n,Default:""}).subscribe({next:s=>this.m_JobQCommands.UserJob[e]=s.String,error:()=>this.m_JobQCommands.errorCount++})}return this.m_JobQCommands}saveJobQCommands(e){this.requesterForm=e,this.m_JobQCommands.successCount=0,this.m_JobQCommands.errorCount=0;for(let n=0;n<4;n++){let s=n+1;this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+s,Value:this.m_JobQCommands.UserJobDesc[n]}).subscribe(this.JobQCommandsObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UserJob"+s,Value:this.m_JobQCommands.UserJob[n]}).subscribe(this.JobQCommandsObs)}}getCurrentForm(){return this.currentForm}setCurrentForm(e){this.currentForm=e}}return t.\u0275fac=function(e){return new(e||t)(K(Ut),K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),jo=(()=>{class t{constructor(e){this.httpClient=e}AddDontRecordSchedule(e){return this.httpClient.post("/Dvr/AddDontRecordSchedule",e)}AddRecordSchedule(e){return this.httpClient.post("/Dvr/AddRecordSchedule",e)}UpdateRecordSchedule(e){return this.httpClient.post("/Dvr/UpdateRecordSchedule",e)}RemoveRecordSchedule(e){return this.httpClient.post("/Dvr/RemoveRecordSchedule",{RecordId:e})}AddRecordedCredits(e){return this.httpClient.post("/Dvr/AddRecordedCredits",e)}AddRecordedProgram(e){return this.httpClient.post("/Dvr/AddRecordedProgram",e)}AllowReRecord(e){return this.httpClient.post("/Dvr/AllowReRecord",{RecordedId:e})}DeleteRecording(e){return this.httpClient.post("/Dvr/DeleteRecording",e)}UnDeleteRecording(e){return this.httpClient.post("/Dvr/UnDeleteRecording",e)}UpdateRecordedMetadata(e){return this.httpClient.post("/Dvr/UpdateRecordedMetadata",e)}DisableRecordSchedule(e){return this.httpClient.post("/Dvr/DisableRecordSchedule",{RecordId:e})}DupInToDescription(e){let n=(new ye).set("DupIn",e);return this.httpClient.get("/Dvr/DupInToDescription",{params:n})}DupInToString(e){let n=(new ye).set("DupIn",e);return this.httpClient.get("/Dvr/DupInToString",{params:n})}DupMethodToDescription(e){let n=(new ye).set("DupMethod",e);return this.httpClient.get("/Dvr/DupMethodToDescription",{params:n})}DupMethodToString(e){let n=(new ye).set("DupMethod",e);return this.httpClient.get("/Dvr/DupMethodToString",{params:n})}EnableRecordSchedule(e){return this.httpClient.post("/Dvr/EnableRecordSchedule",e)}GetConflictList(e){let n=(new ye).set("StartIndex",e.StartIndex).set("Count",e.Count).set("RecordId",e.RecordId);return this.httpClient.get("/Dvr/GetConflictList",{params:n})}GetEncoderList(){return this.httpClient.get("/Dvr/GetEncoderList")}GetExpiringList(e){let n=(new ye).set("StartIndex",e.StartIndex).set("Count",e.Count);return this.httpClient.get("/Dvr/GetExpiringList",{params:n})}GetInputList(){return this.httpClient.get("/Dvr/GetInputList")}GetLastPlayPos(e){let n=(new ye).set("RecordedId",e.RecordedId).set("ChanId",e.ChanId).set("StartTime",e.StartTime).set("OffsetType",e.OffsetType);return this.httpClient.get("/Dvr/GetLastPlayPos",{params:n})}GetOldRecordedList(e){let n=(new ye).set("Descending",e.Descending).set("StartIndex",e.StartIndex).set("Count",e.Count).set("StartTime",e.StartTime).set("EndTime",e.EndTime).set("Title",e.Title).set("SeriesId",e.SeriesId).set("RecordId",e.RecordId).set("Sort",e.Sort);return this.httpClient.get("/Dvr/GetOldRecordedList",{params:n})}GetPlayGroupList(){return this.httpClient.get("/Dvr/GetPlayGroupList")}GetProgramCategories(e){return(new ye).set("OnlyRecorded",e),this.httpClient.get("/Dvr/GetProgramCategories")}GetRecGroupList(){return this.httpClient.get("/Dvr/GetRecGroupList")}GetRecRuleFilterList(){return this.httpClient.get("/Dvr/GetRecRuleFilterList")}GetRecStorageGroupList(){return this.httpClient.get("/Dvr/GetRecStorageGroupList")}GetRecordSchedule(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordSchedule",{params:n})}GetRecordScheduleList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordScheduleList",{params:n})}GetRecorded(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecorded",{params:n})}GetRecordedList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetRecordedList",{params:n})}GetUpcomingList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Dvr/GetUpcomingList",{params:n})}RecStatusToString(e){let n=(new ye).set("RecStatus",e);return this.httpClient.get("/Dvr/RecStatusToString",{params:n})}ManageJobQueue(e){return this.httpClient.post("/Dvr/ManageJobQueue",e)}StopRecording(e){return this.httpClient.post("/Dvr/StopRecording",{RecordedId:e})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function H$(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-button",10),C("onClick",function(){return v(e),d().disableSched()}),m(3,"translate"),c()(),l(4,"div",9),g(5),m(6,"translate"),c()()}2&t&&(a(2),D("label",f(3,2,"settings.main.enableupdates_label")),a(3),S(f(6,4,"settings.main.enableupdates_desc")))}function q$(t,i){1&t&&(l(0,"div",9)(1,"div",12),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.main.restart_desc")))}function U$(t,i){1&t&&(l(0,"div",9),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"settings.main.slave_enabled"),""))}function G$(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-button",10),C("onClick",function(){return v(e),d().restart()}),m(3,"translate"),c()(),_(4,q$,4,3,"div",11),_(5,U$,3,3,"div",11),c()}if(2&t){const e=d();a(2),D("label",f(3,3,"settings.main.restart_label")),a(2),p("ngIf",!e.masterServerName||!e.hostName||e.masterServerName==e.hostName),a(1),p("ngIf",e.masterServerName&&e.hostName&&e.masterServerName!=e.hostName)}}const z$=function(t,i,e){return{Title:t,StartTime:i,Status:e}};function j$(t,i){if(1&t&&(l(0,"small",13),g(1),m(2,"translate"),c()),2&t){const e=d();a(1),T(" ",Dt(2,1,"settings.main.upcomingrec",Rt(4,z$,e.upComing[0].Title,e.recStartTime,e.recStatusDesc))," ")}}function $$(t,i){1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"p"),g(5),m(6,"translate"),c()()),2&t&&(a(2),T("",f(3,2,"settings.main.slave_instructions")," "),a(3),T("",f(6,4,"settings.main.slave_warning")," "))}function W$(t,i){1&t&&k(0,"p-progressSpinner")}function K$(t,i){1&t&&(k(0,"p-message",14),m(1,"translate")),2&t&&D("text",f(1,1,"settings.main.restarting"))}function Q$(t,i){1&t&&(k(0,"p-message",15),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}let J$=(()=>{class t{constructor(e,n,s,r){this.mythService=e,this.setupService=n,this.dvrService=s,this.wizardService=r,this.errorCount=0,this.retryCount=0,this.upComing=[],this.recStatusDesc="",this.recStartTime="",this.ready=!1,this.delay=0,this.busy=!1,this.hostName="",this.masterServerName="",this.getBackendInfo(),this.refreshInfo()}refreshInfo(){setTimeout(()=>{this.getBackendInfo(),this.refreshInfo()},12e4)}getBackendInfo(){0==this.retryCount&&(this.errorCount=0),this.ready=!1,this.recStatusDesc="",this.recStartTime="",this.upComing=[],this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterServerName",Default:this.hostName}).subscribe({next:n=>{this.masterServerName=n.String},error:()=>this.errorCount++})},error:()=>this.errorCount++}),this.mythService.GetBackendInfo().subscribe({next:e=>{this.setupService.schedulingEnabled=e.BackendInfo.Env.SchedulingEnabled,this.setupService.isDatabaseIgnored=e.BackendInfo.Env.IsDatabaseIgnored,this.setupService.DBTimezoneSupport=e.BackendInfo.Env.DBTimezoneSupport,this.wizardService.wizardItems=this.setupService.isDatabaseIgnored?this.wizardService.dbSetupMenu:this.wizardService.fullMenu,this.wizardService.getWizardData(),this.retryCount>0&&this.errorCount>0?(this.retryCount=0,this.errorCount=0):this.retryCount>0&&0==this.errorCount&&setTimeout(()=>this.getBackendInfo(),2e3),0==this.retryCount&&(setTimeout(()=>this.getUpcoming(),this.delay),this.delay=0)},error:()=>{this.setupService.schedulingEnabled=!0,this.errorCount++,this.errorCountthis.getBackendInfo(),2e3):this.retryCount=0}})}getUpcoming(){this.errorCount=0,this.dvrService.GetUpcomingList({Count:1}).subscribe({next:e=>{if(this.upComing=e.ProgramList.Programs,this.ready=!0,this.upComing.length>0){this.dvrService.RecStatusToString(this.upComing[0].Recording.Status).subscribe({next:s=>this.recStatusDesc=s.String,error:()=>this.errorCount++});var n=new Date(this.upComing[0].Recording.StartTs);this.recStartTime=n.toLocaleString()}},error:()=>this.errorCount++})}disableSched(){this.mythService.ManageScheduler({Disable:!0}).subscribe({next:e=>this.getBackendInfo(),error:()=>this.errorCount++})}restart(){this.mythService.Shutdown({Restart:!0}).subscribe({next:e=>{e.bool?(this.retryCount=12,this.getBackendInfo()):this.errorCount++},error:()=>this.errorCount++}),this.delay=5e3}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(De),x(jo),x(Sd))},t.\u0275cmp=G({type:t,selectors:[["app-backend-warning"]],decls:13,vars:7,consts:[[1,"block","card","w-full"],[1,"block"],[1,"m-5"],["class","flex",4,"ngIf"],["class","pb-0 m-0",4,"ngIf"],[4,"ngIf"],["severity","info",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],[1,"flex"],[1,"flex","align-items-center"],["icon","pi pi-save","iconPos","left",1,"pr-5","pb-1","pt-0","m-0",3,"label","onClick"],["class","flex align-items-center",4,"ngIf"],[1,"text-pink-500"],[1,"pb-0","m-0"],["severity","info",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1)(2,"p-card",2),_(3,H$,7,6,"div",3),_(4,G$,6,5,"div",3),l(5,"div"),_(6,j$,3,8,"small",4),c(),_(7,$$,7,6,"div",5),l(8,"div"),_(9,W$,1,0,"p-progressSpinner",5),_(10,K$,2,3,"p-message",6),l(11,"p"),_(12,Q$,2,3,"p-message",7),c()()()()()),2&e&&(a(3),p("ngIf",n.setupService.schedulingEnabled&&0==n.retryCount),a(1),p("ngIf",!n.setupService.schedulingEnabled&&0==n.retryCount),a(2),p("ngIf",n.upComing.length>0),a(1),p("ngIf",n.masterServerName&&n.hostName&&n.masterServerName!=n.hostName&&0==n.retryCount),a(2),p("ngIf",n.retryCount>0),a(1),p("ngIf",n.retryCount>0),a(2),p("ngIf",!n.setupService.isDatabaseIgnored&&n.errorCount>0&&0==n.retryCount))},directives:[Pe,Q,ve,Uo,qe],pipes:[de],styles:[""]}),t})();const Y$=["top"];let nS=(()=>{class t{constructor(e,n,s){this.wizardService=e,this.setupService=n,this.translate=s,this.fullMenu=[],this.dbSetupMenu=[],this.activeIndex=0,n.pageType="S"}ngOnInit(){this.translate.get("setupwizard.steps.selectlanguage").subscribe(e=>{this.fullMenu=[{label:this.translate.instant("setupwizard.steps.dbsetup"),routerLink:"dbsetup"},{label:this.translate.instant("setupwizard.steps.selectlanguage"),routerLink:"selectlanguage"},{label:this.translate.instant("setupwizard.steps.general"),routerLink:"general"},{label:this.translate.instant("setupwizard.steps.capture_cards"),routerLink:"capture-cards"},{label:this.translate.instant("setupwizard.steps.recording_profiles"),routerLink:"recording-profiles"},{label:this.translate.instant("setupwizard.steps.video_sources"),routerLink:"video-sources"},{label:this.translate.instant("setupwizard.steps.input_connections"),routerLink:"input-connections"},{label:this.translate.instant("setupwizard.steps.channel_editor"),routerLink:"channel-editor"},{label:this.translate.instant("setupwizard.steps.storage_groups"),routerLink:"storage-groups"},{label:this.translate.instant("setupwizard.steps.system_events"),routerLink:"system-events"}],this.wizardService.fullMenu=this.fullMenu,this.activeItem=this.fullMenu[0],this.dbSetupMenu=[this.fullMenu[0]],this.wizardService.dbSetupMenu=this.dbSetupMenu,this.wizardService.wizardItems=this.wizardService.fullMenu})}ngAfterViewInit(){this.wizardService.m_topElement=this.topElement}}return t.\u0275fac=function(e){return new(e||t)(x(Sd),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-settings"]],viewQuery:function(e,n){if(1&e&&j(Y$,5),2&e){let s;V(s=B())&&(n.topElement=s.first)}},decls:17,vars:12,consts:[["top",""],[1,"content-section","implementation"],[1,"card"],[1,"flex","flex-row"],["pButton","","pRipple","","icon","pi pi-angle-double-left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-11"],[3,"model","activeItem","scrollable"],["menu",""],["pButton","","pRipple","","icon","pi pi-angle-double-right",1,"p-button-text","p-button-primary",3,"pTooltip","click"]],template:function(e,n){if(1&e){const s=I();k(0,"span",null,0),l(2,"div",1)(3,"h1"),g(4),m(5,"translate"),c(),l(6,"div",2)(7,"div",3)(8,"button",4),C("click",function(){return v(s),F(12).navBackward()}),m(9,"translate"),c(),l(10,"div",5),k(11,"p-tabMenu",6,7),c(),l(13,"button",8),C("click",function(){return v(s),F(12).navForward()}),m(14,"translate"),c()()(),k(15,"app-backend-warning")(16,"router-outlet"),c()}2&e&&(a(4),S(f(5,6,"settings.main.title")),a(4),D("pTooltip",f(9,8,"dashboard.scrolltabsleft")),a(3),p("model",n.wizardService.wizardItems)("activeItem",n.activeItem)("scrollable",!1),a(2),D("pTooltip",f(14,10,"dashboard.scrolltabsright")))},directives:[Ln,vt,Jt,W2,J$,Ml],pipes:[de],styles:['.warning[_ngcontent-%COMP%]{color:#cc8925;background-color:#fff2e2}.connected[_ngcontent-%COMP%]{color:#1ea97c;background-color:#e4f8f0}.medium-width[_ngcontent-%COMP%]{width:"600"}']}),t})();function Z$(t,i){if(1&t){const e=I();l(0,"div"),k(1,"h1"),l(2,"div",1)(3,"button",2),C("click",function(){return v(e),F(7).navBackward()}),m(4,"translate"),c(),l(5,"div",3),k(6,"p-tabMenu",4,5),c(),l(8,"button",6),C("click",function(){return v(e),F(7).navForward()}),m(9,"translate"),c()(),k(10,"router-outlet"),c()}if(2&t){const e=d();a(3),D("pTooltip",f(4,5,"dashboard.scrolltabsleft")),a(3),p("model",e.fullMenu)("activeItem",e.activeItem)("scrollable",!1),a(2),D("pTooltip",f(9,7,"dashboard.scrolltabsright"))}}let iS=(()=>{class t{constructor(e,n){this.translate=e,this.setupService=n,this.translateDone=!1,this.fullMenu=[{label:"dashboard.backendStatus",routerLink:"status"},{label:"dashboard.channeleditor",routerLink:"channel-editor"},{label:"dashboard.programguide",routerLink:"program-guide"},{label:"dashboard.recordings.heading",routerLink:"recordings"},{label:"dashboard.upcoming.heading",routerLink:"upcoming"},{label:"dashboard.recrules.heading",routerLink:"recrules"},{label:"dashboard.videos.heading",routerLink:"videos"}],this.activeItem=this.fullMenu[0],n.pageType="D",this.fullMenu.forEach(s=>{s.label&&this.translate.get(s.label).subscribe(r=>{s.label=r,this.translateDone=!0})})}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-dashboard"]],decls:1,vars:1,consts:[[4,"ngIf"],[1,"flex","flex-row"],["pButton","","pRipple","","icon","pi pi-angle-double-left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-11"],[3,"model","activeItem","scrollable"],["menu",""],["pButton","","pRipple","","icon","pi pi-angle-double-right",1,"p-button-text","p-button-primary",3,"pTooltip","click"]],template:function(e,n){1&e&&_(0,Z$,11,9,"div",0),2&e&&p("ngIf",n.translateDone)},directives:[Q,Ln,vt,Jt,W2,Ml],pipes:[de],styles:["[_nghost-%COMP%] .dark-panel.p-panel .p-panel-header{background:#c0c0c0}"]}),t})(),zi=(()=>{class t{constructor(){}canDeactivate(e,n,s,r){return!e.canDeactivate||e.canDeactivate()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const X$=[{path:"dashboard",component:iS},{path:"setupwizard",component:nS}];let eW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({providers:[zi],imports:[[On.forRoot(X$)],On]}),t})(),tW=(()=>{class t{constructor(e,n){this.http=e,this.document=n}switchTheme(e){let n=this.document.getElementById("app-theme");n&&(n.href="assets/themes/"+e)}getThemes(){return this.http.get("assets/themes/themes.json").toPromise().then(e=>e.data).then(e=>e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi),K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ll=(()=>{class t{constructor(e){this.translate=e,this.m_showSidebar=!0,this.recStatusText={Pending:"",Failing:"",MissedFuture:"",Tuning:"",Failed:"",TunerBusy:"",LowDiskSpace:"",Cancelled:"",Missed:"",Aborted:"",Recorded:"",Recording:"",WillRecord:"",Unknown:"",DontRecord:"",PreviousRecording:"",CurrentRecording:"",EarlierShowing:"",TooManyRecordings:"",NotListed:"",Conflict:"",LaterShowing:"",Repeat:"",Inactive:"",NeverRecord:"",Offline:""},this.getTranslations()}getTranslations(){for(const[e,n]of Object.entries(this.recStatusText))this.translate.get("data.recstatus."+e).subscribe(s=>{Object.defineProperty(this.recStatusText,e,{value:s})})}toggleShowSidebar(){this.m_showSidebar=!this.m_showSidebar}showSidebar(e){this.m_showSidebar=e}}return t.\u0275fac=function(e){return new(e||t)(K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function nW(t,i){if(1&t&&(l(0,"div"),k(1,"img",26),c()),2&t){const e=d(2);a(1),Bn("src","images/themes/",e.m_selectedTheme.Image,"",Xt)}}function iW(t,i){if(1&t&&(l(0,"div"),k(1,"img",27),c()),2&t){const e=d(2);a(1),Bn("src","images/locale/",e.m_selectedLanguage.Image,"",Xt)}}function sW(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"a",9),C("click",function(){return v(e),d().toggleShowSidebar()}),k(3,"i",10)(4,"span",11),c(),k(5,"img",12),l(6,"div",13)(7,"h1"),g(8),m(9,"translate"),c()()(),l(10,"div",14)(11,"button",15),C("click",function(){return v(e),d().showTopBar=!1}),m(12,"translate"),c()(),l(13,"div",16)(14,"a",17),C("click",function(){return v(e),d().toggleShowNavbar()}),k(15,"i",18)(16,"span",11),c(),l(17,"ul",19)(18,"li",20)(19,"a",21),C("click",function(s){return v(e),d(),F(5).toggle(s)}),m(20,"translate"),_(21,nW,2,1,"div",22),l(22,"span",23),g(23),m(24,"translate"),c(),k(25,"span",24),c()(),l(26,"li",20)(27,"a",25),C("click",function(s){return v(e),d(),F(8).toggle(s)}),m(28,"translate"),_(29,iW,2,1,"div",22),l(30,"span",23),g(31),m(32,"translate"),c(),k(33,"span",24),c()()()()()}if(2&t){const e=d();a(8),S(f(9,9,"navbar.mainheading")),a(3),D("pTooltip",f(12,11,"navbar.hide")),a(6),p("hidden",e.m_showNavbar),a(2),D("pTooltip",f(20,13,"navbar.switchTheme")),a(2),p("ngIf",e.m_selectedTheme),a(2),S(f(24,15,"navbar.switchTheme")),a(4),D("pTooltip",f(28,17,"navbar.changeLanguage")),a(2),p("ngIf",e.m_selectedLanguage),a(2),S(f(32,19,"navbar.changeLanguage"))}}function rW(t,i){if(1&t){const e=I();l(0,"div",28)(1,"button",29),C("click",function(){return v(e),d().showTopBar=!0}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"navbar.show")))}function oW(t,i){if(1&t&&(l(0,"tr",33)(1,"td",34)(2,"span",35),g(3),c()()()),2&t){const e=i.$implicit;a(3),S(e.Category)}}function aW(t,i){if(1&t){const e=I();l(0,"tr",36),C("click",function(){const r=v(e).$implicit;return d(2).changeTheme(r)}),l(1,"td",37),k(2,"img",38),c(),l(3,"td"),g(4),c()()}if(2&t){const n=i.$implicit;p("pSelectableRow",i.$implicit),a(2),Bn("src","images/themes/",n.Image,"",Xt),p("alt",n.image),a(2),S(n.Name)}}function lW(t,i){1&t&&(l(0,"p-table",30),_(1,oW,4,1,"ng-template",31),_(2,aW,5,4,"ng-template",32),c()),2&t&&p("value",d().m_themes$)("paginator",!1)("scrollable",!0)}function cW(t,i){if(1&t){const e=I();l(0,"tr",36),C("click",function(){const r=v(e).$implicit,o=d(2);return F(8).hide(),o.changeLanguage(r)}),l(1,"td",37),k(2,"img",38),c(),l(3,"td")(4,"pre")(5,"span",40),g(6),c(),k(7,"br"),g(8),c()()()}if(2&t){const n=i.$implicit;p("pSelectableRow",i.$implicit),a(2),Bn("src","images/locale/",n.Image,"",Xt),p("alt",n.image),a(4),S(n.Language),a(2),T("",n.NativeLanguage," ")}}function uW(t,i){1&t&&(l(0,"p-table",39),_(1,cW,9,5,"ng-template",32),c()),2&t&&p("value",d().m_languages)("paginator",!1)("scrollable",!0)}const dW=function(){return{width:"350px"}},pW=function(){return{width:"450px"}};let hW=(()=>{class t{constructor(e,n,s,r,o,u,h){this.themeService=e,this.configService=n,this.translateService=s,this.primeconfigService=r,this.dataService=o,this.mythService=u,this.router=h,this.m_showNavbar=!0,this.showTopBar=!0,this.m_devMode=function zR(){return ZC=!0,YC}(),this.m_haveDatabase=!0,this.themeService.getThemes().then(b=>{this.m_themes$=b,this.m_selectedTheme=this.findThemeByName(localStorage.getItem("Theme")||"Indigo Light"),this.themeService.switchTheme(this.m_selectedTheme.CSS)}),this.configService.GetLanguages().subscribe(b=>{this.m_languages=b.LanguageList.Languages,this.m_selectedLanguage=this.findLanguageByCode(localStorage.getItem("Language")||"en_US")}),this.mythService.GetBackendInfo().subscribe(b=>{var y=this.router.url;b.BackendInfo.Env.IsDatabaseIgnored||!b.BackendInfo.Env.SchedulingEnabled&&!y.startsWith("/setupwizard/")?h.navigate(["setupwizard/dbsetup"]):"/"==y&&h.navigate(["dashboard/status"])})}ngOnInit(){}findThemeByName(e){for(var n=0;nthis.primeconfigService.setTranslation(n))}toggleShowNavbar(){this.m_showNavbar=!this.m_showNavbar}toggleShowSidebar(){this.dataService.toggleShowSidebar()}}return t.\u0275fac=function(e){return new(e||t)(x(tW),x(zo),x(Le),x(zn),x(Ll),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-navbar"]],decls:10,vars:10,consts:[[1,"flex","flex-column","relative","flex-auto"],["class","toolbar flex justify-content-between align-items-center pm-8 surface-section relative lg:static surface-border","style","height: 80px;",4,"ngIf","ngIfElse"],["hidden",""],[3,"showCloseIcon"],["themePanel",""],["pTemplate",""],["languagePanel",""],[1,"toolbar","flex","justify-content-between","align-items-center","pm-8","surface-section","relative","lg:static","surface-border",2,"height","80px"],[1,"toolbar","flex","align-items-left","flex-shrink-0",2,"height","80px"],["pRipple","",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-3","lg:hidden","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"click"],[1,"pi","pi-bars","mr-1","lg:ml-1","text-base","lg:text-xl"],["ng","","serve","",1,"p-ink"],["src","images/mythtv.png","alt","Image","height","80",1,"py-2","pl-1"],[1,"hidden","md:inline-flex"],[1,"toolbar","flex","flex-grow-1","align-items-end",2,"height","80px"],["pButton","","pRipple","","icon","pi pi-angle-up",1,"p-button-text","lg:col-offset-3","p-button-secondary",3,"pTooltip","click"],[1,"pr-2","toolbar",2,"height","80px"],["pRipple","",1,"toolbar","p-ripple","p-element","my-2","mx-2","flex","align-items-center","cursor-pointer","p-3","md:hidden","md:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",2,"height","80px",3,"click"],[1,"pi","pi-ellipsis-v","mr-1","md:mr-0","text-base","md:text-xl"],[1,"toolbar","list-none","p-0","m-0","md:flex","md:align-items-center","select-none","md:flex-row","surface-section","border-1","md:border-none","surface-border","right-0","top-100","z-2","shadow-2","md:shadow-none","absolute","md:static",3,"hidden"],[1,"toolbar",2,"height","80px"],["pRipple","","tooltipPosition","bottom",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-2","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"pTooltip","click"],[4,"ngIf"],[1,"font-medium","inline","md:hidden"],[1,"p-ink"],["pRipple","","tooltipPosition","bottom",1,"p-ripple","p-element","my-3","mx-1","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-300","hover:text-0","transition-duration-150","transition-colors",3,"pTooltip","click"],[1,"mr-2","lg:mr-0",2,"width","32px","height","32px",3,"src"],[1,"mr-2","lg:mr-0",2,"width","32px",3,"src"],[1,"toolbar","block","flex","flex-grow-1","justify-content-center","align-items-end",2,"height","2rem"],["pButton","","pRipple","","icon","pi pi-angle-down",1,"p-button-text","p-button-secondary",3,"pTooltip","click"],["selectionMode","single","sortField","Name","sortMode","single","scrollHeight","500px","rowGroupMode","subheader","groupRowsBy","Category","responsiveLayout","scroll",3,"value","paginator","scrollable"],["pTemplate","groupheader"],["pTemplate","body"],["pRowGroupHeader",""],["colspan","2"],[1,"font-bold","ml-2"],[3,"pSelectableRow","click"],[2,"max-width","80px"],[1,"theme-image",3,"src","alt"],["selectionMode","single","sortField","NativeLanguage","sortMode","single","scrollHeight","500px","responsiveLayout","scroll",3,"value","paginator","scrollable"],[1,"font-bold"]],template:function(e,n){if(1&e&&(l(0,"div",0),_(1,sW,34,21,"div",1),_(2,rW,3,3,"ng-template",null,2,we),c(),l(4,"p-overlayPanel",3,4),_(6,lW,3,3,"ng-template",5),c(),l(7,"p-overlayPanel",3,6),_(9,uW,2,3,"ng-template",5),c()),2&e){const s=F(3);a(1),p("ngIf",n.showTopBar)("ngIfElse",s),a(3),q(A(8,dW)),p("showCloseIcon",!0),a(3),q(A(9,pW)),p("showCloseIcon",!0)}},directives:[Q,vt,Ln,Jt,V9,ie,xn,yG,wG],pipes:[de],styles:[".toolbar[_ngcontent-%COMP%]{background-color:#000;color:#4682b4}.theme-image[_ngcontent-%COMP%]{width:50px}"]}),t})(),mW=(()=>{class t{constructor(e){this.dataService=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(Ll))},t.\u0275cmp=G({type:t,selectors:[["app-sidenav"]],decls:32,vars:25,consts:[[1,"navbar","flex","relative","lg:static","surface-ground"],["id","sidebar",1,"bg-gray-900","lg:block","flex-shrink-0","absolute","lg:static","left-0","top-0","z-2","border-gray-800","w-18rem","lg:w-5rem","select-none",3,"hidden"],[1,"flex","flex-column","h-full"],[1,"mt-1","select-none"],[1,"list-none","p-3","lg:py-3","lg:px-2","m-0"],[3,"routerLink","pTooltip","tooltipDisabled","click"],["pRipple","",1,"p-ripple","p-element","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-gray-300","hover:text-white","transition-duration-150","transition-colors"],[1,"pi","pi-home","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"font-medium","inline","lg:hidden"],[1,"p-ink"],["pRipple","",1,"p-element","flex","align-items-center","cursor-pointer","p-3","lg:justify-content-center","hover:bg-gray-800","border-round","text-gray-300","hover:text-white","transition-duration-150","transition-colors"],[1,"pi","pi-cog","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"pi","pi-map","mr-2","lg:mr-0","text-base","lg:text-xl"],[1,"contentarea","px-0","lg:px-3","w-full"]],template:function(e,n){1&e&&(ce(0),l(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"ul",4)(6,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(7,"translate"),l(8,"a",6),k(9,"i",7),l(10,"span",8),g(11),m(12,"translate"),c(),k(13,"span",9),c()(),l(14,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(15,"translate"),l(16,"a",10),k(17,"i",11),l(18,"span",8),g(19),m(20,"translate"),c(),k(21,"span",9),c()(),l(22,"li",5),C("click",function(){return n.dataService.showSidebar(!0)}),m(23,"translate"),l(24,"a",10),k(25,"i",12),l(26,"span",8),g(27),m(28,"translate"),c(),k(29,"span",9),c()()()()()(),l(30,"div",13),k(31,"router-outlet"),c()(),ue()),2&e&&(a(2),p("hidden",n.dataService.m_showSidebar),a(4),D("pTooltip",f(7,13,"navbar.dashboard")),p("routerLink","dashboard/status")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(12,15,"navbar.dashboard")),a(3),D("pTooltip",f(15,17,"navbar.backendSetup")),p("routerLink","setupwizard/dbsetup")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(20,19,"navbar.backendSetup")),a(3),D("pTooltip",f(23,21,"dashboard.programguide")),p("routerLink","dashboard/program-guide")("tooltipDisabled",!1===n.dataService.m_showSidebar),a(5),S(f(28,23,"dashboard.programguide")))},directives:[fd,Jt,vt,Ml],pipes:[de],styles:[".sidebar[_ngcontent-%COMP%]{width:70px;height:100%;margin:0}.navbar[_ngcontent-%COMP%]{min-height:calc(100vh - 85px);max-height:calc(100vh - 85px)}.contentarea[_ngcontent-%COMP%]{overflow:scroll;height:calc(100vh - 85px)}"]}),t})(),fW=(()=>{class t{constructor(e,n){this.config=e,this.translate=n,this.title="MythTV Backend",n.setDefaultLang("en_US"),n.use(localStorage.getItem("Language")||"en_US"),n.get("primeng").subscribe(s=>this.config.setTranslation(s)),this.config.ripple=!0}}return t.\u0275fac=function(e){return new(e||t)(x(zn),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-root"]],decls:2,vars:0,template:function(e,n){1&e&&k(0,"app-navbar")(1,"app-sidenav")},directives:[hW,mW],styles:[""]}),t})();const gW=["langform"],_W=["countryrow"],bW=["languagerow"];function vW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.localSetup")," ")}function CW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.countryAndLanguage")," ")}function yW(t,i){1&t&&(l(0,"h2"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"setupwizard.selectCountry")))}function wW(t,i){if(1&t&&(l(0,"div",18,19),k(2,"img",20),l(3,"pre")(4,"span",21),g(5),c(),g(6),c()()),2&t){const e=i.$implicit;ne("id",e.Code),a(2),Bn("src","images/locale/",e.Image,"",Xt),a(3),S(e.Country),a(1),$e("",null!==e.NativeCountry?" - "+e.NativeCountry:""," (",e.Code,")")}}function TW(t,i){if(1&t&&(l(0,"div",22),k(1,"p-message",23),m(2,"translate"),c()),2&t){const e=d(2);a(1),La("text","",f(2,2,"setupwizard.selectedCountry")," ",e.m_wizardData.Country.Country,"")}}function SW(t,i){1&t&&(l(0,"div",22),k(1,"p-message",24),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.noCountry")))}function xW(t,i){1&t&&(l(0,"h2"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"setupwizard.selectLanguage")))}function DW(t,i){if(1&t&&(l(0,"div",18,25),k(2,"img",20),l(3,"pre")(4,"span",21),g(5),c(),g(6),c()()),2&t){const e=i.$implicit;ne("id",e.Code),a(2),Bn("src","images/locale/",e.Image,"",Xt),a(3),S(e.Language),a(1),$e(" - ",e.NativeLanguage," (",e.Code,")")}}function MW(t,i){if(1&t&&(l(0,"div",22),k(1,"p-message",23),m(2,"translate"),c()),2&t){const e=d(2);a(1),La("text","",f(2,2,"setupwizard.selectedLanguage")," ",e.m_wizardData.Language.NativeLanguage,"")}}function kW(t,i){1&t&&(l(0,"div",22),k(1,"p-message",26),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.noLanguage")))}const sS=function(){return{"max-height":"460px","min-height":"460px"}};function IW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"p-listbox",10),C("ngModelChange",function(s){return v(e),d().m_wizardData.Country=s}),_(3,yW,3,3,"ng-template",11),_(4,wW,7,5,"ng-template",12),c(),_(5,TW,3,4,"div",13),_(6,SW,3,3,"ng-template",null,14,we),c(),l(8,"div",15)(9,"p-listbox",16),C("ngModelChange",function(s){return v(e),d().m_wizardData.Language=s}),_(10,xW,3,3,"ng-template",11),_(11,DW,7,5,"ng-template",12),c(),_(12,MW,3,4,"div",13),_(13,kW,3,3,"ng-template",null,17,we),c()()}if(2&t){const e=F(7),n=F(14),s=d();a(2),p("options",s.m_countries)("ngModel",s.m_wizardData.Country)("multiple",!1)("filter",!0)("listStyle",A(14,sS)),a(3),p("ngIf",""!=s.m_wizardData.Country.Code)("ngIfElse",e),a(4),p("options",s.m_languages)("ngModel",s.m_wizardData.Language)("multiple",!1)("filter",!0)("listStyle",A(15,sS)),a(3),p("ngIf",""!=s.m_wizardData.Language.Code)("ngIfElse",n)}}function EW(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function RW(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function LW(t,i){if(1&t){const e=I();l(0,"div",27)(1,"div",28),_(2,EW,2,3,"p-message",29),_(3,RW,2,3,"p-message",30),c(),l(4,"p-button",31),C("onClick",function(){v(e);const s=d(),r=F(2);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c(),l(6,"p-button",32),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/dbsetup"])}),m(7,"translate"),c(),l(8,"p-button",33),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/general"])}),m(9,"translate"),c()()}if(2&t){const e=d(),n=F(2);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,7,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled),a(2),D("label",f(7,9,"common.back")),a(2),D("label",f(9,11,"common.next")),p("disabled",""==e.m_wizardData.Country.Code||""==e.m_wizardData.Language.Code)}}let OW=(()=>{class t{constructor(e,n,s,r,o,u){this.router=e,this.translate=n,this.setupService=s,this.configService=r,this.wizardService=o,this.mythService=u,this.m_countries=[],this.m_languages=[],this.successCount=0,this.errorCount=0,this.expectedCount=0,this.warningText="settings.common.warning",this.saveObserver={next:h=>{h.bool?(this.successCount++,this.successCount>=this.expectedCount&&localStorage.setItem("Language",this.m_wizardData.Language.Code),this.translate.use(this.m_wizardData.Language.Code)):(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:h=>{console.error(h),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.translate.get(this.warningText).subscribe(h=>{this.warningText=h})}ngOnInit(){this.configService.GetLanguages().subscribe(e=>this.m_languages=e.LanguageList.Languages),this.configService.GetCountries().subscribe(e=>this.m_countries=e.CountryList.Countries),this.m_wizardData=this.wizardService.getWizardData(),setTimeout(()=>this.scrollIntoView(),1e3)}ngAfterViewInit(){}scrollIntoView(){if(""!=this.m_wizardData.Country.Code){const e=this.countryRowElement.find(n=>n.nativeElement.getAttribute("id")===this.m_wizardData.Country.Code);e?e.nativeElement.scrollIntoView({behavior:"instant",inline:"start",block:"center"}):console.log("Failed to find element by ID")}if(""!=this.m_wizardData.Language.Code){const e=this.languageRowElement.find(n=>n.nativeElement.getAttribute("id")===this.m_wizardData.Language.Code);e&&e.nativeElement.scrollIntoView({behavior:"instant",inline:"start",block:"center"})}null!=this.wizardService.m_topElement&&this.wizardService.m_topElement.nativeElement.scrollIntoView({behavior:"instant",block:"start"})}saveForm(){this.successCount=0,this.errorCount=0,this.expectedCount=2,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"Country",Value:this.m_wizardData.Country.Code}).subscribe(this.saveObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"Language",Value:this.m_wizardData.Language.Code}).subscribe(this.saveObserver)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(Le),x(De),x(zo),x(Sd),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-selectlanguage"]],viewQuery:function(e,n){if(1&e&&(j(gW,5),j(_W,5,Re),j(bW,5,Re)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.countryRowElement=s),V(s=B())&&(n.languageRowElement=s)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:8,vars:0,consts:[[1,"wizard-content","m-0","md:m-3"],["name","langform",1,"mx-0","md:mx-3"],["langform","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid","m-0","md:m-3"],[1,"col-12","md:col-6","pt-2"],["optionLabel","Country","name","countries",3,"options","ngModel","multiple","filter","listStyle","ngModelChange"],["pTemplate","header"],["pTemplate","item"],["class","pt-5",4,"ngIf","ngIfElse"],["noCountry",""],[1,"col-12","md:col-6"],["optionLabel","Language","name","languages",3,"options","ngModel","multiple","filter","listStyle","ngModelChange"],["noLanguage",""],[1,"language-item"],["countryrow",""],[1,"pr-3",2,"width","70px",3,"src"],[1,"font-bold"],[1,"pt-5"],["severity","success",3,"text"],["severity","error",3,"text"],["languagerow",""],["severity","error",1,"pt-2",3,"text"],[1,"grid","nogutter","m-5"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["icon","pi pi-angle-left","iconPos","left",1,"pr-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",3,"label","disabled","onClick"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"form",1,2)(3,"p-card",3),_(4,vW,2,3,"ng-template",4),_(5,CW,2,3,"ng-template",5),_(6,IW,15,16,"ng-template",6),_(7,LW,10,13,"ng-template",7),c()()())},directives:[ze,Ge,He,Pe,ie,ws,Te,_e,Q,qe,ve],pipes:[de],styles:[".language-item{display:flex;align-items:center}@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();class AW{constructor(i,e){this._document=e;const n=this._textarea=this._document.createElement("textarea"),s=n.style;s.position="fixed",s.top=s.opacity="0",s.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,this._document.body.appendChild(n)}copy(){const i=this._textarea;let e=!1;try{if(i){const n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),e=this._document.execCommand("copy"),n&&n.focus()}}catch(n){}return e}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let rS=(()=>{class t{constructor(e){this._document=e}copy(e){const n=this.beginCopy(e),s=n.copy();return n.destroy(),s}beginCopy(e){return new AW(e,this._document)}}return t.\u0275fac=function(e){return new(e||t)(K(en))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const PW=["databaseForm"];function FW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.databaseSetup")," ")}function NW(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"setupwizard.enterDBLoginDetails")," ")}function VW(t,i){1&t&&(l(0,"div")(1,"small",42),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.IPorAddressRequired")))}function BW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function HW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.userRequired")))}function qW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.passwordRequired")))}function UW(t,i){1&t&&(l(0,"div")(1,"small",43),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.databaseNameRequired")))}function GW(t,i){if(1&t){const e=I();l(0,"div",30)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"input",45,46),C("ngModelChange",function(s){return v(e),d(2).database.LocalHostName=s}),c(),l(6,"small",47),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"setupwizard.LocalHostName_label")),a(2),p("ngModel",e.database.LocalHostName),a(3),S(f(8,5,"setupwizard.LocalHostName_desc"))}}function zW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"label",48),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",49),C("ngModelChange",function(s){return v(e),d(2).database.WOLReconnect=s}),c(),l(5,"small",32),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),T(" ",f(3,8,"settings.vsource.WOLReconnect_label")," "),a(2),p("ngModel",e.database.WOLReconnect)("min",0)("max",60)("step",1)("useGrouping",!1)("showButtons",!0),a(2),T(" ",f(7,10,"settings.vsource.WOLReconnect_desc")," ")}}function jW(t,i){if(1&t){const e=I();l(0,"div",8)(1,"label",50),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",51),C("ngModelChange",function(s){return v(e),d(2).database.WOLRetry=s}),c(),l(5,"small",32),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),T(" ",f(3,8,"settings.vsource.WOLRetry_label")," "),a(2),p("ngModel",e.database.WOLRetry)("min",1)("max",10)("step",1)("useGrouping",!1)("showButtons",!0),a(2),T(" ",f(7,10,"settings.vsource.WOLRetry_desc")," ")}}function $W(t,i){if(1&t){const e=I();l(0,"div",30)(1,"label",52),g(2),m(3,"translate"),c(),l(4,"input",53,54),C("ngModelChange",function(s){return v(e),d(2).database.WOLCommand=s}),c(),l(6,"small",55),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"setupwizard.WOLCommand_label")),a(2),p("ngModel",e.database.WOLCommand),a(3),S(f(8,5,"setupwizard.WOLCommand_desc"))}}function WW(t,i){1&t&&(l(0,"div"),k(1,"p-message",56),m(2,"translate"),c()),2&t&&(a(1),D("text",f(2,1,"setupwizard.connectedToDatabase")))}function KW(t,i){1&t&&(l(0,"div",57,39),k(2,"p-message",58),m(3,"translate"),c()),2&t&&(a(2),D("text",f(3,1,"setupwizard.notConnectedToDatabase")))}const oS=function(t){return{Name:t}};function QW(t,i){if(1&t&&(l(0,"div"),k(1,"p-message",56),m(2,"translate"),c()),2&t){const e=d(2);a(1),D("text",Dt(2,1,"setupwizard.dbsetup.havedb",z(4,oS,e.m_wizardData.Database.Name)))}}function JW(t,i){if(1&t&&(l(0,"div",59,40),k(2,"p-message",60),m(3,"translate"),c()),2&t){const e=d(2);a(2),D("text",Dt(3,1,"setupwizard.dbsetup.havenotdb",z(4,oS,e.m_wizardData.Database.Name)))}}const YW=function(t){return{SchemaVersion:t}};function ZW(t,i){if(1&t&&(l(0,"div"),k(1,"p-message",61),m(2,"translate"),c()),2&t){const e=d(2);a(1),D("text",Dt(2,1,"setupwizard.dbsetup.schemaver",z(4,YW,e.m_wizardData.DatabaseStatus.DatabaseStatus.SchemaVersion)))}}function XW(t,i){1&t&&(l(0,"div",62,40),k(2,"p-message",63),m(3,"translate"),c()),2&t&&(a(2),D("text",f(3,1,"setupwizard.databaseSchemaUnknown")))}function eK(t,i){if(1&t){const e=I();l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"div",68)(5,"div",69),g(6," Sql Server Type: "),c(),l(7,"div",70)(8,"p-radioButton",71),C("ngModelChange",function(s){return v(e),d(3).dbtype=s})("ngModelChange",function(){return v(e),d(3).setCommandList()}),c(),l(9,"label",72),g(10,"MySql"),c()(),l(11,"div",73)(12,"p-radioButton",74),C("ngModelChange",function(s){return v(e),d(3).dbtype=s})("ngModelChange",function(){return v(e),d(3).setCommandList()}),c(),l(13,"label",75),g(14,"MariaDB"),c()()(),l(15,"table",76)(16,"tr")(17,"td",65),g(18),c(),l(19,"td",66)(20,"button",67),C("click",function(){v(e);const s=d(3);return s.copyToclipboard(s.commandlist)}),m(21,"translate"),c()()()(),l(22,"p"),g(23),m(24,"translate"),c(),l(25,"table")(26,"tr")(27,"td",65),g(28),c(),l(29,"td",66)(30,"button",67),C("click",function(){v(e);const s=d(3);return s.copyToclipboard(s.mySqlCommand)}),m(31,"translate"),c()()()()()}if(2&t){const e=d(3);a(2),T(" ",f(3,8,"setupwizard.sqlinstructions")," "),a(6),p("ngModel",e.dbtype),a(4),p("ngModel",e.dbtype),a(6),T(" ",e.commandlist," "),a(2),D("pTooltip",f(21,10,"settings.common.clipboard_tooltip")),a(3),S(f(24,12,"setupwizard.runcommand")),a(5),T(" ",e.mySqlCommand," "),a(2),D("pTooltip",f(31,14,"settings.common.clipboard_tooltip"))}}function tK(t,i){if(1&t){const e=I();l(0,"div")(1,"h2"),g(2),m(3,"translate"),c(),_(4,eK,32,16,"div",13),l(5,"p",64),g(6),m(7,"translate"),c(),l(8,"table")(9,"tr")(10,"td",65),g(11),c(),l(12,"td",66)(13,"button",67),C("click",function(){v(e);const s=d(2);return s.copyToclipboard(s.tzCommand)}),m(14,"translate"),c()()()(),l(15,"p"),g(16),m(17,"translate"),c(),l(18,"p"),g(19),m(20,"translate"),c(),l(21,"p"),g(22),m(23,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"common.instructions")),a(2),p("ngIf",e.connectionFail),a(2),S(f(7,10,"setupwizard.tztables")),a(5),T(" ",e.tzCommand," "),a(2),D("pTooltip",f(14,12,"settings.common.clipboard_tooltip")),a(3),T("",f(17,14,"setupwizard.ignoremessages")," "),a(3),S(f(20,16,"setupwizard.savethis")),a(3),S(f(23,18,"setupwizard.restartbe"))}}const nK=function(t){return{"is-invalid":t}};function iK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"label",9),g(3),m(4,"translate"),c(),l(5,"input",10,11),C("ngModelChange",function(s){return v(e),d().database.Host=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c(),_(10,VW,4,3,"div",13),c(),l(11,"div",8)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"input",15,16),C("ngModelChange",function(s){return v(e),d().database.Port=s}),c(),l(17,"small",17),g(18),m(19,"translate"),c(),_(20,BW,4,3,"div",13),c(),l(21,"div",8)(22,"label",18),g(23),m(24,"translate"),c(),l(25,"input",19,20),C("ngModelChange",function(s){return v(e),d().database.UserName=s}),c(),l(27,"small",21),g(28),m(29,"translate"),c(),_(30,HW,4,3,"div",13),c(),l(31,"div",8)(32,"label",22),g(33),m(34,"translate"),c(),l(35,"input",23,24),C("ngModelChange",function(s){return v(e),d().database.Password=s}),c(),l(37,"small",25),g(38),m(39,"translate"),c(),_(40,qW,4,3,"div",13),c(),l(41,"div",8)(42,"label",26),g(43),m(44,"translate"),c(),l(45,"input",27,28),C("ngModelChange",function(s){return v(e),d().database.Name=s}),c(),l(47,"small",29),g(48),m(49,"translate"),c(),_(50,UW,4,3,"div",13),c(),l(51,"div",30)(52,"p-checkbox",31),C("ngModelChange",function(s){return v(e),d().database.LocalEnabled=s}),m(53,"translate"),c(),l(54,"small",32),g(55),m(56,"translate"),c()(),_(57,GW,9,7,"div",33),l(58,"div",30)(59,"p-checkbox",34),C("ngModelChange",function(s){return v(e),d().database.WOLEnabled=s}),m(60,"translate"),c(),l(61,"small",32),g(62),m(63,"translate"),c()(),_(64,zW,8,12,"div",35),_(65,jW,8,12,"div",35),_(66,$W,9,7,"div",33),c(),l(67,"div")(68,"p-button",36),C("click",function(){return v(e),d().saveForm(!1)}),m(69,"translate"),c()(),l(70,"div",37),_(71,WW,3,3,"div",38),_(72,KW,4,3,"ng-template",null,39,we),_(74,QW,3,6,"div",38),_(75,JW,4,6,"ng-template",null,40,we),_(77,ZW,3,6,"div",38),_(78,XW,4,3,"ng-template",null,41,we),c(),_(80,tK,24,20,"div",13)}if(2&t){const e=F(6),n=F(16),s=F(26),r=F(36),o=F(46),u=F(73),h=F(76),b=F(79),y=d(),w=F(2);a(3),S(f(4,42,"setupwizard.MySQLServerIP")),a(2),p("ngModel",y.database.Host)("ngClass",z(72,nK,e.invalid)),a(3),S(f(9,44,"setupwizard.ipaddress_help")),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),S(f(14,46,"setupwizard.MySQLServerPort")),a(2),p("ngModel",y.database.Port),a(3),S(f(19,48,"setupwizard.port_help")),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(3),S(f(24,50,"setupwizard.MySQLUser")),a(2),p("ngModel",y.database.UserName),a(3),S(f(29,52,"setupwizard.user_help")),a(2),p("ngIf",s.invalid&&(s.dirty||s.touched)),a(3),S(f(34,54,"setupwizard.MySQLPassword")),a(2),p("ngModel",y.database.Password),a(3),S(f(39,56,"setupwizard.password_help")),a(2),p("ngIf",r.invalid&&(r.dirty||r.touched)),a(3),S(f(44,58,"setupwizard.MySQLDatabaseName")),a(2),p("ngModel",y.database.Name),a(3),S(f(49,60,"setupwizard.dbname_help")),a(2),p("ngIf",o.invalid&&(o.dirty||o.touched)),a(2),D("label",f(53,62,"setupwizard.LocalEnabled_label")),p("ngModel",y.database.LocalEnabled)("binary",!0),a(3),T(" ",f(56,64,"setupwizard.LocalEnabled_desc")," "),a(2),p("ngIf",y.database.LocalEnabled),a(2),D("label",f(60,66,"setupwizard.WOLEnabled_label")),p("ngModel",y.database.WOLEnabled)("binary",!0),a(3),T(" ",f(63,68,"setupwizard.WOLEnabled_desc")," "),a(2),p("ngIf",y.database.WOLEnabled),a(1),p("ngIf",y.database.WOLEnabled),a(1),p("ngIf",y.database.WOLEnabled),a(2),D("label",f(69,70,"setupwizard.testConnection")),p("disabled",null==w.invalid||w.invalid),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.Connected)("ngIfElse",u),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.HaveDatabase)("ngIfElse",h),a(3),p("ngIf",y.m_wizardData.DatabaseStatus.DatabaseStatus.Connected&&y.m_wizardData.DatabaseStatus.DatabaseStatus.HaveDatabase)("ngIfElse",b),a(3),p("ngIf",y.setupService.isDatabaseIgnored)}}function sK(t,i){1&t&&(k(0,"p-message",83),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function rK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function oK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"setupwizard.connectionfail"))}function aK(t,i){if(1&t){const e=I();l(0,"div",77)(1,"div",78),_(2,sK,2,3,"p-message",79),_(3,rK,2,3,"p-message",80),_(4,oK,2,3,"p-message",80),c(),l(5,"p-button",81),C("onClick",function(){v(e);const s=d(),r=F(2);return s.saveForm(!0),r.form.markAsPristine()}),m(6,"translate"),c(),l(7,"p-button",82),C("onClick",function(){return v(e),d().router.navigate(["setupwizard/selectlanguage"])}),m(8,"translate"),c()()}if(2&t){const e=d(),n=F(2);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),p("ngIf",e.connectionFail),a(1),D("label",f(6,7,"common.save")),p("disabled",(!n.dirty||e.setupService.schedulingEnabled)&&!e.setupService.isDatabaseIgnored),a(2),D("label",f(8,9,"common.next")),p("disabled",e.setupService.isDatabaseIgnored)}}let lK=(()=>{class t{constructor(e,n,s,r,o,u,h,b){this.router=e,this.configService=n,this.mythService=s,this.wizardService=r,this.translate=o,this.messageService=u,this.setupService=h,this.clipboard=b,this.successCount=0,this.errorCount=0,this.expectedCount=2,this.connectionFail=!1,this.commandlist="",this.mySqlCommand="sudo mysql -u root < setup.sql",this.tzCommand="mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root mysql",this.dbtype="MySQL",this.msg_testconnection="setupwizard.testConnection",this.msg_connectionsuccess="setupwizard.connectionsuccess",this.msg_connectionfail="setupwizard.connectionfail",this.warningText="settings.common.warning",this.saveObserver={next:y=>{y.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:y=>{console.error(y),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.translate.get(this.msg_testconnection).subscribe(y=>this.msg_testconnection=y),this.translate.get(this.msg_connectionsuccess).subscribe(y=>this.msg_connectionsuccess=y),this.translate.get(this.msg_connectionfail).subscribe(y=>this.msg_connectionfail=y),this.translate.get(this.warningText).subscribe(y=>this.warningText=y)}ngOnInit(){this.wizardService.initDatabaseStatus(),this.m_wizardData=this.wizardService.getWizardData(),this.database=Object.assign({},this.m_wizardData.Database),this.wizardService.dbPromise.then(()=>{this.database=Object.assign({},this.m_wizardData.Database)},()=>this.errorCount++)}copyToclipboard(e){this.clipboard.copy(e)}saveForm(e){this.successCount=0,this.errorCount=0,this.expectedCount=1,this.connectionFail=!1;const n={HostName:this.database.Host,UserName:this.database.UserName,Password:this.database.Password,DBName:this.database.Name,dbPort:this.database.Port};this.commandlist="",this.mythService.TestDBSettings(n).subscribe(s=>{s.bool?e?this.configService.SetDatabaseCredentials(this.database).subscribe(this.saveObserver):this.messageService.add({severity:"success",life:5e3,summary:this.msg_testconnection,detail:this.msg_connectionsuccess}):(this.messageService.add({severity:"error",life:5e3,summary:this.msg_testconnection,detail:this.msg_connectionfail}),this.connectionFail=!0,this.setCommandList())})}setCommandList(){let e="";"MySQL"==this.dbtype&&(e="WITH mysql_native_password"),this.commandlist=`CREATE DATABASE IF NOT EXISTS ${this.database.Name};\nCREATE USER IF NOT EXISTS '${this.database.UserName}'@'localhost' IDENTIFIED ${e} by '${this.database.Password}';\nCREATE USER IF NOT EXISTS '${this.database.UserName}'@'%' IDENTIFIED ${e} by '${this.database.Password}';\nGRANT ALL ON ${this.database.Name}.* TO '${this.database.UserName}'@'localhost';\nGRANT ALL ON ${this.database.Name}.* TO '${this.database.UserName}'@'%';`}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(It),x(zo),x(Ut),x(Sd),x(Le),x(ys),x(De),x(rS))},t.\u0275cmp=G({type:t,selectors:[["app-dbsetup"]],viewQuery:function(e,n){if(1&e&&j(PW,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},features:[Ne([ys])],decls:8,vars:0,consts:[["name","databaseForm",1,"mx-0","md:mx-3"],["databaseForm","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"formgrid","grid","form-group"],[1,"field","col-12","md:col-6"],["for","ipaddress",1,"label","block"],["pInputText","","id","ipaddress","type","text","aria-describedby","ipaddress-help","name","hostname","placeholder","Ex. 127.0.0.1 or localhost","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngClass","ngModelChange"],["host","ngModel"],["id","ipaddress-help"],[4,"ngIf"],["for","port",1,"label","block"],["pInputText","","id","port","type","number","aria-describedby","port-help","name","port","placeholder","Ex. 3306","min","0","max","65536",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["port","ngModel"],["id","port-help"],["for","user",1,"label","block"],["pInputText","","id","user","type","text","aria-describedby","user-help","name","user","placeholder","Ex. mythtv","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["user","ngModel"],["id","user-help"],["for","password",1,"label","block"],["pInputText","","id","password","type","text","aria-describedby","password-help","name","password","placeholder","Ex. mythtv","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["password","ngModel"],["id","password-help"],["for","dbname",1,"label","block"],["pInputText","","id","dbname","type","text","aria-describedby","dbname-help","name","dbname","placeholder","Ex. mythconverg","required","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["dbname","ngModel"],["id","dbname-help"],[1,"field","col-12"],["name","LocalEnabled",1,"mb-2","w-full","label","block",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["class","field col-12",4,"ngIf"],["name","WOLEnabled",1,"mb-2","w-full","label","block",3,"ngModel","binary","label","ngModelChange"],["class","field col-12 md:col-6",4,"ngIf"],["type","button",1,"mr-1","p-button-raised","p-button-secondary",3,"label","disabled","click"],[1,"pt-4",2,"display","flex"],[4,"ngIf","ngIfElse"],["notconnected",""],["nodatabase",""],["noschema",""],["id","address-help",1,"p-error","block"],[1,"p-error","block"],["for","LocalHostName",1,"label","block"],["pInputText","","id","LocalHostName","type","text","aria-describedby","LocalHostName-help","name","LocalHostName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["LocalHostName","ngModel"],["id","LocalHostName-help"],["for","WOLReconnect",1,"label","block"],["name","WOLReconnect","id","WOLReconnect",3,"ngModel","min","max","step","useGrouping","showButtons","ngModelChange"],["for","WOLRetry",1,"label","block"],["name","WOLRetry","id","WOLRetry",3,"ngModel","min","max","step","useGrouping","showButtons","ngModelChange"],["for","WOLCommand",1,"label","block"],["pInputText","","id","WOLCommand","type","text","aria-describedby","WOLCommand-help","name","WOLCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["WOLCommand","ngModel"],["id","WOLCommand-help"],["severity","success",1,"pr-2",3,"text"],[1,"pr-2","notconnected"],["severity","error",1,"",3,"text"],[1,"pr-2","nodatabase"],["severity","error",3,"text"],["severity","info",1,"pr-2",3,"text"],[1,"pr-2","noschema"],["severity","info",3,"text"],[1,""],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-copy",1,"p-button-rounded","p-button-text",3,"pTooltip","click"],[1,"flex","pb-3"],[1,"flex-none","flex","align-items-center","label","block","pr-5"],[1,"flex-none","flex","align-items-center","pr-5"],["name","dbtype","value","MySQL","inputId","mysql",3,"ngModel","ngModelChange"],["for","mysql"],[1,"flex-none","flex","align-items-center"],["name","dbtype","value","MariaDB","inputId","mariadb",3,"ngModel","ngModelChange"],["for","mariadb"],[2,"white-space","pre-line"],[1,"grid","nogutter","m-5"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"pr-3",3,"label","disabled","onClick"],["severity","success",3,"text"]],template:function(e,n){1&e&&(k(0,"p-toast"),l(1,"form",0,1)(3,"p-card",2),_(4,FW,2,3,"ng-template",3),_(5,NW,2,3,"ng-template",4),_(6,iK,81,74,"ng-template",5),_(7,aK,9,11,"ng-template",6),c()())},directives:[wd,ze,Ge,He,Pe,ie,Ye,ll,Te,_e,Oe,Q,xu,Su,Tu,rn,dt,ve,qe,Td,Ln,vt,Jt],pipes:[de],styles:[".is-invalid{border-color:red}@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const cK=["hostaddress"];function uK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.hostaddress.title")," ")}function dK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.hostaddress.subtitle")," ")}function pK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function hK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"setupwizard.portRequired")))}function mK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"settings.hostaddress.pin_reqd")," "))}function fK(t,i){1&t&&(l(0,"div")(1,"small",52),g(2,"IPv4 address"),c()())}function gK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2,"IPv6 address"),c()())}function _K(t,i){if(1&t){const e=I();l(0,"div")(1,"div",9)(2,"label",41),g(3),m(4,"translate"),c(),l(5,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.BackendServerIP=s}),c(),l(7,"small",44),g(8),m(9,"translate"),c(),_(10,fK,3,0,"div",14),c(),l(11,"div",9)(12,"label",45),g(13),m(14,"translate"),c(),l(15,"p-dropdown",46,47),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.BackendServerIP6=s}),c(),l(17,"small",48),g(18),m(19,"translate"),c(),_(20,gK,3,0,"div",14),c(),l(21,"div",9)(22,"p-checkbox",49,50),C("ngModelChange",function(s){return v(e),d(2).m_HostAddressData.AllowLinkLocal=s}),m(24,"translate"),c(),l(25,"small",51),g(26),m(27,"translate"),c()()()}if(2&t){const e=F(6),n=F(16),s=d(2);a(3),S(f(4,14,"settings.hostaddress.ipv4_label")),a(2),p("options",s.m_IPsV4)("ngModel",s.m_HostAddressData.BackendServerIP),a(3),T(" ",f(9,16,"settings.hostaddress.ipv4_desc")," "),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),T(" ",f(14,18,"settings.hostaddress.ipv6_label")," "),a(2),p("options",s.m_IPsV6)("ngModel",s.m_HostAddressData.BackendServerIP6),a(3),T(" ",f(19,20,"settings.hostaddress.ipv6_desc")," "),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(2),D("label",f(24,22,"settings.hostaddress.listenlinklocal_label")),p("ngModel",s.m_HostAddressData.AllowLinkLocal)("binary",!0),a(4),T(" ",f(27,24,"settings.hostaddress.listenlinklocal_desc")," ")}}function bK(t,i){1&t&&(l(0,"div")(1,"small",40),g(2,"Primary IP address / DNS name is required"),c()())}function vK(t,i){1&t&&(l(0,"div")(1,"small",53),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"settings.hostaddress.ismaster_hint")," "))}function CK(t,i){1&t&&(l(0,"div")(1,"small",54),g(2,"Hostname of master backend is required"),c()())}const aS=function(t){return{"is-invalid":t}};function yK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5),m(6,"translate"),c(),l(7,"input",11,12),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendServerPort=s}),c(),l(9,"small",13),g(10),m(11,"translate"),c(),_(12,pK,4,3,"div",14),c(),l(13,"div",9)(14,"label",15),g(15),m(16,"translate"),c(),l(17,"input",16,17),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendStatusPort=s}),c(),l(19,"small",18),g(20),m(21,"translate"),c(),_(22,hK,4,3,"div",14),c()(),l(23,"p-fieldset",8),m(24,"translate"),l(25,"div",9)(26,"label",19),g(27),m(28,"translate"),c(),l(29,"input",20,21),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.SecurityPin=s}),c(),l(31,"small",22),g(32),m(33,"translate"),c(),_(34,mK,4,3,"div",14),c()(),l(35,"p-fieldset",8),m(36,"translate"),l(37,"div",9)(38,"p-checkbox",23,24),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.AllowConnFromAll=s}),m(40,"translate"),c(),l(41,"small",22),k(42,"div",25),m(43,"translate"),c()()(),l(44,"p-fieldset",8),m(45,"translate"),l(46,"div",9)(47,"p-checkbox",26,27),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.ListenOnAllIps=s}),m(49,"translate"),c(),l(50,"small",28),g(51),m(52,"translate"),c()(),_(53,_K,28,26,"div",14),c(),l(54,"p-fieldset",8),m(55,"translate"),l(56,"div",9)(57,"div",9)(58,"label",29),g(59),m(60,"translate"),c(),l(61,"p-dropdown",30,31),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.BackendServerAddr=s}),c(),l(63,"small",32),g(64),m(65,"translate"),c()(),_(66,bK,3,0,"div",14),c()(),l(67,"p-fieldset",8),m(68,"translate"),l(69,"div",9)(70,"p-checkbox",33,34),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.IsMasterBackend=s})("onChange",function(){return v(e),d().setMaster()}),m(72,"translate"),c(),l(73,"small",35),g(74),m(75,"translate"),c(),_(76,vK,4,3,"div",14),c(),l(77,"div",9)(78,"label",36),g(79),m(80,"translate"),c(),l(81,"input",37,38),C("ngModelChange",function(s){return v(e),d().m_HostAddressData.MasterServerName=s}),c(),l(83,"small",39),k(84,"div",25),m(85,"translate"),c(),_(86,CK,3,0,"div",14),c()()()}if(2&t){const e=F(8),n=F(18),s=F(30),r=F(62),o=F(82),u=d();a(1),D("legend",f(2,44,"settings.hostaddress.panel.ports")),a(4),T(" ",f(6,46,"settings.hostaddress.backendport_label")," "),a(2),p("ngModel",u.m_HostAddressData.BackendServerPort)("ngClass",z(88,aS,e.invalid)),a(3),T(" ",f(11,48,"settings.hostaddress.backendport_desc")," "),a(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),a(3),T(" ",f(16,50,"settings.hostaddress.statusport_label")," "),a(2),p("ngModel",u.m_HostAddressData.BackendStatusPort)("ngClass",z(90,aS,n.invalid)),a(3),S(f(21,52,"settings.hostaddress.statusport_desc")),a(2),p("ngIf",n.invalid&&(n.dirty||n.touched)),a(1),D("legend",f(24,54,"settings.hostaddress.panel.pin")),a(4),T(" ",f(28,56,"settings.hostaddress.pin_label")," "),a(2),p("ngModel",u.m_HostAddressData.SecurityPin),a(3),T(" ",f(33,58,"settings.hostaddress.pin_desc")," "),a(2),p("ngIf",s.invalid&&(s.dirty||s.touched)),a(1),D("legend",f(36,60,"settings.hostaddress.panel.allowconn")),a(3),D("label",f(40,62,"settings.hostaddress.allowconn_label")),p("ngModel",u.m_HostAddressData.AllowConnFromAll)("binary",!0),a(4),p("innerHTML",f(43,64,"settings.hostaddress.allowconn_desc"),Ht),a(2),D("legend",f(45,66,"settings.hostaddress.panel.iplisten")),a(3),D("label",f(49,68,"settings.hostaddress.listenall_label")),p("ngModel",u.m_HostAddressData.ListenOnAllIps)("binary",!0),a(4),T(" ",f(52,70,"settings.hostaddress.listenall_desc")," "),a(2),p("ngIf",!u.m_HostAddressData.ListenOnAllIps),a(1),D("legend",f(55,72,"settings.hostaddress.panel.primaryadd")),a(5),T(" ",f(60,74,"settings.hostaddress.primaryip_label")," "),a(2),p("options",u.m_IPsAll)("ngModel",u.m_HostAddressData.BackendServerAddr)("editable",!0),a(3),T(" ",f(65,76,"settings.hostaddress.primaryip_desc")," "),a(2),p("ngIf",r.invalid&&(r.dirty||r.touched)),a(1),D("legend",f(68,78,"settings.hostaddress.panel.masterbe")),a(3),D("label",f(72,80,"settings.hostaddress.ismaster_label")),p("ngModel",u.m_HostAddressData.IsMasterBackend)("binary",!0),a(4),T(" ",f(75,82,"settings.hostaddress.ismaster_desc")," "),a(2),p("ngIf",u.m_showChangeHint),a(3),S(f(80,84,"settings.hostaddress.master_label")),a(2),p("ngModel",u.m_HostAddressData.MasterServerName),a(3),p("innerHTML",f(85,86,"settings.hostaddress.master_desc"),Ht),a(2),p("ngIf",o.invalid&&(o.dirty||o.touched))}}function wK(t,i){1&t&&(k(0,"p-message",60),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function TK(t,i){1&t&&(k(0,"p-message",61),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function SK(t,i){if(1&t){const e=I();l(0,"div",55)(1,"div",56),_(2,wK,2,3,"p-message",57),_(3,TK,2,3,"p-message",58),c(),l(4,"p-button",59),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.m_HostAddressData.successCount>0&&0==e.m_HostAddressData.errorCount&&!n.dirty),a(1),p("ngIf",e.m_HostAddressData.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let xK=(()=>{class t{constructor(e,n){this.setupService=e,this.configService=n,this.m_IsMasterBackend=!1,this.m_showChangeHint=!1,this.m_HostAddressData=this.setupService.getHostAddressData(),setTimeout(()=>n.GetIPAddresses("All").subscribe(s=>this.m_IPsAll=s.IPAddresses),500),n.GetIPAddresses("IPv4").subscribe(s=>this.m_IPsV4=s.IPAddresses),n.GetIPAddresses("IPv6").subscribe(s=>this.m_IPsV6=s.IPAddresses)}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}setMaster(){void 0===this.m_savedMaster&&(this.m_savedMaster=this.m_HostAddressData.MasterServerName),this.m_HostAddressData.IsMasterBackend?(this.m_HostAddressData.MasterServerName=this.m_HostAddressData.thisHostName,this.m_showChangeHint=!1):this.m_HostAddressData.MasterServerName==this.m_savedMaster?this.m_showChangeHint=!0:this.m_HostAddressData.MasterServerName=this.m_savedMaster}saveForm(){console.log("save form clicked"),this.setupService.saveHostAddressData(this.currentForm)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(zo))},t.\u0275cmp=G({type:t,selectors:[["app-host-address"]],viewQuery:function(e,n){if(1&e&&j(cK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","hostaddress",1,"mx-0","md:mx-3"],["hostaddress","ngForm"],[1,"m-0","md:m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend"],[1,"form-group","field"],["for","backendserverport",1,"label","block"],["pInputText","","id","backendserverport","type","number","name","backendserverport","placeholder","Ex. 6543","required","","min","0","max","65536",1,"mb-2","form-control","w-10rem",3,"ngModel","ngClass","ngModelChange"],["backendserverport","ngModel"],["id","backendserverport-help",1,"block"],[4,"ngIf"],["for","backendstatusport",1,"label","block"],["pInputText","","id","backendstatusport","type","number","name","backendstatusport","placeholder","Ex. 6544","required","","min","0","max","65536",1,"mb-2","form-control","w-10rem",3,"ngModel","ngClass","ngModelChange"],["backendstatusport","ngModel"],["id","backendstatusport-help",1,"block"],["for","securitypin",1,"label","block"],["pInputText","","id","securitypin","type","text","name","securitypin","placeholder","Ex. 1234","required","",1,"mb-2","form-control","w-10rem",3,"ngModel","ngModelChange"],["securitypin","ngModel"],["id","securitypin-help",1,"block"],["inputId","AllowConnFromAll","name","AllowConnFromAll",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AllowConnFromAll","ngModel"],[3,"innerHTML"],["inputId","ListenOnAllIps","name","ListenOnAllIps",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["ListenOnAllIps","ngModel"],["id","ListenOnAllIps-help",1,"block"],["for","BackendServerAddr",1,"label","block","w-full"],["name","BackendServerAddr","aria-describedby","BackendServerAddr-help",1,"block","mb-2","w-full",3,"options","ngModel","editable","ngModelChange"],["BackendServerAddr","ngModel"],["id","BackendServerAddr-help",1,"block","w-full"],["inputId","IsMasterBackend","name","IsMasterBackend",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange","onChange"],["IsMasterBackend","ngModel"],["id","IsMasterBackend-help",1,"block"],["for","MasterServerName",1,"label","block"],["pInputText","","id","MasterServerName","type","text","name","MasterServerName","placeholder","Ex. masterbe","disabled","disabled",1,"mb-2","form-control","w-15rem","read-only",3,"ngModel","ngModelChange"],["MasterServerName","ngModel"],["id","MasterServerName-help",1,"block"],[1,"p-error","block"],["for","BackendServerIP",1,"label","block"],["name","BackendServerIP","aria-describedby","BackendServerIP-help",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["BackendServerIP","ngModel"],["id","BackendServerIP-help",1,"block"],["for","BackendServerIP6",1,"label","block"],["name","BackendServerIP6","aria-describedby","BackendServerIP6-help",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["BackendServerIP6","ngModel"],["id","BackendServerIP6-help",1,"block"],["inputId","AllowLinkLocal","name","AllowLinkLocal",1,"mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AllowLinkLocal","ngModel"],["id","AllowLinkLocal-help",1,"block"],["id","LocalServerIP-help",1,"p-error","block"],["id","IsMasterBackend-help",1,"p-error","block"],["id","MasterServerName-help",1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,uK,2,3,"ng-template",3),_(4,dK,2,3,"ng-template",4),_(5,yK,87,92,"ng-template",5),_(6,SK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,xu,Su,Tu,Ye,ll,Te,_e,Oe,Q,rn,Vt,qe,ve],pipes:[de],styles:["[_nghost-%COMP%] .p-dropdown{width:18rem}.read-only[_ngcontent-%COMP%]{opacity:1;background-color:#e0e0e0;border-style:solid;height:2rem}"]}),t})();const DK=["locale"];function MK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.locale.title")," ")}function kK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.locale.subtitle")," ")}function IK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5,"TV Format"),c(),l(6,"p-dropdown",11),C("ngModelChange",function(s){return v(e),d().TVFormat=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-dropdown",14),C("ngModelChange",function(s){return v(e),d().VbiFormat=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()(),l(18,"p-fieldset",8),m(19,"translate"),l(20,"div",9)(21,"label",16),g(22),m(23,"translate"),c(),l(24,"p-dropdown",17),C("ngModelChange",function(s){return v(e),d().FreqTable=s}),c(),l(25,"small",18),g(26),m(27,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,13,"settings.locale.tvformat_label")),a(5),p("options",e.m_TVFormats)("ngModel",e.TVFormat),a(2),T(" ",f(9,15,"settings.locale.tvformat_desc")," "),a(4),S(f(13,17,"settings.locale.vbiformat_label")),a(2),p("options",e.m_vbiFormats)("ngModel",e.VbiFormat),a(2),T(" ",f(17,19,"settings.locale.vbiformat_desc")," "),a(2),D("legend",f(19,21,"settings.locale.freqtable_label")),a(4),S(f(23,23,"settings.locale.channfreq_label")),a(2),p("options",e.m_FreqTables)("ngModel",e.FreqTable),a(2),T(" ",f(27,25,"settings.locale.channfreq_desc")," ")}}function EK(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function RK(t,i){1&t&&(k(0,"p-message",25),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function LK(t,i){if(1&t){const e=I();l(0,"div",19)(1,"div",20),_(2,EK,2,3,"p-message",21),_(3,RK,2,3,"p-message",22),c(),l(4,"p-button",23),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}const OK=function(){return{width:"100%"}};let AK=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.TVFormat="PAL",this.VbiFormat="None",this.FreqTable="us-bcast",this.LocaleObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.m_TVFormats=["NTSC","NTSC-JP","PAL","PAL-60","PAL-BG","PAL-DK","PAL-D","PAL-I","PAL-M","PAL-N","PAL-NC","SECAM","SECAM-D","DECAM-DK"],this.m_vbiFormats=["None","PAL teletext","NTSC closed caption"],this.m_FreqTables=["us-bcast","us-cable","us-cable-hrc","us-cable-irc","japan-bcast","japan-cable","europe-west","europe-east","italy","newzealand","australia","ireland","france","china-bcast","southafrica","argentina","australia-optus","singapore","malaysia","israel-hot-matav","try-all"],this.getLocaleData()}getLocaleData(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"TVFormat"}).subscribe({next:e=>this.TVFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"VbiFormat"}).subscribe({next:e=>this.VbiFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"FreqTable"}).subscribe({next:e=>this.FreqTable=e.String,error:()=>this.errorCount++})}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"TVFormat",Value:this.TVFormat}).subscribe(this.LocaleObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"VbiFormat",Value:this.VbiFormat}).subscribe(this.LocaleObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"FreqTable",Value:this.FreqTable}).subscribe(this.LocaleObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-locale"]],viewQuery:function(e,n){if(1&e&&j(DK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:3,consts:[["name","locale",1,"ml-3","mr-3",3,"ngSubmit"],["locale","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","TV Formats"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend"],[1,"form-group","field"],["for","tvformat",1,"label","block"],["name","tvformat","aria-describedby","tvformat-help",1,"w-full","mb-2",3,"options","ngModel","ngModelChange"],["id","tvformat-help",1,"block","mt-2"],["for","vbiformat",1,"label","block"],["name","vbiformat","aria-describedby","vbiformat-help",1,"mb-5","w-full",3,"options","ngModel","ngModelChange"],["id","vbiformat-help",1,"block","mt-2"],["for","freqtable",1,"label","block"],["name","freqtable",1,"mb-2","w-full",3,"options","ngModel","ngModelChange"],["id","freqtable-help",1,"block","pt-2"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),C("ngSubmit",function(){return n.saveForm()}),l(2,"p-card",2),_(3,MK,2,3,"ng-template",3),_(4,kK,2,3,"ng-template",4),_(5,IK,28,27,"ng-template",5),_(6,LK,6,6,"ng-template",6),c()()),2&e&&(a(2),q(A(2,OK)))},directives:[ze,Ge,He,Pe,ie,Ui,Vt,Te,_e,Q,qe,ve],pipes:[de],styles:["[_nghost-%COMP%] .p-dropdown{width:18rem}"]}),t})();const PK=["miscsettings"];function FK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.misc.title")," ")}function NK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.misc.subtitle")," ")}function VK(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().MasterBackendOverride=s}),m(5,"translate"),c(),l(6,"small",11),g(7),m(8,"translate"),c()(),l(9,"div",9)(10,"p-checkbox",12),C("ngModelChange",function(s){return v(e),d().DeletesFollowLinks=s}),m(11,"translate"),c(),l(12,"small",11),g(13),m(14,"translate"),c()(),l(15,"div",9)(16,"p-checkbox",13),C("ngModelChange",function(s){return v(e),d().TruncateDeletesSlowly=s}),m(17,"translate"),c(),l(18,"small",11),g(19),m(20,"translate"),c()(),l(21,"div",9)(22,"label",14),g(23),m(24,"translate"),c(),l(25,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().HDRingbufferSize=s}),c(),l(26,"small",11),g(27),m(28,"translate"),c()(),l(29,"div",9)(30,"label",16),g(31),m(32,"translate"),c(),l(33,"p-dropdown",17),C("ngModelChange",function(s){return v(e),d().StorageScheduler=s}),c(),l(34,"small",11),g(35),m(36,"translate"),c()()(),l(37,"p-fieldset",8),m(38,"translate"),l(39,"div",9)(40,"label",18),g(41),m(42,"translate"),c(),l(43,"p-dropdown",19),C("ngModelChange",function(s){return v(e),d().UPNPWmpSource=s}),c(),l(44,"small",11),g(45),m(46,"translate"),c()()(),l(47,"div",20)(48,"div",9)(49,"label",21),g(50),m(51,"translate"),c(),l(52,"input",22),C("ngModelChange",function(s){return v(e),d().MiscStatusScript=s}),c(),l(53,"small",11),g(54),m(55,"translate"),l(56,"a",23),g(57,"Miscellaneous Status Information"),c()()(),l(58,"div",9)(59,"p-checkbox",24),C("ngModelChange",function(s){return v(e),d().DisableAutomaticBackup=s}),m(60,"translate"),c(),l(61,"small",11),g(62),m(63,"translate"),c()(),l(64,"div",9)(65,"p-checkbox",25),C("ngModelChange",function(s){return v(e),d().DisableFirewireReset=s}),m(66,"translate"),c(),l(67,"small",11),g(68),m(69,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,44,"settings.misc.panel_filemgmt")),p("toggleable",!0)("collapsed",!0),a(3),D("label",f(5,46,"settings.misc.mbo_label")),p("ngModel",e.MasterBackendOverride)("binary",!0),a(3),T(" ",f(8,48,"settings.misc.mbo_desc")," "),a(3),D("label",f(11,50,"settings.misc.follow_label")),p("ngModel",e.DeletesFollowLinks)("binary",!0),a(3),T(" ",f(14,52,"settings.misc.follow_desc")," "),a(3),D("label",f(17,54,"settings.misc.slowly_label")),p("ngModel",e.TruncateDeletesSlowly)("binary",!0),a(3),T(" ",f(20,56,"settings.misc.slowly_desc")," "),a(4),S(f(24,58,"settings.misc.ringbuf_label")),a(2),p("ngModel",e.HDRingbufferSize)("showButtons",!0)("min",4700)("max",94e3)("step",4700),a(2),T(" ",f(28,60,"settings.misc.ringbuf_desc")," "),a(4),S(f(32,62,"settings.misc.sg_label")),a(2),p("options",e.soptions)("ngModel",e.StorageScheduler),a(2),T(" ",f(36,64,"settings.misc.sg_desc")," "),a(2),D("legend",f(38,66,"settings.misc.panel_upnp")),p("toggleable",!0)("collapsed",!0),a(4),S(f(42,68,"settings.misc.upnp_label")),a(2),p("options",e.uoptions)("ngModel",e.UPNPWmpSource),a(2),T(" ",f(46,70,"settings.misc.upnp_desc")," "),a(5),S(f(51,72,"settings.misc.statapp_label")),a(2),p("ngModel",e.MiscStatusScript),a(2),T(" ",f(55,74,"settings.misc.statapp_desc")," "),a(5),D("label",f(60,76,"settings.misc.disback_label")),p("ngModel",e.DisableAutomaticBackup)("binary",!0),a(3),T(" ",f(63,78,"settings.misc.disback_desc")," "),a(3),D("label",f(66,80,"settings.misc.disfwr_label")),p("ngModel",e.DisableFirewireReset)("binary",!0),a(3),T(" ",f(69,82,"settings.misc.disfwr_desc")," ")}}function BK(t,i){1&t&&(k(0,"p-message",31),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function HK(t,i){1&t&&(k(0,"p-message",32),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function qK(t,i){if(1&t){const e=I();l(0,"div",26)(1,"div",27),_(2,BK,2,3,"p-message",28),_(3,HK,2,3,"p-message",29),c(),l(4,"p-button",30),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0&&!n.dirty),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let UK=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.mythService=s,this.successCount=0,this.errorCount=0,this.MasterBackendOverride=!1,this.DeletesFollowLinks=!1,this.TruncateDeletesSlowly=!1,this.HDRingbufferSize=9400,this.StorageScheduler="BalancedFreeSpace",this.UPNPWmpSource="0",this.MiscStatusScript="",this.DisableAutomaticBackup=!1,this.DisableFirewireReset=!1,this.hostName="",this.soptions=[{name:"settings.misc.sg_balfree",code:"BalancedFreeSpace"},{name:"settings.misc.sg_balpercent",code:"BalancedPercFreeSpace"},{name:"settings.misc.bal_io",code:"BalancedDiskIO"},{name:"settings.misc.sg_combination",code:"Combination"}],this.uoptions=[{name:"settings.misc.upnp_recs",code:"0"},{name:"settings.misc.upnp_videos",code:"1"}],this.miscObserver={next:r=>{r.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},n.get(this.soptions[0].name).subscribe(r=>this.soptions[0].name=r),n.get(this.soptions[1].name).subscribe(r=>this.soptions[1].name=r),n.get(this.soptions[2].name).subscribe(r=>this.soptions[2].name=r),n.get(this.soptions[3].name).subscribe(r=>this.soptions[3].name=r),n.get(this.uoptions[0].name).subscribe(r=>this.uoptions[0].name=r),n.get(this.uoptions[1].name).subscribe(r=>this.uoptions[1].name=r),this.mythService.GetHostName().subscribe({next:r=>{this.hostName=r.String,this.getMiscellaneousData()},error:()=>this.errorCount++})}getMiscellaneousData(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MasterBackendOverride",Default:"0"}).subscribe({next:e=>this.MasterBackendOverride="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"DeletesFollowLinks",Default:"0"}).subscribe({next:e=>this.DeletesFollowLinks="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"TruncateDeletesSlowly",Default:"0"}).subscribe({next:e=>this.TruncateDeletesSlowly="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"HDRingbufferSize",Default:"9400"}).subscribe({next:e=>this.HDRingbufferSize=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"StorageScheduler",Default:"BalancedFreeSpace"}).subscribe({next:e=>this.StorageScheduler=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UPNPWmpSource",Default:"0"}).subscribe({next:e=>this.UPNPWmpSource=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"MiscStatusScript",Default:""}).subscribe({next:e=>this.MiscStatusScript=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"DisableAutomaticBackup",Default:"0"}).subscribe({next:e=>this.DisableAutomaticBackup="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"DisableFirewireReset",Default:"0"}).subscribe({next:e=>this.DisableFirewireReset="1"==e.String,error:()=>this.errorCount++})}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MasterBackendOverride",Value:this.MasterBackendOverride?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"DeletesFollowLinks",Value:this.DeletesFollowLinks?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"TruncateDeletesSlowly",Value:this.TruncateDeletesSlowly?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"HDRingbufferSize",Value:String(this.HDRingbufferSize)}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"StorageScheduler",Value:this.StorageScheduler}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"UPNPWmpSource",Value:this.UPNPWmpSource}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"MiscStatusScript",Value:this.MiscStatusScript}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"DisableAutomaticBackup",Value:this.DisableAutomaticBackup?"1":"0"}).subscribe(this.miscObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"DisableFirewireReset",Value:this.DisableFirewireReset?"1":"0"}).subscribe(this.miscObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-misc-settings"]],viewQuery:function(e,n){if(1&e&&j(PK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","miscsettings",1,"ml-3","mr-3"],["miscsettings","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],[1,"form-group","field"],["name","MasterBackendOverride",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["name","DeletesFollowLinks",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["name","TruncateDeletesSlowly",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["for","HDRingbufferSize",1,"label","block"],["name","HDRingbufferSize","id","HDRingbufferSize",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","StorageScheduler",1,"label","block"],["optionLabel","name","optionValue","code","name","StorageScheduler",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["for","UPNPWmpSource",1,"label","block"],["optionLabel","name","optionValue","code","name","UPNPWmpSource",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],[1,"mb-4","w-full"],["for","MiscStatusScript",1,"label","block"],["pInputText","","id","MiscStatusScript","name","MiscStatusScript",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["href","http://www.mythtv.org/wiki/Miscellaneous_Status_Information","target","_blank"],["name","DisableAutomaticBackup",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["name","DisableFirewireReset",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,FK,2,3,"ng-template",3),_(4,NK,2,3,"ng-template",4),_(5,VK,70,84,"ng-template",5),_(6,qK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,rn,Te,_e,dt,Vt,Ye,Q,qe,ve],pipes:[de],styles:["a[_ngcontent-%COMP%]:link, a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:active{background-color:#fff}"]}),t})();const GK=["eitscanopt"];function zK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.eit.title")," ")}function jK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.eit.subtitle")," ")}function $K(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().EITTransportTimeout=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().EITCrawIdleStart=s}),c(),l(15,"small",12),g(16),m(17,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,14,"settings.eit.timeout_label")),a(2),p("ngModel",e.EITTransportTimeout)("showButtons",!0)("min",1)("max",15)("step",1),a(2),T(" ",f(9,16,"settings.eit.timeout_desc")," "),a(4),S(f(13,18,"settings.eit.crawl_label")),a(2),p("ngModel",e.EITCrawIdleStart)("showButtons",!0)("min",30)("max",7200)("step",30),a(2),T(" ",f(17,20,"settings.eit.crawl_desc")," ")}}function WK(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function KK(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function QK(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,WK,2,3,"p-message",17),_(3,KK,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let JK=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.EITTransportTimeout=5,this.EITCrawIdleStart=60,this.eitObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getEITScanner()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getEITScanner(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"EITTransportTimeout",Default:"5"}).subscribe({next:e=>this.EITTransportTimeout=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"EITCrawIdleStart",Default:"60"}).subscribe({next:e=>this.EITCrawIdleStart=Number(e.String),error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"EITTransportTimeout",Value:String(this.EITTransportTimeout)}).subscribe(this.eitObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"EITCrawIdleStart",Value:String(this.EITCrawIdleStart)}).subscribe(this.eitObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-eit-scanner"]],viewQuery:function(e,n){if(1&e&&j(GK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","eitscanopt",1,"ml-3","mr-3"],["eitscanopt","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","EITTransportTimeout",1,"label","block"],["name","EITTransportTimeout","id","EITTransportTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","EITCrawIdleStart",1,"label","block"],["name","EITCrawIdleStart","id","EITCrawIdleStart",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,zK,2,3,"ng-template",3),_(4,jK,2,3,"ng-template",4),_(5,$K,18,22,"ng-template",5),_(6,QK,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,dt,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const YK=["shutwakeopt"];function ZK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.shutwake.title")," ")}function XK(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.shutwake.subtitle")," ")}function eQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"input",11),C("ngModelChange",function(s){return v(e),d().startupCommand=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"p-checkbox",13),C("ngModelChange",function(s){return v(e),d().blockSDWUwithoutClient=s}),m(12,"translate"),c(),l(13,"small",12),g(14),m(15,"translate"),c()(),l(16,"div",9)(17,"label",14),g(18),m(19,"translate"),c(),l(20,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().idleTimeoutSecs=s}),c(),l(21,"small",12),g(22),m(23,"translate"),c()(),l(24,"div",9)(25,"label",16),g(26),m(27,"translate"),c(),l(28,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().idleWaitForRecordingTime=s}),c(),l(29,"small",12),g(30),m(31,"translate"),c()(),l(32,"div",9)(33,"label",18),g(34),m(35,"translate"),c(),l(36,"p-inputNumber",19),C("ngModelChange",function(s){return v(e),d().StartupSecsBeforeRecording=s}),c(),l(37,"small",12),g(38),m(39,"translate"),c()(),l(40,"div",9)(41,"label",20),g(42),m(43,"translate"),c(),l(44,"input",21),C("ngModelChange",function(s){return v(e),d().WakeupTimeFormat=s}),c(),l(45,"small",12),g(46),m(47,"translate"),c()(),l(48,"div",9)(49,"label",22),g(50),m(51,"translate"),c(),l(52,"input",23),C("ngModelChange",function(s){return v(e),d().SetWakeuptimeCommand=s}),c(),l(53,"small",12),g(54),m(55,"translate"),c()(),l(56,"div",9)(57,"label",24),g(58),m(59,"translate"),c(),l(60,"input",25),C("ngModelChange",function(s){return v(e),d().ServerHaltCommand=s}),c(),l(61,"small",12),g(62),m(63,"translate"),c()(),l(64,"div",9)(65,"label",26),g(66),m(67,"translate"),c(),l(68,"input",27),C("ngModelChange",function(s){return v(e),d().preSDWUCheckCommand=s}),c(),l(69,"small",12),g(70),m(71,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,40,"settings.shutwake.startcmd_label")),a(2),p("ngModel",e.startupCommand),a(2),T(" ",f(9,42,"settings.shutwake.startcmd_desc")," "),a(3),D("label",f(12,44,"settings.shutwake.block_label")),p("ngModel",e.blockSDWUwithoutClient)("binary",!0),a(3),T(" ",f(15,46,"settings.shutwake.block_desc")," "),a(4),T("",f(19,48,"settings.shutwake.idletime_label"),"}"),a(2),p("ngModel",e.idleTimeoutSecs)("showButtons",!0)("min",0)("max",1200)("step",5),a(2),T(" ",f(23,50,"settings.shutwake.idletime_desc")," "),a(4),S(f(27,52,"settings.shutwake.maxwait_label")),a(2),p("ngModel",e.idleWaitForRecordingTime)("showButtons",!0)("min",0)("max",300)("step",1),a(2),T(" ",f(31,54,"settings.shutwake.maxwait_desc")," "),a(4),S(f(35,56,"settings.shutwake.startbefore_label")),a(2),p("ngModel",e.StartupSecsBeforeRecording)("showButtons",!0)("min",0)("max",300)("step",1),a(2),T(" ",f(39,58,"settings.shutwake.startbefore_desc")," "),a(4),S(f(43,60,"settings.shutwake.timeformat_label")),a(2),p("ngModel",e.WakeupTimeFormat),a(2),T(" ",f(47,62,"settings.shutwake.timeformat_desc")," "),a(4),S(f(51,64,"settings.shutwake.timecmd_label")),a(2),p("ngModel",e.SetWakeuptimeCommand),a(2),T(" ",f(55,66,"settings.shutwake.timecmd_desc")," "),a(4),S(f(59,68,"settings.shutwake.serverhalt_label")),a(2),p("ngModel",e.ServerHaltCommand),a(2),T(" ",f(63,70,"settings.shutwake.serverhalt_desc")," "),a(4),S(f(67,72,"settings.shutwake.preshut_label")),a(2),p("ngModel",e.preSDWUCheckCommand),a(2),T(" ",f(71,74,"settings.shutwake.preshut_desc")," ")}}function tQ(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nQ(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function iQ(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,tQ,2,3,"p-message",30),_(3,nQ,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let sQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.startupCommand="",this.blockSDWUwithoutClient=!0,this.idleTimeoutSecs=0,this.idleWaitForRecordingTime=15,this.StartupSecsBeforeRecording=120,this.WakeupTimeFormat="hh =mm yyyy-MM-dd",this.SetWakeuptimeCommand="",this.ServerHaltCommand="sudo /sbin/halt -p",this.preSDWUCheckCommand="",this.swObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getShutWake()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getShutWake(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"startupCommand",Default:""}).subscribe({next:e=>this.startupCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"blockSDWUwithoutClient",Default:"1"}).subscribe({next:e=>this.blockSDWUwithoutClient="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"idleTimeoutSecs",Default:"0"}).subscribe({next:e=>this.idleTimeoutSecs=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"idleWaitForRecordingTime",Default:""}).subscribe({next:e=>this.idleWaitForRecordingTime=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"StartupSecsBeforeRecording",Default:"120"}).subscribe({next:e=>this.StartupSecsBeforeRecording=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WakeupTimeFormat",Default:"hh:mm yyyy-MM-dd"}).subscribe({next:e=>this.WakeupTimeFormat=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"SetWakeuptimeCommand",Default:""}).subscribe({next:e=>this.SetWakeuptimeCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"ServerHaltCommand",Default:"sudo /sbin/halt -p"}).subscribe({next:e=>this.ServerHaltCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"preSDWUCheckCommand",Default:""}).subscribe({next:e=>this.preSDWUCheckCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"startupCommand",Value:this.startupCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"blockSDWUwithoutClient",Value:this.blockSDWUwithoutClient?"1":"0"}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"idleTimeoutSecs",Value:String(this.idleTimeoutSecs)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"idleWaitForRecordingTime",Value:String(this.idleWaitForRecordingTime)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"StartupSecsBeforeRecording",Value:String(this.StartupSecsBeforeRecording)}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WakeupTimeFormat",Value:this.WakeupTimeFormat}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"SetWakeuptimeCommand",Value:this.SetWakeuptimeCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"ServerHaltCommand",Value:this.ServerHaltCommand}).subscribe(this.swObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"preSDWUCheckCommand",Value:this.preSDWUCheckCommand}).subscribe(this.swObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-shutdown-wakeup"]],viewQuery:function(e,n){if(1&e&&j(YK,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","shutwakeopt",1,"ml-3","mr-3"],["shutwakeopt","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","startupCommand",1,"label","block"],["pInputText","","id","startupCommand","name","startupCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"block"],["inputId","blockSDWUwithoutClient","name","blockSDWUwithoutClient",1,"mb-2","w-full","label",3,"ngModel","binary","label","ngModelChange"],["for","idleTimeoutSecs",1,"label","block"],["name","idleTimeoutSecs","id","idleTimeoutSecs",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","idleWaitForRecordingTime",1,"label","block"],["name","idleWaitForRecordingTime","id","idleWaitForRecordingTime",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","StartupSecsBeforeRecording",1,"label","block"],["name","StartupSecsBeforeRecording","id","StartupSecsBeforeRecording",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","WakeupTimeFormat",1,"label","block"],["pInputText","","id","WakeupTimeFormat","name","WakeupTimeFormat",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","SetWakeuptimeCommand",1,"label","block"],["pInputText","","id","SetWakeuptimeCommand","name","SetWakeuptimeCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","ServerHaltCommand",1,"label","block"],["pInputText","","id","ServerHaltCommand","name","ServerHaltCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","preSDWUCheckCommand",1,"label","block"],["pInputText","","id","preSDWUCheckCommand","name","preSDWUCheckCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,ZK,2,3,"ng-template",3),_(4,XK,2,3,"ng-template",4),_(5,eQ,72,76,"ng-template",5),_(6,iQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,rn,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const rQ=["backendwakeup"];function oQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendwake.title")," ")}function aQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendwake.subtitle")," ")}function lQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"p-fieldset",8),m(2,"translate"),l(3,"div",9)(4,"label",10),g(5),m(6,"translate"),c(),l(7,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().WOLbackendReconnectWaitTime=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",9)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().WOLbackendConnectRetry=s}),c(),l(16,"small",12),g(17),m(18,"translate"),c()(),l(19,"div",9)(20,"label",15),g(21),m(22,"translate"),c(),l(23,"input",16),C("ngModelChange",function(s){return v(e),d().WOLbackendCommand=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()()(),l(27,"p-fieldset",8),m(28,"translate"),l(29,"div",9)(30,"label",17),g(31),m(32,"translate"),c(),l(33,"input",18),C("ngModelChange",function(s){return v(e),d().SleepCommand=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",9)(38,"label",19),g(39),m(40,"translate"),c(),l(41,"input",20),C("ngModelChange",function(s){return v(e),d().WakeUpCommand=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()()()()}if(2&t){const e=d();a(1),D("legend",f(2,29,"settings.backendwake.master.title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(6,31,"settings.backendwake.master.delay_label")),a(2),p("ngModel",e.WOLbackendReconnectWaitTime)("showButtons",!0)("min",0)("max",1200)("step",5),a(2),T(" ",f(10,33,"settings.backendwake.master.delay_desc")," "),a(4),S(f(14,35,"settings.backendwake.master.attempts_label")),a(2),p("ngModel",e.WOLbackendConnectRetry)("showButtons",!0)("min",1)("max",60)("step",1),a(2),T(" ",f(18,37,"settings.backendwake.master.attempts_desc")," "),a(4),S(f(22,39,"settings.backendwake.master.cmd_label")),a(2),p("ngModel",e.WOLbackendCommand),a(2),T(" ",f(26,41,"settings.backendwake.master.cmd_desc")," "),a(2),D("legend",f(28,43,"settings.backendwake.slave.title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(32,45,"settings.backendwake.slave.sleep_label")),a(2),p("ngModel",e.SleepCommand),a(2),T(" ",f(36,47,"settings.backendwake.slave.sleep_desc")," "),a(4),S(f(40,49,"settings.backendwake.slave.wake_label")),a(2),p("ngModel",e.WakeUpCommand),a(2),T(" ",f(44,51,"settings.backendwake.slave.wake_desc")," ")}}function cQ(t,i){1&t&&(k(0,"p-message",26),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function uQ(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function dQ(t,i){if(1&t){const e=I();l(0,"div",21)(1,"div",22),_(2,cQ,2,3,"p-message",23),_(3,uQ,2,3,"p-message",24),c(),l(4,"p-button",25),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let pQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.hostName="",this.successCount=0,this.errorCount=0,this.WOLbackendReconnectWaitTime=0,this.WOLbackendConnectRetry=5,this.WOLbackendCommand="",this.SleepCommand="",this.WakeUpCommand="",this.bewObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getBackendWake(){this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.getSettings()},error:()=>this.errorCount++})}getSettings(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendReconnectWaitTime",Default:"0"}).subscribe({next:e=>this.WOLbackendReconnectWaitTime=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendConnectRetry",Default:"5"}).subscribe({next:e=>this.WOLbackendConnectRetry=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"WOLbackendCommand",Default:""}).subscribe({next:e=>this.WOLbackendCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"SleepCommand",Default:""}).subscribe({next:e=>this.SleepCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"WakeUpCommand",Default:""}).subscribe({next:e=>this.WakeUpCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendReconnectWaitTime",Value:String(this.WOLbackendReconnectWaitTime)}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendConnectRetry",Value:String(this.WOLbackendConnectRetry)}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"WOLbackendCommand",Value:this.WOLbackendCommand}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"SleepCommand",Value:this.SleepCommand}).subscribe(this.bewObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"WakeUpCommand",Value:this.WakeUpCommand}).subscribe(this.bewObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-backend-wakeup"]],viewQuery:function(e,n){if(1&e&&j(rQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","backendwakeup",1,"ml-3","mr-3"],["backendwakeup","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],[1,"form-group","field"],["for","WOLbackendReconnectWaitTime",1,"label","block"],["name","WOLbackendReconnectWaitTime","id","WOLbackendReconnectWaitTime",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","WOLbackendConnectRetry",1,"label","block"],["name","WOLbackendConnectRetry","id","WOLbackendConnectRetry",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","WOLbackendCommand",1,"label","block"],["pInputText","","id","WOLbackendCommand","name","WOLbackendCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","SleepCommand",1,"label","block"],["pInputText","","id","SleepCommand","name","SleepCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","WakeUpCommand",1,"label","block"],["pInputText","","id","WakeUpCommand","name","WakeUpCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,oQ,2,3,"ng-template",3),_(4,aQ,2,3,"ng-template",4),_(5,lQ,45,53,"ng-template",5),_(6,dQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ui,dt,Te,_e,Ye,Q,qe,ve],pipes:[de],styles:[""]}),t})();const hQ=["backendcontrol"];function mQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendctrl.title")," ")}function fQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.backendctrl.subtitle")," ")}function gQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"input",11,12),C("ngModelChange",function(s){return v(e),d().BackendStopCommand=s}),c(),l(8,"small",13),g(9),m(10,"translate"),c()(),l(11,"div",9)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"input",15,12),C("ngModelChange",function(s){return v(e),d().BackendStartCommand=s}),c(),l(17,"small",13),g(18),m(19,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,6,"settings.backendctrl.stop_label")),a(2),p("ngModel",e.BackendStopCommand),a(3),T(" ",f(10,8,"settings.backendctrl.stop_desc")," "),a(4),S(f(14,10,"settings.backendctrl.start_label")),a(2),p("ngModel",e.BackendStartCommand),a(3),T(" ",f(19,12,"settings.backendctrl.start_desc")," ")}}function _Q(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function bQ(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function vQ(t,i){if(1&t){const e=I();l(0,"div",16)(1,"div",17),_(2,_Q,2,3,"p-message",18),_(3,bQ,2,3,"p-message",19),c(),l(4,"p-button",20),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let CQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.BackendStopCommand="killall mythbackend",this.BackendStartCommand="mythbackend",this.becObserver={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getBackendControl(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"BackendStopCommand",Default:"killall mythbackend"}).subscribe({next:e=>this.BackendStopCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"BackendStartCommand",Default:"mythbackend"}).subscribe({next:e=>this.BackendStartCommand=e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"BackendStopCommand",Value:this.BackendStopCommand}).subscribe(this.becObserver),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"BackendStartCommand",Value:this.BackendStartCommand}).subscribe(this.becObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-backend-control"]],viewQuery:function(e,n){if(1&e&&j(hQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","backendcontrol",1,"ml-3","mr-3"],["backendcontrol","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","BackendStopCommand",1,"label","block"],["pInputText","","id","BackendStopCommand","name","BackendStopCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["MiscStatusScript","ngModel"],[1,"block"],["for","BackendStartCommand",1,"label","block"],["pInputText","","id","BackendStartCommand","name","BackendStartCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,mQ,2,3,"ng-template",3),_(4,fQ,2,3,"ng-template",4),_(5,gQ,20,14,"ng-template",5),_(6,vQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const yQ=["jobqbackend"],wQ=["JobQueueWindowStartHT"],TQ=["JobQueueWindowEndHT"];function SQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqbackend.title")," ")}function xQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqbackend.subtitle")," ")}function DQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",11),C("ngModelChange",function(s){return v(e),d().JobQueueMaxSimultaneousJobs=s}),c(),l(7,"small",12),g(8),m(9,"translate"),c()(),l(10,"div",9)(11,"label",13),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().JobQueueCheckFrequency=s}),c(),l(15,"small",12),g(16),m(17,"translate"),c()(),l(18,"div",9)(19,"label",15),g(20),m(21,"translate"),c(),l(22,"p-calendar",16,17),C("ngModelChange",function(s){return v(e),d().JobQueueWindowStart=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()(),l(27,"div",9)(28,"label",18),g(29),m(30,"translate"),c(),l(31,"p-calendar",19,20),C("ngModelChange",function(s){return v(e),d().JobQueueWindowEnd=s}),c(),l(33,"small",12),g(34),m(35,"translate"),c()(),l(36,"div",9)(37,"label",21),g(38),m(39,"translate"),c(),l(40,"p-dropdown",22),C("ngModelChange",function(s){return v(e),d().JobQueueCPU=s}),c(),l(41,"small",12),g(42),m(43,"translate"),c()(),l(44,"div",9)(45,"p-checkbox",23),C("ngModelChange",function(s){return v(e),d().JobAllowMetadata=s}),m(46,"translate"),c(),l(47,"small",12),g(48),m(49,"translate"),c()(),l(50,"div",9)(51,"p-checkbox",24),C("ngModelChange",function(s){return v(e),d().JobAllowCommFlag=s}),m(52,"translate"),c(),l(53,"small",12),g(54),m(55,"translate"),c()(),l(56,"div",9)(57,"p-checkbox",25),C("ngModelChange",function(s){return v(e),d().JobAllowTranscode=s}),m(58,"translate"),c(),l(59,"small",12),g(60),m(61,"translate"),c()(),l(62,"div",9)(63,"p-checkbox",26),C("ngModelChange",function(s){return v(e),d().JobAllowPreview=s}),m(64,"translate"),c(),l(65,"small",12),g(66),m(67,"translate"),c()(),l(68,"div",9)(69,"p-checkbox",27),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob1=s}),c(),l(70,"small",12),g(71),m(72,"translate"),c()(),l(73,"div",9)(74,"p-checkbox",28),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob2=s}),c(),l(75,"small",12),g(76),m(77,"translate"),c()(),l(78,"div",9)(79,"p-checkbox",29),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob3=s}),c(),l(80,"small",12),g(81),m(82,"translate"),c()(),l(83,"div",9)(84,"p-checkbox",30),C("ngModelChange",function(s){return v(e),d().JobAllowUserJob4=s}),c(),l(85,"small",12),g(86),m(87,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,60,"settings.jobqbackend.maxjobs_label")),a(2),p("ngModel",e.JobQueueMaxSimultaneousJobs)("showButtons",!0)("min",1)("max",10)("step",1),a(2),T(" ",f(9,62,"settings.jobqbackend.maxjobs_desc")," "),a(4),S(f(13,64,"settings.jobqbackend.freq_label")),a(2),p("ngModel",e.JobQueueCheckFrequency)("showButtons",!0)("min",5)("max",300)("step",5),a(2),T(" ",f(17,66,"settings.jobqbackend.freq_desc")," "),a(4),S(f(21,68,"settings.jobqbackend.start_label")),a(2),p("ngModel",e.JobQueueWindowStart)("timeOnly",!0)("readonlyInput",!0),a(3),T(" ",f(26,70,"settings.jobqbackend.start_desc")," "),a(4),S(f(30,72,"settings.jobqbackend.end_label")),a(2),p("ngModel",e.JobQueueWindowEnd)("timeOnly",!0)("readonlyInput",!0),a(3),T(" ",f(35,74,"settings.jobqbackend.end_desc")," "),a(4),S(f(39,76,"settings.jobqbackend.cpu_label")),a(2),p("options",e.cpuOptions)("ngModel",e.JobQueueCPU),a(2),T(" ",f(43,78,"settings.jobqbackend.cpu_desc")," "),a(3),D("label",f(46,80,"settings.jobqbackend.meta_label")),p("ngModel",e.JobAllowMetadata)("binary",!0),a(3),T(" ",f(49,82,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(52,84,"settings.jobqbackend.comm_label")),p("ngModel",e.JobAllowCommFlag)("binary",!0),a(3),T(" ",f(55,86,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(58,88,"settings.jobqbackend.trans_label")),p("ngModel",e.JobAllowTranscode)("binary",!0),a(3),T(" ",f(61,90,"settings.jobqbackend.allow_desc")," "),a(3),D("label",f(64,92,"settings.jobqbackend.preview_label")),p("ngModel",e.JobAllowPreview)("binary",!0),a(3),T(" ",f(67,94,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[0]),p("ngModel",e.JobAllowUserJob1)("binary",!0),a(2),T(" ",f(72,96,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[1]),p("ngModel",e.JobAllowUserJob2)("binary",!0),a(2),T(" ",f(77,98,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[2]),p("ngModel",e.JobAllowUserJob3)("binary",!0),a(2),T(" ",f(82,100,"settings.jobqbackend.allow_desc")," "),a(3),D("label",e.JobQCmds.UserJobDesc[3]),p("ngModel",e.JobAllowUserJob4)("binary",!0),a(2),T(" ",f(87,102,"settings.jobqbackend.allow_desc")," ")}}function MQ(t,i){1&t&&(k(0,"p-message",36),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function kQ(t,i){1&t&&(k(0,"p-message",37),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function IQ(t,i){if(1&t){const e=I();l(0,"div",31)(1,"div",32),_(2,MQ,2,3,"p-message",33),_(3,kQ,2,3,"p-message",34),c(),l(4,"p-button",35),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let EQ=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.mythService=s,this.successCount=0,this.errorCount=0,this.hostName="",this.JobQueueMaxSimultaneousJobs=1,this.JobQueueCheckFrequency=60,this.JobQueueWindowStart=new Date(0),this.JobQueueWindowStartHT$=new Je,this.JobQueueWindowEnd=new Date(0),this.JobQueueWindowEndHT$=new Je,this.JobQueueCPU="0",this.JobAllowMetadata=!0,this.JobAllowCommFlag=!0,this.JobAllowTranscode=!0,this.JobAllowPreview=!0,this.JobAllowUserJob1=!1,this.JobAllowUserJob2=!1,this.JobAllowUserJob3=!1,this.JobAllowUserJob4=!1,this.cpuOptions=[{name:"settings.jobqbackend.cpu_low",code:"0"},{name:"settings.jobqbackend.cpu_med",code:"1"},{name:"settings.jobqbackend.cpu_high",code:"2"}],this.jqbObserver={next:r=>{r.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getJobQBackend(),this.JobQueueWindowStartHT$.subscribe({complete:()=>this.JobQueueWindowStartHT.updateInputfield()}),this.JobQueueWindowEndHT$.subscribe({complete:()=>this.JobQueueWindowEndHT.updateInputfield()}),this.JobQCmds=this.setupService.getJobQCommands(),n.get(this.cpuOptions[0].name).subscribe(r=>this.cpuOptions[0].name=r),n.get(this.cpuOptions[1].name).subscribe(r=>this.cpuOptions[1].name=r),n.get(this.cpuOptions[2].name).subscribe(r=>this.cpuOptions[2].name=r)}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getJobQBackend(){this.successCount=0,this.errorCount=0,this.setupService.parseTime(this.JobQueueWindowStart,"00:00"),this.setupService.parseTime(this.JobQueueWindowEnd,"23:59"),this.mythService.GetHostName().subscribe({next:e=>{this.hostName=e.String,this.getSettings()},error:()=>this.errorCount++})}getSettings(){this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueMaxSimultaneousJobs",Default:"1"}).subscribe({next:e=>this.JobQueueMaxSimultaneousJobs=Number(e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueCheckFrequency",Default:"60"}).subscribe({next:e=>this.JobQueueCheckFrequency=Number(e.String),error:()=>this.errorCount++}),this.JobQueueWindowStartHT$=this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueWindowStart",Default:"00:00"}),this.JobQueueWindowStartHT$.subscribe({next:e=>this.setupService.parseTime(this.JobQueueWindowStart,e.String),error:()=>this.errorCount++}),this.JobQueueWindowEndHT$=this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueWindowEnd",Default:"23:59"}),this.JobQueueWindowEndHT$.subscribe({next:e=>this.setupService.parseTime(this.JobQueueWindowEnd,e.String),error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobQueueCPU",Default:"0"}).subscribe({next:e=>this.JobQueueCPU=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowMetadata",Default:"1"}).subscribe({next:e=>this.JobAllowMetadata="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowCommFlag",Default:"1"}).subscribe({next:e=>this.JobAllowCommFlag="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowTranscode",Default:"1"}).subscribe({next:e=>this.JobAllowTranscode="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowPreview",Default:"1"}).subscribe({next:e=>this.JobAllowPreview="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob1",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob1="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob2",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob2="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob3",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob3="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:this.hostName,Key:"JobAllowUserJob4",Default:"0"}).subscribe({next:e=>this.JobAllowUserJob4="1"==e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueMaxSimultaneousJobs",Value:String(this.JobQueueMaxSimultaneousJobs)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueCheckFrequency",Value:String(this.JobQueueCheckFrequency)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueWindowStart",Value:this.setupService.formatTime(this.JobQueueWindowStart)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueWindowEnd",Value:this.setupService.formatTime(this.JobQueueWindowEnd)}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobQueueCPU",Value:this.JobQueueCPU}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowMetadata",Value:this.JobAllowMetadata?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowCommFlag",Value:this.JobAllowCommFlag?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowTranscode",Value:this.JobAllowTranscode?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowPreview",Value:this.JobAllowPreview?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob1",Value:this.JobAllowUserJob1?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob2",Value:this.JobAllowUserJob2?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob3",Value:this.JobAllowUserJob3?"1":"0"}).subscribe(this.jqbObserver),this.mythService.PutSetting({HostName:this.hostName,Key:"JobAllowUserJob4",Value:this.JobAllowUserJob4?"1":"0"}).subscribe(this.jqbObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-backend"]],viewQuery:function(e,n){if(1&e&&(j(yQ,5),j(wQ,5),j(TQ,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.JobQueueWindowStartHT=s.first),V(s=B())&&(n.JobQueueWindowEndHT=s.first)}},decls:7,vars:0,consts:[["name","jobqbackend",1,"ml-3","mr-3"],["jobqbackend","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","JobQueueMaxSimultaneousJobs",1,"label","block"],["name","JobQueueMaxSimultaneousJobs","id","JobQueueMaxSimultaneousJobs",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"block"],["for","JobQueueCheckFrequency",1,"label","block"],["name","JobQueueCheckFrequency","id","JobQueueCheckFrequency",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","JobQueueWindowStart",1,"label","block"],["name","JobQueueWindowStart","id","JobQueueWindowStart","ngControl","JobQueueWindowStart",3,"ngModel","timeOnly","readonlyInput","ngModelChange"],["JobQueueWindowStartHT",""],["for","JobQueueWindowEnd",1,"label","block"],["name","JobQueueWindowEnd","id","JobQueueWindowEnd","ngControl","JobQueueWindowEnd",3,"ngModel","timeOnly","readonlyInput","ngModelChange"],["JobQueueWindowEndHT",""],["for","JobQueueCPU",1,"label","block"],["optionLabel","name","optionValue","code","name","JobQueueCPU",1,"block","w-15rem","mb-2",3,"options","ngModel","ngModelChange"],["inputId","JobAllowMetadata","name","JobAllowMetadata",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowCommFlag","name","JobAllowCommFlag",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowTranscode","name","JobAllowTranscode",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowPreview","name","JobAllowPreview",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob1","name","JobAllowUserJob1",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob2","name","JobAllowUserJob2",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob3","name","JobAllowUserJob3",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","JobAllowUserJob4","name","JobAllowUserJob4",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,SQ,2,3,"ng-template",3),_(4,xQ,2,3,"ng-template",4),_(5,DQ,88,104,"ng-template",5),_(6,IQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,dt,Te,_e,xr,Vt,rn,Q,qe,ve],pipes:[de],styles:[""]}),t})();const RQ=["jobqglobal"];function LQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqglobal.title")," ")}function OQ(t,i){}function AQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().JobsRunOnRecordHost=s}),m(4,"translate"),c(),l(5,"small",11),g(6),m(7,"translate"),c()(),l(8,"div",9)(9,"p-checkbox",12),C("ngModelChange",function(s){return v(e),d().AutoCommflagWhileRecording=s}),m(10,"translate"),c(),l(11,"small",11),g(12),m(13,"translate"),c()(),l(14,"div",9)(15,"label",13),g(16),m(17,"translate"),c(),l(18,"input",14),C("ngModelChange",function(s){return v(e),d().JobQueueCommFlagCommand=s}),c(),l(19,"small",11),g(20),m(21,"translate"),c()(),l(22,"div",9)(23,"label",15),g(24),m(25,"translate"),c(),l(26,"input",16),C("ngModelChange",function(s){return v(e),d().JobQueueTranscodeCommand=s}),c(),l(27,"small",11),g(28),m(29,"translate"),c()(),l(30,"div",9)(31,"p-checkbox",17),C("ngModelChange",function(s){return v(e),d().AutoTranscodeBeforeAutoCommflag=s}),m(32,"translate"),c(),l(33,"small",11),g(34),m(35,"translate"),c()(),l(36,"div",9)(37,"p-checkbox",18),C("ngModelChange",function(s){return v(e),d().SaveTranscoding=s}),m(38,"translate"),c(),l(39,"small",11),g(40),m(41,"translate"),c()()()()}if(2&t){const e=d();a(3),D("label",f(4,22,"settings.jobqglobal.runonrechost_label")),p("ngModel",e.JobsRunOnRecordHost)("binary",!0),a(3),T(" ",f(7,24,"settings.jobqglobal.runonrechost_desc")," "),a(3),D("label",f(10,26,"settings.jobqglobal.startcomm_label")),p("ngModel",e.AutoCommflagWhileRecording)("binary",!0),a(3),T(" ",f(13,28,"settings.jobqglobal.startcomm_desc")," "),a(4),S(f(17,30,"settings.jobqglobal.commcmd_label")),a(2),p("ngModel",e.JobQueueCommFlagCommand),a(2),T(" ",f(21,32,"settings.jobqglobal.commcmd_desc")," "),a(4),S(f(25,34,"settings.jobqglobal.transcmd_label")),a(2),p("ngModel",e.JobQueueTranscodeCommand),a(2),T(" ",f(29,36,"settings.jobqglobal.transcmd_desc")," "),a(3),D("label",f(32,38,"settings.jobqglobal.transfirst_label")),p("ngModel",e.AutoTranscodeBeforeAutoCommflag)("binary",!0),a(3),T(" ",f(35,40,"settings.jobqglobal.transfirst_desc")," "),a(3),D("label",f(38,42,"settings.jobqglobal.transsave_label")),p("ngModel",e.SaveTranscoding)("binary",!0),a(3),T(" ",f(41,44,"settings.jobqglobal.transsave_desc")," ")}}function PQ(t,i){1&t&&(k(0,"p-message",24),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function FQ(t,i){1&t&&(k(0,"p-message",25),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function NQ(t,i){if(1&t){const e=I();l(0,"div",19)(1,"div",20),_(2,PQ,2,3,"p-message",21),_(3,FQ,2,3,"p-message",22),c(),l(4,"p-button",23),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let VQ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.JobsRunOnRecordHost=!1,this.AutoCommflagWhileRecording=!1,this.JobQueueCommFlagCommand="mythcommflag",this.JobQueueTranscodeCommand="mythtranscode",this.AutoTranscodeBeforeAutoCommflag=!1,this.SaveTranscoding=!1,this.JobQGlobalObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getJobQGlobal()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getJobQGlobal(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobsRunOnRecordHost",Default:"0"}).subscribe({next:e=>this.JobsRunOnRecordHost="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"AutoCommflagWhileRecording",Default:"0"}).subscribe({next:e=>this.AutoCommflagWhileRecording="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobQueueCommFlagCommand",Default:"mythcommflag"}).subscribe({next:e=>this.JobQueueCommFlagCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"JobQueueTranscodeCommand",Default:"mythtranscode"}).subscribe({next:e=>this.JobQueueTranscodeCommand=e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"AutoTranscodeBeforeAutoCommflag",Default:"0"}).subscribe({next:e=>this.AutoTranscodeBeforeAutoCommflag="1"==e.String,error:()=>this.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"SaveTranscoding",Default:"0"}).subscribe({next:e=>this.SaveTranscoding="1"==e.String,error:()=>this.errorCount++})}saveForm(){this.successCount=0,this.errorCount=0,this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobsRunOnRecordHost",Value:this.JobsRunOnRecordHost?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"AutoCommflagWhileRecording",Value:this.AutoCommflagWhileRecording?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobQueueCommFlagCommand",Value:this.JobQueueCommFlagCommand}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"JobQueueTranscodeCommand",Value:this.JobQueueTranscodeCommand}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"AutoTranscodeBeforeAutoCommflag",Value:this.AutoTranscodeBeforeAutoCommflag?"1":"0"}).subscribe(this.JobQGlobalObs),this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"SaveTranscoding",Value:this.SaveTranscoding?"1":"0"}).subscribe(this.JobQGlobalObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-global"]],viewQuery:function(e,n){if(1&e&&j(RQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","jobqglobal",1,"ml-3","mr-3"],["jobqglobal","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["inputId","JobsRunOnRecordHost","name","JobsRunOnRecordHost",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"block"],["inputId","AutoCommflagWhileRecording","name","AutoCommflagWhileRecording",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["for","JobQueueCommFlagCommand",1,"label","block"],["pInputText","","id","JobQueueCommFlagCommand","name","JobQueueCommFlagCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","JobQueueTranscodeCommand",1,"label","block"],["pInputText","","id","JobQueueTranscodeCommand","name","JobQueueTranscodeCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["inputId","AutoTranscodeBeforeAutoCommflag","name","AutoTranscodeBeforeAutoCommflag",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["inputId","SaveTranscoding","name","SaveTranscoding",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,LQ,2,3,"ng-template",3),_(4,OQ,0,0,"ng-template",4),_(5,AQ,42,46,"ng-template",5),_(6,NQ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,rn,Te,_e,Ye,Q,qe,ve],pipes:[de],styles:[""]}),t})();const BQ=["jobqcommands"];function HQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqcommands.title")," ")}function qQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.jobqcommands.subtitle")," ")}const lS=function(t){return{num:t}};function UQ(t,i){if(1&t){const e=I();l(0,"div")(1,"div",10)(2,"label",11),k(3,"div",12),c(),l(4,"input",13,14),C("ngModelChange",function(s){const o=v(e).$implicit;return d(2).JobQCommandsData.UserJobDesc[o]=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()(),l(9,"div",10)(10,"label",11),k(11,"div",12),c(),l(12,"input",13,16),C("ngModelChange",function(s){const o=v(e).$implicit;return d(2).JobQCommandsData.UserJob[o]=s}),c(),l(14,"small",15),g(15),m(16,"translate"),c()()()}if(2&t){const e=i.$implicit,n=d(2);a(2),Bn("for","UserJobDesc",e,""),a(1),p("translate","settings.jobqcommands.job_label")("translateParams",z(18,lS,e+1)),a(1),Bn("id","UserJobDesc",e,"")("name","UserJobDesc",e,""),p("ngModel",n.JobQCommandsData.UserJobDesc[e]),a(3),T(" ",f(8,14,"settings.jobqcommands.job_desc")," "),a(3),Bn("for","UserJob",e,""),a(1),p("translate","settings.jobqcommands.command_label")("translateParams",z(20,lS,e+1)),a(1),Bn("id","UserJob",e,"")("name","UserJob",e,""),p("ngModel",n.JobQCommandsData.UserJob[e]),a(3),T(" ",f(16,16,"settings.jobqcommands.command_desc")," ")}}function GQ(t,i){if(1&t&&(l(0,"div",7)(1,"div",8),_(2,UQ,17,22,"div",9),c()()),2&t){const e=d();a(2),p("ngForOf",e.items)}}function zQ(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function jQ(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function $Q(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,zQ,2,3,"p-message",19),_(3,jQ,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.JobQCommandsData.successCount>0&&0==e.JobQCommandsData.errorCount&&!n.dirty),a(1),p("ngIf",e.JobQCommandsData.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let WQ=(()=>{class t{constructor(e){this.setupService=e,this.items=[0,1,2,3],this.JobQCommandsData=this.setupService.getJobQCommands()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}saveForm(){this.setupService.saveJobQCommands(this.currentForm)}}return t.\u0275fac=function(e){return new(e||t)(x(De))},t.\u0275cmp=G({type:t,selectors:[["app-jobqueue-commands"]],viewQuery:function(e,n){if(1&e&&j(BQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","jobqcommands",1,"ml-3","mr-3"],["jobqcommands","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[4,"ngFor","ngForOf"],[1,"form-group","field"],[1,"label","block",3,"for"],[3,"translate","translateParams"],["pInputText","",1,"mb-2","form-control","w-full",3,"id","ngModel","name","ngModelChange"],["UserJobDesc{{item}}","ngModel"],[1,"block"],["UserJob{{item}}","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,HQ,2,3,"ng-template",3),_(4,qQ,2,3,"ng-template",4),_(5,GQ,3,1,"ng-template",5),_(6,$Q,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,at,hu,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const KQ=["epgdownload"];function QQ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.epgdownload.title")," ")}function JQ(t,i){}function YQ(t,i){if(1&t){const e=I();l(0,"div",7)(1,"div",8)(2,"div",9)(3,"p-checkbox",10),C("ngModelChange",function(s){return v(e),d().MythFillEnabled=s}),m(4,"translate"),c(),l(5,"small",11),g(6),m(7,"translate"),c()()()()}if(2&t){const e=d();a(3),D("label",f(4,4,"settings.epgdownload.enabled_label")),p("ngModel",e.MythFillEnabled)("binary",!0),a(3),T(" ",f(7,6,"settings.epgdownload.enabled_desc")," ")}}function ZQ(t,i){1&t&&(k(0,"p-message",17),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function XQ(t,i){1&t&&(k(0,"p-message",18),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function eJ(t,i){if(1&t){const e=I();l(0,"div",12)(1,"div",13),_(2,ZQ,2,3,"p-message",14),_(3,XQ,2,3,"p-message",15),c(),l(4,"p-button",16),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let tJ=(()=>{class t{constructor(e,n){this.setupService=e,this.mythService=n,this.successCount=0,this.errorCount=0,this.MythFillEnabled=!0,this.EpgDownloadObs={next:s=>{s.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.getEpgDownload()}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}getEpgDownload(){this.successCount=0,this.errorCount=0,this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"MythFillEnabled",Default:"1"}).subscribe({next:e=>this.MythFillEnabled="1"==e.String,error:()=>this.errorCount++})}saveForm(){console.log("save form clicked"),this.successCount=0,this.errorCount=0,this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"MythFillEnabled",Value:this.MythFillEnabled?"1":"0"}).subscribe(this.EpgDownloadObs)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-epg-downloading"]],viewQuery:function(e,n){if(1&e&&j(KQ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},decls:7,vars:0,consts:[["name","epgdownload",1,"ml-3","mr-3"],["epgdownload","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["inputId","MythFillEnabled","name","MythFillEnabled",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,QQ,2,3,"ng-template",3),_(4,JQ,0,0,"ng-template",4),_(5,YQ,8,8,"ng-template",5),_(6,eJ,6,6,"ng-template",6),c()())},directives:[ze,Ge,He,Pe,ie,rn,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();function nJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[0],"")}}function iJ(t,i){1&t&&k(0,"app-host-address")}function sJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[1],"")}}function rJ(t,i){1&t&&k(0,"app-locale")}function oJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[2],"")}}function aJ(t,i){1&t&&k(0,"app-misc-settings")}function lJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[3],"")}}function cJ(t,i){1&t&&k(0,"app-eit-scanner")}function uJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[4],"")}}function dJ(t,i){1&t&&k(0,"app-shutdown-wakeup")}function pJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[5],"")}}function hJ(t,i){1&t&&k(0,"app-backend-wakeup")}function mJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[6],"")}}function fJ(t,i){1&t&&k(0,"app-backend-control")}function gJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[7],"")}}function _J(t,i){1&t&&k(0,"app-jobqueue-backend")}function bJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[8],"")}}function vJ(t,i){1&t&&k(0,"app-jobqueue-global")}function CJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[9],"")}}function yJ(t,i){1&t&&k(0,"app-jobqueue-commands")}function wJ(t,i){if(1&t&&(l(0,"b"),g(1),c()),2&t){const e=d();a(1),T("\xa0",e.dirtyMessages[10],"")}}function TJ(t,i){1&t&&k(0,"app-epg-downloading")}let SJ=(()=>{class t{constructor(e,n,s){this.setupService=e,this.translate=n,this.router=s,this.m_showHelp=!1,this.currentTab=-1,this.dirtyMessages=["","","","","","","","","","","","","","","",""],this.forms=[,,,,,,,,,,,,,,,,],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.setupService.setCurrentForm(null),n.get(this.dirtyText).subscribe(r=>this.dirtyText=r),n.get(this.warningText).subscribe(r=>this.warningText=r)}ngOnInit(){}onTabOpen(e){this.showDirty(),void 0===this.forms[e.index]&&(this.forms[e.index]=this.setupService.getCurrentForm()),this.currentTab=e.index,console.log("onTabOpen"),console.log(e),this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty()}showDirty(){-1!=this.currentTab&&(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}showHelp(){this.m_showHelp=!0}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(e=>e.length>0))||this.confirm(this.warningText)}onWindowClose(e){(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n.length>0))&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-general-settings"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:54,vars:42,consts:[[1,"col-12","w-full","p-0",3,"onClose","onOpen"],[3,"header"],["pTemplate","header"],["pTemplate","content"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"p-card")(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",0),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),l(5,"p-accordionTab",1),m(6,"translate"),_(7,nJ,2,1,"ng-template",2),_(8,iJ,1,0,"ng-template",3),c(),l(9,"p-accordionTab",1),m(10,"translate"),_(11,sJ,2,1,"ng-template",2),_(12,rJ,1,0,"ng-template",3),c(),l(13,"p-accordionTab",1),m(14,"translate"),_(15,oJ,2,1,"ng-template",2),_(16,aJ,1,0,"ng-template",3),c(),l(17,"p-accordionTab",1),m(18,"translate"),_(19,lJ,2,1,"ng-template",2),_(20,cJ,1,0,"ng-template",3),c(),l(21,"p-accordionTab",1),m(22,"translate"),_(23,uJ,2,1,"ng-template",2),_(24,dJ,1,0,"ng-template",3),c(),l(25,"p-accordionTab",1),m(26,"translate"),_(27,pJ,2,1,"ng-template",2),_(28,hJ,1,0,"ng-template",3),c(),l(29,"p-accordionTab",1),m(30,"translate"),_(31,mJ,2,1,"ng-template",2),_(32,fJ,1,0,"ng-template",3),c(),l(33,"p-accordionTab",1),m(34,"translate"),_(35,gJ,2,1,"ng-template",2),_(36,_J,1,0,"ng-template",3),c(),l(37,"p-accordionTab",1),m(38,"translate"),_(39,bJ,2,1,"ng-template",2),_(40,vJ,1,0,"ng-template",3),c(),l(41,"p-accordionTab",1),m(42,"translate"),_(43,CJ,2,1,"ng-template",2),_(44,yJ,1,0,"ng-template",3),c(),l(45,"p-accordionTab",1),m(46,"translate"),_(47,wJ,2,1,"ng-template",2),_(48,TJ,1,0,"ng-template",3),c()(),l(49,"div",4)(50,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/selectlanguage"])}),m(51,"translate"),c(),l(52,"p-button",6),C("onClick",function(){return n.router.navigate(["setupwizard/capture-cards"])}),m(53,"translate"),c()()()),2&e&&(a(2),S(f(3,14,"settings.general.title")),a(3),D("header",f(6,16,"settings.hostaddress.title")),a(4),D("header",f(10,18,"settings.locale.title")),a(4),D("header",f(14,20,"settings.misc.title")),a(4),D("header",f(18,22,"settings.eit.title")),a(4),D("header",f(22,24,"settings.shutwake.title")),a(4),D("header",f(26,26,"settings.backendwake.title")),a(4),D("header",f(30,28,"settings.backendctrl.title")),a(4),D("header",f(34,30,"settings.jobqbackend.title")),a(4),D("header",f(38,32,"settings.jobqglobal.title")),a(4),D("header",f(42,34,"settings.jobqcommands.title")),a(4),D("header",f(46,36,"settings.epgdownload.title")),a(5),D("label",f(51,38,"common.back")),a(2),D("label",f(53,40,"common.next")))},directives:[Pe,Ks,Ws,ie,xK,AK,UK,JK,sQ,pQ,CQ,EQ,VQ,WQ,tJ,ve],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})(),Gt=(()=>{class t{constructor(e){this.httpClient=e,this.diseqcTypes=[{description:"Switch",type:"switch",inactive:!1},{description:"Rotor",type:"rotor",inactive:!1},{description:"Unicable",type:"scr",inactive:!1},{description:"LNB",type:"lnb",inactive:!1}]}GetCaptureCardList(e,n){let s=(new ye).set("HostName",e).set("CardType",n);return this.httpClient.get("/Capture/GetCaptureCardList",{params:s})}GetCardTypeList(){return this.httpClient.get("/Capture/GetCardTypeList",{})}UpdateCaptureCard(e,n,s){return this.httpClient.post("/Capture/UpdateCaptureCard",{Cardid:e,Setting:n,Value:s})}DeleteCaptureCard(e){return this.httpClient.post("/Capture/RemoveCardInput",{CardInputId:e})}AddCaptureCard(e){return this.httpClient.post("/Capture/AddCaptureCard",e)}GetCaptureDeviceList(e){let n=(new ye).set("CardType",e);return this.httpClient.get("/Capture/GetCaptureDeviceList",{params:n})}GetDiseqcTreeList(){return this.httpClient.get("/Capture/GetDiseqcTreeList",{})}AddDiseqcTree(e){return this.httpClient.post("/Capture/AddDiseqcTree",e)}UpdateDiseqcTree(e){return this.httpClient.post("/Capture/UpdateDiseqcTree",e)}DeleteDiseqcTree(e){return this.httpClient.post("/Capture/RemoveDiseqcTree",{DiseqcId:e})}GetDiseqcConfigList(){return this.httpClient.get("/Capture/GetDiseqcConfigList",{})}AddDiseqcConfig(e){return this.httpClient.post("/Capture/AddDiseqcConfig",e)}DeleteDiseqcConfig(e){return console.log(e),this.httpClient.post("/Capture/RemoveDiseqcConfig",{CardId:e})}GetInputGroupList(){return this.httpClient.get("/Capture/GetUserInputGroupList",{})}SetInputMaxRecordings(e,n){return this.httpClient.post("/Capture/SetInputMaxRecordings",{InputId:e,Max:n})}AddUserInputGroup(e){return this.httpClient.post("/Capture/AddUserInputGroup",{Name:e})}LinkInputGroup(e,n){return this.httpClient.post("/Capture/LinkInputGroup",{InputId:e,InputGroupId:n})}UnlinkInputGroup(e,n){return this.httpClient.post("/Capture/UnlinkInputGroup",{InputId:e,InputGroupId:n})}GetRecProfileGroupList(e,n,s){let r=(new ye).set("GroupId",e).set("ProfileId",n).set("OnlyInUse",s);return this.httpClient.get("/Capture/GetRecProfileGroupList",{params:r})}AddRecProfile(e,n,s,r){return this.httpClient.post("/Capture/AddRecProfile",{GroupId:e,ProfileName:n,VideoCodec:s,AudioCodec:r})}DeleteRecProfile(e){return this.httpClient.post("/Capture/DeleteRecProfile",{ProfileId:e})}UpdateRecProfile(e,n,s){return this.httpClient.post("/Capture/UpdateRecProfile",{ProfileId:e,VideoCodec:n,AudioCodec:s})}UpdateRecProfileParam(e,n,s){return this.httpClient.post("/Capture/UpdateRecProfileParam",{ProfileId:e,Name:n,Value:s})}GetCardSubType(e){let n=(new ye).set("cardid",e);return this.httpClient.get("/Capture/GetCardSubType",{params:n})}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xJ(t,i){if(1&t){const e=I();l(0,"p-button",14),C("onClick",function(){return v(e),d().displayModal=!1}),m(1,"translate"),c(),l(2,"p-button",15),C("onClick",function(){return v(e),d().newCard()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",""==e.selectedCardType.CardType)}}function DJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){return v(e),d().displayDeleteAllonHost=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){return v(e),d().deleteAllOnHost()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function MJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){return v(e),d().displayDeleteAll=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){return v(e),d().deleteAllOnAllHosts()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function kJ(t,i){1&t&&(l(0,"div",18),k(1,"br")(2,"p-message",19),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function IJ(t,i){1&t&&(l(0,"div",18),k(1,"br")(2,"p-message",20),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function EJ(t,i){if(1&t&&(l(0,"div",24)(1,"div",25),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d().index,n=d();a(2),yo(" ",n.m_CaptureCardsFiltered[e].CardType," ",n.m_CaptureCardsFiltered[e].VideoDevice," (",n.m_CaptureCardsFiltered[e].DisplayName,") "),a(2),T("\xa0",n.dirtyMessages[e],"")}}function RJ(t,i){if(1&t){const e=I();l(0,"p-button",16),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",17),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function LJ(t,i){if(1&t&&k(0,"app-ceton",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function OJ(t,i){if(1&t&&k(0,"app-dvb",32),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)("diseqcTreeList",n.diseqcTreeList)("parent",n)}}function AJ(t,i){if(1&t&&k(0,"app-external",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function PJ(t,i){if(1&t&&k(0,"app-hdhomerun",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function FJ(t,i){if(1&t&&k(0,"app-iptv",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function NJ(t,i){if(1&t&&k(0,"app-import",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function VJ(t,i){if(1&t&&k(0,"app-demo",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function BJ(t,i){if(1&t&&k(0,"app-v4l2",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function HJ(t,i){if(1&t&&k(0,"app-hdpvr",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function qJ(t,i){if(1&t&&k(0,"app-satip",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function UJ(t,i){if(1&t&&k(0,"app-vbox",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function GJ(t,i){if(1&t&&k(0,"app-firewire",31),2&t){const e=d(2).index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)}}function zJ(t,i){1&t&&(l(0,"div"),k(1,"br"),g(2,"Not Supported "),c())}const xd=function(){return{width:"50vw"}},jJ=function(t,i,e){return{CardType:t,VideoDevice:i,DisplayName:e}};function $J(t,i){if(1&t){const e=I();l(0,"p-button",26),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",2),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,RJ,4,6,"ng-template",4),c(),l(11,"div",27),_(12,LJ,1,2,"app-ceton",28),_(13,OJ,1,4,"app-dvb",29),_(14,AJ,1,2,"app-external",28),_(15,PJ,1,2,"app-hdhomerun",28),_(16,FJ,1,2,"app-iptv",28),_(17,NJ,1,2,"app-import",28),_(18,VJ,1,2,"app-demo",28),_(19,BJ,1,2,"app-v4l2",28),_(20,HJ,1,2,"app-hdpvr",28),_(21,qJ,1,2,"app-satip",28),_(22,UJ,1,2,"app-vbox",28),_(23,GJ,1,2,"app-firewire",28),_(24,zJ,3,0,"div",30),c()}if(2&t){const e=d().index,n=d();D("label",f(1,24,"settings.capture.delete_this")),p("disabled",!n.m_CaptureCardsFiltered[e].CardId||n.setupService.schedulingEnabled),a(2),q(A(33,xd)),D("header",f(3,26,"settings.capture.delete_this")),p("visible",n.displayDeleteThis[e])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,28,"settings.common.ru_sure")),a(3),S(Dt(9,30,"settings.capture.delete_details",Rt(34,jJ,n.m_CaptureCardsFiltered[e].CardType,n.m_CaptureCardsFiltered[e].VideoDevice,n.m_CaptureCardsFiltered[e].DisplayName))),a(3),p("ngSwitch",n.m_CaptureCardsFiltered[e].CardType),a(1),p("ngSwitchCase","CETON"),a(1),p("ngSwitchCase","DVB"),a(1),p("ngSwitchCase","EXTERNAL"),a(1),p("ngSwitchCase","HDHOMERUN"),a(1),p("ngSwitchCase","FREEBOX"),a(1),p("ngSwitchCase","IMPORT"),a(1),p("ngSwitchCase","DEMO"),a(1),p("ngSwitchCase","V4L2ENC"),a(1),p("ngSwitchCase","HDPVR"),a(1),p("ngSwitchCase","SATIP"),a(1),p("ngSwitchCase","VBOX"),a(1),p("ngSwitchCase","FIREWIRE")}}function WJ(t,i){if(1&t){const e=I();l(0,"p-accordionTab",21),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,EJ,5,4,"ng-template",22),_(2,$J,25,38,"ng-template",23),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}const KJ=function(){return{height:"50vh"}},cS=function(t){return{host:t}};let uS=(()=>{class t{constructor(e,n,s,r,o){this.mythService=e,this.router=n,this.captureCardService=s,this.setupService=r,this.translate=o,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.m_hostName="",this.displayModal=!1,this.selectedCardType={CardType:"",Description:""},this.displayDeleteAllonHost=!1,this.displayDeleteAll=!1,this.successCount=0,this.expectedCount=0,this.errorCount=0,this.deleteAll=!1,this.delObserver={next:u=>{u.bool?(this.successCount++,this.successCount==this.expectedCount&&(this.deleteAll?(this.loadCards(!0),this.deleteAll=!1):this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1))):(this.errorCount++,this.deletedTab=-1,this.deleteAll=!1)},error:u=>{console.error(u),this.errorCount++,this.deleteAll=!1}},this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(u=>{this.m_hostName=u.String,this.loadCards(!0)}),o.get(this.dirtyText).subscribe(u=>this.dirtyText=u),o.get(this.warningText).subscribe(u=>this.warningText=u),o.get(this.deletedText).subscribe(u=>this.deletedText=u),o.get(this.newText).subscribe(u=>this.newText=u),this.captureCardService.GetCardTypeList().subscribe(u=>{this.cardTypes=u.CardTypeList.CardTypes,this.cardTypes.forEach(h=>{h.Inactive=t.supportedCardTypes.indexOf(h.CardType)<0})})}loadCards(e){this.m_CaptureCardList$=this.captureCardService.GetCaptureCardList("",""),this.m_CaptureCardList$.subscribe(n=>{this.m_CaptureCardList=n,e&&this.filterCards()})}filterCards(){this.m_CaptureCardsFiltered=this.m_CaptureCardList.CaptureCardList.CaptureCards.filter(e=>0==e.ParentId&&e.HostName==this.m_hostName),this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[];for(let e=0;e{this.diseqcTreeList=e},error:e=>{console.log("GetDiseqcTreeList",e),this.errorCount++}})}onTabOpen(e){this.successCount+this.errorCount>=this.expectedCount&&(this.errorCount=0,this.successCount=0,this.expectedCount=0),this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:this.m_CaptureCardsFiltered[this.currentTab].CardId?"":this.newText)}newCard(){this.displayModal=!1;let e={CardType:this.selectedCardType.CardType,HostName:this.m_hostName,ChannelTimeout:3e3,SignalTimeout:1e3};switch(e.CardType){case"EXTERNAL":e.ChannelTimeout=2e4;break;case"FREEBOX":e.VideoDevice="http://mafreebox.freebox.fr/freeboxtv/playlist.m3u",e.ChannelTimeout=3e4;break;case"SATIP":e.DVBDiSEqCType=1}for(let n=0;n{s.ParentId==n&&(console.log("DeleteThis (parent):",s.CardId),this.expectedCount++,this.captureCardService.DeleteCaptureCard(s.CardId).subscribe(this.delObserver))}),this.m_CaptureCardsFiltered[e].DiSEqCId=0,console.log("DeleteThis:",n),this.expectedCount++,this.captureCardService.DeleteCaptureCard(n).subscribe(this.delObserver)}deleteAllOnHost(){if(!(this.successCount+this.errorCount{e.HostName!=this.m_hostName&&(e.DiSEqCId=0,console.log("DeleteThis (other host):",e.CardId),this.expectedCount++,this.captureCardService.DeleteCaptureCard(e.CardId).subscribe(this.delObserver))}))}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.supportedCardTypes=["CETON","DVB","EXTERNAL","HDHOMERUN","FREEBOX","IMPORT","DEMO","V4L2ENC","HDPVR","SATIP","VBOX","FIREWIRE"],t.\u0275fac=function(e){return new(e||t)(x(Ut),x(It),x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-capture-cards"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:42,vars:72,consts:[[1,"m-5"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["optionLabel","Description","optionDisabled","Inactive",3,"options","ngModel","listStyle","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","click"],["styleClass","p-button-danger","icon","pi pi-trash","iconPos","left",3,"label","disabled","click"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-11","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"ngSwitch"],[3,"card","cardList",4,"ngSwitchCase"],[3,"card","cardList","diseqcTreeList","parent",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"card","cardList"],[3,"card","cardList","diseqcTreeList","parent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayModal=!0}),m(5,"translate"),c(),l(6,"p-dialog",2),C("visibleChange",function(r){return n.displayModal=r}),m(7,"translate"),l(8,"p"),g(9),m(10,"translate"),c(),l(11,"p-listbox",3),C("ngModelChange",function(r){return n.selectedCardType=r})("onDblClick",function(){return n.newCard()}),c(),_(12,xJ,4,7,"ng-template",4),c(),g(13," \xa0 "),l(14,"p-button",5),C("click",function(){return n.displayDeleteAllonHost=!0}),m(15,"translate"),c(),l(16,"p-dialog",2),C("visibleChange",function(r){return n.displayDeleteAllonHost=r}),m(17,"translate"),l(18,"h2"),g(19),m(20,"translate"),c(),_(21,DJ,4,6,"ng-template",4),c(),g(22," \xa0 "),l(23,"p-button",6),C("click",function(){return n.displayDeleteAll=!0}),m(24,"translate"),c(),l(25,"p-dialog",2),C("visibleChange",function(r){return n.displayDeleteAll=r}),m(26,"translate"),l(27,"h2"),g(28),m(29,"translate"),c(),_(30,MJ,4,6,"ng-template",4),c(),k(31,"br"),l(32,"div",7),_(33,kJ,5,3,"div",8),_(34,IJ,5,3,"div",8),c(),l(35,"p-accordion",9),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(36,WJ,3,2,"p-accordionTab",10),c(),l(37,"div",11)(38,"p-button",12),C("onClick",function(){return n.router.navigate(["setupwizard/general"])}),m(39,"translate"),c(),l(40,"p-button",13),C("onClick",function(){return n.router.navigate(["setupwizard/recording-profiles"])}),m(41,"translate"),c()()()),2&e&&(a(2),S(f(3,38,"settings.capture.title")),a(2),D("label",f(5,40,"settings.capture.new_capture_card")),a(2),q(A(64,xd)),D("header",f(7,42,"settings.capture.new_capture_card")),p("visible",n.displayModal)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(10,44,"settings.capture.select_type")),a(2),p("options",n.cardTypes)("ngModel",n.selectedCardType)("listStyle",A(65,KJ)),a(3),D("label",Dt(15,46,"settings.capture.delete_on_host",z(66,cS,n.m_hostName))),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(68,xd)),D("header",Dt(17,49,"settings.capture.delete_on_host",z(69,cS,n.m_hostName))),p("visible",n.displayDeleteAllonHost)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(20,52,"settings.common.ru_sure")),a(4),D("label",f(24,54,"settings.capture.delete_all")),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(71,xd)),D("header",f(26,56,"settings.capture.delete_all_all")),p("visible",n.displayDeleteAll)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(29,58,"settings.common.ru_sure")),a(5),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.m_CaptureCardsFiltered),a(2),D("label",f(39,60,"common.back")),a(2),D("label",f(41,62,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();function QJ(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d();a(2),T(" ",n.Name," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function JJ(t,i){1&t&&_(0,QJ,5,2,"div",9),2&t&&p("ngIf",d(2).readyCount>0)}function YJ(t,i){if(1&t&&k(0,"app-profile-group",12),2&t){const e=d().$implicit,n=d();p("group",e)("parentComponent",n)}}function ZJ(t,i){if(1&t){const e=I();l(0,"p-accordionTab",6),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,JJ,1,1,"ng-template",7),_(2,YJ,1,2,"ng-template",8),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}let dS=(()=>{class t{constructor(e,n,s,r){this.captureCardService=e,this.router=n,this.translate=s,this.setupService=r,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.activeTab=[],this.readyCount=0,this.profileGroups=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.groups=[],this.setupService.setCurrentForm(null),this.loadGroups(),s.get(this.dirtyText).subscribe(o=>this.dirtyText=o),s.get(this.warningText).subscribe(o=>this.warningText=o)}loadGroups(){this.captureCardService.GetRecProfileGroupList(0,0,!0).subscribe(n=>{this.groups=n.RecProfileGroupList.RecProfileGroups,this.readyCount++})}ngOnInit(){}onTabOpen(e){this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.profileGroups[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.profileGroups[this.currentTab].allClean()?"":this.dirtyText)}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=!0;return this.profileGroups.forEach(n=>{n.allClean()||(e=!1)}),!!e||this.confirm(this.warningText)}onWindowClose(e){let n=!0;this.profileGroups.forEach(s=>{s.allClean()||(n=!1)}),n||(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(It),x(Le),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-recording-profiles"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:10,consts:[[1,"md:m-5"],[1,"col-12","w-full",3,"onOpen","onClose"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],["class","grid w-full",4,"ngIf"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"group","parentComponent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",1),C("onOpen",function(r){return n.onTabOpen(r)})("onClose",function(r){return n.onTabClose(r)}),_(5,ZJ,3,1,"p-accordionTab",2),c(),l(6,"div",3)(7,"p-button",4),C("onClick",function(){return n.router.navigate(["setupwizard/capture-cards"])}),m(8,"translate"),c(),l(9,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/video-sources"])}),m(10,"translate"),c()()()),2&e&&(a(2),S(f(3,4,"settings.rprofiles.title")),a(3),p("ngForOf",n.groups),a(2),D("label",f(8,6,"common.back")),a(2),D("label",f(10,8,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})(),Or=(()=>{class t{constructor(e){this.httpClient=e}AddDBChannel(e){return this.httpClient.post("/Channel/AddDBChannel",e)}UpdateDBChannel(e){return this.httpClient.post("/Channel/UpdateDBChannel",e)}AddVideoSource(e){return this.httpClient.post("/Channel/AddVideoSource",e)}FetchChannelsFromSource(e){let n=(new ye).set("SourceId",e.SourceId).set("CardId",e.CardId).set("WaitForFinish",e.WaitForFinish);return this.httpClient.get("/Channel/FetchChannelsFromSource",{params:n})}GetChannelInfo(e){let n=(new ye).set("ChanID",e);return this.httpClient.get("/Channel/GetChannelInfo",{params:n})}GetChannelInfoList(e){let n=new ye;return void 0!==e.SourceID&&(n=n.set("SourceID",e.SourceID)),void 0!==e.ChannelGroupID&&(n=n.set("ChannelGroupID",e.ChannelGroupID)),void 0!==e.StartIndex&&(n=n.set("StartIndex",e.StartIndex)),void 0!==e.Count&&(n=n.set("Count",e.Count)),void 0!==e.OnlyVisible&&(n=n.set("OnlyVisible",e.OnlyVisible)),void 0!==e.Details&&(n=n.set("Details",e.Details)),void 0!==e.OrderByName&&(n=n.set("OrderByName",e.OrderByName)),void 0!==e.GroupByCallsign&&(n=n.set("GroupByCallsign",e.GroupByCallsign)),void 0!==e.OnlyTunable&&(n=n.set("OnlyTunable",e.OnlyTunable)),this.httpClient.get("/Channel/GetChannelInfoList",{params:n})}GetDDLineupList(e){let n=(new ye).set("Source",e.Source).set("UserId",e.UserId).set("Password",e.Password);return this.httpClient.get("/Channel/GetDDLineupList",{params:n})}GetVideoMultiplex(e){let n=(new ye).set("MplexID",e);return this.httpClient.get("/Channel/GetVideoMultiplex",{params:n})}GetVideoMultiplexList(e){let n=(new ye).set("SourceID",e.SourceID);return e.StartIndex&&(n=n.set("StartIndex",e.StartIndex)),e.Count&&(n=n.set("Count",e.Count)),this.httpClient.get("/Channel/GetVideoMultiplexList",{params:n})}GetVideoSource(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetVideoSource",{params:n})}GetVideoSourceList(){return this.httpClient.get("/Channel/GetVideoSourceList")}GetXMLTVIdList(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetXMLTVIdList",{params:n})}GetAvailableChanid(){return this.httpClient.get("/Channel/GetAvailableChanid",{})}RemoveDBChannel(e){return this.httpClient.post("/Channel/RemoveDBChannel",{ChannelID:e})}RemoveVideoSource(e){return this.httpClient.post("/Channel/RemoveVideoSource",{SourceId:e})}UpdateVideoSource(e){return this.httpClient.post("/Channel/UpdateVideoSource",e)}GetGrabberList(){return this.httpClient.get("/Channel/GetGrabberList")}GetFreqTableList(){return this.httpClient.get("/Channel/GetFreqTableList")}GetCommMethodList(){return this.httpClient.get("/Channel/GetCommMethodList")}StartScan(e){return this.httpClient.post("/Channel/StartScan",e)}GetScanStatus(){return this.httpClient.get("/Channel/GetScanStatus")}StopScan(e){return this.httpClient.post("/Channel/StopScan",{Cardid:e})}GetScanList(e){let n=(new ye).set("SourceID",e);return this.httpClient.get("/Channel/GetScanList",{params:n})}SendScanDialogResponse(e){return this.httpClient.post("/Channel/SendScanDialogResponse",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const XJ=["vsourceform"],eY=["top"];function tY(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.vsource.item_title")," ")}function nY(t,i){}function iY(t,i){if(1&t&&(l(0,"div")(1,"small",34),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.work.errorMessage," ")}}const pS=function(){return{minWidth:"80%"}};function sY(t,i){if(1&t){const e=I();l(0,"p-dropdown",35,36),C("ngModelChange",function(s){return v(e),d(2).videoSource.Grabber=s})("onChange",function(){return v(e),d(2).checkName()}),c()}if(2&t){const e=d(2);q(A(5,pS)),p("options",e.grabberList.GrabberList.Grabbers)("ngModel",e.videoSource.Grabber)("editable",!1)}}function rY(t,i){if(1&t){const e=I();l(0,"div",10)(1,"label",37),g(2),m(3,"translate"),c(),l(4,"p"),g(5),m(6,"translate"),l(7,"a",38),g(8,"XMLTV"),c()(),l(9,"table")(10,"tr")(11,"td",39),g(12),c(),l(13,"td",40)(14,"button",41),C("click",function(){return v(e),d(2).copyConfigure()}),m(15,"translate"),c()()()()()}if(2&t){const e=d(2);a(2),T(" ",f(3,4,"settings.vsource.grabberconfig_label")," "),a(3),T(" ",f(6,6,"settings.vsource.grabberconfig_desc")," "),a(7),T(" ",e.configCommand," "),a(2),D("pTooltip",f(15,8,"settings.common.clipboard_tooltip"))}}function oY(t,i){if(1&t){const e=I();l(0,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).videoSource.FreqTable=s}),c()}if(2&t){const e=d(2);q(A(5,pS)),p("options",e.freqTableList.FreqTableList)("ngModel",e.videoSource.FreqTable)("editable",!1)}}function aY(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().videoSource.SourceName=s})("change",function(){return v(e),d().checkName()}),c(),_(8,iY,3,1,"div",14),l(9,"small",15),g(10),m(11,"translate"),c()(),l(12,"div",10)(13,"label",16),g(14),m(15,"translate"),c(),_(16,sY,2,6,"p-dropdown",17),l(17,"small",15),g(18),m(19,"translate"),c()(),_(20,rY,16,10,"div",18),l(21,"div",10)(22,"p-checkbox",19,20),C("ngModelChange",function(s){return v(e),d().videoSource.UseEIT=s}),m(24,"translate"),c(),l(25,"small",15),g(26),m(27,"translate"),c()(),l(28,"div",10)(29,"label",21),g(30),m(31,"translate"),c(),_(32,oY,2,6,"p-dropdown",22),l(33,"small",15),g(34),m(35,"translate"),c()(),l(36,"div",10)(37,"label",23),g(38),m(39,"translate"),c(),l(40,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().videoSource.ScanFrequency=s}),c(),l(41,"small",15),g(42),m(43,"translate"),c()(),l(44,"div",10)(45,"label",25),g(46),m(47,"translate"),c(),l(48,"p-inputNumber",26),C("ngModelChange",function(s){return v(e),d().videoSource.NITId=s}),c(),l(49,"small",15),g(50),m(51,"translate"),c()(),l(52,"div",10)(53,"label",27),g(54),m(55,"translate"),c(),l(56,"p-inputNumber",28),C("ngModelChange",function(s){return v(e),d().videoSource.BouquetId=s}),c(),l(57,"small",15),g(58),m(59,"translate"),l(60,"a",29),g(61,"DVB UK"),c()()(),l(62,"div",10)(63,"label",30),g(64),m(65,"translate"),c(),l(66,"p-inputNumber",31),C("ngModelChange",function(s){return v(e),d().videoSource.RegionId=s}),c(),l(67,"small",15),g(68),m(69,"translate"),l(70,"a",29),g(71,"DVB UK"),c()()(),l(72,"div",10)(73,"label",32),g(74),m(75,"translate"),c(),l(76,"p-inputNumber",33),C("ngModelChange",function(s){return v(e),d().videoSource.LCNOffset=s}),c(),l(77,"small",15),g(78),m(79,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,54,"settings.vsource.source_label")),a(2),p("ngModel",e.videoSource.SourceName)("disabled",e.videoSource.Id>0)("maxlength",50),a(2),p("ngIf",e.work.errorMessage),a(2),T(" ",f(11,56,"settings.vsource.source_desc")," "),a(4),T(" ",f(15,58,"settings.vsource.grabber_label")," "),a(2),p("ngIf",e.grabberList.GrabberList.Grabbers.length>0),a(2),T(" ",f(19,60,"settings.vsource.grabber_desc")," "),a(2),p("ngIf",e.configCommand.length>0),a(2),D("label",f(24,62,"settings.vsource.eit_label")),p("ngModel",e.videoSource.UseEIT)("binary",!0),a(4),T(" ",f(27,64,"settings.vsource.eit_desc")," "),a(4),T(" ",f(31,66,"settings.vsource.freqtable_label")," "),a(2),p("ngIf",e.freqTableList.FreqTableList.length>0),a(2),T(" ",f(35,68,"settings.vsource.freqtable_desc")," "),a(4),T(" ",f(39,70,"settings.vsource.scanfreq_label")," "),a(2),p("ngModel",e.videoSource.ScanFrequency)("min",0)("max",999999999),a(2),T(" ",f(43,72,"settings.vsource.scanfreq_desc")," "),a(4),T(" ",f(47,74,"settings.vsource.netid_label")," "),a(2),p("ngModel",e.videoSource.NITId)("showButtons",!0)("min",-1)("max",65535)("step",1)("useGrouping",!1),a(2),T(" ",f(51,76,"settings.vsource.netid_desc")," "),a(4),T(" ",f(55,78,"settings.vsource.bouquet_label")," "),a(2),p("ngModel",e.videoSource.BouquetId)("showButtons",!0)("min",0)("max",65535)("step",1)("useGrouping",!1),a(2),T(" ",f(59,80,"settings.vsource.bouquet_desc")," "),a(6),T(" ",f(65,82,"settings.vsource.region_label")," "),a(2),p("ngModel",e.videoSource.RegionId)("showButtons",!0)("min",0)("max",100)("step",1)("useGrouping",!1),a(2),T(" ",f(69,84,"settings.vsource.region_desc")," "),a(6),T(" ",f(75,86,"settings.vsource.lcnoffset_label")," "),a(2),p("ngModel",e.videoSource.LCNOffset)("showButtons",!0)("min",0)("max",2e4)("step",100)("useGrouping",!1),a(2),T(" ",f(79,88,"settings.vsource.lcnoffset_desc")," ")}}function lY(t,i){1&t&&(k(0,"p-message",49),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function cY(t,i){1&t&&(k(0,"p-message",50),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function uY(t,i){if(1&t){const e=I();l(0,"div",44)(1,"div",45),_(2,lY,2,3,"p-message",46),_(3,cY,2,3,"p-message",47),c(),l(4,"p-button",48),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.videoSource.SourceName||e.work.validateError||e.setupService.schedulingEnabled)}}let dY=(()=>{class t{constructor(e,n,s,r,o){this.channelService=e,this.translate=n,this.setupService=s,this.clipboard=r,this.mythService=o,this.grabberList={GrabberList:{Grabbers:[]}},this.freqTableList={FreqTableList:[]},this.work={successCount:0,errorCount:0,errorMessage:"",validateError:!1},this.messages={nameInUse:"settings.vsource.nameInUse",nameRequired:"settings.vsource.nameRequired"},this.configCommand="",this.saveObserver={next:u=>{u.bool?this.work.successCount++:!this.videoSource.Id&&u.int?(this.work.successCount++,this.videoSource.Id||(this.videoSource.Id=u.int)):(console.log("saveObserver error",u),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:u=>{console.log("saveObserver error",u),this.work.errorCount++,this.currentForm.form.markAsDirty()}},n.get(this.messages.nameInUse).subscribe(u=>this.messages.nameInUse=u),n.get(this.messages.nameRequired).subscribe(u=>this.messages.nameRequired=u)}ngOnInit(){this.channelService.GetGrabberList().subscribe(e=>{this.grabberList=e}),this.channelService.GetFreqTableList().subscribe(e=>{this.freqTableList=e}),this.mythService.GetBackendInfo().subscribe(e=>{this.backendInfo=e,this.setupConf()})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}copyConfigure(){this.clipboard.copy(this.configCommand)}checkName(){this.work.errorMessage="",this.work.validateError=!1,this.videoSource.SourceName=this.videoSource.SourceName.trim(),this.videoSourceList.VideoSourceList.VideoSources.find(n=>n.SourceName==this.videoSource.SourceName&&n.Id!=this.videoSource.Id)&&(this.work.errorMessage=this.messages.nameInUse,this.work.validateError=!0),""==this.videoSource.SourceName&&(this.work.errorMessage=this.messages.nameRequired,this.work.validateError=!0),this.setupConf()}setupConf(){this.configCommand="eitonly"==this.videoSource.Grabber||"/bin/true"==this.videoSource.Grabber||""==this.videoSource.Grabber||""==this.videoSource.SourceName||this.work.validateError?"":"sudo -u "+this.backendInfo.BackendInfo.Env.USER+" "+this.videoSource.Grabber+' --configure --config-file "'+this.backendInfo.BackendInfo.Env.MYTHCONFDIR+"/"+this.videoSource.SourceName+'.xmltv"'}saveForm(){if(this.work.successCount=0,this.work.errorCount=0,this.videoSource.Id){let e=this.videoSource;e.SourceID=this.videoSource.Id,this.channelService.UpdateVideoSource(e).subscribe(this.saveObserver)}else this.channelService.AddVideoSource(this.videoSource).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Or),x(Le),x(De),x(rS),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-vsource"]],viewQuery:function(e,n){if(1&e&&(j(XJ,5),j(eY,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{videoSource:"videoSource",videoSourceList:"videoSourceList"},decls:9,vars:0,consts:[["name","vsourceform",1,"ml-3","mr-3"],["vsourceform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","SourceName",1,"label","block"],["pInputText","","id","SourceName","name","SourceName",1,"mb-2","form-control","w-full",3,"ngModel","disabled","maxlength","ngModelChange","change"],["SourceName","ngModel"],[4,"ngIf"],[1,"block"],["for","Grabber",1,"label","block"],["optionLabel","DisplayName","optionValue","Program","name","Grabber",3,"options","ngModel","editable","style","ngModelChange","onChange",4,"ngIf"],["class","form-group field",4,"ngIf"],["inputId","UseEIT","name","UseEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","FreqTable",1,"label","block"],["name","FreqTable",3,"options","ngModel","editable","style","ngModelChange",4,"ngIf"],["for","ScanFrequency",1,"label","block"],["name","ScanFrequency","id","ScanFrequency",3,"ngModel","min","max","ngModelChange"],["for","NITId",1,"label","block"],["name","NITId","id","NITId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["for","BouquetId",1,"label","block"],["name","BouquetId","id","BouquetId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["href","https://www.mythtv.org/wiki/DVB_UK","target","_blank"],["for","RegionId",1,"label","block"],["name","RegionId","id","RegionId",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],["for","LCNOffset",1,"label","block"],["name","LCNOffset","id","LCNOffset",3,"ngModel","showButtons","min","max","step","useGrouping","ngModelChange"],[1,"p-error","block"],["optionLabel","DisplayName","optionValue","Program","name","Grabber",3,"options","ngModel","editable","ngModelChange","onChange"],["Grabber","ngModel"],["for","configure",1,"label","block"],["href","http://www.mythtv.org/wiki/XMLTV","target","_blank"],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-copy",1,"p-button-rounded","p-button-text",3,"pTooltip","click"],["name","FreqTable",3,"options","ngModel","editable","ngModelChange"],["FreqTable","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,tY,2,3,"ng-template",4),_(6,nY,0,0,"ng-template",5),_(7,aY,80,90,"ng-template",6),_(8,uY,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,fn,Q,Vt,Ln,vt,Jt,rn,dt,qe,ve],pipes:[de],styles:["a[_ngcontent-%COMP%]:link, a[_ngcontent-%COMP%]:visited, a[_ngcontent-%COMP%]:active{background-color:#fff}"]}),t})();function pY(t,i){if(1&t){const e=I();l(0,"p-button",12),C("click",function(){return v(e),d().displayDeleteAll=!1}),m(1,"translate"),c(),l(2,"p-button",13),C("click",function(){return v(e),d().deleteAllSources()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function hY(t,i){1&t&&(l(0,"div",14),k(1,"br")(2,"p-message",15),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function mY(t,i){1&t&&(l(0,"div",14),k(1,"br")(2,"p-message",16),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function fY(t,i){if(1&t&&(l(0,"div",20)(1,"div",21),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d().index,n=d();a(2),$e(" ",n.videoSourceList.VideoSourceList.VideoSources[e].SourceName," (",n.videoSourceList.VideoSourceList.VideoSources[e].Grabber,") "),a(2),T("\xa0",n.dirtyMessages[e],"")}}function gY(t,i){if(1&t){const e=I();l(0,"p-button",12),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",13),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const hS=function(){return{width:"50vw"}},_Y=function(t,i){return{Grabber:t,DisplayName:i}};function bY(t,i){if(1&t){const e=I();l(0,"p-button",22),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",3),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,gY,4,6,"ng-template",4),c(),k(11,"app-vsource",23)}if(2&t){const e=d().index,n=d();D("label",f(1,13,"settings.vsource.delete_this")),p("disabled",!n.videoSourceList.VideoSourceList.VideoSources[e].Id||n.setupService.schedulingEnabled),a(2),q(A(22,hS)),D("header",f(3,15,"settings.vsource.delete_this")),p("visible",n.displayDeleteThis[e])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,17,"settings.common.ru_sure")),a(3),S(Dt(9,19,"settings.vsource.delete_details",We(23,_Y,n.videoSourceList.VideoSourceList.VideoSources[e].Grabber,n.videoSourceList.VideoSourceList.VideoSources[e].SourceName))),a(3),p("videoSource",n.videoSourceList.VideoSourceList.VideoSources[e])("videoSourceList",n.videoSourceList)}}function vY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",17),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,fY,5,3,"ng-template",18),_(2,bY,12,26,"ng-template",19),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}let CY=(()=>{class t{constructor(e,n,s,r){this.setupService=e,this.translate=n,this.channelService=s,this.router=r,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.successCount=0,this.expectedCount=0,this.errorCount=0,this.displayDeleteAll=!1,this.deleteAll=!1,this.videoSourceList={VideoSourceList:{VideoSources:[],AsOf:"",Version:"",ProtoVer:""}},this.delObserver={next:o=>{o.bool?(this.successCount++,this.successCount==this.expectedCount&&(this.deleteAll?(this.loadSources(),this.deleteAll=!1):this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1))):(this.errorCount++,this.deletedTab=-1,this.deleteAll=!1)},error:o=>{console.error(o),this.errorCount++,this.deleteAll=!1}},this.setupService.setCurrentForm(null),this.loadSources(),n.get(this.dirtyText).subscribe(o=>this.dirtyText=o),n.get(this.warningText).subscribe(o=>this.warningText=o),n.get(this.deletedText).subscribe(o=>this.deletedText=o),n.get(this.newText).subscribe(o=>this.newText=o)}loadSources(){this.channelService.GetVideoSourceList().subscribe(e=>{this.videoSourceList=e,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.displayDeleteThis=[];for(let n=0;n=this.expectedCount&&(this.errorCount=0,this.successCount=0,this.expectedCount=0),this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:this.videoSourceList.VideoSourceList.VideoSources[this.currentTab].Id?"":this.newText)}newSource(){for(let n=0;nn==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Or),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-video-sources"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:26,vars:32,consts:[[1,"m-5"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["styleClass","p-button-danger","icon","pi pi-trash","iconPos","left",3,"label","disabled","click"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"videoSource","videoSourceList"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.newSource()}),m(5,"translate"),c(),g(6," \xa0 "),l(7,"p-button",2),C("click",function(){return n.displayDeleteAll=!0}),m(8,"translate"),c(),l(9,"p-dialog",3),C("visibleChange",function(r){return n.displayDeleteAll=r}),m(10,"translate"),l(11,"h2"),g(12),m(13,"translate"),c(),_(14,pY,4,6,"ng-template",4),c(),k(15,"br"),l(16,"div",5),_(17,hY,5,3,"div",6),_(18,mY,5,3,"div",6),c(),l(19,"p-accordion",7),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(20,vY,3,2,"p-accordionTab",8),c(),l(21,"div",9)(22,"p-button",10),C("onClick",function(){return n.router.navigate(["setupwizard/recording-profiles"])}),m(23,"translate"),c(),l(24,"p-button",11),C("onClick",function(){return n.router.navigate(["setupwizard/input-connections"])}),m(25,"translate"),c()()()),2&e&&(a(2),S(f(3,17,"settings.vsource.title")),a(2),D("label",f(5,19,"settings.vsource.new_video_source")),a(3),D("label",f(8,21,"settings.vsource.delete_all")),p("disabled",n.setupService.schedulingEnabled),a(2),q(A(31,hS)),D("header",f(10,23,"settings.vsource.delete_all")),p("visible",n.displayDeleteAll)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(13,25,"settings.common.ru_sure")),a(5),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.videoSourceList.VideoSourceList.VideoSources),a(2),D("label",f(23,27,"common.back")),a(2),D("label",f(25,29,"common.next")))},directives:[Pe,ve,Tn,ie,Q,qe,Ks,at,Ws,dY],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();function yY(t,i){if(1&t&&(l(0,"div",10)(1,"div",11),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(2),n=e.$implicit,s=e.index,r=d();a(2),Ic(" ",n.CardType," ",n.VideoDevice," (",n.DisplayName,") => ",r.videoSourceLookup[n.SourceId].SourceName," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function wY(t,i){1&t&&_(0,yY,5,5,"div",9),2&t&&p("ngIf",d(2).readyCount>1)}function TY(t,i){if(1&t&&k(0,"app-iconnection",12),2&t){const e=d().index,n=d();p("card",n.m_CaptureCardsFiltered[e])("cardList",n.m_CaptureCardList)("videoSourceLookup",n.videoSourceLookup)("videoSourceList",n.videoSourceList)("parentComponent",n)}}function SY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",6),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,wY,1,1,"ng-template",7),_(2,TY,1,5,"ng-template",8),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}let mS=(()=>{class t{constructor(e,n,s,r,o,u){this.mythService=e,this.router=n,this.captureCardService=s,this.setupService=r,this.translate=o,this.channelService=u,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.activeTab=[],this.readyCount=0,this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.m_hostName="",this.m_CaptureCardsFiltered=[],this.videoSourceList={VideoSourceList:{VideoSources:[],AsOf:"",Version:"",ProtoVer:""}},this.videoSourceLookup=[],this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(h=>{this.m_hostName=h.String,this.loadCards(!0)}),this.loadSources(),o.get(this.dirtyText).subscribe(h=>this.dirtyText=h),o.get(this.warningText).subscribe(h=>this.warningText=h)}loadCards(e){this.m_CaptureCardList$=this.captureCardService.GetCaptureCardList("",""),this.m_CaptureCardList$.subscribe(n=>{this.m_CaptureCardList=n,e&&this.filterCards(),this.readyCount++})}filterCards(){this.m_CaptureCardsFiltered=this.m_CaptureCardList.CaptureCardList.CaptureCards.filter(e=>0==e.ParentId&&e.HostName==this.m_hostName),this.dirtyMessages=[],this.forms=[],this.activeTab=[];for(let e=0;e{this.videoSourceList=e,this.videoSourceList.VideoSourceList.VideoSources.unshift({Id:0,SourceName:"(None)",ScanFrequency:0}),this.videoSourceLookup=[],this.videoSourceList.VideoSourceList.VideoSources.forEach(n=>{this.videoSourceLookup[n.Id]=n}),this.readyCount++})}ngOnInit(){}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(It),x(Gt),x(De),x(Le),x(Or))},t.\u0275cmp=G({type:t,selectors:[["app-input-connections"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:10,consts:[[1,"m-5"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],["class","grid w-full",4,"ngIf"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"card","cardList","videoSourceLookup","videoSourceList","parentComponent"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-accordion",1),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(5,SY,3,1,"p-accordionTab",2),c(),l(6,"div",3)(7,"p-button",4),C("onClick",function(){return n.router.navigate(["setupwizard/video-sources"])}),m(8,"translate"),c(),l(9,"p-button",5),C("onClick",function(){return n.router.navigate(["setupwizard/channel-editor"])}),m(10,"translate"),c()()()),2&e&&(a(2),S(f(3,4,"settings.iconnections.title")),a(3),p("ngForOf",n.m_CaptureCardsFiltered),a(2),D("label",f(8,6,"common.back")),a(2),D("label",f(10,8,"common.next")))},styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const xY=["sgroupform"],DY=function(t){return{name:t}};function MY(t,i){if(1&t&&k(0,"span",8),2&t){const e=d();p("translate","settings.sgroups.sgroup_title")("translateParams",z(2,DY,e.sgroup.LocalizedName))}}function kY(t,i){}function IY(t,i){1&t&&(l(0,"div")(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.sgroups.deleted_label")))}function EY(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",20),g(2),c(),l(3,"td",21)(4,"button",22),C("click",function(){const r=v(e).index;return d(2).editDirectory(r)}),c()(),l(5,"td",21)(6,"button",23),C("click",function(){const r=v(e).index;return d(2).deleteDirectory(r)}),c()(),l(7,"td"),_(8,IY,4,3,"div",24),c()()}if(2&t){const e=i.index,n=d(2);a(2),T(" ",n.editDirs[e]," "),a(2),p("disabled",!n.editDirs[e]),a(2),p("disabled",!n.editDirs[e]),a(2),p("ngIf",!n.editDirs[e])}}function RY(t,i){if(1&t){const e=I();l(0,"p-button",25),C("onClick",function(){return v(e),d(2).showEditDlg=!1}),m(1,"translate"),c(),l(2,"p-button",26),C("onClick",function(){v(e);const s=d(2);return s.editDirs[s.editDlgNum]=s.editDirName,s.showEditDlg=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.cancel")),a(2),D("label",f(3,4,"common.ok")))}const LY=function(){return{width:"50vw"}},OY=function(){return{height:"50vh"}};function AY(t,i){if(1&t){const e=I();l(0,"div",9)(1,"div",10)(2,"table"),_(3,EY,9,4,"tr",11),c(),l(4,"p-dialog",12),C("visibleChange",function(s){return v(e),d().showEditDlg=s}),m(5,"translate"),l(6,"div",13)(7,"label",14),g(8),m(9,"translate"),c(),l(10,"input",15,16),C("ngModelChange",function(s){return v(e),d().editDirName=s})("change",function(){return v(e),d().textChange()}),c()(),l(12,"p-listbox",17,18),C("ngModelChange",function(s){return v(e),d().selectedDir=s})("onClick",function(){return v(e),d().selectDir()}),c(),_(14,RY,4,6,"ng-template",7),c(),k(15,"br"),l(16,"p-button",19),C("onClick",function(){return v(e),d().addDirectory()}),m(17,"translate"),c()()()}if(2&t){const e=d();a(3),p("ngForOf",e.editDirs),a(1),q(A(20,LY)),D("header",f(5,14,"settings.sgroups.seldir_title")),p("visible",e.showEditDlg)("modal",!0)("draggable",!1)("resizable",!1),a(4),S(f(9,16,"settings.sgroups.dirname_label")),a(2),p("ngModel",e.editDirName),a(2),p("options",e.dirSelect)("ngModel",e.selectedDir)("listStyle",A(21,OY)),a(4),D("label",f(17,18,"settings.sgroups.adddir_button"))}}function PY(t,i){1&t&&(k(0,"p-message",32),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function FY(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function NY(t,i){if(1&t){const e=I();l(0,"div",27)(1,"div",28),_(2,PY,2,3,"p-message",29),_(3,FY,2,3,"p-message",30),c(),l(4,"p-button",31),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let VY=(()=>{class t{constructor(e,n,s){this.mythService=e,this.setupService=n,this.translate=s,this.successCount=0,this.errorCount=0,this.expectCount=0,this.showEditDlg=!1,this.editDlgNum=-1,this.editDirName="",this.editDirs=[],this.dirSelect=[],this.selectedDir="",this.upString="UP 1 LEVEL",this.saveObserver={next:r=>{r.bool?(this.successCount++,this.successCount==this.expectCount&&(this.sgroup.DirNames=this.editDirs.filter(o=>o.length>1))):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get("settings.sgroups.updir").subscribe(r=>this.upString="// ** "+r+" **")}ngOnInit(){this.editDirs=this.sgroup.DirNames.slice()}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm)}selectDir(){for(;"/"==this.editDirName.charAt(this.editDirName.length-1);)this.editDirName=this.editDirName.substring(0,this.editDirName.length-1);if(this.selectedDir.startsWith("//")){let e=this.editDirName.lastIndexOf("/");this.editDirName=this.editDirName.substring(0,e),0==this.editDirName.length&&(this.editDirName="/")}else this.editDirName=this.editDirName+"/"+this.selectedDir;this.fillDirList()}textChange(){this.fillDirList()}fillDirList(){0!=this.editDirName.indexOf("/")&&(this.editDirName="/"+this.editDirName),this.mythService.GetDirListing(this.editDirName).subscribe(e=>{"/"!=this.editDirName&&e.DirListing.unshift(this.upString),this.dirSelect=e.DirListing})}addDirectory(){this.editDirs.push("/"),this.editDirectory(this.editDirs.length-1)}editDirectory(e){this.editDirName=this.editDirs[e],this.editDlgNum=e,this.showEditDlg=!0,this.fillDirList()}deleteDirectory(e){this.editDirs[e]="",this.currentForm.form.markAsDirty()}saveForm(){this.successCount=0,this.errorCount=0,this.expectCount=0;for(let e=0;e{""!=e&&-1==this.sgroup.DirNames.indexOf(e)&&(this.mythService.AddStorageGroupDir({GroupName:this.sgroup.GroupName,DirName:e,HostName:this.hostName}).subscribe(this.saveObserver),this.expectCount++)}),this.sgroup.DirNames.forEach(e=>{-1==this.editDirs.indexOf(e)&&(this.mythService.RemoveStorageGroupDir({GroupName:this.sgroup.GroupName,DirName:e,HostName:this.hostName}).subscribe(this.saveObserver),this.expectCount++)})}}return t.\u0275fac=function(e){return new(e||t)(x(Ut),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-sgroup"]],viewQuery:function(e,n){if(1&e&&j(xY,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{sgroup:"sgroup",hostName:"hostName"},decls:9,vars:0,consts:[["name","sgroupform",1,"ml-3","mr-3"],["sgroupform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[3,"translate","translateParams"],[1,"grid"],[1,"mb-4","w-full"],[4,"ngFor","ngForOf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],[1,"form-group","field"],["for","DirName",1,"label","block"],["pInputText","","id","DirName","name","DirName",1,"mb-2","form-control","w-full",2,"font-family","monospace",3,"ngModel","ngModelChange","change"],["DirName","ngModel"],["name","ListDirs",3,"options","ngModel","listStyle","ngModelChange","onClick"],["ListDirs","ngModel"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[1,"align-items-center","bg-blue-100","text-gray-900",2,"font-family","monospace"],[1,"align-items-center"],["pButton","","pRipple","","type","button","icon","pi pi-pencil","pTooltip","Edit",1,"p-button-rounded","p-button-text",3,"disabled","click"],["pButton","","pRipple","","type","button","icon","pi pi-trash","pTooltip","Delete",1,"p-button-rounded","p-button-text",3,"disabled","click"],[4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","onClick"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,MY,1,4,"ng-template",4),_(6,kY,0,0,"ng-template",5),_(7,AY,18,22,"ng-template",6),_(8,NY,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,hu,at,Ln,vt,Jt,Q,Tn,Ye,Te,_e,ws,ve,qe],pipes:[de],styles:[""]}),t})();function BY(t,i){if(1&t){const e=I();l(0,"p-button",14),C("onClick",function(){return v(e),d().displayNewDlg=!1}),m(1,"translate"),c(),l(2,"p-button",15),C("onClick",function(){return v(e),d().newGroup()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",""==e.newGroupName)}}const HY=function(t){return{name:t}};function qY(t,i){if(1&t&&k(0,"span",23),2&t){const e=d(2).index,n=d();p("translate","settings.sgroups.tab_create_title")("translateParams",z(2,HY,n.storageGroups[e].LocalizedName))}}function UY(t,i){if(1&t&&g(0),2&t){const e=d(2).index;T(" ",d().storageGroups[e].LocalizedName," ")}}function GY(t,i){if(1&t&&(l(0,"div",19)(1,"div",20),_(2,qY,1,4,"span",21),_(3,UY,1,1,"ng-template",null,22,we),l(5,"b"),g(6),c()()()),2&t){const e=F(4),n=d().index,s=d();a(2),p("ngIf",0==s.storageGroups[n].DirNames.length)("ngIfElse",e),a(4),T("\xa0",s.dirtyMessages[n],"")}}function zY(t,i){if(1&t&&k(0,"app-sgroup",24),2&t){const e=d().index,n=d();p("sgroup",n.storageGroups[e])("hostName",n.hostName)}}function jY(t,i){if(1&t){const e=I();l(0,"p-accordionTab",16),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,GY,7,3,"ng-template",17),_(2,zY,1,2,"ng-template",18),c()}if(2&t){const e=i.index;p("selected",d().activeTab[e])}}const $Y=function(){return{width:"50vw"}};let WY=(()=>{class t{constructor(e,n,s,r){this.setupService=e,this.translate=n,this.mythService=s,this.router=r,this.forms=[],this.dirtyMessages=[],this.currentTab=-1,this.activeTab=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.hostName="",this.storageGroupDirs=[],this.storageGroups=[{GroupName:"Default",LocalizedName:"",DirNames:[]},{GroupName:"LiveTV",LocalizedName:"",DirNames:[]},{GroupName:"DB Backups",LocalizedName:"",DirNames:[]},{GroupName:"Videos",LocalizedName:"",DirNames:[]},{GroupName:"Trailers",LocalizedName:"",DirNames:[]},{GroupName:"Coverart",LocalizedName:"",DirNames:[]},{GroupName:"Fanart",LocalizedName:"",DirNames:[]},{GroupName:"Screenshots",LocalizedName:"",DirNames:[]},{GroupName:"Banners",LocalizedName:"",DirNames:[]},{GroupName:"Photographs",LocalizedName:"",DirNames:[]},{GroupName:"Music",LocalizedName:"",DirNames:[]},{GroupName:"MusicArt",LocalizedName:"",DirNames:[]}],this.displayNewDlg=!1,this.newGroupName="",this.setupService.setCurrentForm(null),this.mythService.GetHostName().subscribe(o=>{this.hostName=o.String,this.loadGroups()}),n.get(this.dirtyText).subscribe(o=>this.dirtyText=o),n.get(this.warningText).subscribe(o=>this.warningText=o),n.get(this.deletedText).subscribe(o=>this.deletedText=o),n.get(this.newText).subscribe(o=>this.newText=o),this.storageGroups.forEach(o=>n.get("settings.sgroups.special."+o.GroupName).subscribe(u=>o.LocalizedName=u))}loadGroups(){this.mythService.GetStorageGroupDirs({HostName:this.hostName}).subscribe(e=>{this.storageGroupDirs=e.StorageGroupDirList.StorageGroupDirs,this.storageGroupDirs.forEach(n=>{let s=this.storageGroups.find(r=>r.GroupName==n.GroupName);s?s.DirNames.push(n.DirName):this.storageGroups.push({GroupName:n.GroupName,LocalizedName:n.GroupName,DirNames:[n.DirName]})})})}ngOnInit(){}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||!this.forms[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab].dirty?this.dirtyText:"")}newGroup(){this.displayNewDlg=!1,!this.storageGroups.find(n=>n.GroupName==this.newGroupName)&&(this.storageGroups.push({GroupName:this.newGroupName,LocalizedName:this.newGroupName,DirNames:[]}),this.newGroupName="")}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(De),x(Le),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-storage-groups"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:25,vars:24,consts:[[1,"m-5"],["label","New Storage Group","icon","pi pi-plus-circle","styleClass","p-button-plain",3,"onClick"],["header","New Storage Group",3,"visible","modal","draggable","resizable","visibleChange"],[1,"form-group","field"],["for","GroupName",1,"block"],["pInputText","","id","GroupName","name","GroupName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["GroupName","ngModel"],[1,"block"],["pTemplate","footer"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"selected","selectedChange",4,"ngFor","ngForOf"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],[3,"selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],[3,"translate","translateParams",4,"ngIf","ngIfElse"],["onlyName",""],[3,"translate","translateParams"],[3,"sgroup","hostName"]],template:function(e,n){1&e&&(l(0,"p-card",0)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayNewDlg=!0}),c(),l(5,"p-dialog",2),C("visibleChange",function(r){return n.displayNewDlg=r}),l(6,"p"),g(7),m(8,"translate"),c(),l(9,"div",3)(10,"label",4),g(11),m(12,"translate"),c(),l(13,"input",5,6),C("ngModelChange",function(r){return n.newGroupName=r}),c(),k(15,"small",7),c(),_(16,BY,4,7,"ng-template",8),c(),k(17,"br"),l(18,"p-accordion",9),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(19,jY,3,1,"p-accordionTab",10),c(),l(20,"div",11)(21,"p-button",12),C("onClick",function(){return n.router.navigate(["setupwizard/channel-editor"])}),m(22,"translate"),c(),l(23,"p-button",13),C("onClick",function(){return n.router.navigate(["setupwizard/system-events"])}),m(24,"translate"),c()()()),2&e&&(a(2),S(f(3,13,"settings.sgroups.title")),a(3),q(A(23,$Y)),p("visible",n.displayNewDlg)("modal",!0)("draggable",!1)("resizable",!1),a(2),S(f(8,15,"settings.sgroups.name_prompt")),a(4),S(f(12,17,"settings.sgroups.name_label")),a(2),p("ngModel",n.newGroupName),a(6),p("ngForOf",n.storageGroups),a(2),D("label",f(22,19,"common.back")),a(2),D("label",f(24,21,"common.next")))},directives:[Pe,ve,Tn,Ye,Te,_e,ie,Ks,at,Ws,Q,hu,VY],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const KY=["eventsform"];function QY(t,i){if(1&t){const e=I();l(0,"div",9)(1,"div",10)(2,"label",11),g(3),c(),l(4,"input",12),C("ngModelChange",function(s){return v(e).$implicit.Value=s}),c()()()}if(2&t){const e=i.$implicit;a(2),D("for",e.Key),a(1),S(e.LocalizedName),a(1),D("id",e.Key),D("name",e.Key),p("ngModel",e.Value)}}function JY(t,i){if(1&t&&(l(0,"div",7),_(1,QY,5,5,"div",8),c()),2&t){const e=d();a(1),p("ngForOf",e.events)}}function YY(t,i){1&t&&(k(0,"p-message",18),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ZY(t,i){1&t&&(k(0,"p-message",19),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function XY(t,i){if(1&t){const e=I();l(0,"div",13)(1,"div",14),_(2,YY,2,3,"p-message",15),_(3,ZY,2,3,"p-message",16),c(),l(4,"p-button",17),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&e.successCount==e.expectedCount&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let eZ=(()=>{class t{constructor(e,n,s,r,o){this.configService=e,this.translate=n,this.setupService=s,this.mythService=r,this.router=o,this.hostName="",this.events=[],this.successCount=0,this.errorCount=0,this.expectedCount=0,this.warningText="settings.common.warning",this.kClearSettingValue="",this.jqbObserver={next:u=>{u.bool?this.successCount++:(this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty())},error:u=>{console.error(u),this.errorCount++,this.currentForm&&this.currentForm.form.markAsDirty()}},this.mythService.GetHostName().subscribe({next:u=>{this.hostName=u.String,this.configService.GetSystemEvents().subscribe(h=>{this.eventList=h,this.events=h.SystemEventList.SystemEvents})},error:()=>this.errorCount++}),this.translate.get(this.warningText).subscribe(u=>{this.warningText=u})}ngOnInit(){}saveForm(){this.successCount=0,this.errorCount=0,this.expectedCount=0,this.events.forEach(e=>{let n=e.Value.trim();n?this.mythService.PutSetting({HostName:this.hostName,Key:e.Key,Value:n}).subscribe(this.jqbObserver):this.mythService.DeleteSetting({HostName:this.hostName,Key:e.Key}).subscribe(this.jqbObserver),this.expectedCount++})}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(zo),x(Le),x(De),x(Ut),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-system-events"]],viewQuery:function(e,n){if(1&e&&j(KY,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:11,vars:6,consts:[["name","eventsform",1,"ml-3","mr-3"],["eventsform","ngForm"],[1,"m-5"],["pTemplate","content"],["pTemplate","footer"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],[1,"grid"],["class","mb-4 w-full",4,"ngFor","ngForOf"],[1,"mb-4","w-full"],[1,"form-group","field"],[1,"label","block",3,"for"],["pInputText","",1,"mb-2","form-control","w-full",3,"id","ngModel","name","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"h2"),g(3),m(4,"translate"),c(),l(5,"p-card",2),_(6,JY,2,1,"ng-template",3),_(7,XY,6,6,"ng-template",4),c(),l(8,"div",5)(9,"p-button",6),C("onClick",function(){return n.router.navigate(["setupwizard/storage-groups"])}),m(10,"translate"),c()()()),2&e&&(a(3),S(f(4,2,"settings.sysevents.title")),a(6),D("label",f(10,4,"common.back")))},directives:[ze,Ge,He,Pe,ie,at,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:["@media screen and (max-width: 48rem){.p-card-body,.p-card-content,.p-accordion-content{padding:0rem!important}}\n"],encapsulation:2}),t})();const tZ=["chanform"];function nZ(t,i){if(1&t){const e=I();l(0,"button",53),C("click",function(){return v(e),d(2).openNew()}),m(1,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,2,"settings.chanedit.new_channel")),p("disabled","S"==e.setupService.pageType&&e.setupService.schedulingEnabled)}}function iZ(t,i){1&t&&g(0),2&t&&T(" ",i.$implicit," ")}function sZ(t,i){if(1&t){const e=I();l(0,"p-dropdown",68),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),_(2,iZ,1,1,"ng-template",69),c()}if(2&t){const e=i.$implicit,n=d(3);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.sourceNames)("showClear",!0)}}function rZ(t,i){if(1&t){const e=I();l(0,"p-button",70),C("onClick",function(){return v(e),d(3).deleteSourceRequest()}),m(1,"translate"),m(2,"translate"),c()}if(2&t){const e=d(3);D("pTooltip",f(1,3,"settings.chanedit.delete_source")),D("label",f(2,5,"common.delete")),p("disabled",e.setupService.schedulingEnabled)}}function oZ(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.chanedit.delete_message")," ")}function aZ(t,i){1&t&&k(0,"button",71)}function lZ(t,i){if(1&t&&(l(0,"tr")(1,"th"),g(2),m(3,"translate"),l(4,"p-columnFilter",54),_(5,sZ,3,6,"ng-template",55),c(),_(6,rZ,3,7,"p-button",56),_(7,oZ,2,3,"ng-template",null,57,we),c()(),l(9,"tr")(10,"th",58),g(11,"\xa0"),c(),l(12,"th",59),g(13),m(14,"translate"),k(15,"p-sortIcon",60),c(),l(16,"th",61),g(17),m(18,"translate"),c(),l(19,"th",62),g(20),m(21,"translate"),c(),l(22,"th",63),g(23),m(24,"translate"),c(),l(25,"th",64),g(26),m(27,"translate"),k(28,"p-sortIcon",65),c(),l(29,"th",61),g(30),m(31,"translate"),c(),l(32,"th",62),g(33),m(34,"translate"),c(),l(35,"th",61),g(36),m(37,"translate"),c(),l(38,"th",61),k(39,"button",66),_(40,aZ,1,0,"button",67),c()()),2&t){const e=F(8),n=d(2);a(2),T("",f(3,13,"settings.chanedit.col_source"),": \xa0 "),a(2),p("showMenu",!1),a(2),p("ngIf","S"==n.setupService.pageType)("ngIfElse",e),a(7),T(" ",f(14,15,"settings.chanedit.col_channum")," "),a(4),S(f(18,17,"settings.chanedit.col_freqid")),a(3),S(f(21,19,"settings.chanedit.col_callsign")),a(3),S(f(24,21,"settings.chanedit.col_name")),a(3),T(" ",f(27,23,"settings.chanedit.col_source")," "),a(4),S(f(31,25,"settings.chanedit.col_priority")),a(3),S(f(34,27,"settings.chanedit.col_visibility")),a(3),S(f(37,29,"settings.chanedit.col_useeit")),a(4),p("ngIf","S"==n.setupService.pageType)}}function cZ(t,i){1&t&&k(0,"img",79),2&t&&D("src",d().$implicit.IconURL,Xt)}function uZ(t,i){1&t&&k(0,"img",80)}function dZ(t,i){if(1&t){const e=I();l(0,"button",81),C("click",function(){v(e);const s=d().$implicit;return d(2).deleteRequest(s)}),m(1,"translate"),c()}if(2&t){const e=d().$implicit,n=d(2);D("pTooltip",f(1,2,"settings.chanedit.deletechan")),p("disabled",e.ChanId<0||n.setupService.schedulingEnabled)}}const pZ=function(t){return{"line-through":t}};function hZ(t,i){if(1&t){const e=I();l(0,"tr",72)(1,"td",58),_(2,cZ,1,1,"img",73),_(3,uZ,1,0,"ng-template",null,74,we),c(),l(5,"td",75),g(6),c(),l(7,"td",61),g(8),c(),l(9,"td",62),g(10),c(),l(11,"td",63),g(12),c(),l(13,"td",76),g(14),c(),l(15,"td",61),g(16),c(),l(17,"td",62),g(18),c(),l(19,"td",61),g(20),c(),l(21,"td",61)(22,"button",77),C("click",function(){const r=v(e).$implicit;return d(2).editChannel(r)}),m(23,"translate"),c(),_(24,dZ,2,4,"button",78),c()()}if(2&t){const e=i.$implicit,n=F(4),s=d(2);p("ngClass",z(16,pZ,e.ChanId<0)),a(2),p("ngIf",e.IconURL)("ngIfElse",n),a(4),S(e.ChanNum),a(2),S(e.FrequencyId),a(2),S(e.CallSign),a(2),S(e.ChannelName),a(2),S(e.Source),a(2),S(e.RecPriority),a(2),S(s.getVisibility(e)),a(2),S(e.UseEIT?"Y":"N"),a(2),D("pTooltip",f(23,14,"settings.chanedit.editchan")),p("disabled",e.ChanId<0||"S"==s.setupService.pageType&&s.setupService.schedulingEnabled),a(2),p("ngIf","S"==s.setupService.pageType)}}function mZ(t,i){if(1&t){const e=I();l(0,"div",48)(1,"p-table",49),C("onFilter",function(s){return v(e),d().onFilter(s)}),_(2,nZ,2,4,"ng-template",50),_(3,lZ,41,31,"ng-template",51),_(4,hZ,25,18,"ng-template",52),c()()}if(2&t){const e=d();a(1),p("value",e.allChannels)("scrollable",!0)("rowHover",!0)}}function fZ(t,i){1&t&&k(0,"p-progressSpinner")}function gZ(t,i){1&t&&(k(0,"p-message",87),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function _Z(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function bZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,gZ,2,3,"p-message",83),_(2,_Z,2,3,"p-message",84),c(),l(3,"p-button",85),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",86),C("onClick",function(){return v(e),d().saveChannel()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(7);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.channel.ChannelName.trim()||""==e.channel.ChanNum.trim()||""==e.channel.CallSign.trim())}}function vZ(t,i){if(1&t){const e=I();l(0,"p-button",89),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",90),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}function CZ(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function yZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,CZ,2,3,"p-message",84),c(),l(2,"p-button",85),C("onClick",function(){v(e);const s=d(),r=F(7);return s.displayDelete=!1,r.form.markAsPristine()}),m(3,"translate"),c(),l(4,"p-button",91),C("onClick",function(){v(e);const s=d();return s.deleteChannel(s.channel)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"common.delete"))}}const wZ=function(t){return{Source:t}};function TZ(t,i){if(1&t&&(l(0,"p")(1,"b"),g(2),m(3,"translate"),c()()),2&t){const e=d();a(2),S(Dt(3,1,"settings.chanedit.delete_source_details",z(4,wZ,e.filterEvent.filters.Source.value)))}}function SZ(t,i){1&t&&(l(0,"p")(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.chanedit.delete_all_details")))}function xZ(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c()()),2&t){const e=d();a(2),yo(" ",f(3,3,"common.delete")," ",e.channel.ChanNum," ",e.channel.ChannelName,"")}}function DZ(t,i){1&t&&(k(0,"p-message",88),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function MZ(t,i){if(1&t){const e=I();l(0,"div",82),_(1,DZ,2,3,"p-message",84),c(),l(2,"p-button",85),C("onClick",function(){v(e);const s=d(),r=F(7);return s.displayDeleteSource=!1,s.channelOperation=-1,r.form.markAsPristine()}),m(3,"translate"),c(),l(4,"p-button",92),C("onClick",function(){return v(e),d().deleteSource()}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,4,"common.cancel")),a(2),D("label",f(5,6,"common.delete")),p("disabled",e.working)}}const kZ=function(){return{height:"75vw",width:"50vw"}},Dd=function(){return{minWidth:"400px"}},IZ=function(t,i,e){return{ChanNum:t,ChannelName:i,Source:e}};let fS=(()=>{class t{constructor(e,n,s,r){this.channelService=e,this.translate=n,this.setupService=s,this.router=r,this.allChannels=[],this.videoSources=[],this.commMethods=[],this.sourceNames=[],this.tvFormats=[{value:"Default",prompt:"common.default"},{value:"NTSC",prompt:"NTSC"},{value:"NTSC-JP",prompt:"NTSC-JP"},{value:"PAL",prompt:"PAL"},{value:"PAL-60",prompt:"PAL-60"},{value:"PAL-BG",prompt:"PAL-BG"},{value:"PAL-DK",prompt:"PAL-DK"},{value:"PAL-D",prompt:"PAL-D"},{value:"PAL-I",prompt:"PAL-I"},{value:"PAL-M",prompt:"PAL-M"},{value:"PAL-N",prompt:"PAL-N"},{value:"PAL-NC",prompt:"PAL-NC"},{value:"SECAM",prompt:"SECAM"},{value:"SECAM-D",prompt:"SECAM-D"},{value:"SECAM-DK",prompt:"SECAM-DK"}],this.visibilities=[{value:"Always Visible",prompt:"settings.chanedit.always-visible"},{value:"Visible",prompt:"settings.chanedit.visible"},{value:"Not Visible",prompt:"settings.chanedit.not-visible"},{value:"Never Visible",prompt:"settings.chanedit.never-visible"}],this.headingNew="settings.chanedit.new_channel",this.headingEdit="settings.chanedit.title",this.warningText="settings.common.warning",this.deleteText="settings.common.ru_sure",this.unassignedText="settings.chanedit.unassigned",this.transDone=0,this.numTranslations=9,this.successCount=0,this.errorCount=0,this.displayChannelDlg=!1,this.dialogHeader="",this.displayUnsaved=!1,this.displayDelete=!1,this.displayDeleteSource=!1,this.working=!1,this.chansLoaded=!1,this.filterEvent={filters:{Source:{matchMode:"",value:""}}},this.channel=this.resetChannel(),this.channelOperation=0,this.saveObserver={next:o=>{if(o.bool)switch(console.log("saveObserver success",o),this.successCount++,this.currentForm.form.markAsPristine(),this.channelOperation){case 0:this.editingChannel&&(Object.assign(this.editingChannel,this.channel),this.editingChannel.Source=this.getSource(this.editingChannel));break;case 1:this.allChannels.push(this.channel);break;case-1:this.channel.ChanId=-99,this.displayDelete=!1,this.displayDeleteSource=!1,this.currentForm.form.markAsPristine();break;case-2:this.channel.ChanId=-99,this.deleteSource()}else console.log("saveObserver error",o),this.errorCount++,this.working=!1},error:o=>{console.log("saveObserver error",o),this.errorCount++,this.working=!1}},this.translate.get(this.unassignedText).subscribe(o=>{this.unassignedText=o,this.transDone++,this.loadLists()}),this.loadTranslations()}ngOnInit(){this.markPristine()}resetChannel(){return{ATSCMajorChan:0,ATSCMinorChan:0,CallSign:"",ChanFilters:"",ChanId:0,ChanNum:"",ChannelGroups:"",ChannelName:"",CommFree:!1,CommMethod:-1,DefaultAuth:"",ExtendedVisible:"Visible",FineTune:0,Format:"Default",FrequencyId:"",IconURL:"",InputId:0,Inputs:"",MplexId:0,Programs:[],RecPriority:0,ServiceId:0,ServiceType:0,SourceId:0,TimeOffset:0,UseEIT:!1,Visible:!0,XMLTVID:"",ChanSeq:0}}loadLists(){this.channelService.GetChannelInfoList({Details:!0}).subscribe(e=>{this.allChannels=e.ChannelInfoList.ChannelInfos,this.chansLoaded=!0,this.channelService.GetVideoSourceList().subscribe(n=>{this.videoSources=n.VideoSourceList.VideoSources,this.videoSources.unshift({Id:0,SourceName:this.unassignedText}),this.videoSources.forEach(s=>this.sourceNames.push(s.SourceName)),this.allChannels.forEach((s,r)=>{s.ChanSeq=r,s.Source=this.getSource(s)})})}),this.channelService.GetCommMethodList().subscribe(e=>this.commMethods=e.CommMethodList.CommMethods)}loadTranslations(){this.visibilities.forEach(e=>{this.translate.get(e.prompt).subscribe(n=>{e.prompt=n,this.transDone++})}),this.translate.get(this.headingNew).subscribe(e=>{this.headingNew=e,this.transDone++}),this.translate.get(this.headingEdit).subscribe(e=>{this.headingEdit=e,this.transDone++}),this.translate.get(this.warningText).subscribe(e=>{this.warningText=e,this.transDone++}),this.translate.get(this.deleteText).subscribe(e=>{this.deleteText=e,this.transDone++}),this.translate.get(this.tvFormats[0].prompt).subscribe(e=>{this.tvFormats[0].prompt=e,this.transDone++})}getSource(e){const n=this.videoSources.find(s=>e.SourceId==s.Id);return null!=n?n.SourceName:this.unassignedText}getVisibility(e){const n=this.visibilities.find(s=>e.ExtendedVisible==s.value);return null!=n?n.prompt:""}openNew(){this.successCount=0,this.errorCount=0,this.dialogHeader=this.headingNew,this.channel=this.resetChannel(),this.displayChannelDlg=!0,this.markPristine()}editChannel(e){this.editingChannel=e,this.successCount=0,this.errorCount=0,this.dialogHeader=this.headingEdit,this.channel=Object.assign({},e),this.displayChannelDlg=!0,this.markPristine()}saveChannel(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1;let e={CallSign:this.channel.CallSign,ChannelID:this.channel.ChanId,ChannelNumber:this.channel.ChanNum,ChannelName:this.channel.ChannelName,CommMethod:this.channel.CommMethod,ExtendedVisible:this.channel.ExtendedVisible,Format:this.channel.Format,FrequencyID:this.channel.FrequencyId,RecPriority:this.channel.RecPriority,ServiceID:this.channel.ServiceId,SourceID:this.channel.SourceId,TimeOffset:this.channel.TimeOffset,UseEIT:this.channel.UseEIT,XMLTVID:this.channel.XMLTVID};0==this.channel.ChanId?(this.channelOperation=1,this.channelService.GetAvailableChanid().subscribe(n=>{this.channel.ChanId=n.int,e.ChannelID=n.int,this.channelService.AddDBChannel(e).subscribe(this.saveObserver)})):(this.channelOperation=0,this.channelService.UpdateDBChannel(e).subscribe(this.saveObserver))}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayChannelDlg=!1,this.editingChannel=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayChannelDlg=!1,this.displayUnsaved=!1,this.editingChannel=void 0)}deleteRequest(e){this.channel=e,this.displayDelete=!0}deleteChannel(e,n){this.successCount=0,this.errorCount=0,this.channel=e,this.channelOperation=n?-2:-1,console.log("Delete Channel",e),this.channelService.RemoveDBChannel(e.ChanId).subscribe(this.saveObserver)}deleteSourceRequest(){this.channel=this.resetChannel(),this.displayDeleteSource=!0}deleteSource(){this.working=!0;const e=this.allChannels.find(n=>n.ChanId>0&&(!this.filterEvent.filters.Source.value||this.filterEvent.filters.Source.value==n.Source));e?this.deleteChannel(e,!0):(this.displayDelete=!1,this.displayDeleteSource=!1,this.currentForm.form.markAsPristine(),this.working=!1)}onFilter(e){this.filterEvent=e}markPristine(){setTimeout(()=>this.currentForm.form.markAsPristine(),200)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.warningText)}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Or),x(Le),x(De),x(It))},t.\u0275cmp=G({type:t,selectors:[["app-channel-editor"]],viewQuery:function(e,n){if(1&e&&j(tZ,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},decls:155,vars:180,consts:[["class","block card w-full","style","height: 90vh",4,"ngIf","ngIfElse"],["loading",""],["name","chanform",1,"ml-3","mr-3"],["chanform","ngForm"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","ChannelName",1,"label","block"],["pInputText","","id","ChannelName","name","ChannelName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ChannelName","ngModel"],[1,"block"],["for","ChanNum",1,"label","block"],["pInputText","","id","ChanNum","name","ChanNum",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ChanNum","ngModel"],["for","FrequencyId",1,"label","block"],["pInputText","","id","FrequencyId","name","FrequencyId",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrequencyId","ngModel"],["for","CallSign",1,"label","block"],["pInputText","","id","CallSign","name","CallSign",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["CallSign","ngModel"],["for","ExtendedVisible",1,"label","block"],["optionLabel","prompt","optionValue","value","name","ExtendedVisible",3,"options","ngModel","editable","maxlength","ngModelChange"],["ExtendedVisible","ngModel"],["for","ServiceId",1,"label","block"],["name","ServiceId","id","ServiceId",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","SourceId",1,"label","block"],["optionLabel","SourceName","optionValue","Id","name","SourceId",3,"options","ngModel","editable","maxlength","ngModelChange"],["SourceId","ngModel"],["for","Format",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Format",3,"options","ngModel","editable","maxlength","ngModelChange"],["Format","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","UseEIT","name","UseEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","XMLTVID",1,"label","block"],["pInputText","","id","XMLTVID","name","XMLTVID",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["XMLTVID","ngModel"],["for","TimeOffset",1,"label","block"],["name","TimeOffset","id","TimeOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","CommMethod",1,"label","block"],["optionLabel","LocalizedName","optionValue","CommMethod","name","CommMethod",3,"options","ngModel","editable","maxlength","ngModelChange"],["CommMethod","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],[3,"header","visible","modal","draggable","resizable","visibleChange"],[4,"ngIf","ngIfElse"],["all",""],[4,"ngIf"],[1,"block","card","w-full",2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover","onFilter"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","mr-2",3,"label","disabled","click"],["field","Source","matchMode","equals",3,"showMenu"],["pTemplate","filter"],["icon","pi pi-trash","styleClass","p-button-danger",3,"pTooltip","label","disabled","onClick",4,"ngIf","ngIfElse"],["explain",""],[2,"flex-basis","8%"],["pSortableColumn","ChanSeq",2,"flex-basis","9%"],["field","ChanSeq"],[2,"flex-basis","6%"],[2,"flex-basis","10%"],[2,"flex-basis","24%"],["pSortableColumn","Source",2,"flex-basis","16%"],["field","Source"],["pButton","","pRipple","","icon","pi pi-pencil","disabled","true",1,"p-button-text"],["pButton","","pRipple","","icon","pi pi-trash","class","p-button-text p-button-danger","disabled","true",4,"ngIf"],["name","filter",3,"ngModel","options","placeholder","showClear","onChange"],["pTemplate","item"],["icon","pi pi-trash","styleClass","p-button-danger",3,"pTooltip","label","disabled","onClick"],["pButton","","pRipple","","icon","pi pi-trash","disabled","true",1,"p-button-text","p-button-danger"],["height","40",3,"ngClass"],["height","32","width","42","style","background-color:#000000","onerror","this.height='0'",3,"src",4,"ngIf","ngIfElse"],["nullIcon",""],[2,"flex-basis","9%"],[2,"flex-basis","16%"],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text",3,"disabled","pTooltip","click"],["pButton","","pRipple","","icon","pi pi-trash","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","disabled","click",4,"ngIf"],["height","32","width","42","onerror","this.height='0'",2,"background-color","#000000",3,"src"],["height","32","width","42"],["pButton","","pRipple","","icon","pi pi-trash","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","disabled","click"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"disabled","label","onClick"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,mZ,5,3,"div",0),_(4,fZ,1,0,"ng-template",null,1,we),l(6,"form",2,3)(8,"p-dialog",4),C("visibleChange",function(r){return n.displayChannelDlg=r}),l(9,"div",5)(10,"label",6),g(11),m(12,"translate"),c(),l(13,"input",7,8),C("ngModelChange",function(r){return n.channel.ChannelName=r}),c(),l(15,"small",9),g(16),m(17,"translate"),c()(),l(18,"div",5)(19,"label",10),g(20),m(21,"translate"),c(),l(22,"input",11,12),C("ngModelChange",function(r){return n.channel.ChanNum=r}),c(),l(24,"small",9),g(25),m(26,"translate"),c()(),l(27,"div",5)(28,"label",13),g(29),m(30,"translate"),c(),l(31,"input",14,15),C("ngModelChange",function(r){return n.channel.FrequencyId=r}),c(),l(33,"small",9),g(34),m(35,"translate"),c()(),l(36,"div",5)(37,"label",16),g(38),m(39,"translate"),c(),l(40,"input",17,18),C("ngModelChange",function(r){return n.channel.CallSign=r}),c(),l(42,"small",9),g(43),m(44,"translate"),c()(),l(45,"div",5)(46,"label",19),g(47),m(48,"translate"),c(),l(49,"p-dropdown",20,21),C("ngModelChange",function(r){return n.channel.ExtendedVisible=r}),c(),l(51,"small",9),g(52),m(53,"translate"),c()(),l(54,"div",5)(55,"label",22),g(56),m(57,"translate"),c(),l(58,"p-inputNumber",23),C("ngModelChange",function(r){return n.channel.ServiceId=r}),c(),l(59,"small",9),g(60),m(61,"translate"),c()(),l(62,"div",5)(63,"label",24),g(64),m(65,"translate"),c(),l(66,"p-dropdown",25,26),C("ngModelChange",function(r){return n.channel.SourceId=r}),c(),l(68,"small",9),g(69),m(70,"translate"),c()(),l(71,"div",5)(72,"label",27),g(73),m(74,"translate"),c(),l(75,"p-dropdown",28,29),C("ngModelChange",function(r){return n.channel.Format=r}),c(),l(77,"small",9),g(78),m(79,"translate"),c()(),l(80,"div",5)(81,"label",30),g(82),m(83,"translate"),c(),l(84,"p-inputNumber",31),C("ngModelChange",function(r){return n.channel.RecPriority=r}),c(),l(85,"small",9),g(86),m(87,"translate"),c()(),l(88,"div",5)(89,"p-checkbox",32,33),C("ngModelChange",function(r){return n.channel.UseEIT=r}),m(91,"translate"),c(),l(92,"small",9),g(93),m(94,"translate"),c()(),l(95,"div",5)(96,"label",34),g(97),m(98,"translate"),c(),l(99,"input",35,36),C("ngModelChange",function(r){return n.channel.XMLTVID=r}),c(),l(101,"small",9),g(102),m(103,"translate"),c()(),l(104,"div",5)(105,"label",37),g(106),m(107,"translate"),c(),l(108,"p-inputNumber",38),C("ngModelChange",function(r){return n.channel.TimeOffset=r}),c(),l(109,"small",9),g(110),m(111,"translate"),c()(),l(112,"div",5)(113,"label",39),g(114),m(115,"translate"),c(),l(116,"p-dropdown",40,41),C("ngModelChange",function(r){return n.channel.CommMethod=r}),c(),l(118,"small",9),g(119),m(120,"translate"),c()(),k(121,"br")(122,"br")(123,"br")(124,"br")(125,"br")(126,"br")(127,"br")(128,"br"),_(129,bZ,7,9,"ng-template",42),c(),l(130,"p-dialog",43),C("visibleChange",function(r){return n.displayUnsaved=r}),m(131,"translate"),l(132,"p"),g(133),m(134,"translate"),c(),_(135,vZ,4,6,"ng-template",42),c(),l(136,"p-dialog",44),C("visibleChange",function(r){return n.displayDelete=r}),m(137,"translate"),l(138,"h2"),g(139),m(140,"translate"),c(),l(141,"p"),g(142),m(143,"translate"),c(),_(144,yZ,6,7,"ng-template",42),c(),l(145,"p-dialog",44),C("visibleChange",function(r){return n.displayDeleteSource=r}),m(146,"translate"),l(147,"h2"),g(148),m(149,"translate"),c(),_(150,TZ,4,6,"p",45),_(151,SZ,4,3,"ng-template",null,46,we),_(153,xZ,4,5,"div",47),_(154,MZ,6,8,"ng-template",42),c()()),2&e){const s=F(5),r=F(152);a(1),S(f(2,102,"settings.chanedit.title")),a(2),p("ngIf",n.chansLoaded&&n.transDone>=n.numTranslations)("ngIfElse",s),a(5),q(A(171,kZ)),D("header",n.dialogHeader),p("visible",n.displayChannelDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(3),S(f(12,104,"settings.chanedit.channame")),a(2),p("ngModel",n.channel.ChannelName),a(3),T(" ",f(17,106,"settings.chanedit.channame_desc")," "),a(4),S(f(21,108,"settings.chanedit.channum")),a(2),p("ngModel",n.channel.ChanNum),a(3),T(" ",f(26,110,"settings.chanedit.channum_desc")," "),a(4),S(f(30,112,"settings.chanedit.freqid")),a(2),p("ngModel",n.channel.FrequencyId),a(3),T(" ",f(35,114,"settings.chanedit.freqid_desc")," "),a(4),S(f(39,116,"settings.chanedit.callsign")),a(2),p("ngModel",n.channel.CallSign),a(3),T(" ",f(44,118,"settings.chanedit.callsign_desc")," "),a(4),S(f(48,120,"settings.chanedit.visible_label")),a(2),q(A(172,Dd)),p("options",n.visibilities)("ngModel",n.channel.ExtendedVisible)("editable",!1)("maxlength",0),a(3),T(" ",f(53,122,"settings.chanedit.visible_desc")," "),a(4),S(f(57,124,"settings.chanedit.serviceid_label")),a(2),p("ngModel",n.channel.ServiceId)("showButtons",!0)("min",-1)("max",65535)("step",1),a(2),T(" ",f(61,126,"settings.chanedit.serviceid_desc")," "),a(4),S(f(65,128,"settings.chanedit.source_label")),a(2),q(A(173,Dd)),p("options",n.videoSources)("ngModel",n.channel.SourceId)("editable",!1)("maxlength",0),a(3),T(" ",f(70,130,"settings.chanedit.source_desc")," "),a(4),S(f(74,132,"settings.chanedit.format_label")),a(2),q(A(174,Dd)),p("options",n.tvFormats)("ngModel",n.channel.Format)("editable",!1)("maxlength",0),a(3),T(" ",f(79,134,"settings.chanedit.format_desc")," "),a(4),S(f(83,136,"settings.chanedit.priority_label")),a(2),p("ngModel",n.channel.RecPriority)("showButtons",!0)("min",-99)("max",99)("step",1),a(2),T(" ",f(87,138,"settings.chanedit.priority_desc")," "),a(3),D("label",f(91,140,"settings.chanedit.eit_label")),p("ngModel",n.channel.UseEIT)("binary",!0),a(4),T(" ",f(94,142,"settings.chanedit.eit_desc")," "),a(4),S(f(98,144,"settings.chanedit.xmltvid_label")),a(2),p("ngModel",n.channel.XMLTVID),a(3),T(" ",f(103,146,"settings.chanedit.xmltvid_desc")," "),a(4),S(f(107,148,"settings.chanedit.timeoffset_label")),a(2),p("ngModel",n.channel.TimeOffset)("showButtons",!0)("min",-1440)("max",1440)("step",30),a(2),T(" ",f(111,150,"settings.chanedit.timeoffset_desc")," "),a(4),S(f(115,152,"settings.chanedit.commmethod_label")),a(2),q(A(175,Dd)),p("options",n.commMethods)("ngModel",n.channel.CommMethod)("editable",!1)("maxlength",0),a(3),T(" ",f(120,154,"settings.chanedit.commmethod_desc")," "),a(11),D("header",f(131,156,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(134,158,"common.unsaved_message")),a(3),D("header",f(137,160,"settings.chanedit.delete_this")),p("visible",n.displayDelete)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(140,162,"settings.common.ru_sure")),a(3),S(Dt(143,164,"settings.chanedit.delete_details",Rt(176,IZ,n.channel.ChanNum,n.channel.ChannelName,n.getSource(n.channel)))),a(3),D("header",f(146,167,"settings.chanedit.delete_source")),p("visible",n.displayDeleteSource)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(149,169,"settings.common.ru_sure")),a(2),p("ngIf",n.filterEvent.filters.Source.value)("ngIfElse",r),a(3),p("ngIf",0!=n.channel.ChanId)}},directives:[Q,xn,ie,Ln,vt,vg,Vt,Te,_e,ve,Jt,Cd,yd,Oe,Uo,ze,Ge,He,Tn,Ye,fn,dt,rn,qe],pipes:[de],styles:[""]}),t})(),EZ=(()=>{class t{constructor(e){this.router=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(It))},t.\u0275cmp=G({type:t,selectors:[["app-wiz-channeledit"]],decls:11,vars:6,consts:[[1,"m-5"],[1,"flex","justify-content-end"],["icon","pi pi-angle-left","iconPos","left",1,"p-3",3,"label","onClick"],["icon","pi pi-angle-right","iconPos","right",1,"p-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"p-card",0),k(1,"app-channel-editor")(2,"br")(3,"br")(4,"br")(5,"br"),l(6,"div",1)(7,"p-button",2),C("onClick",function(){return n.router.navigate(["setupwizard/input-connections"])}),m(8,"translate"),c(),l(9,"p-button",3),C("onClick",function(){return n.router.navigate(["setupwizard/storage-groups"])}),m(10,"translate"),c()()()),2&e&&(a(7),D("label",f(8,2,"common.back")),a(2),D("label",f(10,4,"common.next")))},directives:[Pe,fS,ve],pipes:[de],styles:[""]}),t})(),RZ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[On.forChild([{path:"setupwizard",component:nS,children:[{path:"selectlanguage",component:OW,canDeactivate:[zi]},{path:"dbsetup",component:lK,canDeactivate:[zi]},{path:"general",component:SJ,canDeactivate:[zi]},{path:"capture-cards",component:uS,canDeactivate:[zi]},{path:"recording-profiles",component:dS,canDeactivate:[zi]},{path:"video-sources",component:CY,canDeactivate:[zi]},{path:"input-connections",component:mS,canDeactivate:[zi]},{path:"channel-editor",component:EZ,canDeactivate:[zi]},{path:"storage-groups",component:WY,canDeactivate:[zi]},{path:"system-events",component:eZ,canDeactivate:[zi]}]}])],On]}),t})(),LZ=(()=>{class t{constructor(e){this.httpClient=e,this.startDate=new Date}toTime(e){return new Date(e).toISOString()}toStartTime(e){return this.toTime(e)}toEndTime(e){let n=new Date(e),s=new Date(n.getTime()+72e5);return this.toTime(s.toISOString())}toHalfHour(e){let n=new Date(e);return n.setMinutes(n.getMinutes()<30?0:30),n.setSeconds(0),n}AddToChannelGroup(e){return this.httpClient.post("/Guide/AddToChannelGroup",e)}GetCategoryList(){return this.httpClient.get("/Guide/GetCategoryList")}GetChannelGroupList(e){let n=(new ye).set("IncludeEmpty",e);return this.httpClient.get("/Guide/GetChannelGroupList",{params:n})}GetChannelIcon(e){let n=(new ye).set("ChanId",e.ChanId).set("Width",e.Width).set("Height",e.Height);return this.httpClient.get("/Guide/GetChannelIcon",{params:n})}GetProgramDetails(e){let n=(new ye).set("ChanId",e.ChanId).set("StartTime",e.StartTime);return this.httpClient.get("/Guide/GetProgramDetails",{params:n})}GetProgramGuide(e){e&&(this.startDate=e);let n=this.toHalfHour(this.startDate).toISOString(),s={StartTime:this.toStartTime(n),EndTime:this.toEndTime(n),Details:!0};return this.httpClient.post("/Guide/GetProgramGuide",s)}GetProgramList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Guide/GetProgramList",{params:n})}GetStoredSearches(e){let n=(new ye).set("Type",e);return this.httpClient.get("/Guide/GetStoredSearches",{params:n})}RemoveFromChannelGroup(e){return this.httpClient.post("/Guide/RemoveFromChannelGroup",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function OZ(t,i){if(1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t){const e=d(2);a(2),Ic(" ",f(3,4,"dashboard.guide.channel")," ",e.channel.ChanNum," ",e.channel.CallSign," ",e.channel.ChannelName,"")}}function AZ(t,i){1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"dashboard.guide.people_search")," "))}function PZ(t,i){1&t&&(l(0,"div",11)(1,"b"),g(2),m(3,"translate"),c()()),2&t&&(a(2),T(" ",f(3,1,"dashboard.guide.title_search")," "))}function FZ(t,i){if(1&t){const e=I();l(0,"div",12)(1,"input",13),C("ngModelChange",function(s){return v(e),d(2).searchValue=s}),c(),l(2,"button",14),C("click",function(){return v(e),d(2).titleSearch()}),m(3,"translate"),c(),l(4,"button",15),C("click",function(){return v(e),d(2).peopleSearch()}),m(5,"translate"),c()()}if(2&t){const e=d(2);a(1),p("ngModel",e.searchValue),a(1),D("pTooltip",f(3,3,"dashboard.guide.title_search")),a(2),D("pTooltip",f(5,5,"dashboard.guide.people_search"))}}function NZ(t,i){if(1&t){const e=I();l(0,"div",4)(1,"button",16),C("click",function(){return v(e),d(2).onGrid()}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"dashboard.guide.retgrid")))}const VZ=function(){return{width:"30px",height:"30px"}};function BZ(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,VZ)))}function HZ(t,i){if(1&t){const e=I();l(0,"div")(1,"button",17),C("click",function(){v(e);const s=d(3);return s.refreshing=!0,s.refresh()}),m(2,"translate"),c()()}2&t&&(a(1),D("pTooltip",f(2,1,"common.refresh")))}const qZ=function(t,i){return[t,i]};function UZ(t,i){if(1&t&&_(0,HZ,3,3,"div",10),2&t){const e=d(2);p("ngIf",We(1,qZ,e.CHANNEL,e.GRID).indexOf(e.displayType)>-1)}}function GZ(t,i){}function zZ(t,i){if(1&t&&(ce(0),l(1,"div",27),k(2,"app-guide-timebar",28),c(),ue()),2&t){const e=d(4);a(2),p("guide",e)}}function jZ(t,i){if(1&t&&(ce(0),k(1,"app-guide-programentry",29),ue()),2&t){const e=d().$implicit,n=d().$implicit,s=d(3);a(1),p("program",e)("guideStartTime",s.m_programGuide.ProgramGuide.StartTime)("guideEndTime",s.m_programGuide.ProgramGuide.EndTime)("guideComponent",s)("channel",n)}}function $Z(t,i){if(1&t&&(ce(0),_(1,jZ,2,5,"ng-container",10),ue()),2&t){const e=i.$implicit,n=d(4);a(1),p("ngIf",!n.timeChange&&n.inDisplayWindow(e.StartTime,e.EndTime))}}function WZ(t,i){if(1&t&&(l(0,"div",21),_(1,zZ,3,1,"ng-container",10),l(2,"div",22)(3,"div",23),k(4,"app-guide-channelicon",24),c(),l(5,"div",25),_(6,$Z,2,1,"ng-container",26),c()()()),2&t){const e=i.$implicit,n=i.rowIndex,s=d(3);a(1),p("ngIf",n%5==0),a(3),p("channel",e)("guideComponent",s),a(2),p("ngForOf",e.Programs)}}function KZ(t,i){if(1&t&&(l(0,"div")(1,"p-dataView",18),_(2,GZ,0,0,"ng-template",19),_(3,WZ,7,4,"ng-template",20),c()()),2&t){const e=d(2);a(1),p("value",e.m_programGuide.ProgramGuide.Channels)("totalRecords",e.m_programGuide.ProgramGuide.TotalAvailable)}}function QZ(t,i){if(1&t&&(l(0,"div"),k(1,"app-programs",30),c()),2&t){const e=d(2);a(1),p("inter",e.inter)("programs",e.listPrograms)("usage","GUIDE")}}const Cg=function(t,i,e){return[t,i,e]};function JZ(t,i){if(1&t){const e=I();l(0,"div")(1,"div",3)(2,"div",4)(3,"p-calendar",5),C("ngModelChange",function(s){return v(e),d().m_pickerDate=s})("onClose",function(){return v(e),d().onDateChange()})("keyup.enter",function(){return v(e),d().onDateChange()})("onBlur",function(){return v(e),d().onDateChange()}),c()(),_(4,OZ,4,6,"div",6),_(5,AZ,4,3,"div",6),_(6,PZ,4,3,"div",6),_(7,FZ,6,7,"div",7),_(8,NZ,3,3,"div",8),l(9,"div",4),_(10,BZ,2,3,"div",0),_(11,UZ,1,4,"ng-template",null,9,we),c()(),_(13,KZ,4,2,"div",10),_(14,QZ,2,3,"div",10),c()}if(2&t){const e=F(12),n=d();a(3),p("ngModel",n.m_pickerDate)("showTime",!0)("stepMinute",30)("dateFormat","yy/mm/dd")("selectOtherMonths",!0)("showIcon",!0)("showOnFocus",!1)("showButtonBar",!0)("clearButtonStyleClass","hidden"),a(1),p("ngIf",n.displayType==n.CHANNEL),a(1),p("ngIf",n.displayType==n.PEOPLESEARCH),a(1),p("ngIf",n.displayType==n.TITLESEARCH),a(1),p("ngIf",Rt(18,Cg,n.GRID,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1),a(1),p("ngIf",Rt(22,Cg,n.CHANNEL,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1),a(2),p("ngIf",n.refreshing)("ngIfElse",e),a(3),p("ngIf",n.displayType==n.GRID),a(1),p("ngIf",Rt(26,Cg,n.CHANNEL,n.TITLESEARCH,n.PEOPLESEARCH).indexOf(n.displayType)>-1)}}function YZ(t,i){1&t&&k(0,"p-progressSpinner")}let gS=(()=>{class t{constructor(e,n){this.guideService=e,this.translate=n,this.m_startDate=new Date,this.m_pickerDate=new Date,this.m_endDate=new Date,this.m_channelData=[],this.m_channelTotal=10,this.m_rows=10,this.listPrograms=[],this.loaded=!1,this.refreshing=!1,this.timeChange=!1,this.inter={summaryComponent:this},this.GRID=1,this.CHANNEL=2,this.TITLESEARCH=3,this.PEOPLESEARCH=4,this.displayType=this.GRID,this.searchValue="",this.translate.onLangChange.subscribe(s=>{console.log("Event: language change, new language ("+s.lang+")"),this.switchLanguage(s.lang),this.fetchData()})}ngOnInit(){this.fetchData()}switchLanguage(e){this.translate.use(e)}fetchData(e){this.guideService.GetProgramGuide(e).subscribe(n=>{this.m_programGuide=n,this.m_startDate=new Date(n.ProgramGuide.StartTime),this.m_pickerDate=new Date(this.m_startDate),this.m_endDate=new Date(n.ProgramGuide.EndTime),this.m_channelData=n.ProgramGuide.Channels,this.m_channelTotal=n.ProgramGuide.TotalAvailable,this.loaded=!0,this.refreshing=!1,this.timeChange=!1})}fetchDetails(){let e=this.m_startDate.getTime(),s={Details:!0,StartTime:new Date(e+1e3).toISOString()};switch(this.displayType){case this.CHANNEL:s.ChanId=this.channel.ChanId;break;case this.TITLESEARCH:s.TitleFilter=this.searchValue,s.Count=1e3;break;case this.PEOPLESEARCH:s.PersonFilter=this.searchValue,s.Count=1e3}this.listPrograms=[],this.guideService.GetProgramList(s).subscribe(r=>{this.listPrograms=r.ProgramList.Programs,this.loaded=!0,this.refreshing=!1})}inDisplayWindow(e,n){let s=new Date(e),r=new Date(n),o=new Date(this.m_startDate),u=new Date(this.m_endDate);return!(r<=o||s>=u)&&s1&&(this.displayType=this.TITLESEARCH,this.refresh())}peopleSearch(){this.searchValue=this.searchValue.trim(),this.searchValue.length>1&&(this.displayType=this.PEOPLESEARCH,this.refresh())}}return t.\u0275fac=function(e){return new(e||t)(x(LZ),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-guide"]],decls:7,vars:6,consts:[[4,"ngIf","ngIfElse"],[3,"inter"],["loading",""],[1,"flex"],[1,"flex","align-items-center"],[3,"ngModel","showTime","stepMinute","dateFormat","selectOtherMonths","showIcon","showOnFocus","showButtonBar","clearButtonStyleClass","ngModelChange","onClose","keyup.enter","onBlur"],["class","flex align-items-center p-5",4,"ngIf"],["class","flex align-items-center pl-5",4,"ngIf"],["class","flex align-items-center",4,"ngIf"],["refreshBn",""],[4,"ngIf"],[1,"flex","align-items-center","p-5"],[1,"flex","align-items-center","pl-5"],["type","text","pInputText","","id","searchValue","name","searchValue","placeholder","Search",1,"text-xl",3,"ngModel","ngModelChange"],["pButton","","pRipple","","icon","pi pi-search",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-user",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-table",1,"p-button-text",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",3,"pTooltip","click"],[3,"value","totalRecords"],["pTemplate","header","styleClass","timeHeader"],["pTemplate","listItem"],[1,"grid","col-12","p-3"],[1,"grid","flex-grow-1"],[1,"col-1"],[3,"channel","guideComponent"],[1,"col"],[4,"ngFor","ngForOf"],[1,"col-12"],[3,"guide"],[3,"program","guideStartTime","guideEndTime","guideComponent","channel"],[3,"inter","programs","usage"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,JZ,15,30,"div",0),k(4,"app-schedule",1),_(5,YZ,1,0,"ng-template",null,2,we)),2&e){const s=F(6);a(1),T("",f(2,4,"dashboard.programguide")," "),a(2),p("ngIf",n.loaded)("ngIfElse",s),a(1),p("inter",n.inter)}},styles:[".channelRow[_ngcontent-%COMP%]{display:block;grid-template-columns:90px auto;width:100%;height:82px;padding-bottom:2px}.programsBox[_ngcontent-%COMP%], .timebarbox[_ngcontent-%COMP%]{grid-template-columns:90px auto;grid-template-rows:28px;width:100%}"]}),t})();function ZZ(t,i){1&t&&k(0,"img",5),2&t&&D("src",d().channel.IconURL,Xt)}function XZ(t,i){1&t&&k(0,"img",6)}let eX=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-guide-channelicon"]],inputs:{channel:"channel",guideComponent:"guideComponent"},decls:8,vars:4,consts:[[1,"flex","flex-column","align-items-center","channelBox","cursor-pointer",3,"click"],[1,"channelIcon"],["height","57",3,"src",4,"ngIf","ngIfElse"],["nullIcon",""],[1,"channelText"],["height","57",3,"src"],["height","0","width","0"]],template:function(e,n){if(1&e&&(l(0,"div",0),C("click",function(){return n.guideComponent.onChannel(n.channel)}),l(1,"div",1),_(2,ZZ,1,1,"img",2),_(3,XZ,1,0,"ng-template",null,3,we),c(),l(5,"div",4)(6,"span"),g(7),c()()()),2&e){const s=F(4);a(2),p("ngIf",n.channel.IconURL)("ngIfElse",s),a(5),$e("",n.channel.ChanNum," ",n.channel.CallSign,"")}},directives:[Q],styles:[".channelBox[_ngcontent-%COMP%]{border-radius:10px;background:var(--surface-200);height:120px}.channelIcon[_ngcontent-%COMP%]{height:57px;max-width:86px;margin-top:10px;margin-bottom:3px;overflow:hidden;float:right}.channelText[_ngcontent-%COMP%]{clear:both;font-weight:700;text-align:-webkit-center;overflow:hidden;text-overflow:ellipsis;padding:0 3px}"]}),t})();function tX(t,i){if(1&t&&(l(0,"div")(1,"div",5),g(2),c()()),2&t){const e=d();a(2),S(e.program.SubTitle)}}const nX=function(){return["WillRecord","Recording"]};function iX(t,i){if(1&t&&(l(0,"div")(1,"div",6),g(2),c()()),2&t){const e=d();a(1),p("ngClass",A(2,nX).indexOf(e.program.Recording.StatusName)>-1?"bg-green-400":"bg-pink-400"),a(1),T(" ",e.dataService.recStatusText[e.program.Recording.StatusName],"")}}let sX=(()=>{class t{constructor(e){this.dataService=e,this.editSchedule=!1}ngOnInit(){}durationToWidth(){let e=new Date(this.program.StartTime),n=new Date(this.program.EndTime),s=new Date(this.guideStartTime),r=new Date(this.guideEndTime),h=er?r:n,y=r.getTime()-s.getTime();return(b.getTime()-h.getTime())/y*100}openDialog(){this.guideComponent.inter.sched&&this.guideComponent.inter.sched.open(this.program,this.channel)}}return t.\u0275fac=function(e){return new(e||t)(x(Ll))},t.\u0275cmp=G({type:t,selectors:[["app-guide-programentry"]],inputs:{program:"program",channel:"channel",guideStartTime:"guideStartTime",guideEndTime:"guideEndTime",guideComponent:"guideComponent"},decls:8,vars:6,consts:[[1,"programBox","cursor-pointer",3,"click"],[1,"programTitle"],[1,"programBody"],[4,"ngIf"],[1,"programDescription"],[1,"programSubtitle"],[1,"programSubtitle",3,"ngClass"]],template:function(e,n){1&e&&(l(0,"div",0),C("click",function(){return n.openDialog()}),l(1,"div",1),g(2),c(),l(3,"div",2),_(4,tX,3,1,"div",3),_(5,iX,3,3,"div",3),l(6,"div",4),g(7),c()()()),2&e&&(Hn("width",n.durationToWidth(),"%"),a(2),S(n.program.Title),a(2),p("ngIf",0!=n.program.SubTitle.length),a(1),p("ngIf",n.program.Recording),a(2),S(n.program.Description))},directives:[Q,Oe],styles:[".programBox[_ngcontent-%COMP%]{float:left;height:120px;padding:0 0 0 2px;color:var(--primary-color-text);background:var(--surface-200);border-radius:10px;overflow:hidden;text-overflow:ellipsis}.programTitle[_ngcontent-%COMP%]{padding:5px 8px 4px 7px;width:100%;height:28px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;z-index:4;position:relative;float:left;font-size:1.1em;white-space:nowrap;font-weight:700;overflow:hidden;text-overflow:ellipsis}.programBody[_ngcontent-%COMP%]{margin:3px 5px 4px;padding:0 0 0 2px;color:var(--text-color-secondary);height:45px;z-index:5}.programSubtitle[_ngcontent-%COMP%]{color:var(--text-color);position:relative;font-weight:700;margin-right:5px;line-height:15px;padding-top:2px;padding-bottom:3px}.programDescription[_ngcontent-%COMP%]{position:relative;z-index:1;line-height:15px}"]}),t})(),rX=(()=>{class t{constructor(e){this.translate=e}ngOnInit(){}segmentToStartTime(e){const n=18e5*e;return(new Date(this.guide.m_startDate.getTime()+n).toLocaleTimeString()+" ").replace(/:.. /," ")}pageLeft(){this.guide.m_pickerDate=new Date(this.guide.m_startDate.getTime()-72e5),this.guide.onDateChange()}pageRight(){this.guide.m_pickerDate=new Date(this.guide.m_startDate.getTime()+72e5),this.guide.onDateChange()}}return t.\u0275fac=function(e){return new(e||t)(x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-guide-timebar"]],inputs:{guide:"guide"},decls:21,vars:5,consts:[[1,"grid"],[1,"col-1","datebox"],[1,"col","segmentbox"],[1,"flex"],[1,"flex-none","cursor-pointer",3,"click"],[1,"flex-none"],[1,"flex-grow-1"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"div",1),g(2),c(),l(3,"div",2)(4,"div",3)(5,"div",4),C("click",function(){return n.pageLeft()}),g(6,"<<"),c(),l(7,"div",5),g(8),c()()(),l(9,"div",2),g(10),c(),l(11,"div",2),g(12),c(),l(13,"div",2)(14,"div",3)(15,"div",5),g(16),c(),l(17,"div",6),g(18,"\xa0"),c(),l(19,"div",4),C("click",function(){return n.pageRight()}),g(20,">>"),c()()()()),2&e&&(a(2),S(n.guide.m_startDate.toLocaleDateString()),a(6),T("\xa0",n.segmentToStartTime(0),""),a(2),S(n.segmentToStartTime(1)),a(2),S(n.segmentToStartTime(2)),a(4),S(n.segmentToStartTime(3)))},styles:[".timebarbox[_ngcontent-%COMP%]{grid-template-columns:90px auto;grid-template-rows:28px;width:100%}.datebox[_ngcontent-%COMP%]{padding:5px 8px 4px 7px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);border-radius:10px}.segmentsbox[_ngcontent-%COMP%]{display:block;float:left;position:relative;height:100%;width:calc(100% - 91px)}.segmentbox[_ngcontent-%COMP%]{width:25%;padding:5px 8px 4px 7px;color:var(--primary-color-text);background:linear-gradient(to bottom,var(--surface-800) 1%,var(--surface-500) 90%,var(--surface-200) 99%);height:auto;border-radius:10px}"]}),t})();function _S(t,i=zf){const n=function oX(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-i.now():Math.abs(t);return s=>s.lift(new aX(n,i))}class aX{constructor(i,e){this.delay=i,this.scheduler=e}call(i,e){return e.subscribe(new yg(i,this.delay,this.scheduler))}}class yg extends yt{constructor(i,e,n){super(i),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(i){const e=i.source,n=e.queue,s=i.scheduler,r=i.destination;for(;n.length>0&&n[0].time-s.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const o=Math.max(0,n[0].time-s.now());this.schedule(i,o)}else this.unsubscribe(),e.active=!1}_schedule(i){this.active=!0,this.destination.add(i.schedule(yg.dispatch,this.delay,{source:this,destination:this.destination,scheduler:i}))}scheduleNotification(i){if(!0===this.errored)return;const e=this.scheduler,n=new lX(e.now()+this.delay,i);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(i){this.scheduleNotification(Wn.createNext(i))}_error(i){this.errored=!0,this.queue=[],this.destination.error(i),this.unsubscribe()}_complete(){this.scheduleNotification(Wn.createComplete()),this.unsubscribe()}}class lX{constructor(i,e){this.time=i,this.notification=e}}const cX=["cetonform"],uX=["top"];function dX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.ceton.title")," ")}function pX(t,i){}function hX(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().work.ipAddress=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"input",16,13),C("ngModelChange",function(s){return v(e),d().work.tuner=s}),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",17),g(22),m(23,"translate"),c(),l(24,"input",18,19),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(26,"small",14),g(27),m(28,"translate"),c()(),l(29,"div",10)(30,"label",20),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(34,"small",14),g(35),m(36,"translate"),c()(),l(37,"div",10)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(42,"small",14),g(43),m(44,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,23,"settings.capture.ceton.ipaddress_label")),a(2),p("ngModel",e.work.ipAddress),a(3),T(" ",f(10,25,"settings.capture.ceton.ipaddress_desc")," "),a(4),S(f(14,27,"settings.capture.ceton.tuner_label")),a(2),p("ngModel",e.work.tuner),a(3),T(" ",f(19,29,"settings.capture.ceton.tuner_desc")," "),a(4),S(f(23,31,"settings.capture.ceton.deviceid_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(28,33,"settings.capture.ceton.deviceid_desc")," "),a(4),S(f(32,35,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(36,37,"settings.capture.sigtimeout_desc")," "),a(4),S(f(40,39,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(44,41,"settings.capture.tunetimeout_desc")," ")}}function mX(t,i){1&t&&(k(0,"p-message",29),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fX(t,i){1&t&&(k(0,"p-message",30),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gX(t,i){if(1&t){const e=I();l(0,"div",24)(1,"div",25),_(2,mX,2,3,"p-message",26),_(3,fX,2,3,"p-message",27),c(),l(4,"p-button",28),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _X=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={ipAddress:"",tuner:"",successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){if(this.card.VideoDevice){const e=this.card.VideoDevice.split("-");if(2==e.length){this.work.ipAddress=e[0];const n=e[1].split(".");2==n.length&&(this.work.tuner=n[1])}}}ngAfterViewInit(){this.currentForm.valueChanges.pipe(_S(50)).subscribe(()=>this.card.VideoDevice=this.work.ipAddress+"-RTP."+this.work.tuner),this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-ceton"]],viewQuery:function(e,n){if(1&e&&(j(cX,5),j(uX,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","cetonform",1,"ml-3","mr-3"],["cetonform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","ip",1,"label","block"],["pInputText","","id","ip","name","ip",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ipAddress","ngModel"],[1,"block"],["for","tuner",1,"label","block"],["pInputText","","id","tuner","name","tuner",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,dX,2,3,"ng-template",4),_(6,pX,0,0,"ng-template",5),_(7,hX,45,43,"ng-template",6),_(8,gX,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const bX=["dvbform"],vX=["top"];function CX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.dvb.title")," ")}function yX(t,i){}const wX=function(){return{minWidth:"80%"}};function TX(t,i){if(1&t){const e=I();l(0,"p-dropdown",43,44),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,wX)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function SX(t,i){if(1&t&&(l(0,"div")(1,"small",45),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.work.warningMessage," ")}}function xX(t,i){if(1&t){const e=I();l(0,"input",46,47),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function DX(t,i){if(1&t){const e=I();l(0,"p-dropdown",48,49),C("ngModelChange",function(s){return v(e),d(2).card.InputName=s}),c()}if(2&t){const e=d(2);p("options",e.currentDevice.InputNames)("ngModel",e.card.InputName)}}function MX(t,i){if(1&t){const e=I();l(0,"p-button",50),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function kX(t,i){if(1&t){const e=I();l(0,"p-button",51),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",52),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function IX(t,i){if(1&t){const e=I();l(0,"p-button",53),C("onClick",function(){v(e);const s=d(2);return s.setupRootTrees(),s.work.displayConnectDevice=!0}),m(1,"translate"),m(2,"translate"),c()}2&t&&(D("label",f(1,2,"settings.capture.dvb.satellite_connect")),D("pTooltip",f(2,4,"settings.capture.dvb.satellite_connect_tooltip")))}function EX(t,i){if(1&t){const e=I();l(0,"p-button",51),C("onClick",function(){return v(e),d(2).work.displayConnectDevice=!1}),m(1,"translate"),c(),l(2,"p-button",52),C("onClick",function(){return v(e),d(2).selectDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",!e.work.selectedDiseqcTree)}}function RX(t,i){if(1&t){const e=I();l(0,"p-button",54),C("onClick",function(){return v(e),d(2).canDeleteDiseqc()}),c()}}function LX(t,i){if(1&t){const e=I();l(0,"p-button",55),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",56),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function OX(t,i){if(1&t){const e=I();l(0,"p-button",57),C("onClick",function(){return v(e),d(2).work.displayDisconnect=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.satellite_disconnect"))}function AX(t,i){if(1&t){const e=I();l(0,"p-button",55),C("click",function(){return v(e),d(2).work.displayDisconnect=!1}),m(1,"translate"),c(),l(2,"p-button",56),C("click",function(){return v(e),d(2).unSelectDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function PX(t,i){1&t&&(k(0,"p-message",58),m(1,"translate")),2&t&&D("text",f(1,1,"settings.capture.dvb.satellite_disconnect_error"))}function FX(t,i){if(1&t){const e=I();l(0,"app-lnb",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function NX(t,i){if(1&t){const e=I();l(0,"app-rotor",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function VX(t,i){if(1&t){const e=I();l(0,"app-switch",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}function BX(t,i){if(1&t){const e=I();l(0,"app-unicable",59),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e)}}const Md=function(){return{width:"50vw"}};function HX(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,TX,2,7,"p-dropdown",12),_(7,SX,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,xX,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",17),g(21),m(22,"translate"),c(),_(23,DX,2,2,"p-dropdown",18),l(24,"small",14),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"label",19),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(32,"small",14),g(33),m(34,"translate"),c()(),l(35,"div",10)(36,"label",21),g(37),m(38,"translate"),c(),l(39,"p-inputNumber",22),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(40,"small",14),g(41),m(42,"translate"),c()(),l(43,"div",10)(44,"p-checkbox",23,24),C("ngModelChange",function(s){return v(e),d().card.DVBWaitForSeqStart=s}),m(46,"translate"),c(),l(47,"small",14),g(48),m(49,"translate"),c()(),l(50,"div",10)(51,"p-checkbox",25,26),C("ngModelChange",function(s){return v(e),d().card.DVBOnDemand=s}),m(53,"translate"),c(),l(54,"small",14),g(55),m(56,"translate"),c()(),l(57,"div",10)(58,"p-checkbox",27,28),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(60,"translate"),c(),l(61,"small",14),g(62),m(63,"translate"),c()(),l(64,"div",10)(65,"label",29),g(66),m(67,"translate"),c(),l(68,"p-inputNumber",30),C("ngModelChange",function(s){return v(e),d().card.DVBTuningDelay=s}),c(),l(69,"small",14),g(70),m(71,"translate"),c()()(),l(72,"p-fieldset",31),m(73,"translate"),_(74,MX,2,3,"p-button",32),l(75,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(76,"translate"),l(77,"label",34),g(78),m(79,"translate"),c(),l(80,"p-listbox",35),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(81,kX,4,7,"ng-template",7),c(),g(82," \xa0 "),_(83,IX,3,6,"p-button",36),l(84,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayConnectDevice=s}),m(85,"translate"),l(86,"label",37),g(87),m(88,"translate"),c(),l(89,"p-listbox",38),C("ngModelChange",function(s){return v(e),d().work.selectedDiseqcTree=s})("onDblClick",function(){return v(e),d().selectDiseqc()}),c(),_(90,EX,4,7,"ng-template",7),c(),_(91,RX,1,0,"p-button",39),l(92,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(93,"translate"),l(94,"h2"),g(95),m(96,"translate"),c(),l(97,"p"),g(98),m(99,"translate"),c(),_(100,LX,4,6,"ng-template",7),c(),g(101," \xa0 "),_(102,OX,2,3,"p-button",40),l(103,"p-dialog",33),C("visibleChange",function(s){return v(e),d().work.displayDisconnect=s}),m(104,"translate"),l(105,"h2"),g(106),m(107,"translate"),c(),l(108,"p"),g(109),m(110,"translate"),c(),_(111,AX,4,6,"ng-template",7),c(),_(112,PX,2,3,"p-message",41),_(113,FX,1,3,"app-lnb",42),_(114,NX,1,3,"app-rotor",42),_(115,VX,1,3,"app-switch",42),_(116,BX,1,3,"app-unicable",42),c()()}if(2&t){const e=d();a(4),S(f(5,93,"settings.capture.dvb.device_label")),a(2),p("ngIf",e.work.isReady),a(1),p("ngIf",e.work.warningMessage),a(2),T(" ",f(10,95,"settings.capture.device_desc")," "),a(4),S(f(14,97,"settings.capture.dvb.frontend_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(18,99,"settings.capture.frontend_desc")," "),a(4),S(f(22,101,"settings.capture.dvb.inputname_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(26,103,"settings.capture.inputname_desc")," "),a(4),S(f(30,105,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(34,107,"settings.capture.sigtimeout_desc")," "),a(4),S(f(38,109,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(42,111,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(46,113,"settings.capture.dvb.wait_label")),p("ngModel",e.card.DVBWaitForSeqStart)("binary",!0),a(4),T(" ",f(49,115,"settings.capture.dvb.wait_desc")," "),a(3),D("label",f(53,117,"settings.capture.dvb.ondemand_label")),p("ngModel",e.card.DVBOnDemand)("binary",!0),a(4),T(" ",f(56,119,"settings.capture.dvb.ondemand_desc")," "),a(3),D("label",f(60,121,"settings.capture.dvb.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(63,123,"settings.capture.dvb.eitscan_desc")," "),a(4),S(f(67,125,"settings.capture.dvb.tuningdelay_label")),a(2),p("ngModel",e.card.DVBTuningDelay)("showButtons",!0)("min",0)("max",2e3)("step",25),a(2),T(" ",f(71,127,"settings.capture.dvb.tuningdelay_desc")," "),a(2),D("legend",f(73,129,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcTree),a(1),q(A(151,Md)),D("header",f(76,131,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(79,133,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(3),p("ngIf",!e.diseqcTree),a(1),q(A(152,Md)),D("header",f(85,135,"settings.capture.dvb.satellite_connect")),p("visible",e.work.displayConnectDevice)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(88,137,"settings.capture.dvb.satellite_select")),a(2),p("options",e.diseqcRootTrees)("ngModel",e.work.selectedDiseqcTree),a(2),p("ngIf",e.diseqcTree),a(1),q(A(153,Md)),D("header",f(93,139,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(96,141,"settings.common.ru_sure")),a(3),S(f(99,143,"settings.capture.dvb.satellite_delete_desc")),a(4),p("ngIf",e.diseqcTree),a(1),q(A(154,Md)),D("header",f(104,145,"settings.capture.dvb.satellite_disconnect")),p("visible",e.work.displayDisconnect)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(107,147,"settings.common.ru_sure")),a(3),S(f(110,149,"settings.capture.dvb.satellite_disconnect_warning")),a(3),p("ngIf",e.work.diseqcError),a(1),p("ngIf",e.diseqcTree&&"lnb"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"rotor"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"switch"==e.diseqcTree.Type),a(1),p("ngIf",e.diseqcTree&&"scr"==e.diseqcTree.Type)}}function qX(t,i){1&t&&(k(0,"p-message",64),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function UX(t,i){1&t&&(k(0,"p-message",58),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function GX(t,i){if(1&t){const e=I();l(0,"div",60)(1,"div",61),_(2,qX,2,3,"p-message",62),_(3,UX,2,3,"p-message",41),c(),l(4,"p-button",63),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let bS=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.work={InputName:"",successCount:0,errorCount:0,inputNames:[""],isReady:!1,warningMessage:"",displayNewDiseqc:!1,displayDeleteDiseqc:!1,displayConnectDevice:!1,displayDisconnect:!1,selectedDiseqcTree:0,diseqcError:!1},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.diseqcRootTrees=[],this.diseqcTree=void 0,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.selectedDiseqcType={description:"",type:"",inactive:!0},this.saveObserver={next:r=>{r.bool?(console.log("saveObserver success",r),this.work.successCount++):!this.card.CardId&&r.int?(console.log("saveObserver success",r),this.work.successCount++,this.card.CardId||(this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card),this.captureCardService.UpdateCaptureCard(this.card.CardId,"inputname",this.card.InputName).subscribe(this.saveObserver))):(console.log("saveObserver error",r),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.log("saveObserver error",r),this.work.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){null==this.card.DVBWaitForSeqStart&&(this.card.DVBWaitForSeqStart=!0),null==this.card.DVBOnDemand&&(this.card.DVBOnDemand=!0),null==this.card.DVBEITScan&&(this.card.DVBEITScan=!0),null==this.card.CardId&&(this.card.CardId=0),null==this.card.VideoDevice&&(this.card.VideoDevice=""),null==this.card.DiSEqCId&&(this.card.DiSEqCId=0),this.captureCardService.GetCaptureDeviceList("DVB").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}}),this.setupDiseqc()}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDiseqc(){this.diseqcTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.DiSEqCId==this.card.DiSEqCId),this.work.diseqcError=!1}newDiseqc(){this.work.displayNewDiseqc=!1,this.work.diseqcError=!1,this.diseqcTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setupRootTrees(){this.diseqcRootTrees=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.filter(e=>!e.ParentId)}selectDiseqc(){this.work.displayConnectDevice=!1,this.work.diseqcError=!1,this.card.DiSEqCId=this.work.selectedDiseqcTree,this.currentForm.form.markAsDirty(),this.setupDiseqc()}unSelectDiseqc(){this.work.displayDisconnect=!1,this.work.diseqcError=!1,this.card.DiSEqCId=0,this.currentForm.form.markAsDirty(),this.diseqcTree=void 0,this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe()}canDeleteDiseqc(){this.work.diseqcError=!1,this.cardList.CaptureCardList.CaptureCards.filter(n=>n.DiSEqCId==this.card.DiSEqCId).length>1?this.work.diseqcError=!0:this.work.displayDeleteDiseqc=!0}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.work.successCount=0,this.work.errorCount=0,this.diseqcTree&&this.diseqcTree.DiSEqCId&&(this.captureCardService.DeleteDiseqcTree(this.diseqcTree.DiSEqCId).subscribe({next:e=>{e.bool?this.work.successCount++:(this.work.errorCount++,console.log("DeleteDiseqcTree",e)),this.parent.loadDiseqc()},error:e=>{console.log("DeleteDiseqcTree",e),this.work.errorCount++}}),this.card.DiSEqCId=0,this.card.CardId&&(this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"DiSEqCId",String(this.card.DiSEqCId)).subscribe(this.saveObserver)}),this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe())),this.diseqcTree=void 0}setDiseqcObject(e){this.diseqcComponent=e}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.work.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.work.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.work.diseqcError=!1,this.diseqcTree&&this.diseqcComponent?this.diseqcComponent.saveForm(0,{next:e=>{var n;this.card.DiSEqCId&&e.bool&&this.card.DiSEqCId==(null===(n=this.diseqcTree)||void 0===n?void 0:n.DiSEqCId)?(this.work.successCount++,this.saveCard()):e.int&&this.diseqcTree?(this.card.DiSEqCId=e.int,this.diseqcTree.DiSEqCId=e.int,this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.push(this.diseqcTree),this.saveCard()):(console.log("saveForm",e),this.work.errorCount++,this.currentForm.form.markAsDirty())},error:e=>{console.log("saveForm",e),this.work.errorCount++,this.currentForm.form.markAsDirty()},complete:()=>{}}):this.saveCard()}saveCard(){this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_wait_for_seqstart",this.card.DVBWaitForSeqStart?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_on_demand",this.card.DVBOnDemand?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_tuning_delay",String(this.card.DVBTuningDelay)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"inputname",this.card.InputName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"DiSEqCId",String(this.card.DiSEqCId)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-dvb"]],viewQuery:function(e,n){if(1&e&&(j(bX,5),j(vX,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList",diseqcTreeList:"diseqcTreeList",parent:"parent"},decls:9,vars:0,consts:[["name","dvbform",1,"ml-3","mr-3"],["dvbform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["for","InputName",1,"label","block"],["name","InputName",3,"options","ngModel","ngModelChange",4,"ngIf"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBWaitForSeqStart","name","DVBWaitForSeqStart",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBWaitForSeqStart","ngModel"],["inputId","DVBOnDemand","name","DVBOnDemand",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBOnDemand","ngModel"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["for","DVBTuningDelay",1,"label","block"],["name","DVBTuningDelay","id","DVBTuningDelay",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","pTooltip","onClick",4,"ngIf"],["for","diseqcRootTrees",1,"label","block"],["optionLabel","Description","name","diseqcRootTrees","optionValue","DiSEqCId",3,"options","ngModel","ngModelChange","onDblClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"onClick",4,"ngIf"],["icon","pi pi-minus-circle","styleClass","p-button-warning",3,"label","onClick",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],["name","InputName",3,"options","ngModel","ngModelChange"],["InputName","ngModel"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","pTooltip","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-minus-circle","styleClass","p-button-warning",3,"label","onClick"],["severity","error",3,"text"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,CX,2,3,"ng-template",4),_(6,yX,0,0,"ng-template",5),_(7,HX,117,155,"ng-template",6),_(8,GX,6,6,"ng-template",7),c()())},styles:[""]}),t})();const zX=["lnbform"];function jX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.lnb.title")," ")}function $X(t,i){}const vS=function(){return{minWidth:"80%"}};function WX(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-dropdown",14,15),C("ngModelChange",function(s){return v(e),d().currentPreset=s})("onChange",function(){return v(e),d().updatePreset()}),c(),l(17,"small",12),g(18),m(19,"translate"),c()(),l(20,"div",8)(21,"label",16),g(22),m(23,"translate"),c(),l(24,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(26,"small",12),g(27),m(28,"translate"),c()(),l(29,"div",8)(30,"label",19),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().work.LnbLofSwitch=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",21),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",22),C("ngModelChange",function(s){return v(e),d().work.LnbLofLo=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()(),l(45,"div",8)(46,"label",23),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().work.LnbLofHi=s}),c(),l(50,"small",12),g(51),m(52,"translate"),c()(),l(53,"div",8)(54,"p-checkbox",25,26),C("ngModelChange",function(s){return v(e),d().diseqcTree.LnbPolInv=s}),m(56,"translate"),c(),l(57,"small",12),g(58),m(59,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,43,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,45,"settings.capture.diseqc.lnb.preset_label")),a(2),q(A(69,vS)),p("options",e.lnbPresetList)("ngModel",e.currentPreset)("editable",!1)("maxlength",0)("scrollHeight","400px"),a(3),T(" ",f(19,47,"settings.capture.diseqc.lnb.preset_desc")," "),a(4),S(f(23,49,"settings.capture.diseqc.lnb.type_label")),a(2),q(A(70,vS)),p("options",e.lnbSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0)("disabled","custom"!=e.currentPreset.SubType),a(3),T(" ",f(28,51,"settings.capture.diseqc.lnb.type_desc")," "),a(4),S(f(32,53,"settings.capture.diseqc.lnb.lofswitch_label")),a(2),p("ngModel",e.work.LnbLofSwitch)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType||"voltage_tone"!=e.diseqcTree.SubType),a(2),T(" ",f(36,55,"settings.capture.diseqc.lnb.lofswitch_desc")," "),a(4),S(f(40,57,"settings.capture.diseqc.lnb.loflow_label")),a(2),p("ngModel",e.work.LnbLofLo)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType),a(2),T(" ",f(44,59,"settings.capture.diseqc.lnb.loflow_desc")," "),a(4),S(f(48,61,"settings.capture.diseqc.lnb.lofhigh_label")),a(2),p("ngModel",e.work.LnbLofHi)("useGrouping",!1)("disabled","custom"!=e.currentPreset.SubType||!("voltage_tone"==e.diseqcTree.SubType||"bandstacked"==e.diseqcTree.SubType)),a(2),T(" ",f(52,63,"settings.capture.diseqc.lnb.lofhigh_desc")," "),a(3),D("label",f(56,65,"settings.capture.diseqc.lnb.reversed_label")),p("ngModel",e.diseqcTree.LnbPolInv)("binary",!0)("disabled","custom"!=e.currentPreset.SubType),a(4),T(" ",f(59,67,"settings.capture.diseqc.lnb.reversed_desc")," ")}}let kd=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.baseEvent=new H,this.work={LnbLofSwitch:0,LnbLofLo:0,LnbLofHi:0},this.lnbSubTypes=[{Name:"settings.capture.diseqc.subtype_legacy",SubType:"fixed"},{Name:"settings.capture.diseqc.subtype_standard",SubType:"voltage"},{Name:"settings.capture.diseqc.subtype_universal",SubType:"voltage_tone"},{Name:"settings.capture.diseqc.subtype_backstacked",SubType:"bandstacked"}],this.lnbPresetList=[{Name:"settings.capture.diseqc.lnbpreset_universal",SubType:"voltage_tone",LnbLofSwitch:11700,LnbLofLo:9750,LnbLofHi:10600,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_single",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:9750,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_circular",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:11250,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_Linear",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:10750,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_cband",SubType:"voltage",LnbLofSwitch:0,LnbLofLo:5150,LnbLofHi:0,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_dishpro",SubType:"bandstacked",LnbLofSwitch:0,LnbLofLo:11250,LnbLofHi:14350,LnbPolInv:!1},{Name:"settings.capture.diseqc.lnbpreset_custom",SubType:"custom",LnbLofSwitch:0,LnbLofLo:0,LnbLofHi:0,LnbPolInv:!1}],this.setupDone=!1,this.lnbSubTypes.forEach(r=>s.get(r.Name).subscribe(o=>r.Name=o)),this.lnbPresetList.forEach(r=>s.get(r.Name).subscribe(o=>r.Name=o))}ngOnInit(){if(this.diseqcTree.DiSEqCId){let e;this.work.LnbLofSwitch=this.diseqcTree.LnbLofSwitch/1e3,this.work.LnbLofLo=this.diseqcTree.LnbLofLo/1e3,this.work.LnbLofHi=this.diseqcTree.LnbLofHi/1e3,e=this.lnbPresetList.find(n=>n.SubType==this.diseqcTree.SubType&&n.LnbLofSwitch==this.work.LnbLofSwitch&&n.LnbLofLo==this.work.LnbLofLo&&n.LnbLofHi==this.work.LnbLofHi&&n.LnbPolInv==this.diseqcTree.LnbPolInv),this.currentPreset=null==e?this.lnbPresetList[this.lnbPresetList.length-1]:e}else this.currentPreset=this.lnbPresetList[0],this.updatePreset()}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}updatePreset(){if("custom"!=this.currentPreset.SubType){let e=this.lnbSubTypes.find(n=>n.SubType==this.currentPreset.SubType);e&&(this.currentSubType=e,this.updateSubType()),this.work.LnbLofSwitch=this.currentPreset.LnbLofSwitch,this.work.LnbLofLo=this.currentPreset.LnbLofLo,this.work.LnbLofHi=this.currentPreset.LnbLofHi,this.diseqcTree.LnbPolInv=this.currentPreset.LnbPolInv}}updateSubType(){this.diseqcTree.SubType=this.currentSubType.SubType}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.LnbLofSwitch=1e3*this.work.LnbLofSwitch,this.diseqcTree.LnbLofLo=1e3*this.work.LnbLofLo,this.diseqcTree.LnbLofHi=1e3*this.work.LnbLofHi,this.diseqcTree.DiSEqCId?this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s)):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-lnb"]],viewQuery:function(e,n){if(1&e&&j(zX,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","lnbform",1,"ml-3","mr-3"],["lnbform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","LnbPreset",1,"label","block"],["optionLabel","Name","name","LnbPreset",3,"options","ngModel","editable","maxlength","scrollHeight","ngModelChange","onChange"],["LnbPreset","ngModel"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","disabled","ngModelChange","onChange"],["SubType","ngModel"],["for","LnbLofSwitch",1,"label","block"],["name","LnbLofSwitch","id","LnbLofSwitch","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["for","LnbLofLo",1,"label","block"],["name","LnbLofLo","id","LnbLofLo","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["for","LnbLofHi",1,"label","block"],["name","LnbLofHi","id","LnbLofHi","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","disabled","ngModelChange"],["inputId","LnbPolInv","name","LnbPolInv",1,"label","mb-2","w-full",3,"ngModel","binary","label","disabled","ngModelChange"],["LnbPolInv","ngModel"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,jX,2,3,"ng-template",3),_(4,$X,0,0,"ng-template",4),_(5,WX,60,71,"ng-template",5),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Vt,fn,dt,rn],pipes:[de],styles:[""]}),t})();const KX=["rotorform"];function QX(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.rotor.title")," ")}function JX(t,i){}function YX(t,i){1&t&&(l(0,"tr")(1,"th"),g(2,"Position #"),c(),l(3,"th"),g(4,"Angle (Degrees)"),c()())}function ZX(t,i){if(1&t){const e=I();l(0,"p-inputNumber",43),C("ngModelChange",function(s){return v(e),d().$implicit.Angle=s}),c()}2&t&&p("ngModel",d().$implicit.Angle)("min",-180)("max",180)("maxFractionDigits",5)}function XX(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d(2).$implicit;a(1),T("",e.Angle," (W)")}}function eee(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d(2).$implicit;a(1),T(" ",e.Angle," (E)")}}function tee(t,i){if(1&t&&(_(0,XX,2,1,"div",44),_(1,eee,2,1,"div",44)),2&t){const e=d().$implicit;p("ngIf",e.Angle<0),a(1),p("ngIf",null!=e.Angle&&e.Angle>=0)}}function nee(t,i){if(1&t&&(l(0,"tr")(1,"td"),g(2),c(),l(3,"td",40)(4,"p-cellEditor"),_(5,ZX,1,4,"ng-template",41),_(6,tee,2,2,"ng-template",42),c()()()),2&t){const e=i.$implicit;a(2),T(" ",e.Num," ")}}const CS=function(){return{width:"25rem"}};function iee(t,i){if(1&t&&(l(0,"div",8)(1,"label",36),g(2),m(3,"translate"),c(),l(4,"div")(5,"p-table",37),_(6,YX,5,0,"ng-template",38),_(7,nee,7,1,"ng-template",39),c()(),l(8,"small",12),g(9),m(10,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,6,"settings.capture.diseqc.rotor.positions_label")),a(2),q(A(10,CS)),a(1),p("value",e.rotorPositions)("scrollable",!0),a(4),T(" ",f(10,8,"settings.capture.diseqc.rotor.positions_desc")," ")}}function see(t,i){if(1&t){const e=I();l(0,"p-button",45),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function ree(t,i){if(1&t){const e=I();l(0,"p-button",46),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",47),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function oee(t,i){if(1&t){const e=I();l(0,"p-button",48),C("onClick",function(){return v(e),d(2).work.displayDeleteDiseqc=!0}),c()}2&t&&p("disabled",!d(2).diseqcSubTree)}function aee(t,i){if(1&t){const e=I();l(0,"p-button",49),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",50),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function lee(t,i){if(1&t){const e=I();l(0,"app-lnb",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function cee(t,i){if(1&t){const e=I();l(0,"app-rotor",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function uee(t,i){if(1&t){const e=I();l(0,"app-switch",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function dee(t,i){if(1&t){const e=I();l(0,"app-unicable",51),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}const pee=function(){return{minWidth:"80%"}},yS=function(){return{width:"50vw"}};function hee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(25,"small",12),g(26),m(27,"translate"),c()(),_(28,iee,11,11,"div",19),l(29,"div",8)(30,"label",20),g(31),m(32,"translate"),c(),l(33,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().diseqcTree.RotorLoSpeed=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().diseqcTree.RotorHiSpeed=s}),c(),l(42,"small",12),g(43),m(44,"translate"),c()(),l(45,"div",8)(46,"label",24),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().fields.Latitude=s}),c(),l(50,"small",12),g(51),m(52,"translate"),c()(),l(53,"div",8)(54,"label",26),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d().fields.Longitude=s}),c(),l(58,"small",12),g(59),m(60,"translate"),c()(),l(61,"p-fieldset",28),m(62,"translate"),_(63,see,2,3,"p-button",29),l(64,"p-dialog",30),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(65,"translate"),l(66,"label",31),g(67),m(68,"translate"),c(),l(69,"p-listbox",32),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(70,ree,4,7,"ng-template",33),c(),_(71,oee,1,1,"p-button",34),l(72,"p-dialog",30),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(73,"translate"),l(74,"h2"),g(75),m(76,"translate"),c(),l(77,"p"),g(78),m(79,"translate"),c(),_(80,aee,4,6,"ng-template",33),c(),_(81,lee,1,3,"app-lnb",35),_(82,cee,1,3,"app-rotor",35),_(83,uee,1,3,"app-switch",35),_(84,dee,1,3,"app-unicable",35),c()()()}if(2&t){const e=d();a(4),S(f(5,65,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,67,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,69,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(18,71,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),q(A(105,CS)),a(2),S(f(22,73,"settings.capture.diseqc.rotor.type_label")),a(2),q(A(106,pee)),p("options",e.rotorSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0),a(3),T(" ",f(27,75,"settings.capture.diseqc.rotor.type_desc")," "),a(2),p("ngIf","diseqc_1_2"==e.diseqcTree.SubType),a(3),S(f(32,77,"settings.capture.diseqc.rotor.lospeed_label")),a(2),p("ngModel",e.diseqcTree.RotorLoSpeed)("maxFractionDigits",5),a(2),T(" ",f(36,79,"settings.capture.diseqc.rotor.lospeed_desc")," "),a(4),S(f(40,81,"settings.capture.diseqc.rotor.hispeed_label")),a(2),p("ngModel",e.diseqcTree.RotorHiSpeed)("maxFractionDigits",5),a(2),T(" ",f(44,83,"settings.capture.diseqc.rotor.hispeed_desc")," "),a(4),S(f(48,85,"settings.capture.diseqc.rotor.latitude_label")),a(2),p("ngModel",e.fields.Latitude)("maxFractionDigits",5),a(2),T(" ",f(52,87,"settings.capture.diseqc.rotor.latitude_desc")," "),a(4),S(f(56,89,"settings.capture.diseqc.rotor.longitude_label")),a(2),p("ngModel",e.fields.Longitude)("maxFractionDigits",5),a(2),T(" ",f(60,91,"settings.capture.diseqc.rotor.longitude_desc")," "),a(2),D("legend",f(62,93,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcSubTree),a(1),q(A(107,yS)),D("header",f(65,95,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(68,97,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(2),p("ngIf",e.diseqcSubTree),a(1),q(A(108,yS)),D("header",f(73,99,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(76,101,"settings.common.ru_sure")),a(3),S(f(79,103,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",e.diseqcSubTree&&"lnb"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"rotor"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"switch"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"scr"==e.diseqcSubTree.Type)}}let Ol=(()=>{class t{constructor(e,n,s,r){this.captureCardService=e,this.setupService=n,this.translate=s,this.mythService=r,this.baseEvent=new H,this.rotorSubTypes=[{Name:"settings.capture.diseqc.subtype_diseqc_1_2",SubType:"diseqc_1_2"},{Name:"settings.capture.diseqc.subtype_diseqc_1_3",SubType:"diseqc_1_3"}],this.selectedDiseqcType={description:"",type:"",inactive:!0},this.rotorPositions=[],this.fields={Latitude:null,Longitude:null},this.work={displayNewDiseqc:!1,displayDeleteDiseqc:!1},this.setupDone=!1,this.rotorSubTypes.forEach(o=>s.get(o.Name).subscribe(u=>o.Name=u))}ngOnInit(){this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"latitude"}).subscribe({next:e=>{e.String.length>0&&(this.fields.Latitude=Number(e.String))},error:()=>this.dvbComponent.work.errorCount++}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"longitude"}).subscribe({next:e=>{e.String.length>0&&(this.fields.Longitude=Number(e.String))},error:()=>this.dvbComponent.work.errorCount++});for(let e=0;e<48;e++)this.rotorPositions.push({Num:e+1,Angle:null});if(this.diseqcTree.DiSEqCId?this.diseqcTree.RotorPositions.split(":").forEach(n=>{let s=n.split("=");if(2==s.length&&s[0].length>0&&s[1].length>0){let r=Number.parseInt(s[1])-1,o=Number.parseFloat(s[0]);r>-1&&r<48&&(this.rotorPositions[r].Angle=o)}}):(this.diseqcTree.RotorHiSpeed=2.5,this.diseqcTree.RotorLoSpeed=1.9,this.diseqcTree.SubType="diseqc_1_3",this.diseqcTree.CmdRepeat=1),this.diseqcTree.SubType){let e=this.rotorSubTypes.find(n=>n.SubType==this.diseqcTree.SubType);e&&(this.currentSubType=e)}this.diseqcSubTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.ParentId==this.diseqcTree.DiSEqCId)}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}updateSubType(){this.diseqcTree.SubType=this.currentSubType.SubType}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setDiseqcObject(e){this.diseqcSubComponent=e}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.dvbComponent.work.errorCount=0,this.diseqcSubTree&&this.diseqcSubTree.DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree.DiSEqCId).subscribe({next:e=>{e.bool||(console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++)},error:e=>{console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree=void 0)}saveForm(e,n){this.diseqcTree.ParentId=e,null!=this.fields.Latitude&&this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"latitude",Value:String(this.fields.Latitude)}).subscribe(this.dvbComponent.saveObserver),null!=this.fields.Longitude&&this.mythService.PutSetting({HostName:"_GLOBAL_",Key:"longitude",Value:String(this.fields.Longitude)}).subscribe(this.dvbComponent.saveObserver),this.diseqcTree.RotorPositions="",this.rotorPositions.forEach(s=>{null!=s.Angle&&(this.diseqcTree.RotorPositions.length>0&&(this.diseqcTree.RotorPositions=this.diseqcTree.RotorPositions+":"),this.diseqcTree.RotorPositions=this.diseqcTree.RotorPositions+s.Angle+"="+s.Num)}),this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{error:s=>{n.error(s)}})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next(s),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{next:r=>{},error:r=>{n.error(r)}})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le),x(Ut))},t.\u0275cmp=G({type:t,selectors:[["app-rotor"]],viewQuery:function(e,n){if(1&e&&j(KX,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","rotorform",1,"ml-3","mr-3"],["rotorform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SubType","ngModel"],["class","form-group field",4,"ngIf"],["for","RotorLoSpeed",1,"label","block"],["name","RotorLoSpeed","id","RotorLoSpeed","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","RotorHiSpeed",1,"label","block"],["name","RotorHiSpeed","id","RotorHiSpeed","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","Latitude",1,"label","block"],["name","Latitude","id","Latitude","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],["for","Longitude",1,"label","block"],["name","Longitude","id","Longitude","mode","decimal",3,"ngModel","maxFractionDigits","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["for","RotorPositions",1,"label","block"],["dataKey","Num","responsiveLayout","scroll","name","RotorPositions","styleClass","p-datatable-gridlines","scrollHeight","20rem",3,"value","scrollable"],["pTemplate","header"],["pTemplate","body"],["pEditableColumn",""],["pTemplate","input"],["pTemplate","output"],["name","Angle",3,"ngModel","min","max","maxFractionDigits","ngModelChange"],[4,"ngIf"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,QX,2,3,"ng-template",3),_(4,JX,0,0,"ng-template",4),_(5,hee,85,109,"ng-template",5),c()())},styles:[""]}),t})();const mee=["unicableform"];function fee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.unicable.title")," ")}function gee(t,i){}function _ee(t,i){if(1&t){const e=I();l(0,"p-button",30),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(1,"translate"),c()}2&t&&D("label",f(1,1,"settings.capture.dvb.newsatellite_button"))}function bee(t,i){if(1&t){const e=I();l(0,"p-button",31),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",32),C("onClick",function(){return v(e),d(2).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(2);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function vee(t,i){if(1&t){const e=I();l(0,"p-button",33),C("onClick",function(){return v(e),d(2).work.displayDeleteDiseqc=!0}),c()}2&t&&p("disabled",!d(2).diseqcSubTree)}function Cee(t,i){if(1&t){const e=I();l(0,"p-button",34),C("click",function(){return v(e),d(2).work.displayDeleteDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",35),C("click",function(){return v(e),d(2).deleteDiseqc()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function yee(t,i){if(1&t){const e=I();l(0,"app-lnb",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function wee(t,i){if(1&t){const e=I();l(0,"app-rotor",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function Tee(t,i){if(1&t){const e=I();l(0,"app-switch",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}function See(t,i){if(1&t){const e=I();l(0,"app-unicable",36),C("baseEvent",function(s){return v(e),d(2).setDiseqcObject(s)}),c()}if(2&t){const e=d(2);p("diseqcTree",e.diseqcSubTree)("diseqcTreeList",e.diseqcTreeList)("dvbComponent",e.dvbComponent)}}const wS=function(){return{width:"50vw"}};function xee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrUserband=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrFrequency=s}),c(),l(24,"small",12),g(25),m(26,"translate"),c()(),l(27,"div",8)(28,"label",18),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",19),C("ngModelChange",function(s){return v(e),d().diseqcTree.ScrPin=s}),c(),l(32,"small",12),g(33),m(34,"translate"),c()(),l(35,"div",8)(36,"label",20),g(37),m(38,"translate"),c(),l(39,"p-inputNumber",21),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(40,"small",12),k(41,"div",15),m(42,"translate"),c()(),l(43,"p-fieldset",22),m(44,"translate"),_(45,_ee,2,3,"p-button",23),l(46,"p-dialog",24),C("visibleChange",function(s){return v(e),d().work.displayNewDiseqc=s}),m(47,"translate"),l(48,"label",25),g(49),m(50,"translate"),c(),l(51,"p-listbox",26),C("ngModelChange",function(s){return v(e),d().selectedDiseqcType=s})("onDblClick",function(){return v(e),d().newDiseqc()}),c(),_(52,bee,4,7,"ng-template",27),c(),_(53,vee,1,1,"p-button",28),l(54,"p-dialog",24),C("visibleChange",function(s){return v(e),d().work.displayDeleteDiseqc=s}),m(55,"translate"),l(56,"h2"),g(57),m(58,"translate"),c(),l(59,"p"),g(60),m(61,"translate"),c(),_(62,Cee,4,6,"ng-template",27),c(),_(63,yee,1,3,"app-lnb",29),_(64,wee,1,3,"app-rotor",29),_(65,Tee,1,3,"app-switch",29),_(66,See,1,3,"app-unicable",29),c()()()}if(2&t){const e=d();a(4),S(f(5,55,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,57,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,59,"settings.capture.diseqc.unicable.userband_label")),a(2),p("ngModel",e.diseqcTree.ScrUserband)("showButtons",!0)("min",0)("max",7)("step",1),a(2),p("innerHTML",f(18,61,"settings.capture.diseqc.userband_desc"),Ht),a(4),S(f(22,63,"settings.capture.diseqc.unicable.frequency_label")),a(2),p("ngModel",e.diseqcTree.ScrFrequency)("useGrouping",!1),a(2),T(" ",f(26,65,"settings.capture.diseqc.unicable.frequency_desc")," "),a(4),S(f(30,67,"settings.capture.diseqc.unicable.pin_label")),a(2),p("ngModel",e.diseqcTree.ScrPin)("useGrouping",!1)("min",-1)("max",255),a(2),T(" ",f(34,69,"settings.capture.diseqc.unicable.pin_desc")," "),a(4),S(f(38,71,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(42,73,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),D("legend",f(44,75,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",!e.diseqcSubTree),a(1),q(A(87,wS)),D("header",f(47,77,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(50,79,"settings.capture.dvb.newsatellite_devtype")),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType),a(2),p("ngIf",e.diseqcSubTree),a(1),q(A(88,wS)),D("header",f(55,81,"settings.capture.dvb.satellite_delete_header")),p("visible",e.work.displayDeleteDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(58,83,"settings.common.ru_sure")),a(3),S(f(61,85,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",e.diseqcSubTree&&"lnb"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"rotor"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"switch"==e.diseqcSubTree.Type),a(1),p("ngIf",e.diseqcSubTree&&"scr"==e.diseqcSubTree.Type)}}let Al=(()=>{class t{constructor(e){this.captureCardService=e,this.selectedDiseqcType={description:"",type:"",inactive:!0},this.baseEvent=new H,this.work={displayNewDiseqc:!1,displayDeleteDiseqc:!1},this.setupDone=!1}ngOnInit(){this.diseqcTree.DiSEqCId||(this.diseqcTree.ScrUserband=0,this.diseqcTree.ScrFrequency=1210,this.diseqcTree.ScrPin=-1,this.diseqcTree.CmdRepeat=1),this.diseqcSubTree=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(e=>e.ParentId==this.diseqcTree.DiSEqCId)}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree={Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}}setDiseqcObject(e){this.diseqcSubComponent=e}deleteDiseqc(){this.work.displayDeleteDiseqc=!1,this.dvbComponent.work.errorCount=0,this.diseqcSubTree&&this.diseqcSubTree.DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree.DiSEqCId).subscribe({next:e=>{e.bool||(console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++)},error:e=>{console.log("DeleteDiseqcTree",e),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree=void 0)}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{error:s=>{n.error(s)}})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s),this.diseqcSubComponent&&this.diseqcSubComponent.saveForm(this.diseqcTree.DiSEqCId,{next:r=>{},error:r=>{n.error(r)}})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt))},t.\u0275cmp=G({type:t,selectors:[["app-unicable"]],viewQuery:function(e,n){if(1&e&&j(mee,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","unicableform",1,"ml-3","mr-3"],["unicableform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","ScrUserband",1,"label","block"],["name","ScrUserband","id","ScrUserband",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","ScrFrequency",1,"label","block"],["name","ScrFrequency","id","ScrFrequency","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","ngModelChange"],["for","ScrPin",1,"label","block"],["name","ScrPin","id","ScrPin","mode","decimal","inputId","withoutgrouping",3,"ngModel","useGrouping","min","max","ngModelChange"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["pTemplate","footer"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,fee,2,3,"ng-template",3),_(4,gee,0,0,"ng-template",4),_(5,xee,67,89,"ng-template",5),c()())},styles:[""]}),t})();const Dee=["switchform"];function Mee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.diseqc.switch.title")," ")}function kee(t,i){}function Iee(t,i){1&t&&(l(0,"div")(1,"small",27),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.capture.diseqc.switchports_error")))}function Eee(t,i){if(1&t){const e=I();l(0,"p-button",33),C("onClick",function(){v(e);const s=d(2).index;return d(2).displayDeleteThis[s]=!0}),c()}2&t&&p("disabled",!d(2).$implicit)}function Ree(t,i){if(1&t){const e=I();l(0,"p-button",34),C("click",function(){v(e);const s=d(2).index;return d(2).displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",35),C("click",function(){v(e);const s=d(2).index;return d(2).deleteDiseqc(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}function Lee(t,i){if(1&t){const e=I();l(0,"app-lnb",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Oee(t,i){if(1&t){const e=I();l(0,"app-rotor",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Aee(t,i){if(1&t){const e=I();l(0,"app-switch",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}function Pee(t,i){if(1&t){const e=I();l(0,"app-unicable",36),C("baseEvent",function(s){return v(e),d(4).setDiseqcObject(s)}),c()}if(2&t){const e=d(2).$implicit,n=d(2);p("diseqcTree",e)("diseqcTreeList",n.diseqcTreeList)("dvbComponent",n.dvbComponent)}}const TS=function(){return{width:"50vw"}};function Fee(t,i){if(1&t){const e=I();l(0,"p-fieldset",28),m(1,"translate"),_(2,Eee,1,1,"p-button",29),l(3,"p-dialog",30),C("visibleChange",function(s){v(e);const r=d().index;return d(2).displayDeleteThis[r]=s}),m(4,"translate"),l(5,"h2"),g(6),m(7,"translate"),c(),l(8,"p"),g(9),m(10,"translate"),c(),_(11,Ree,4,6,"ng-template",31),c(),_(12,Lee,1,3,"app-lnb",32),_(13,Oee,1,3,"app-rotor",32),_(14,Aee,1,3,"app-switch",32),_(15,Pee,1,3,"app-unicable",32),c()}if(2&t){const e=d(),n=e.$implicit,s=e.index,r=d(2);D("legend",f(1,17,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",n),a(1),q(A(25,TS)),D("header",f(4,19,"settings.capture.dvb.satellite_delete_header")),p("visible",r.displayDeleteThis[s])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(7,21,"settings.common.ru_sure")),a(3),S(f(10,23,"settings.capture.dvb.satellite_delete_desc")),a(3),p("ngIf",n&&"lnb"==n.Type),a(1),p("ngIf",n&&"rotor"==n.Type),a(1),p("ngIf",n&&"switch"==n.Type),a(1),p("ngIf",n&&"scr"==n.Type)}}function Nee(t,i){if(1&t&&(l(0,"div"),_(1,Fee,16,26,"p-fieldset",26),c()),2&t){const e=i.$implicit;a(1),p("ngIf",e)}}function Vee(t,i){if(1&t){const e=I();l(0,"p-button",40),C("onClick",function(){return v(e),d(3).work.displayNewDiseqc=!1}),m(1,"translate"),c(),l(2,"p-button",41),C("onClick",function(){return v(e),d(3).newDiseqc()}),m(3,"translate"),c()}if(2&t){const e=d(3);D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.selectedDiseqcType.inactive)}}function Bee(t,i){if(1&t){const e=I();l(0,"p-fieldset",28),m(1,"translate"),l(2,"p-button",37),C("onClick",function(){return v(e),d(2).work.displayNewDiseqc=!0}),m(3,"translate"),c(),l(4,"p-dialog",30),C("visibleChange",function(s){return v(e),d(2).work.displayNewDiseqc=s}),m(5,"translate"),l(6,"label",38),g(7),m(8,"translate"),c(),l(9,"p-listbox",39),C("ngModelChange",function(s){return v(e),d(2).selectedDiseqcType=s})("onDblClick",function(){return v(e),d(2).newDiseqc()}),c(),_(10,Vee,4,7,"ng-template",31),c()()}if(2&t){const e=d(2);D("legend",f(1,14,"settings.capture.dvb.satellite_heading")),p("toggleable",!0)("collapsed",!1),a(2),D("label",f(3,16,"settings.capture.dvb.newsatellite_button")),a(2),q(A(22,TS)),D("header",f(5,18,"settings.capture.dvb.newsatellite_heading")),p("visible",e.work.displayNewDiseqc)("modal",!0)("draggable",!1)("resizable",!1),a(3),T(" ",f(8,20,"settings.capture.dvb.newsatellite_devtype")," "),a(2),p("options",e.captureCardService.diseqcTypes)("ngModel",e.selectedDiseqcType)}}const Hee=function(){return{width:"25rem"}},qee=function(){return{minWidth:"80%"}};function Uee(t,i){if(1&t){const e=I();l(0,"div",6)(1,"div",7)(2,"div",8)(3,"label",9),g(4),m(5,"translate"),c(),l(6,"input",10,11),C("ngModelChange",function(s){return v(e),d().diseqcTree.Description=s}),c(),l(8,"small",12),g(9),m(10,"translate"),c()(),l(11,"div",8)(12,"label",13),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",14),C("ngModelChange",function(s){return v(e),d().diseqcTree.CmdRepeat=s}),c(),l(16,"small",12),k(17,"div",15),m(18,"translate"),c()(),l(19,"div",8)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d().currentSubType=s})("onChange",function(){return v(e),d().updateSubType()}),c(),l(25,"small",12),g(26),m(27,"translate"),c()(),l(28,"div",8)(29,"label",19),g(30),m(31,"translate"),c(),l(32,"input",20,21),C("ngModelChange",function(s){return v(e),d().work.addressText=s}),c(),l(34,"small",12),g(35),m(36,"translate"),c()(),l(37,"div",8)(38,"label",22),g(39),m(40,"translate"),c(),l(41,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().diseqcTree.SwitchPorts=s}),c(),l(42,"small",12),k(43,"div",15),m(44,"translate"),c(),_(45,Iee,4,3,"div",24),c(),_(46,Nee,2,1,"div",25),_(47,Bee,11,23,"p-fieldset",26),c()()}if(2&t){const e=d();a(4),S(f(5,35,"settings.capture.diseqc.description_label")),a(2),p("ngModel",e.diseqcTree.Description),a(3),T(" ",f(10,37,"settings.capture.diseqc.description_desc")," "),a(4),S(f(14,39,"settings.capture.diseqc.cmdrepeat_label")),a(2),p("ngModel",e.diseqcTree.CmdRepeat)("showButtons",!0)("min",0)("max",15)("step",1),a(2),p("innerHTML",f(18,41,"settings.capture.diseqc.cmdrepeat_desc"),Ht),a(2),q(A(55,Hee)),a(2),S(f(22,43,"settings.capture.diseqc.switch.type_label")),a(2),q(A(56,qee)),p("options",e.switchSubTypes)("ngModel",e.currentSubType)("editable",!1)("maxlength",0),a(3),T(" ",f(27,45,"settings.capture.diseqc.switch.type_desc")," "),a(4),S(f(31,47,"settings.capture.diseqc.address_label")),a(2),p("ngModel",e.work.addressText)("disabled",!e.work.enableAddrAndPorts),a(3),T(" ",f(36,49,"settings.capture.diseqc.address_desc")," "),a(4),T(" ",f(40,51,"settings.capture.diseqc.switchports_label")," "),a(2),p("ngModel",e.diseqcTree.SwitchPorts)("showButtons",!0)("min",0)("max",255)("step",1)("disabled",!e.work.enableAddrAndPorts),a(2),p("innerHTML",f(44,53,"settings.capture.diseqc.switchports_desc"),Ht),a(2),p("ngIf",e.diseqcSubTreeCount>e.diseqcTree.SwitchPorts),a(1),p("ngForOf",e.diseqcSubTree),a(1),p("ngIf",e.diseqcSubTreeCount{class t{constructor(e,n){this.captureCardService=e,this.translate=n,this.diseqcSubComponent=[],this.baseEvent=new H,this.switchSubTypes=[{Name:"settings.capture.diseqc.switch.tone",SubType:"tone"},{Name:"settings.capture.diseqc.switch.voltage",SubType:"voltage"},{Name:"settings.capture.diseqc.switch.mini_diseqc",SubType:"mini_diseqc"},{Name:"settings.capture.diseqc.switch.diseqc",SubType:"diseqc"},{Name:"settings.capture.diseqc.switch.diseqc_uncom",SubType:"diseqc_uncom"},{Name:"settings.capture.diseqc.switch.legacy_sw21",SubType:"legacy_sw21"},{Name:"settings.capture.diseqc.switch.legacy_sw42",SubType:"legacy_sw42"},{Name:"settings.capture.diseqc.switch.legacy_sw64",SubType:"legacy_sw64"}],this.diseqcSubTree=[],this.diseqcSubTreeCount=0,this.work={addressText:"",displayNewDiseqc:!1,enableAddrAndPorts:!1},this.displayDeleteThis=[],this.selectedDiseqcType={description:"",type:"",inactive:!0},this.setupDone=!1,this.switchSubTypes.forEach(s=>n.get(s.Name).subscribe(r=>s.Name=r))}ngOnInit(){if(this.diseqcTree.DiSEqCId?this.work.addressText="0x"+this.diseqcTree.Address.toString(16):(this.diseqcTree.Address=16,this.work.addressText="0x10",this.diseqcTree.SwitchPorts=2,this.diseqcTree.SubType="tone",this.diseqcTree.CmdRepeat=1),this.diseqcTree.SubType){let e=this.switchSubTypes.find(n=>n.SubType==this.diseqcTree.SubType);e&&(this.currentSubType=e)}this.updateSubType(),this.displayDeleteThis=[],this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.forEach(e=>{e.ParentId==this.diseqcTree.DiSEqCId&&(this.diseqcSubTree.push(e),this.displayDeleteThis.push(!1),this.diseqcSubTreeCount++)})}ngAfterViewInit(){this.baseEvent.emit(this),this.currentForm.valueChanges.subscribe(n=>{this.setupDone&&this.currentForm.dirty&&this.dvbComponent.currentForm.form.markAsDirty()}),new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.setupDone=!0,this.diseqcTree.DiSEqCId?this.currentForm.form.markAsPristine():(this.currentForm.form.markAsDirty(),this.dvbComponent.currentForm.form.markAsDirty())})}newDiseqc(){this.work.displayNewDiseqc=!1,this.diseqcSubTree.push({Type:this.selectedDiseqcType.type,Description:this.selectedDiseqcType.description}),this.displayDeleteThis.push(!1),this.diseqcSubTreeCount++}setDiseqcObject(e){this.diseqcSubComponent.findIndex(s=>s===e)<0&&this.diseqcSubComponent.push(e),console.log("setDiseqcObject",this.diseqcSubComponent.length)}deleteDiseqc(e){this.displayDeleteThis[e]=!1,this.dvbComponent.work.errorCount=0,console.log("Delete",e),null!=this.diseqcSubTree[e]&&(this.diseqcSubTree[e].DiSEqCId&&this.captureCardService.DeleteDiseqcTree(this.diseqcSubTree[e].DiSEqCId).subscribe({next:n=>{n.bool||(console.log("DeleteDiseqcTree",n),this.dvbComponent.work.errorCount++)},error:n=>{console.log("DeleteDiseqcTree",n),this.dvbComponent.work.errorCount++}}),0==this.dvbComponent.work.errorCount&&(this.diseqcSubTree[e]=null,this.diseqcSubTreeCount--))}updateSubType(){switch(this.diseqcTree.SubType=this.currentSubType.SubType,this.diseqcTree.SubType){case"tone":case"voltage":case"mini_diseqc":case"legacy_sw21":case"legacy_sw42":this.work.addressText="0x10",this.diseqcTree.SwitchPorts=2,this.work.enableAddrAndPorts=!1;break;case"legacy_sw64":this.work.addressText="0x10",this.diseqcTree.SwitchPorts=3,this.work.enableAddrAndPorts=!1;break;case"diseqc_uncom":case"diseqc":this.work.enableAddrAndPorts=!0}}saveForm(e,n){this.diseqcTree.ParentId=e,this.diseqcTree.Address=Number.parseInt(this.work.addressText),this.diseqcTree.DiSEqCId?(this.captureCardService.UpdateDiseqcTree(this.diseqcTree).subscribe(n),this.diseqcSubComponent.forEach(s=>{s&&s.saveForm(this.diseqcTree.DiSEqCId,{error:r=>{n.error(r)}})})):this.captureCardService.AddDiseqcTree(this.diseqcTree).subscribe({next:s=>{s.int&&s.int>0?(this.diseqcTree.DiSEqCId=s.int,n.next&&n.next(s),this.diseqcSubComponent.forEach(r=>{r&&r.saveForm(this.diseqcTree.DiSEqCId,{next:o=>{},error:o=>{n.error(o)}})})):(console.log("UpdateDiseqcTree",s),n.error(s))},error:s=>{console.log("UpdateDiseqcTree",s),n.error(s)}})}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-switch"]],viewQuery:function(e,n){if(1&e&&j(Dee,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{diseqcTree:"diseqcTree",diseqcTreeList:"diseqcTreeList",dvbComponent:"dvbComponent"},outputs:{baseEvent:"baseEvent"},decls:6,vars:0,consts:[["name","switchform",1,"ml-3","mr-3"],["switchform","ngForm"],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","Description",1,"label","block"],["pInputText","","id","ip","name","Description",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Description","ngModel"],[1,"block"],["for","CmdRepeat",1,"label","block"],["name","CmdRepeat","id","CmdRepeat",3,"ngModel","showButtons","min","max","step","ngModelChange"],[3,"innerHTML"],["for","SubType",1,"label","block"],["optionLabel","Name","name","SubType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SubType","ngModel"],["for","Address",1,"label","block"],["pInputText","","id","Address","name","Address",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["Address","ngModel"],["for","SwitchPorts",1,"label","block"],["name","SwitchPorts","id","SwitchPorts",3,"ngModel","showButtons","min","max","step","disabled","ngModelChange"],[4,"ngIf"],[4,"ngFor","ngForOf"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"p-error","block"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick",4,"ngIf"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent",4,"ngIf"],["styleClass","p-button-warning","label","Delete Satellite Devices","icon","pi pi-trash",3,"disabled","onClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[3,"diseqcTree","diseqcTreeList","dvbComponent","baseEvent"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],["for","disenqcTypes",1,"label","block"],["optionLabel","description","name","disenqcTypes","optionDisabled","inactive",3,"options","ngModel","ngModelChange","onDblClick"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"p-card",2),_(3,Mee,2,3,"ng-template",3),_(4,kee,0,0,"ng-template",4),_(5,Uee,48,57,"ng-template",5),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Vt,fn,Q,at,Ui,ve,Tn,kd,Ol,t,Al,ws],pipes:[de],styles:[""]}),t})();const Gee=["externalform"],zee=["top"];function jee(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.external.title")," ")}function $ee(t,i){}function Wee(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",16),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(16,"small",14),g(17),m(18,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,10,"settings.capture.external.command_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,12,"settings.capture.external.command_desc")," "),a(4),S(f(14,14,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(18,16,"settings.capture.tunetimeout_desc")," ")}}function Kee(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Qee(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Jee(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,Kee,2,3,"p-message",19),_(3,Qee,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Yee=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-external"]],viewQuery:function(e,n){if(1&e&&(j(Gee,5),j(zee,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","externalform",1,"ml-3","mr-3"],["externalform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,jee,2,3,"ng-template",4),_(6,$ee,0,0,"ng-template",5),_(7,Wee,19,18,"ng-template",6),_(8,Jee,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Zee=["hdhomerunform"],Xee=["top"];function ete(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.hdhomerun.title")," ")}function tte(t,i){}function nte(t,i){if(1&t){const e=I();l(0,"p-listbox",20,21),C("ngModelChange",function(s){return v(e),d(2).selectedDevices=s})("onChange",function(){return v(e),d(2).updateDevices()}),c()}if(2&t){const e=d(2);p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.selectedDevices)("checkbox",!0)("showToggleAll",!1)("multiple",!0)}}const ite=function(){return{width:"30rem"}};function ste(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"div"),_(7,nte,2,5,"p-listbox",12),l(8,"small",13),g(9),m(10,"translate"),c()()(),l(11,"div",10)(12,"label",14),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",15),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(16,"small",13),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",16),g(21),m(22,"translate"),c(),l(23,"p-inputNumber",17),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(24,"small",13),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"p-checkbox",18,19),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(30,"translate"),c(),l(31,"small",13),g(32),m(33,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,23,"settings.capture.hdhomerun.device_label")),a(2),q(A(39,ite)),a(1),p("ngIf",e.work.isReady),a(2),T(" ",f(10,25,"settings.capture.hdhomerun.device_desc")," "),a(4),S(f(14,27,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(18,29,"settings.capture.sigtimeout_desc")," "),a(4),S(f(22,31,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(26,33,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(30,35,"settings.capture.hdhomerun.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(33,37,"settings.capture.dvb.eitscan_ldesc")," ")}}function rte(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ote(t,i){1&t&&(k(0,"p-message",28),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function ate(t,i){if(1&t){const e=I();l(0,"div",22)(1,"div",23),_(2,rte,2,3,"p-message",24),_(3,ote,2,3,"p-message",25),c(),l(4,"p-button",26),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let lte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={isReady:!1,successCount:0,errorCount:0},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.selectedDevices=[],this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){this.captureCardService.GetCaptureDeviceList("HDHOMERUN").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevices()},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevices(){this.card.VideoDevice&&this.card.VideoDevice.split(",").forEach(n=>{const s=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(r=>n==r.VideoDevice.split(" ")[0]);s&&this.selectedDevices.push(s)}),this.work.isReady=!0}updateDevices(){let e="",n=[];this.selectedDevices.forEach(s=>{n.push(s.VideoDevice.split(" ")[0]),this.card.SignalTimeout=s.SignalTimeout,this.card.ChannelTimeout=s.ChannelTimeout}),n.sort(),console.log(n),n.forEach(s=>{e&&(e+=","),e+=s}),this.card.VideoDevice=e}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-hdhomerun"]],viewQuery:function(e,n){if(1&e&&(j(Zee,5),j(Xee,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","hdhomerunform",1,"ml-3","mr-3"],["hdhomerunform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","checkbox","showToggleAll","multiple","ngModelChange","onChange",4,"ngIf"],[1,"block"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","checkbox","showToggleAll","multiple","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,ete,2,3,"ng-template",4),_(6,tte,0,0,"ng-template",5),_(7,ste,34,40,"ng-template",6),_(8,ate,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,ws,Te,_e,dt,rn,qe,ve],pipes:[de],styles:[""]}),t})();const cte=["iptvform"],ute=["top"];function dte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.iptv.title")," ")}function pte(t,i){}function hte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"p-inputNumber",16),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(16,"small",14),g(17),m(18,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,10,"settings.capture.iptv.url_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,12,"settings.capture.iptv.url_desc")," "),a(4),S(f(14,14,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",1750)("max",65e3)("step",250),a(2),T(" ",f(18,16,"settings.capture.tunetimeout_desc")," ")}}function mte(t,i){1&t&&(k(0,"p-message",22),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fte(t,i){1&t&&(k(0,"p-message",23),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gte(t,i){if(1&t){const e=I();l(0,"div",17)(1,"div",18),_(2,mte,2,3,"p-message",19),_(3,fte,2,3,"p-message",20),c(),l(4,"p-button",21),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _te=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"}),this.card.CardId||new Je(n=>{setTimeout(()=>{n.next(1),n.complete()},100)}).subscribe(n=>{this.currentForm.form.markAsDirty()})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-iptv"]],viewQuery:function(e,n){if(1&e&&(j(cte,5),j(ute,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","iptvform",1,"ml-3","mr-3"],["iptvform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,dte,2,3,"ng-template",4),_(6,pte,0,0,"ng-template",5),_(7,hte,19,18,"ng-template",6),_(8,gte,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Q,qe,ve],pipes:[de],styles:[""]}),t})();const bte=["importform"],vte=["top"];function Cte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.import.title")," ")}function yte(t,i){}function wte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,3,"settings.capture.import.file_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,5,"settings.capture.import.file_desc")," ")}}function Tte(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Ste(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function xte(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,Tte,2,3,"p-message",17),_(3,Ste,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Dte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-import"]],viewQuery:function(e,n){if(1&e&&(j(bte,5),j(vte,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","importform",1,"ml-3","mr-3"],["importform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Cte,2,3,"ng-template",4),_(6,yte,0,0,"ng-template",5),_(7,wte,11,7,"ng-template",6),_(8,xte,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Mte=["demoform"],kte=["top"];function Ite(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.demo.title")," ")}function Ete(t,i){}function Rte(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),l(6,"input",12,13),C("ngModelChange",function(s){return v(e),d().card.VideoDevice=s}),c(),l(8,"small",14),g(9),m(10,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,3,"settings.capture.import.file_label")),a(2),p("ngModel",e.card.VideoDevice),a(3),T(" ",f(10,5,"settings.capture.demo.file_desc")," ")}}function Lte(t,i){1&t&&(k(0,"p-message",20),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Ote(t,i){1&t&&(k(0,"p-message",21),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Ate(t,i){if(1&t){const e=I();l(0,"div",15)(1,"div",16),_(2,Lte,2,3,"p-message",17),_(3,Ote,2,3,"p-message",18),c(),l(4,"p-button",19),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Pte=(()=>{class t{constructor(e,n){this.captureCardService=e,this.setupService=n,this.work={successCount:0,errorCount:0},this.saveObserver={next:s=>{this.card.CardId&&s.bool?this.work.successCount++:!this.card.CardId&&s.int?(this.work.successCount++,this.card.CardId=s.int):(this.work.errorCount++,this.currentForm.form.markAsDirty())},error:s=>{console.error(s),this.work.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}saveForm(){console.log("save form clicked"),this.work.successCount=0,this.work.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-demo"]],viewQuery:function(e,n){if(1&e&&(j(Mte,5),j(kte,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","demoform",1,"ml-3","mr-3"],["demoform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["pInputText","","id","VideoDevice","name","VideoDevice",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["VideoDevice","ngModel"],[1,"block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Ite,2,3,"ng-template",4),_(6,Ete,0,0,"ng-template",5),_(7,Rte,11,7,"ng-template",6),_(8,Ate,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Ye,Te,_e,Q,qe,ve],pipes:[de],styles:[""]}),t})();const Fte=["connform"];function Nte(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.iconnection.title")," ")}function Vte(t,i){}function Bte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",45),C("ngModelChange",function(s){return v(e),d(3).work.switchPort=s}),c(),l(5,"small",16),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.iconnection.switchport_label")),a(2),p("ngModel",e.work.switchPort)("showButtons",!0)("min",1)("max",e.diseqcTree.SwitchPorts)("step",1),a(2),T(" ",f(7,9,"settings.iconnection.switchport_desc")," ")}}function Hte(t,i){if(1&t){const e=I();l(0,"div")(1,"div",12)(2,"label",46),g(3),m(4,"translate"),c(),l(5,"p-inputNumber",47),C("ngModelChange",function(s){return v(e),d(3).work.rotorDegrees=s}),c(),k(6,"br")(7,"br"),l(8,"div",48)(9,"p-radioButton",49),C("ngModelChange",function(s){return v(e),d(3).work.hemisphere=s}),c(),l(10,"label",50),g(11),m(12,"translate"),c()(),l(13,"div",48)(14,"p-radioButton",51),C("ngModelChange",function(s){return v(e),d(3).work.hemisphere=s}),c(),l(15,"label",52),g(16),m(17,"translate"),c()(),l(18,"small",16),g(19),m(20,"translate"),c()()()}if(2&t){const e=d(3);a(3),S(f(4,10,"settings.iconnection.longitude_label")),a(2),p("ngModel",e.work.rotorDegrees)("min",0)("max",180)("maxFractionDigits",4),a(4),p("ngModel",e.work.hemisphere),a(2),S(f(12,12,"settings.iconnection.longitude_east")),a(3),p("ngModel",e.work.hemisphere),a(2),S(f(17,14,"settings.iconnection.longitude_west")),a(3),T(" ",f(20,16,"settings.iconnection.longitude_desc")," ")}}function qte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",53),g(2),m(3,"translate"),c(),l(4,"div",48)(5,"p-radioButton",54),C("ngModelChange",function(s){return v(e),d(3).work.scrPort=s}),c(),l(6,"label",55),g(7),m(8,"translate"),c()(),l(9,"div",48)(10,"p-radioButton",56),C("ngModelChange",function(s){return v(e),d(3).work.scrPort=s}),c(),l(11,"label",57),g(12),m(13,"translate"),c()(),l(14,"small",16),g(15),m(16,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,6,"settings.iconnection.unicablepos_label")),a(3),p("ngModel",e.work.scrPort),a(2),S(f(8,8,"settings.iconnection.unicablepos_porta")),a(3),p("ngModel",e.work.scrPort),a(2),S(f(13,10,"settings.iconnection.unicablepos_portb")),a(3),T(" ",f(16,12,"settings.iconnection.unicablepos_desc")," ")}}function Ute(t,i){1&t&&(l(0,"div",41),_(1,Bte,8,11,"div",42),_(2,Hte,21,18,"div",43),_(3,qte,17,14,"div",42),c()),2&t&&(p("ngSwitch",d(2).diseqcTree.Type),a(1),p("ngSwitchCase","switch"),a(1),p("ngSwitchCase","rotor"),a(1),p("ngSwitchCase","scr"))}function Gte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",58),g(2),m(3,"translate"),c(),l(4,"input",59,60),C("ngModelChange",function(s){return v(e),d(2).card.InputName=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.delivery_label")),a(2),p("ngModel",e.card.InputName),a(3),T(" ",f(8,5,"settings.iconnection.delivery_desc")," ")}}function zte(t,i){if(1&t){const e=I();l(0,"p-dropdown",63,60),C("ngModelChange",function(s){return v(e),d(3).card.InputName=s}),c()}if(2&t){const e=d(3);p("options",e.currentDevice.InputNames)("ngModel",e.card.InputName)}}function jte(t,i){if(1&t&&(l(0,"div",12)(1,"label",61),g(2),m(3,"translate"),c(),_(4,zte,2,2,"p-dropdown",62),l(5,"small",16),g(6),m(7,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.input_label")),a(2),p("ngIf",e.work.isReady),a(2),T(" ",f(7,5,"settings.capture.inputname_desc")," ")}}function $te(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",64),g(2),m(3,"translate"),c(),l(4,"input",65,66),C("ngModelChange",function(s){return v(e),d(2).card.ExternalCommand=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.externalcmd_label")),a(2),p("ngModel",e.card.ExternalCommand),a(3),T(" ",f(8,5,"settings.iconnection.externalcmd_desc")," ")}}function Wte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",67),g(2),m(3,"translate"),c(),l(4,"input",68,69),C("ngModelChange",function(s){return v(e),d(2).card.TuneChan=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,3,"settings.iconnection.tunechan_label")),a(2),p("ngModel",e.card.TuneChan),a(3),T(" ",f(8,5,"settings.iconnection.tunechan_desc")," ")}}const Id=function(){return{minWidth:"400px"}};function Kte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",70),g(2),m(3,"translate"),c(),l(4,"p-dropdown",71,72),C("ngModelChange",function(s){return v(e),d(2).card.Quicktune=s}),c(),l(6,"small",16),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.iconnection.quicktune_label")),a(2),q(A(12,Id)),p("options",e.quickTuneValues)("ngModel",e.card.Quicktune)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.iconnection.quicktune_desc")," ")}}function Qte(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",73,74),C("ngModelChange",function(s){return v(e),d(2).card.DishnetEIT=s}),m(3,"translate"),c(),l(4,"small",16),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.iconnection.dishneteit_label")),p("ngModel",e.card.DishnetEIT)("binary",!0),a(4),T(" ",f(6,6,"settings.iconnection.dishneteit_desc")," ")}}function Jte(t,i){if(1&t&&(l(0,"p-fieldset",75),m(1,"translate"),k(2,"app-channelscan",76),c()),2&t){const e=d(2);D("legend",f(1,7,"settings.iconnection.scan_title")),p("collapsed",!0)("toggleable",!0),a(2),p("card",e.card)("cardList",e.cardList)("iconnection",e)("videoSourceLookup",e.videoSourceLookup)}}function Yte(t,i){if(1&t){const e=I();l(0,"p-button",77),C("click",function(){return v(e),d(2).work.fetchChannelsDialog=!1}),m(1,"translate"),c(),l(2,"p-button",78),C("click",function(){return v(e),d(2).fetchChannels()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const Zte=function(t){return{num:t}},Xte=function(){return{width:"50vw"}};function ene(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9),_(2,Ute,4,4,"div",10),_(3,Gte,9,7,"div",11),_(4,jte,8,7,"div",11),l(5,"div",12)(6,"label",13),g(7),m(8,"translate"),c(),l(9,"input",14,15),C("ngModelChange",function(s){return v(e),d().card.DisplayName=s}),c(),l(11,"small",16),g(12),m(13,"translate"),c()(),l(14,"div",12)(15,"label",17),g(16),m(17,"translate"),c(),l(18,"p-dropdown",18,19),C("ngModelChange",function(s){return v(e),d().card.SourceId=s})("onChange",function(){return v(e),d().fillChannelList()}),c(),l(20,"small",16),g(21),m(22,"translate"),c()(),_(23,$te,9,7,"div",11),_(24,Wte,9,7,"div",11),_(25,Kte,9,13,"div",11),_(26,Qte,7,8,"div",11),_(27,Jte,3,9,"p-fieldset",20),k(28,"br")(29,"br"),l(30,"div",12)(31,"div",8)(32,"div",21)(33,"p-button",22),C("onClick",function(){return v(e),d().work.fetchChannelsDialog=!0}),m(34,"translate"),c()(),l(35,"div",21),g(36),m(37,"translate"),c()(),l(38,"small",16),g(39),m(40,"translate"),c()(),l(41,"p-dialog",23),C("visibleChange",function(s){return v(e),d().work.fetchChannelsDialog=s}),l(42,"p"),g(43),m(44,"translate"),c(),l(45,"p"),g(46),m(47,"translate"),c(),_(48,Yte,4,6,"ng-template",7),c(),l(49,"div",12)(50,"label",24),g(51),m(52,"translate"),c(),l(53,"p-dropdown",25,26),C("ngModelChange",function(s){return v(e),d().card.StartChannel=s}),c(),l(55,"small",16),g(56),m(57,"translate"),c()(),l(58,"p-fieldset",27),m(59,"translate"),l(60,"div",12)(61,"label",28),g(62),m(63,"translate"),c(),l(64,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().card.RecLimit=s}),c(),l(65,"small",16),g(66),m(67,"translate"),c()(),l(68,"div",12)(69,"p-checkbox",30,31),C("ngModelChange",function(s){return v(e),d().card.SchedGroup=s}),m(71,"translate"),c(),l(72,"small",16),g(73),m(74,"translate"),c()(),l(75,"div",12)(76,"label",32),g(77),m(78,"translate"),c(),l(79,"p-inputNumber",33),C("ngModelChange",function(s){return v(e),d().card.RecPriority=s}),c(),l(80,"small",16),g(81),m(82,"translate"),c()(),l(83,"div",12)(84,"label",34),g(85),m(86,"translate"),c(),l(87,"p-inputNumber",35),C("ngModelChange",function(s){return v(e),d().card.SchedOrder=s}),c(),l(88,"small",16),g(89),m(90,"translate"),c()(),l(91,"div",12)(92,"label",36),g(93),m(94,"translate"),c(),l(95,"p-inputNumber",37),C("ngModelChange",function(s){return v(e),d().card.LiveTVOrder=s}),c(),l(96,"small",16),g(97),m(98,"translate"),c()(),l(99,"div",12)(100,"label",38),g(101),m(102,"translate"),c(),l(103,"p-dropdown",39,40),C("ngModelChange",function(s){return v(e),d().work.inputGroupName=s}),c(),l(105,"small",16),g(106),m(107,"translate"),c()()()()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.diseqcTree),a(1),p("ngIf","DVB"==e.card.CardType),a(1),p("ngIf","DVB"!=e.card.CardType),a(3),S(f(8,80,"settings.iconnection.displayname_label")),a(2),p("ngModel",e.card.DisplayName),a(3),T(" ",f(13,82,"settings.iconnection.displayname_desc")," "),a(4),S(f(17,84,"settings.iconnection.sourceid_label")),a(2),q(A(129,Id)),p("options",e.videoSourceList.VideoSourceList.VideoSources)("ngModel",e.card.SourceId)("editable",!1)("maxlength",0),a(3),T(" ",f(22,86,"settings.iconnection.sourceid_desc")," "),a(2),p("ngIf",e.work.isEncoder||e.work.isUnscanable),a(1),p("ngIf",e.work.showPresetTuner),a(1),p("ngIf",!e.work.isEncoder&&!e.work.isUnscanable),a(1),p("ngIf","DVB"==e.card.CardType),a(1),p("ngIf",!e.work.isUnscanable),a(6),D("label",f(34,88,"settings.iconnection.fetch.label")),p("disabled",!e.card.SourceId||n.dirty||1==e.work.fetchStatus||e.setupService.schedulingEnabled),a(3),T(" \xa0\xa0",Dt(37,90,e.fetchMessages[e.work.fetchStatus],z(130,Zte,e.work.fetchCount))," "),a(3),T(" ",f(40,93,"settings.iconnection.fetch.desc")," "),a(2),q(A(132,Xte)),p("visible",e.work.fetchChannelsDialog)("modal",!0)("draggable",!1)("resizable",!1),a(2),S(f(44,95,"settings.iconnection.fetch.warning")),a(3),S(f(47,97,"settings.common.ru_sure")),a(5),S(f(52,99,"settings.iconnection.startchan_label")),a(2),q(A(133,Id)),p("options",e.sourceChannels)("ngModel",e.card.StartChannel)("editable",!1),a(3),T(" ",f(57,101,"settings.iconnection.startchan_desc")," "),a(2),D("legend",f(59,103,"settings.iconnection.interact_title")),p("toggleable",!0)("collapsed",!0),a(4),S(f(63,105,"settings.iconnection.maxrec_label")),a(2),p("ngModel",e.card.RecLimit)("showButtons",!0)("min",1)("max",10)("step",1),a(2),T(" ",f(67,107,"settings.iconnection.maxrec_desc")," "),a(3),D("label",f(71,109,"settings.iconnection.schedgrp_label")),p("ngModel",e.card.SchedGroup)("binary",!0),a(4),T(" ",f(74,111,"settings.iconnection.schedgrp_desc")," "),a(4),S(f(78,113,"settings.iconnection.recpri_label")),a(2),p("ngModel",e.card.RecPriority)("showButtons",!0)("min",-99)("max",99)("step",1),a(2),T(" ",f(82,115,"settings.iconnection.recpri_desc")," "),a(4),S(f(86,117,"settings.iconnection.schedorder_label")),a(2),p("ngModel",e.card.SchedOrder)("showButtons",!0)("min",0)("max",99)("step",1),a(2),T(" ",f(90,119,"settings.iconnection.schedorder_desc")," "),a(4),S(f(94,121,"settings.iconnection.liveorder_label")),a(2),p("ngModel",e.card.LiveTVOrder)("showButtons",!0)("min",0)("max",99)("step",1),a(2),T(" ",f(98,123,"settings.iconnection.liveorder_desc")," "),a(4),S(f(102,125,"settings.iconnection.inpgroup_label")),a(2),q(A(134,Id)),p("options",e.selectGroups)("ngModel",e.work.inputGroupName)("editable",!0),a(3),T(" ",f(107,127,"settings.iconnection.inpgroup_desc")," ")}}function tne(t,i){1&t&&(k(0,"p-message",84),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nne(t,i){1&t&&(k(0,"p-message",85),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function ine(t,i){if(1&t){const e=I();l(0,"div",79)(1,"div",80),_(2,tne,2,3,"p-message",81),_(3,nne,2,3,"p-message",82),c(),l(4,"p-button",83),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.work.successCount>0&&0==e.work.errorCount&&!n.dirty),a(1),p("ngIf",e.work.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let SS=(()=>{class t{constructor(e,n,s,r){this.translate=e,this.channelService=n,this.captureCardService=s,this.setupService=r,this.allChannels=[],this.sourceChannels=[],this.inputGroups=[],this.selectGroups=[],this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:["MPEG2TS"]},this.work={successCount:0,errorCount:0,expectedCount:0,recLimitUpd:!1,reloadGroups:!1,isEncoder:!1,isUnscanable:!1,hasTuner:!1,showPresetTuner:!1,inputGroupName:"",orgInputGroupName:"",fetchChannelsDialog:!1,fetchStatus:0,fetchCount:0,switchPort:0,rotorDegrees:0,scrPort:"",hemisphere:1,isReady:!1,startScan:!1},this.deviceFree=new ct,this.orgInputGroupIds=[],this.fetchMessages=["","settings.iconnection.fetch.inprog","settings.iconnection.fetch.complete","settings.iconnection.fetch.failed"],this.messages={devNotExist:"settings.capture.dvb.devNotExist"},this.preEncodedTypes=["DVB","FIREWIRE","HDHOMERUN","FREEBOX","IMPORT","DEMO","ASI","CETON","VBOX","SATIP"],this.unscanableTypes=["FIREWIRE","HDPVR","IMPORT","DEMO","GO7007","MJPEG"],this.hasTunerTypes=["DVB","HDHOMERUN","FREEBOX","CETON","VBOX","SATIP"],this.quickTuneValues=[{prompt:"settings.iconnection.quicktune.never",value:0},{prompt:"settings.iconnection.quicktune.livetv",value:1},{prompt:"settings.iconnection.quicktune.always",value:2}],this.saveObserver={next:o=>{o.bool?(this.work.successCount++,this.work.recLimitUpd&&(this.work.successCount==this.work.expectedCount?this.captureCardService.SetInputMaxRecordings(this.card.CardId,this.card.RecLimit).subscribe(this.saveObserver):this.work.successCount==this.work.expectedCount+1&&(this.parentComponent.loadCards(!1),this.work.recLimitUpd=!1)),this.work.successCount==this.work.expectedCount&&this.work.reloadGroups&&(this.loadInputGroups(),this.work.reloadGroups=!1),this.work.successCount==this.work.expectedCount&&this.work.startScan&&this.scanComponent&&(this.work.startScan=!1,this.currentForm.form.markAsPristine(),this.scanComponent.startScan())):(console.log("saveObserver error",o),this.work.startScan=!1,this.work.errorCount++,this.currentForm.form.markAsDirty())},error:o=>{console.log("saveObserver error",o),this.work.startScan=!1,this.work.errorCount++,this.currentForm.form.markAsDirty()}},this.quickTuneValues.forEach(o=>e.get(o.prompt).subscribe(u=>o.prompt=u)),this.loadChannels(),this.loadInputGroups()}loadChannels(){this.channelService.GetChannelInfoList({Details:!0}).subscribe(n=>{this.allChannels=n.ChannelInfoList.ChannelInfos,this.fillChannelList()})}fillChannelList(){this.sourceChannels=this.allChannels.filter(e=>e.SourceId==this.card.SourceId),this.sourceChannels.find(e=>e.ChanNum==this.card.StartChannel)||(this.card.StartChannel="")}loadInputGroups(){this.captureCardService.GetInputGroupList().subscribe(e=>{this.inputGroups=e.InputGroupList.InputGroups,this.inputGroups.forEach(n=>{if(Qu("user:")){const s=n.InputGroupName.substring(5);-1==this.selectGroups.findIndex(r=>s==r.InputGroupName)&&this.selectGroups.push({CardInputId:0,InputGroupId:n.InputGroupId,InputGroupName:s}),n.CardInputId==this.card.CardId&&(this.work.inputGroupName||(this.work.inputGroupName=s,this.work.orgInputGroupName=s),this.orgInputGroupIds.push(n.InputGroupId))}})})}ngOnInit(){this.work.isEncoder=this.preEncodedTypes.indexOf(this.card.CardType)<0,this.work.isUnscanable=this.unscanableTypes.indexOf(this.card.CardType)>=0,this.work.hasTuner=this.hasTunerTypes.indexOf(this.card.CardType)>=0,(this.work.isEncoder||this.work.isUnscanable)&&(this.work.hasTuner||"EXTERNAL"==this.card.CardType)&&(this.work.showPresetTuner=!0),"DVB"==this.card.CardType&&this.loadDiseqc(),this.card.DisplayName||(this.card.DisplayName="Input "+this.card.CardId),this.captureCardService.GetCaptureDeviceList(this.card.CardType).subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice(),this.deviceFree.next(!0)},error:e=>{console.log("GetCaptureDeviceList",e),this.work.errorCount++}})}setupDevice(){if(this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:["MPEG2TS"]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName),this.currentDevice.InputNames.includes("MPEG2TS")||this.currentDevice.InputNames.push("MPEG2TS")),this.work.isReady=!0}loadDiseqc(){this.captureCardService.GetDiseqcTreeList().subscribe({next:e=>{this.diseqcTreeList=e,this.setupDiseqc()},error:e=>{console.log("GetDiseqcTreeList",e),this.work.errorCount++}})}setupDiseqc(){let e=this.diseqcTreeList.DiseqcTreeList.DiseqcTrees.find(n=>n.DiSEqCId==this.card.DiSEqCId);if(e)switch(this.diseqcTree=e,this.diseqcTree.Type){case"switch":case"rotor":case"scr":this.captureCardService.GetDiseqcConfigList().subscribe({next:n=>{let s=n.DiseqcConfigList.DiseqcConfigs.find(r=>r.CardId==this.card.CardId&&r.DiSEqCId==this.card.DiSEqCId);if(this.diseqcConfig=s||{CardId:this.card.CardId,DiSEqCId:this.card.DiSEqCId,Value:""},"switch"==this.diseqcTree.Type)this.work.switchPort=Number.parseInt(this.diseqcConfig.Value)-1,Number.isNaN(this.work.switchPort)&&(this.work.switchPort=0);else if("rotor"==this.diseqcTree.Type)this.work.rotorDegrees=Number.parseFloat(this.diseqcConfig.Value),Number.isNaN(this.work.rotorDegrees)&&(this.work.rotorDegrees=0),this.work.rotorDegrees<0?(this.work.hemisphere=-1,this.work.rotorDegrees=-this.work.rotorDegrees):this.work.hemisphere=1;else if("scr"==this.diseqcTree.Type)switch(this.diseqcConfig.Value){case"0":this.work.scrPort="A";break;case"1":this.work.scrPort="B";break;default:this.work.scrPort=""}},error:n=>{console.log("GetDiseqcTreeList",n),this.work.errorCount++}})}}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.currentForm.form.markAsDirty(),setTimeout(()=>{this.currentForm.form.markAsPristine()},0)}fetchChannels(){this.work.fetchChannelsDialog=!1;let e={SourceId:this.card.SourceId,CardId:this.card.CardId,WaitForFinish:!0};this.work.fetchStatus=1,this.channelService.FetchChannelsFromSource(e).subscribe({next:n=>{this.work.fetchStatus=n.int>0?2:3,this.work.fetchCount=n.int,this.loadChannels()},error:n=>{console.log("fetchChannels",n),this.work.fetchStatus=3,this.work.fetchCount=0}})}saveForm(){this.work.successCount=0,this.work.errorCount=0,this.work.expectedCount=0,this.work.inputGroupName!=this.work.orgInputGroupName?this.work.inputGroupName?this.captureCardService.AddUserInputGroup(this.work.inputGroupName).subscribe({next:n=>{this.saveCard(n.int)},error:n=>{console.log("saveForm error",n),this.work.errorCount++,this.currentForm.form.markAsDirty()}}):this.saveCard(-1):this.saveCard(0)}saveCard(e){0!=e&&(this.work.reloadGroups=!0);let n=0;if(this.work.recLimitUpd=!1,this.cardList.CaptureCardList.CaptureCards.forEach(s=>{(s.CardId==this.card.CardId||s.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(s.CardId,"inputname",s.InputName=this.card.InputName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"displayname",s.DisplayName=this.card.DisplayName).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"sourceid",String(s.SourceId=this.card.SourceId)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"quicktune",String(s.Quicktune=this.card.Quicktune)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"dishnet_eit",(s.DishnetEIT=this.card.DishnetEIT)?"1":"0").subscribe(this.saveObserver),this.card.StartChannel&&(this.captureCardService.UpdateCaptureCard(s.CardId,"startchan",s.StartChannel=this.card.StartChannel).subscribe(this.saveObserver),this.work.expectedCount++),this.captureCardService.UpdateCaptureCard(s.CardId,"recpriority",String(s.RecPriority=this.card.RecPriority)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"livetvorder",String(s.LiveTVOrder=this.card.LiveTVOrder)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"reclimit",String(s.RecLimit=this.card.RecLimit)).subscribe(this.saveObserver),this.card.SchedGroup&&this.card.CardId!=s.CardId?(s.SchedGroup=!1,s.SchedOrder=0):(s.SchedGroup=this.card.SchedGroup,s.SchedOrder=this.card.SchedOrder),this.captureCardService.UpdateCaptureCard(s.CardId,"schedgroup",s.SchedGroup?"1":"0").subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(s.CardId,"schedorder",String(s.SchedOrder)).subscribe(this.saveObserver),this.work.expectedCount+=10,0!=e&&this.orgInputGroupIds.forEach(r=>{this.captureCardService.UnlinkInputGroup(s.CardId,r).subscribe(this.saveObserver),this.work.expectedCount++}),e>0&&(this.captureCardService.LinkInputGroup(s.CardId,e).subscribe(this.saveObserver),this.work.expectedCount++),n++)}),n!=this.card.RecLimit&&(this.work.recLimitUpd=!0),this.diseqcConfig){let s="";if("switch"==this.diseqcTree.Type)s=(this.work.switchPort-1).toString();else if("rotor"==this.diseqcTree.Type)s=(this.work.rotorDegrees*this.work.hemisphere).toString();else if("scr"==this.diseqcTree.Type)switch(this.work.scrPort){case"A":default:s="0";break;case"B":s="1"}s!=this.diseqcConfig.Value&&(this.diseqcConfig.Value=s,this.captureCardService.DeleteDiseqcConfig(this.card.CardId).subscribe(r=>{this.captureCardService.AddDiseqcConfig(this.diseqcConfig).subscribe(this.saveObserver)}))}}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Or),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-iconnection"]],viewQuery:function(e,n){if(1&e&&j(Fte,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},inputs:{card:"card",cardList:"cardList",videoSourceLookup:"videoSourceLookup",videoSourceList:"videoSourceList",parentComponent:"parentComponent"},decls:9,vars:0,consts:[["name","connform",1,"ml-3","mr-3"],["connform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[3,"ngSwitch",4,"ngIf"],["class","form-group field",4,"ngIf"],[1,"form-group","field"],["for","DisplayName",1,"label","block"],["pInputText","","id","DisplayName","name","DisplayName",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["DisplayName","ngModel"],[1,"block"],["for","SourceId",1,"label","block"],["optionLabel","SourceName","optionValue","Id","name","SourceId",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SourceId","ngModel"],["class","mb-4 w-full",3,"legend","collapsed","toggleable",4,"ngIf"],[2,"display","flex","align-items","center"],["icon","pi pi-download","iconPos","left",3,"label","disabled","onClick"],["header","Fetch Channels",3,"visible","modal","draggable","resizable","visibleChange"],["for","StartChannel",1,"label","block"],["placeholder","Select Item","optionLabel","ChanNum","optionValue","ChanNum","scrollHeight","400px","name","StartChannel",3,"options","ngModel","editable","ngModelChange"],["StartChannel","ngModel"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","RecLimit",1,"label","block"],["name","RecLimit","id","RecLimit",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","SchedGroup","name","SchedGroup",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBWaitForSeqStart","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","SchedOrder",1,"label","block"],["name","SchedOrder","id","SchedOrder",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","LiveTVOrder",1,"label","block"],["name","LiveTVOrder","id","LiveTVOrder",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","inputGroupName",1,"label","block"],["placeholder","Optional Group Name","optionLabel","InputGroupName","optionValue","InputGroupName","scrollHeight","400px","name","inputGroupName",3,"options","ngModel","editable","ngModelChange"],["inputGroupName","ngModel"],[3,"ngSwitch"],["class","form-group field",4,"ngSwitchCase"],[4,"ngSwitchCase"],["for","Port",1,"label","block"],["name","Port","id","Port",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Degrees",1,"label","block"],["name","Degrees","id","Degrees",3,"ngModel","min","max","maxFractionDigits","ngModelChange"],[1,"field-radiobutton"],["name","hemisphere","value","1","inputId","east",3,"ngModel","ngModelChange"],["for","east",1,"label","block"],["name","hemisphere","value","-1","inputId","west",3,"ngModel","ngModelChange"],["for","west",1,"label","block"],[1,"label","block"],["name","scrPort","value","A","inputId","portA",3,"ngModel","ngModelChange"],["for","portA",1,"label","block"],["name","scrPort","value","B","inputId","portB",3,"ngModel","ngModelChange"],["for","portB",1,"label","block"],["for","Delivery",1,"label","block"],["pInputText","","id","Delivery","name","Delivery","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["InputName","ngModel"],["for","InputName",1,"label","block"],["name","InputName",3,"options","ngModel","ngModelChange",4,"ngIf"],["name","InputName",3,"options","ngModel","ngModelChange"],["for","ExternalCommand",1,"label","block"],["pInputText","","id","ExternalCommand","name","ExternalCommand",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["ExternalCommand","ngModel"],["for","TuneChan",1,"label","block"],["pInputText","","id","TuneChan","name","TuneChan",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["TuneChan","ngModel"],["for","Quicktune",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Quicktune",3,"options","ngModel","editable","maxlength","ngModelChange"],["Quicktune","ngModel"],["inputId","DishnetEIT","name","DishnetEIT",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DishnetEIT","ngModel"],[1,"mb-4","w-full",3,"legend","collapsed","toggleable"],[3,"card","cardList","iconnection","videoSourceLookup"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Nte,2,3,"ng-template",4),_(6,Vte,0,0,"ng-template",5),_(7,ene,108,135,"ng-template",6),_(8,ine,6,6,"ng-template",7),c()())},styles:[""]}),t})();function sne(t,i){if(1&t){const e=I();l(0,"p-button",10),C("onClick",function(){return v(e),d().displayNewDialog=!1}),m(1,"translate"),c(),l(2,"p-button",11),C("onClick",function(){return v(e),d().newProfile()}),m(3,"translate"),c()}if(2&t){const e=d();D("label",f(1,3,"common.cancel")),a(2),D("label",f(3,5,"common.ok")),p("disabled",e.rejectName())}}function rne(t,i){1&t&&(l(0,"div",12),k(1,"br")(2,"p-message",13),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"settings.common.successful_delete")))}function one(t,i){1&t&&(l(0,"div",12),k(1,"br")(2,"p-message",14),m(3,"translate"),k(4,"br"),c()),2&t&&(a(2),D("text",f(3,1,"common.networkfail")))}function ane(t,i){if(1&t&&(l(0,"div",18)(1,"div",19),g(2),l(3,"b"),g(4),c()()()),2&t){const e=d(),n=e.$implicit,s=e.index,r=d();a(2),T(" ",n.Name," "),a(2),T("\xa0",r.dirtyMessages[s],"")}}function lne(t,i){if(1&t){const e=I();l(0,"p-button",22),C("click",function(){v(e);const s=d(2).index;return d().displayDeleteThis[s]=!1}),m(1,"translate"),c(),l(2,"p-button",23),C("click",function(){v(e);const s=d(2).index;return d().deleteThis(s)}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.no")),a(2),D("label",f(3,4,"common.yes")))}const xS=function(){return{width:"50vw"}},cne=function(t,i){return{ProfileName:t,GroupName:i}};function une(t,i){if(1&t){const e=I();l(0,"p-button",20),C("onClick",function(){v(e);const s=d().index;return d().displayDeleteThis[s]=!0}),m(1,"translate"),c(),l(2,"p-dialog",2),C("visibleChange",function(s){v(e);const r=d().index;return d().displayDeleteThis[r]=s}),m(3,"translate"),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"p"),g(8),m(9,"translate"),c(),_(10,lne,4,6,"ng-template",5),c(),k(11,"app-recprofile",21)}if(2&t){const e=d(),n=e.index,s=e.$implicit,r=d();D("label",f(1,14,"settings.rprofiles.delete_this")),p("disabled",!r.group.RecProfiles[n].Id||r.setupService.schedulingEnabled),a(2),q(A(23,xS)),D("header",f(3,16,"settings.rprofiles.delete_this")),p("visible",r.displayDeleteThis[n])("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(6,18,"settings.common.ru_sure")),a(3),S(Dt(9,20,"settings.rprofiles.delete_details",We(24,cne,r.group.RecProfiles[n].Name,r.group.Name))),a(3),p("profile",s)("group",r.group)("parentComponent",r)}}function dne(t,i){if(1&t){const e=I();l(0,"p-accordionTab",15),C("selectedChange",function(s){const o=v(e).index;return d().activeTab[o]=s}),_(1,ane,5,2,"ng-template",16),_(2,une,12,27,"ng-template",17),c()}if(2&t){const e=i.index,n=d();p("disabled",n.disabledTab[e])("selected",n.activeTab[e])}}let DS=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.currentTab=-1,this.deletedTab=-1,this.dirtyMessages=[],this.forms=[],this.disabledTab=[],this.activeTab=[],this.readyCount=0,this.displayNewDialog=!1,this.newProfileName="",this.successCount=0,this.expectedCount=0,this.errorCount=0,this.displayDeleteThis=[],this.dirtyText="settings.common.unsaved",this.warningText="settings.common.warning",this.deletedText="settings.common.deleted",this.newText="settings.common.new",this.delObserver={next:r=>{r.bool?(this.successCount++,this.deletedTab>-1&&(this.dirtyMessages[this.deletedTab]=this.deletedText,this.disabledTab[this.deletedTab]=!0,this.activeTab[this.deletedTab]=!1,this.deletedTab=-1)):(this.errorCount++,this.deletedTab=-1)},error:r=>{console.error(r),this.errorCount++}},s.get(this.dirtyText).subscribe(r=>this.dirtyText=r),s.get(this.warningText).subscribe(r=>this.warningText=r),s.get(this.deletedText).subscribe(r=>this.deletedText=r),s.get(this.newText).subscribe(r=>this.newText=r)}ngOnInit(){let e=this.parentComponent.groups.findIndex(n=>n===this.group);this.parentComponent.profileGroups[e]=this}onTabOpen(e){this.showDirty();let n=this.setupService.getCurrentForm();null!=n&&(this.forms[e.index]=n),this.setupService.setCurrentForm(null),this.currentTab=e.index,this.dirtyMessages[this.currentTab]=""}onTabClose(e){this.showDirty(),this.currentTab=-1}showDirty(){-1==this.currentTab||this.disabledTab[this.currentTab]||(this.dirtyMessages[this.currentTab]=this.forms[this.currentTab]&&this.forms[this.currentTab].dirty?this.dirtyText:this.group.RecProfiles[this.currentTab].Id?"":this.newText)}newProfile(){this.displayNewDialog=!1;for(let n=0;nn.Name==e)}confirm(e){return oe(window.confirm(e))}canDeactivate(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)||this.confirm(this.warningText)}allClean(){let e=this.setupService.getCurrentForm();return!(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(n=>n==this.dirtyText)||e&&e.dirty)}onWindowClose(e){let n=this.setupService.getCurrentForm();(this.forms[this.currentTab]&&this.forms[this.currentTab].dirty||this.dirtyMessages.find(s=>s==this.dirtyText)||n&&n.dirty)&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-profile-group"]],hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},inputs:{group:"group",parentComponent:"parentComponent"},decls:19,vars:24,consts:[[1,"block","card","w-full"],["icon","pi pi-plus-circle","styleClass","p-button-plain",3,"label","onClick"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pInputText","","id","Name","name","Name","autofocus","",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Name","ngModel"],["pTemplate","footer"],[1,"grid","nogutter"],["class","col-12",4,"ngIf"],[1,"col-12","w-full",3,"onClose","onOpen"],[3,"disabled","selected","selectedChange",4,"ngFor","ngForOf"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","disabled","onClick"],[1,"col-12"],["severity","success",3,"text"],["severity","error",3,"text"],[3,"disabled","selected","selectedChange"],["pTemplate","header"],["pTemplate","content"],[1,"grid","w-full"],[1,"col-9","pr-1"],["styleClass","p-button-warning","icon","pi pi-trash",3,"label","disabled","onClick"],[3,"profile","group","parentComponent"],["icon","pi pi-times-circle","styleClass","p-button-plain",3,"label","click"],["icon","pi pi-check-circle","styleClass","p-button-plain",3,"label","click"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"h3"),g(2),m(3,"translate"),c(),l(4,"p-button",1),C("onClick",function(){return n.displayNewDialog=!0}),m(5,"translate"),c(),l(6,"p-dialog",2),C("visibleChange",function(r){return n.displayNewDialog=r}),m(7,"translate"),l(8,"p"),g(9),m(10,"translate"),c(),l(11,"input",3,4),C("ngModelChange",function(r){return n.newProfileName=r}),c(),_(13,sne,4,7,"ng-template",5),c(),l(14,"div",6),_(15,rne,5,3,"div",7),_(16,one,5,3,"div",7),c(),l(17,"p-accordion",8),C("onClose",function(r){return n.onTabClose(r)})("onOpen",function(r){return n.onTabOpen(r)}),_(18,dne,3,2,"p-accordionTab",9),c()()),2&e&&(a(2),$e("",f(3,15,"settings.rprofiles.grouptitle")," ",n.group.Name,""),a(2),D("label",f(5,17,"settings.rprofiles.new_profile")),a(2),q(A(23,xS)),D("header",f(7,19,"settings.rprofiles.new_profile")),p("visible",n.displayNewDialog)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(10,21,"settings.rprofiles.enter_profile_name")),a(2),p("ngModel",n.newProfileName),a(4),p("ngIf",n.expectedCount&&n.successCount==n.expectedCount),a(1),p("ngIf",n.errorCount>0),a(2),p("ngForOf",n.group.RecProfiles))},styles:[""]}),t})();const pne=["recprofform"],hne=["top"];function mne(t,i){if(1&t&&(g(0),m(1,"translate")),2&t){const e=d();$e(" ",f(1,2,"settings.rprofiles.proftitle")," ",e.profile.Name," ")}}function fne(t,i){}function gne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",13,14),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("autotranscode",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.rprofiles.autotranscode_label")),p("ngModel",e.profile.RecProfParams[e.findIx("autotranscode",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.autotranscode_desc")," ")}}function _ne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",16),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",17),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("width","480")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.rprofiles.width_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("width","480")].Value)("showButtons",!0)("min",160)("max",720)("step",16),a(2),T(" ",f(7,9,"settings.rprofiles.width_desc")," ")}}function bne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",18),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",19),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("height","480")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.rprofiles.height_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("height","480")].Value)("showButtons",!0)("min",160)("max",480)("step",16),a(2),T(" ",f(7,9,"settings.rprofiles.height_desc")," ")}}const xs=function(){return{minWidth:"400px"}};function vne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",20),g(2),m(3,"translate"),c(),l(4,"p-dropdown",21,22),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("recordingtype","all")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.rprofiles.recordingtype_label")),a(2),q(A(12,xs)),p("options",e.recordingtypeOptions)("ngModel",e.profile.RecProfParams[e.findIx("recordingtype","all")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.recordingtype_desc")," ")}}function Cne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",23,24),C("ngModelChange",function(s){v(e);const r=d(2);return r.profile.RecProfParams[r.findIx("recordmpts",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(2);a(1),D("label",f(3,4,"settings.rprofiles.recordmpts_label")),p("ngModel",e.profile.RecProfParams[e.findIx("recordmpts",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.recordmpts_desc")," ")}}function yne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",26),g(2),m(3,"translate"),c(),l(4,"p-dropdown",27,28),C("ngModelChange",function(s){return v(e),d(3).profile.VideoCodec=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.videocodec_label")),a(2),q(A(9,xs)),p("options",e.params.Video)("ngModel",e.profile.VideoCodec)("editable",!1)("maxlength",0)}}function wne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",29),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",30),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpegquality","170")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpegquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpegquality","170")].Value)("showButtons",!0)("min",1)("max",255)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegquality_desc")," ")}}function Tne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",31),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",32),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpeglumafilter","0")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpeglumafilter_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpeglumafilter","0")].Value)("showButtons",!0)("min",0)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegfilter_desc")," ")}}function Sne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",33),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",34),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("rtjpegchromafilter","0")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.rtjpegchromafilter_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("rtjpegchromafilter","0")].Value)("showButtons",!0)("min",0)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.rtjpegfilter_desc")," ")}}function xne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",35),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",36),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4bitrate","2200")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4bitrate","2200")].Value)("showButtons",!0)("min",100)("max",8e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4bitrate_desc")," ")}}function Dne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",37),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",38),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4maxquality","2")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4maxquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4maxquality","2")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function Mne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",39),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",40),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4minquality","15")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4minquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4minquality","15")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function kne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",42),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpegquality","100")].Value=s}),c(),k(5,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,6,"settings.rprofiles.hardwaremjpegquality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpegquality","100")].Value)("showButtons",!0)("min",0)("max",100)("step",1)}}const MS=function(){return["1","2","4"]};function Ine(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",43),g(2),m(3,"translate"),c(),l(4,"p-dropdown",44,45),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpeghdecimation","2")].Value=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.hardwaremjpeghdecimation_label")),a(2),q(A(9,xs)),p("options",A(10,MS))("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpeghdecimation","2")].Value)("editable",!1)("maxlength",0)}}function Ene(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",46),g(2),m(3,"translate"),c(),l(4,"p-dropdown",47,48),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("hardwaremjpegvdecimation","2")].Value=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.hardwaremjpegvdecimation_label")),a(2),q(A(9,xs)),p("options",A(10,MS))("ngModel",e.profile.RecProfParams[e.findIx("hardwaremjpegvdecimation","2")].Value)("editable",!1)("maxlength",0)}}function Rne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",49),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",50),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4qualdiff","3")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg4qualdiff_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4qualdiff","3")].Value)("showButtons",!0)("min",1)("max",31)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg4quality_desc")," ")}}function Lne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",51),g(2),m(3,"translate"),c(),l(4,"p-dropdown",52,53),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2streamtype","2")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2streamtype_label")),a(2),q(A(12,xs)),p("options",e.streamTypeOptions)("ngModel",e.profile.RecProfParams[e.findIx("mpeg2streamtype","2")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2streamtype_desc")," ")}}const One=function(){return["Square","4:3","16:9","2.21:1"]};function Ane(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",54),g(2),m(3,"translate"),c(),l(4,"p-dropdown",55,56),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2aspectratio","Square")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2aspectratio_label")),a(2),q(A(12,xs)),p("options",A(13,One))("ngModel",e.profile.RecProfParams[e.findIx("mpeg2aspectratio","Square")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2aspectratio_desc")," ")}}function Pne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",57),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",58),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2bitrate","6000")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2bitrate","6000")].Value)("showButtons",!0)("min",1e3)("max",16e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2bitrate_desc")," ")}}function Fne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",59),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",60),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2maxbitrate","4500")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2maxbitrate","4500")].Value)("showButtons",!0)("min",1e3)("max",16e3)("step",100),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Nne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",61),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",62),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("low_mpeg4avgbitrate","4500")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",63),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",64),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("low_mpeg4peakbitrate","6000")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.lowres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("low_mpeg4avgbitrate","4500")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("low_mpeg4peakbitrate","6000")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Vne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",65),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",66),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("medium_mpeg4avgbitrate","9000")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",67),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",68),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("medium_mpeg4peakbitrate","11000")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.medres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("medium_mpeg4avgbitrate","9000")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("medium_mpeg4peakbitrate","11000")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Bne(t,i){if(1&t){const e=I();l(0,"p-fieldset",25),m(1,"translate"),l(2,"div",12)(3,"label",69),g(4),m(5,"translate"),c(),l(6,"p-inputNumber",70),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("high_mpeg4avgbitrate","13500")].Value=s}),c(),l(7,"small",15),g(8),m(9,"translate"),c()(),l(10,"div",12)(11,"label",71),g(12),m(13,"translate"),c(),l(14,"p-inputNumber",72),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("high_mpeg4peakbitrate","20200")].Value=s}),c(),l(15,"small",15),g(16),m(17,"translate"),c()()()}if(2&t){const e=d(3);D("legend",f(1,17,"settings.rprofiles.highres_label")),p("toggleable",!0)("collapsed",!0),a(4),S(f(5,19,"settings.rprofiles.mpeg2bitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("high_mpeg4avgbitrate","13500")].Value)("showButtons",!0)("min",1e3)("max",13500)("step",500),a(2),T(" ",f(9,21,"settings.rprofiles.mpeg2bitrate_desc")," "),a(4),S(f(13,23,"settings.rprofiles.mpeg2maxbitrate_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("high_mpeg4peakbitrate","20200")].Value)("showButtons",!0)("min",1100)("max",20200)("step",500),a(2),T(" ",f(17,25,"settings.rprofiles.mpeg2maxbitrate_desc")," ")}}function Hne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",73,74),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("scalebitrate",!0)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.scalebitrate_label")),p("ngModel",e.profile.RecProfParams[e.findIx("scalebitrate",!0)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.scalebitrate_desc")," ")}}function qne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",75,76),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionvhq",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionvhq_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionvhq",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionvhq_desc")," ")}}function Une(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",77,78),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4option4mv",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4option4mv_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4option4mv",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4option4mv_desc")," ")}}function Gne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",79,80),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionidct",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionidct_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionidct",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionidct_desc")," ")}}function zne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"p-checkbox",81,82),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg4optionime",!1)].Value=s}),m(3,"translate"),c(),l(4,"small",15),g(5),m(6,"translate"),c()()}if(2&t){const e=d(3);a(1),D("label",f(3,4,"settings.rprofiles.mpeg4optionime_label")),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg4optionime",!1)].Value)("binary",!0),a(4),T(" ",f(6,6,"settings.rprofiles.mpeg4optionime_desc")," ")}}function jne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",83),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",84),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("encodingthreadcount","1")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.encodingthreadcount_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("encodingthreadcount","1")].Value)("showButtons",!0)("min",1)("max",8)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.encodingthreadcount_desc")," ")}}function $ne(t,i){if(1&t&&(l(0,"p-fieldset",25),m(1,"translate"),_(2,yne,7,10,"div",10),_(3,wne,8,11,"div",10),_(4,Tne,8,11,"div",10),_(5,Sne,8,11,"div",10),_(6,xne,8,11,"div",10),_(7,Dne,8,11,"div",10),_(8,Mne,8,11,"div",10),_(9,kne,6,8,"div",10),_(10,Ine,7,11,"div",10),_(11,Ene,7,11,"div",10),_(12,Rne,8,11,"div",10),_(13,Lne,9,13,"div",10),_(14,Ane,9,14,"div",10),_(15,Pne,8,11,"div",10),_(16,Fne,8,11,"div",10),_(17,Nne,18,27,"p-fieldset",11),_(18,Vne,18,27,"p-fieldset",11),_(19,Bne,18,27,"p-fieldset",11),_(20,Hne,7,8,"div",10),_(21,qne,7,8,"div",10),_(22,Une,7,8,"div",10),_(23,Gne,7,8,"div",10),_(24,zne,7,8,"div",10),_(25,jne,8,11,"div",10),c()),2&t){const e=d(2);D("legend",f(1,27,"settings.rprofiles.video_label")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",e.params.Video.length>0),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","RTjpeg"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","Hardware MJPEG"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2"==e.profile.VideoCodec||"MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4 AVC Hardware Encoder"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec||"MPEG-2"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec),a(1),p("ngIf","MPEG-4"==e.profile.VideoCodec||"MPEG-2"==e.profile.VideoCodec)}}function Wne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",85),g(2),m(3,"translate"),c(),l(4,"p-dropdown",86,87),C("ngModelChange",function(s){return v(e),d(3).profile.AudioCodec=s}),c(),k(6,"small",15),c()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.audiocodec_label")),a(2),q(A(9,xs)),p("options",e.params.Audio)("ngModel",e.profile.AudioCodec)("editable",!1)("maxlength",0)}}function Kne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",88),g(2),m(3,"translate"),c(),l(4,"p-dropdown",89,90),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("samplerate","32000")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.samplerate_label")),a(2),q(A(12,xs)),p("options",e.samplerateOptions)("ngModel",e.profile.RecProfParams[e.findIx("samplerate","32000")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.samplerate_desc")," ")}}function Qne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",91),g(2),m(3,"translate"),c(),l(4,"p-dropdown",92,93),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2language","32000")].Value=s}),c(),l(6,"small",15),g(7),m(8,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,8,"settings.rprofiles.mpeg2language_label")),a(2),q(A(12,xs)),p("options",e.mpeg2languageOptions)("ngModel",e.profile.RecProfParams[e.findIx("mpeg2language","32000")].Value)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.rprofiles.mpeg2language_desc")," ")}}function Jne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",94),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",95),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mp3quality","1")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.mp3quality_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mp3quality","1")].Value)("showButtons",!0)("min",1)("max",9)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mp3quality_desc")," ")}}function Yne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",96),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",97),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("volume","90")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.volume_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("volume","90")].Value)("showButtons",!0)("min",0)("max",100)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.volume_desc")," ")}}function Zne(t,i){if(1&t){const e=I();l(0,"div",12)(1,"label",98),g(2),m(3,"translate"),c(),l(4,"p-inputNumber",99),C("ngModelChange",function(s){v(e);const r=d(3);return r.profile.RecProfParams[r.findIx("mpeg2audvolume","90")].Value=s}),c(),l(5,"small",15),g(6),m(7,"translate"),c()()}if(2&t){const e=d(3);a(2),S(f(3,7,"settings.rprofiles.volume_label")),a(2),p("ngModel",e.profile.RecProfParams[e.findIx("mpeg2audvolume","90")].Value)("showButtons",!0)("min",0)("max",100)("step",1),a(2),T(" ",f(7,9,"settings.rprofiles.mpeg2audvolume_desc")," ")}}function Xne(t,i){if(1&t&&(l(0,"p-fieldset",25),m(1,"translate"),_(2,Wne,7,10,"div",10),_(3,Kne,9,13,"div",10),_(4,Qne,9,13,"div",10),_(5,Jne,8,11,"div",10),_(6,Yne,8,11,"div",10),_(7,Zne,8,11,"div",10),c()),2&t){const e=d(2);D("legend",f(1,9,"settings.rprofiles.audio_label")),p("toggleable",!0)("collapsed",!0),a(2),p("ngIf",e.params.Audio.length>0),a(1),p("ngIf","MP3"==e.profile.AudioCodec||"MPEG-2 Hardware Encoder"==e.profile.AudioCodec||"Uncompressed"==e.profile.AudioCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.AudioCodec),a(1),p("ngIf","MP3"==e.profile.AudioCodec),a(1),p("ngIf","MP3"==e.profile.AudioCodec||"Uncompressed"==e.profile.AudioCodec),a(1),p("ngIf","MPEG-2 Hardware Encoder"==e.profile.AudioCodec)}}function eie(t,i){if(1&t&&(l(0,"div",8)(1,"div",9),_(2,gne,7,8,"div",10),_(3,_ne,8,11,"div",10),_(4,bne,8,11,"div",10),_(5,vne,9,13,"div",10),_(6,Cne,7,8,"div",10),_(7,$ne,26,29,"p-fieldset",11),_(8,Xne,8,11,"p-fieldset",11),c()()),2&t){const e=d();a(2),p("ngIf",e.params.Param.includes("autotranscode")),a(1),p("ngIf",e.params.Param.includes("width")),a(1),p("ngIf",e.params.Param.includes("height")),a(1),p("ngIf",e.params.Param.includes("recordingtype")),a(1),p("ngIf",e.params.Param.includes("recordmpts")),a(1),p("ngIf",e.params.Video.length>0),a(1),p("ngIf",e.params.Audio.length>0)}}function tie(t,i){1&t&&(k(0,"p-message",105),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function nie(t,i){1&t&&(k(0,"p-message",106),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function iie(t,i){if(1&t){const e=I();l(0,"div",100)(1,"div",101),_(2,tie,2,3,"p-message",102),_(3,nie,2,3,"p-message",103),c(),l(4,"p-button",104),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(1),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||e.setupService.schedulingEnabled)}}let sie=(()=>{class t{constructor(e,n,s){this.translate=e,this.captureCardService=n,this.setupService=s,this.successCount=0,this.errorCount=0,this.expectedCount=0,this.paramList=[{CardType:"V4L",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"MPEG",Param:["autotranscode","height","width"],Video:["MPEG-2 Hardware Encoder"],Audio:["MPEG-2 Hardware Encoder"]},{CardType:"MJPEG",Param:["autotranscode","height","width"],Video:["Hardware MJPEG"],Audio:["MP3","Uncompressed"]},{CardType:"HDTV",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"DVB",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"FIREWIRE",Param:["autotranscode"],Video:[],Audio:[]},{CardType:"GO7007",Param:["autotranscode","height","width"],Video:["MPEG-4","MPEG-2"],Audio:["MP3","Uncompressed"]},{CardType:"IMPORT",Param:["autotranscode"],Video:[],Audio:[]},{CardType:"FREEBOX",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"HDHOMERUN",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"CRC_IP",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"HDPVR",Param:["autotranscode"],Video:["MPEG-4 AVC Hardware Encoder"],Audio:["AC3 Hardware Encoder","AAC Hardware Encoder"]},{CardType:"ASI",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"OCUR",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]},{CardType:"CETON",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"VBOX",Param:["autotranscode","recordmpts"],Video:[],Audio:[]},{CardType:"SATIP",Param:["autotranscode","recordingtype","recordmpts"],Video:[],Audio:[]},{CardType:"V4L2:uvcvideo",Param:["autotranscode","height","width"],Video:["V4L2:MPEG-2 Video"],Audio:["V4L2:MPEG-1/2 Layer II encoding"]},{CardType:"TRANSCODE",Param:["autotranscode","height","width"],Video:["RTjpeg","MPEG-4"],Audio:["MP3","Uncompressed"]}],this.params={CardType:"",Param:[""],Video:[""],Audio:[""]},this.videoParamList=[{Codec:"RTjpeg",Param:["rtjpegquality","rtjpeglumafilter","rtjpegchromafilter"]},{Codec:"MPEG-4",Param:["mpeg4bitrate","mpeg4maxquality","mpeg4minquality","mpeg4qualdiff","scalebitrate","mpeg4optionvhq","mpeg4option4mv","mpeg4optionidct","mpeg4optionime","encodingthreadcount"]},{Codec:"MPEG-2",Param:["mpeg2bitrate","scalebitrate","encodingthreadcount"]},{Codec:"Hardware MJPEG",Param:["hardwaremjpegquality","hardwaremjpeghdecimation","hardwaremjpegvdecimation"]},{Codec:"MPEG-2 Hardware Encoder",Param:["mpeg2streamtype","mpeg2aspectratio","mpeg2bitrate","mpeg2maxbitrate"]},{Codec:"MPEG-4 AVC Hardware Encoder",Param:["low_mpeg4avgbitrate","low_mpeg4peakbitrate","medium_mpeg4avgbitrate","medium_mpeg4peakbitrate","high_mpeg4avgbitrate","high_mpeg4peakbitrate"]},{Codec:"V4L2:MPEG-2 Video",Param:[]}],this.audioParamList=[{Codec:"MP3",Param:["samplerate","mp3quality","volume"]},{Codec:"MPEG-2 Hardware Encoder",Param:["samplerate","mpeg2language","mpeg2audvolume"]},{Codec:"Uncompressed",Param:["samplerate","volume"]}],this.recordingtypeOptions=[{Name:"settings.rprofiles.rectype_normal",Value:"all"},{Name:"settings.rprofiles.rectype_tv",Value:"tv"},{Name:"settings.rprofiles.rectype_audio",Value:"audio"}],this.samplerateOptions=["32000","44100","48000"],this.streamTypeOptions=["MPEG-2 PS","MPEG-2 TS","MPEG-1 VCD","PES AV","PES V","PES A","DVD","DVD-Special 1","DVD-Special 2"],this.mpeg2languageOptions=[{Name:"settings.rprofiles.lang_main",Value:"0"},{Name:"settings.rprofiles.lang_sap",Value:"1"},{Name:"settings.rprofiles.lang_dual",Value:"2"}],this.saveObserver={next:r=>{this.profile.Id&&r.bool?this.successCount++:!this.profile.Id&&r.int?(this.successCount++,this.profile.Id=r.int,this.saveForm(2)):(console.log("saveObserver error",r),this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.log("saveObserver error",r),this.errorCount++,this.currentForm.form.markAsDirty()}},this.recordingtypeOptions.forEach(r=>{e.get(r.Name).subscribe(o=>r.Name=o)}),this.mpeg2languageOptions.forEach(r=>{e.get(r.Name).subscribe(o=>r.Name=o)})}ngOnInit(){let e=this.paramList.find(n=>n.CardType==this.group.CardType);e&&(this.params=e)}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}findIx(e,n){let s=this.profile.RecProfParams.findIndex(r=>r.Name==e);return-1==s?s=this.profile.RecProfParams.push({Name:e,Value:n})-1:"boolean"==typeof n&&"string"==typeof this.profile.RecProfParams[s].Value&&(this.profile.RecProfParams[s].Value="1"==this.profile.RecProfParams[s].Value),s}saveForm(e){switch(e){case 1:if(this.successCount=0,this.errorCount=0,this.expectedCount=0,this.profile.Id<=0)return this.captureCardService.AddRecProfile(this.group.Id,this.profile.Name,this.profile.VideoCodec,this.profile.AudioCodec).subscribe(this.saveObserver),void this.expectedCount++;this.captureCardService.UpdateRecProfile(this.profile.Id,this.profile.VideoCodec,this.profile.AudioCodec).subscribe(this.saveObserver),this.expectedCount++;case 2:this.saveParams(this.params.Param);let n=this.videoParamList.find(r=>r.Codec==this.profile.VideoCodec);n?this.saveParams(n.Param):(console.log("ERROR videoparams not found"),this.errorCount++,this.currentForm.form.markAsDirty());let s=this.audioParamList.find(r=>r.Codec==this.profile.AudioCodec);s?this.saveParams(s.Param):(console.log("ERROR audioparams not found"),this.errorCount++,this.currentForm.form.markAsDirty())}}saveParams(e){e.forEach(n=>{let s=this.profile.RecProfParams[this.findIx(n,"0")].Value;s="boolean"==typeof s?s?"1":"0":s.toString(),this.captureCardService.UpdateRecProfileParam(this.profile.Id,n,s).subscribe(this.saveObserver),this.expectedCount++})}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-recprofile"]],viewQuery:function(e,n){if(1&e&&(j(pne,5),j(hne,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{profile:"profile",group:"group",parentComponent:"parentComponent"},decls:9,vars:0,consts:[["name","recprofform",1,"ml-3","mr-3"],["recprofform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],["class","form-group field",4,"ngIf"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"form-group","field"],["inputId","autotranscode","name","autotranscode",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["autotranscode","ngModel"],[1,"block"],["for","width",1,"label","block"],["name","width","id","width",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","height",1,"label","block"],["name","height","id","height",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","recordingtype",1,"label","block"],["optionLabel","Name","optionValue","Value","name","recordingtype",3,"options","ngModel","editable","maxlength","ngModelChange"],["recordingtype","ngModel"],["inputId","recordmpts","name","recordmpts",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["recordmpts","ngModel"],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","VideoCodec",1,"label","block"],["name","VideoCodec",3,"options","ngModel","editable","maxlength","ngModelChange"],["VideoCodec","ngModel"],["for","rtjpegquality",1,"label","block"],["name","rtjpegquality","id","rtjpegquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","rtjpeglumafilter",1,"label","block"],["name","rtjpeglumafilter","id","rtjpeglumafilter",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","rtjpegchromafilter",1,"label","block"],["name","rtjpegchromafilter","id","rtjpegchromafilter",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4bitrate",1,"label","block"],["name","mpeg4bitrate","id","mpeg4bitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4maxquality",1,"label","block"],["name","mpeg4maxquality","id","mpeg4maxquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg4minquality",1,"label","block"],["name","mpeg4minquality","id","mpeg4minquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","hardwaremjpegquality",1,"label","block"],["name","hardwaremjpegquality","id","hardwaremjpegquality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","hardwaremjpeghdecimation",1,"label","block"],["name","hardwaremjpeghdecimation",3,"options","ngModel","editable","maxlength","ngModelChange"],["hardwaremjpeghdecimation","ngModel"],["for","hardwaremjpegvdecimation",1,"label","block"],["name","hardwaremjpegvdecimation",3,"options","ngModel","editable","maxlength","ngModelChange"],["hardwaremjpegvdecimation","ngModel"],["for","mpeg4qualdiff",1,"label","block"],["name","mpeg4qualdiff","id","mpeg4qualdiff",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2streamtype",1,"label","block"],["name","mpeg2streamtype",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2streamtype","ngModel"],["for","mpeg2aspectratio",1,"label","block"],["name","mpeg2aspectratio",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2aspectratio","ngModel"],["for","mpeg2bitrate",1,"label","block"],["name","mpeg2bitrate","id","mpeg2bitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2maxbitrate",1,"label","block"],["name","mpeg2maxbitrate","id","mpeg2maxbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","low_mpeg4avgbitrate",1,"label","block"],["name","low_mpeg4avgbitrate","id","low_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","low_mpeg4peakbitrate",1,"label","block"],["name","low_mpeg4peakbitrate","id","low_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","medium_mpeg4avgbitrate",1,"label","block"],["name","medium_mpeg4avgbitrate","id","medium_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","medium_mpeg4peakbitrate",1,"label","block"],["name","medium_mpeg4peakbitrate","id","medium_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","high_mpeg4avgbitrate",1,"label","block"],["name","high_mpeg4avgbitrate","id","high_mpeg4avgbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","high_mpeg4peakbitrate",1,"label","block"],["name","high_mpeg4peakbitrate","id","high_mpeg4peakbitrate",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","scalebitrate","name","scalebitrate",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["scalebitrate","ngModel"],["inputId","mpeg4optionvhq","name","mpeg4optionvhq",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionvhq","ngModel"],["inputId","mpeg4option4mv","name","mpeg4option4mv",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4option4mv","ngModel"],["inputId","mpeg4optionidct","name","mpeg4optionidct",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionidct","ngModel"],["inputId","mpeg4optionime","name","mpeg4optionime",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["mpeg4optionime","ngModel"],["for","encodingthreadcount",1,"label","block"],["name","encodingthreadcount","id","encodingthreadcount",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","AudioCodec",1,"label","block"],["name","AudioCodec",3,"options","ngModel","editable","maxlength","ngModelChange"],["AudioCodec","ngModel"],["for","samplerate",1,"label","block"],["name","samplerate",3,"options","ngModel","editable","maxlength","ngModelChange"],["samplerate","ngModel"],["for","mpeg2language",1,"label","block"],["optionLabel","Name","optionValue","Value","name","mpeg2language",3,"options","ngModel","editable","maxlength","ngModelChange"],["mpeg2language","ngModel"],["for","mp3quality",1,"label","block"],["name","mp3quality","id","mp3quality",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","volume",1,"label","block"],["name","volume","id","volume",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","mpeg2audvolume",1,"label","block"],["name","mpeg2audvolume","id","mpeg2audvolume",3,"ngModel","showButtons","min","max","step","ngModelChange"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,mne,2,4,"ng-template",4),_(6,fne,0,0,"ng-template",5),_(7,eie,9,7,"ng-template",6),_(8,iie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,rn,Te,_e,dt,Vt,fn,Ui,qe,ve],pipes:[de],styles:[""]}),t})();const rie=["v4l2form"],oie=["top"];function aie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.v4l2.title")," ")}function lie(t,i){}const cie=function(){return{minWidth:"80%"}};function uie(t,i){if(1&t){const e=I();l(0,"p-dropdown",17,18),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,cie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function die(t,i){if(1&t&&(l(0,"div")(1,"small",19),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function pie(t,i){if(1&t){const e=I();l(0,"input",20,21),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function hie(t,i){if(1&t&&(l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,uie,2,7,"p-dropdown",12),_(7,die,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,pie,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()()()()),2&t){const e=d();a(4),S(f(5,7,"settings.capture.v4l2.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,9,"settings.capture.device_desc")," "),a(4),S(f(14,11,"settings.capture.v4l2.frontend_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(18,13,"settings.capture.frontend_desc")," ")}}function mie(t,i){1&t&&(k(0,"p-message",27),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function fie(t,i){1&t&&(k(0,"p-message",28),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function gie(t,i){if(1&t){const e=I();l(0,"div",22)(1,"div",23),_(2,mie,2,3,"p-message",24),_(3,fie,2,3,"p-message",25),c(),l(4,"p-button",26),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let _ie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("V4L2ENC").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver)}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-v4l2"]],viewQuery:function(e,n){if(1&e&&(j(rie,5),j(oie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","v4l2form",1,"ml-3","mr-3"],["v4l2form","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,aie,2,3,"ng-template",4),_(6,lie,0,0,"ng-template",5),_(7,hie,19,15,"ng-template",6),_(8,gie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,qe,ve],pipes:[de],styles:[""]}),t})();const bie=["hdpvrform"],vie=["top"];function Cie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.hdpvr.title")," ")}function yie(t,i){}const kS=function(){return{minWidth:"80%"}};function wie(t,i){if(1&t){const e=I();l(0,"p-dropdown",21,22),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,kS)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Tie(t,i){if(1&t&&(l(0,"div")(1,"small",23),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Sie(t,i){if(1&t){const e=I();l(0,"input",24,25),C("ngModelChange",function(s){return v(e),d(2).currentDevice.FrontendName=s}),c()}2&t&&p("ngModel",d(2).currentDevice.FrontendName)}function xie(t,i){if(1&t){const e=I();l(0,"p-dropdown",26,27),C("ngModelChange",function(s){return v(e),d(2).card.AudioDevice=s}),c()}if(2&t){const e=d(2);q(A(6,kS)),p("options",e.currentDevice.AudioDevices)("ngModel",e.card.AudioDevice)("editable",!1)("maxlength",0)}}function Die(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,wie,2,7,"p-dropdown",12),_(7,Tie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),_(15,Sie,2,1,"input",16),l(16,"small",14),g(17),m(18,"translate"),c()(),l(19,"div",10)(20,"label",17),g(21),m(22,"translate"),c(),_(23,xie,2,7,"p-dropdown",18),l(24,"small",14),g(25),m(26,"translate"),c()(),l(27,"div",10)(28,"label",19),g(29),m(30,"translate"),c(),l(31,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(32,"small",14),g(33),m(34,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,17,"settings.capture.v4l2.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,19,"settings.capture.device_desc")," "),a(4),S(f(14,21,"settings.capture.v4l2.frontend_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(18,23,"settings.capture.frontend_desc")," "),a(4),S(f(22,25,"settings.capture.hdpvr.audiodevice_label")),a(2),p("ngIf",e.isReady),a(2),T(" ",f(26,27,"settings.capture.hdpvr.audiodevice_desc")," "),a(4),S(f(30,29,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(34,31,"settings.capture.tunetimeout_desc")," ")}}function Mie(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function kie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Iie(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,Mie,2,3,"p-message",30),_(3,kie,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Eie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("HDPVR").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected,InputNames:[""]}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist,InputNames:[""]},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.currentDevice&&this.card.InputName&&(this.currentDevice.InputNames.includes(this.card.InputName)||this.currentDevice.InputNames.push(this.card.InputName)),this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.InputName=this.currentDevice.DefaultInputName,this.card.AudioDevice="",this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"audiodevice",String(this.card.AudioDevice)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-hdpvr"]],viewQuery:function(e,n){if(1&e&&(j(bie,5),j(vie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","hdpvrform",1,"ml-3","mr-3"],["dvbform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],["for","FrontendName",1,"label","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true","class","mb-2 form-control w-full",3,"ngModel","ngModelChange",4,"ngIf"],["for","AudioDevice",1,"label","block"],["name","AudioDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange",4,"ngIf"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],["pInputText","","id","FrontendName","name","FrontendName","disabled","true",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["FrontendName","ngModel"],["name","AudioDevice",3,"options","ngModel","editable","maxlength","ngModelChange"],["AudioDevice","ngModel"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Cie,2,3,"ng-template",4),_(6,yie,0,0,"ng-template",5),_(7,Die,35,33,"ng-template",6),_(8,Iie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,qe,ve],pipes:[de],styles:[""]}),t})();const Rie=["satipform"],Lie=["top"];function Oie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.satip.title")," ")}function Aie(t,i){}const Pie=function(){return{minWidth:"83%"}};function Fie(t,i){if(1&t){const e=I();l(0,"p-dropdown",25,26),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Pie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Nie(t,i){if(1&t&&(l(0,"div")(1,"small",27),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Vie(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,Fie,2,7,"p-dropdown",12),_(7,Nie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"div",16),g(16),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",15),g(22),m(23,"translate"),c(),l(24,"div",16),g(25),c(),l(26,"small",14),g(27),m(28,"translate"),c()(),l(29,"div",10)(30,"label",15),g(31),m(32,"translate"),c(),l(33,"div",16),g(34),c(),l(35,"small",14),g(36),m(37,"translate"),c()(),l(38,"div",10)(39,"label",15),g(40),m(41,"translate"),c(),l(42,"div",16),g(43),c(),l(44,"small",14),g(45),m(46,"translate"),c()(),l(47,"div",10)(48,"label",17),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",18),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(52,"small",14),g(53),m(54,"translate"),c()(),l(55,"div",10)(56,"label",19),g(57),m(58,"translate"),c(),l(59,"p-inputNumber",20),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(60,"small",14),g(61),m(62,"translate"),c()(),l(63,"div",10)(64,"p-checkbox",21,22),C("ngModelChange",function(s){return v(e),d().card.DVBEITScan=s}),m(66,"translate"),c(),l(67,"small",14),g(68),m(69,"translate"),c()(),l(70,"div",10)(71,"label",23),g(72),m(73,"translate"),c(),l(74,"p-inputNumber",24),C("ngModelChange",function(s){return v(e),d().card.DVBDiSEqCType=s}),c(),l(75,"small",14),g(76),m(77,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.satip.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,43,"settings.capture.satip.device_desc")," "),a(4),S(f(14,45,"settings.capture.satip.friendly_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(2),T(" ",f(19,47,"settings.capture.satip.friendly_desc")," "),a(4),S(f(23,49,"settings.capture.satip.tunertype_label")),a(3),T(" ",e.currentDevice.TunerType," \xa0 "),a(2),T(" ",f(28,51,"settings.capture.tunertype_desc")," "),a(4),S(f(32,53,"settings.capture.satip.tunerindex_label")),a(3),T(" ",e.currentDevice.TunerNumber," \xa0 "),a(2),T(" ",f(37,55,"settings.capture.tunerindex_desc")," "),a(4),S(f(41,57,"settings.capture.satip.deviceid_label")),a(3),T(" ",e.card.VideoDevice," \xa0 "),a(2),T(" ",f(46,59,"settings.capture.deviceid_desc")," "),a(4),S(f(50,61,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(54,63,"settings.capture.sigtimeout_desc")," "),a(4),S(f(58,65,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(62,67,"settings.capture.tunetimeout_desc")," "),a(3),D("label",f(66,69,"settings.capture.dvb.eitscan_label")),p("ngModel",e.card.DVBEITScan)("binary",!0),a(4),T(" ",f(69,71,"settings.capture.dvb.eitscan_desc")," "),a(4),S(f(73,73,"settings.capture.satip.diseqcpos_label")),a(2),p("ngModel",e.card.DVBDiSEqCType)("showButtons",!0)("min",1)("max",255)("step",1),a(2),T(" ",f(77,75,"settings.capture.satip.diseqcpos_desc")," ")}}function Bie(t,i){1&t&&(k(0,"p-message",33),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Hie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function qie(t,i){if(1&t){const e=I();l(0,"div",28)(1,"div",29),_(2,Bie,2,3,"p-message",30),_(3,Hie,2,3,"p-message",31),c(),l(4,"p-button",32),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let Uie=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("SATIP").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",VideoDevicePrompt:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,Description:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_eitscan",String(this.card.DVBEITScan?"1":"0")).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"dvb_diseqc_type",String(this.card.DVBDiSEqCType)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-satip"]],viewQuery:function(e,n){if(1&e&&(j(Rie,5),j(Lie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","satipform",1,"ml-3","mr-3"],["satipform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevicePrompt","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","DVBEITScan","name","DVBEITScan",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["DVBEITScan","ngModel"],["for","DVBDiSEqCType",1,"label","block"],["name","DVBDiSEqCType","id","DVBDiSEqCType",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevicePrompt","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,Oie,2,3,"ng-template",4),_(6,Aie,0,0,"ng-template",5),_(7,Vie,78,77,"ng-template",6),_(8,qie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,dt,rn,qe,ve],pipes:[de],styles:[""]}),t})();const Gie=["vboxform"],zie=["top"];function jie(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.vbox.title")," ")}function $ie(t,i){}const Wie=function(){return{minWidth:"83%"}};function Kie(t,i){if(1&t){const e=I();l(0,"p-dropdown",26,27),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Wie)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function Qie(t,i){if(1&t&&(l(0,"div")(1,"small",28),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function Jie(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,Kie,2,7,"p-dropdown",12),_(7,Qie,3,1,"div",13),l(8,"small",14),g(9),m(10,"translate"),c()(),l(11,"div",10)(12,"label",15),g(13),m(14,"translate"),c(),l(15,"div",16),g(16),c(),l(17,"small",14),g(18),m(19,"translate"),c()(),l(20,"div",10)(21,"label",15),g(22),m(23,"translate"),c(),l(24,"div",16),g(25),c(),k(26,"small",14),c(),l(27,"div",10)(28,"label",17),g(29),m(30,"translate"),c(),l(31,"input",18,19),C("ngModelChange",function(s){return v(e),d().currentDevice.IPAddress=s}),c(),l(33,"small",14),g(34),m(35,"translate"),c()(),l(36,"div",10)(37,"label",20),g(38),m(39,"translate"),c(),l(40,"input",21,19),C("ngModelChange",function(s){return v(e),d().currentDevice.TunerNumber=s}),c(),l(42,"small",14),g(43),m(44,"translate"),c()(),l(45,"div",10)(46,"label",22),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(50,"small",14),g(51),m(52,"translate"),c()(),l(53,"div",10)(54,"label",24),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(58,"small",14),g(59),m(60,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,31,"settings.capture.satip.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(2),T(" ",f(10,33,"settings.capture.vbox.device_desc")," "),a(4),S(f(14,35,"settings.capture.vbox.deviceid_label")),a(3),T(" ",e.card.VideoDevice," \xa0 "),a(2),T(" ",f(19,37,"settings.capture.vbox.deviceid_desc")," "),a(4),S(f(23,39,"settings.capture.vbox.description_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(4),S(f(30,41,"settings.capture.ceton.ipaddress_label")),a(2),p("ngModel",e.currentDevice.IPAddress)("disabled",e.currentDevice!==e.manualDevice),a(3),T(" ",f(35,43,"settings.capture.vbox.ipaddress_desc")," "),a(4),S(f(39,45,"settings.capture.ceton.tuner_label")),a(2),p("ngModel",e.currentDevice.TunerNumber)("disabled",e.currentDevice!==e.manualDevice),a(3),T(" ",f(44,47,"settings.capture.vbox.tuner_desc")," "),a(4),S(f(48,49,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(52,51,"settings.capture.sigtimeout_desc")," "),a(4),S(f(56,53,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(60,55,"settings.capture.tunetimeout_desc")," ")}}function Yie(t,i){1&t&&(k(0,"p-message",34),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Zie(t,i){1&t&&(k(0,"p-message",35),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Xie(t,i){if(1&t){const e=I();l(0,"div",29)(1,"div",30),_(2,Yie,2,3,"p-message",31),_(3,Zie,2,3,"p-message",32),c(),l(4,"p-button",33),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let ese=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected",manuallyEnter:"settings.capture.vbox.manuallyenter"},this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r),s.get(this.messages.manuallyEnter).subscribe(r=>this.messages.manuallyEnter=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("VBOX").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.manualDevice={VideoDevicePrompt:this.messages.manuallyEnter,VideoDevice:"",Description:"",IPAddress:"",TunerNumber:0,SignalTimeout:7e3,ChannelTimeout:1e4},this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift(this.manualDevice),this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.currentDevice===this.manualDevice?this.subscription=this.currentForm.valueChanges.pipe(_S(50)).subscribe(()=>this.card.VideoDevice=this.manualDevice.IPAddress+"-"+this.manualDevice.TunerNumber):this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-vbox"]],viewQuery:function(e,n){if(1&e&&(j(Gie,5),j(zie,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","vboxform",1,"ml-3","mr-3"],["vboxform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],["u","",1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevicePrompt",1,"label","block"],["optionLabel","VideoDevicePrompt","name","VideoDevicePrompt",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","ip",1,"label","block"],["pInputText","","id","ip","name","ip",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["ipAddress","ngModel"],["for","tuner",1,"label","block"],["pInputText","","id","tuner","name","tuner",1,"mb-2","form-control","w-full",3,"ngModel","disabled","ngModelChange"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevicePrompt","name","VideoDevicePrompt",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevicePrompt","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,jie,2,3,"ng-template",4),_(6,$ie,0,0,"ng-template",5),_(7,Jie,61,57,"ng-template",6),_(8,Xie,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,qe,ve],pipes:[de],styles:[""]}),t})();const tse=["firewireform"],nse=["top"];function ise(t,i){1&t&&(g(0),m(1,"translate")),2&t&&T(" ",f(1,1,"settings.capture.firewire.title")," ")}function sse(t,i){}const Ed=function(){return{minWidth:"83%"}};function rse(t,i){if(1&t){const e=I();l(0,"p-dropdown",30,31),C("ngModelChange",function(s){return v(e),d(2).currentDevice=s})("onChange",function(){return v(e),d(2).updateDevice()}),c()}if(2&t){const e=d(2);q(A(6,Ed)),p("options",e.captureDeviceList.CaptureDeviceList.CaptureDevices)("ngModel",e.currentDevice)("editable",!1)("maxlength",0)}}function ose(t,i){if(1&t&&(l(0,"div")(1,"small",32),g(2),c()()),2&t){const e=d(2);a(2),T(" ",e.warningMessage," ")}}function ase(t,i){if(1&t){const e=I();l(0,"div",8)(1,"div",9)(2,"div",10)(3,"label",11),g(4),m(5,"translate"),c(),_(6,rse,2,7,"p-dropdown",12),_(7,ose,3,1,"div",13),k(8,"small",14),c(),l(9,"div",10)(10,"label",15),g(11),m(12,"translate"),c(),l(13,"div",16),g(14),c(),k(15,"small",14),c(),l(16,"div",10)(17,"label",17),g(18),m(19,"translate"),c(),l(20,"p-dropdown",18,19),C("ngModelChange",function(s){return v(e),d().card.FirewireModel=s}),c(),l(22,"small",14),g(23),m(24,"translate"),c()(),l(25,"div",10)(26,"label",20),g(27),m(28,"translate"),c(),l(29,"p-dropdown",21,22),C("ngModelChange",function(s){return v(e),d().card.FirewireConnection=s}),c(),k(31,"small",14),c(),l(32,"div",10)(33,"label",23),g(34),m(35,"translate"),c(),l(36,"p-dropdown",24,25),C("ngModelChange",function(s){return v(e),d().card.FirewireSpeed=s}),c(),k(38,"small",14),c(),l(39,"div",10)(40,"label",26),g(41),m(42,"translate"),c(),l(43,"p-inputNumber",27),C("ngModelChange",function(s){return v(e),d().card.SignalTimeout=s}),c(),l(44,"small",14),g(45),m(46,"translate"),c()(),l(47,"div",10)(48,"label",28),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().card.ChannelTimeout=s}),c(),l(52,"small",14),g(53),m(54,"translate"),c()()()()}if(2&t){const e=d();a(4),S(f(5,41,"settings.capture.firewire.device_label")),a(2),p("ngIf",e.isReady),a(1),p("ngIf",e.warningMessage),a(4),S(f(12,43,"settings.capture.vbox.description_label")),a(3),T(" ",e.currentDevice.Description," \xa0 "),a(4),S(f(19,45,"settings.capture.firewire.model_label")),a(2),q(A(61,Ed)),p("options",e.models)("ngModel",e.card.FirewireModel)("editable",!1)("maxlength",0),a(3),T(" ",f(24,47,"settings.capture.firewire.model_desc")," "),a(4),S(f(28,49,"settings.capture.firewire.connection_label")),a(2),q(A(62,Ed)),p("options",e.connectionTypes)("ngModel",e.card.FirewireConnection)("editable",!1)("maxlength",0),a(5),S(f(35,51,"settings.capture.firewire.speed_label")),a(2),q(A(63,Ed)),p("options",e.speeds)("ngModel",e.card.FirewireSpeed)("editable",!1)("maxlength",0),a(5),S(f(42,53,"settings.capture.sigtimeout_label")),a(2),p("ngModel",e.card.SignalTimeout)("showButtons",!0)("min",250)("max",6e4)("step",250),a(2),T(" ",f(46,55,"settings.capture.sigtimeout_desc")," "),a(4),S(f(50,57,"settings.capture.tunetimeout_label")),a(2),p("ngModel",e.card.ChannelTimeout)("showButtons",!0)("min",2e3)("max",65e3)("step",250),a(2),T(" ",f(54,59,"settings.capture.tunetimeout_desc")," ")}}function lse(t,i){1&t&&(k(0,"p-message",38),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function cse(t,i){1&t&&(k(0,"p-message",39),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function use(t,i){if(1&t){const e=I();l(0,"div",33)(1,"div",34),_(2,lse,2,3,"p-message",35),_(3,cse,2,3,"p-message",36),c(),l(4,"p-button",37),C("onClick",function(){v(e);const s=d(),r=F(1);return s.saveForm(),r.form.markAsPristine()}),m(5,"translate"),c()()}if(2&t){const e=d(),n=F(1);a(2),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(5,4,"common.save")),p("disabled",!n.dirty||!e.card.VideoDevice||e.setupService.schedulingEnabled)}}let dse=(()=>{class t{constructor(e,n,s){this.captureCardService=e,this.setupService=n,this.translate=s,this.messages={devNotExist:"settings.capture.dvb.devNotExist",unknownName:"settings.capture.dvb.unknownName",devInUse:"settings.capture.dvb.devInUse",noDevSelected:"settings.capture.dvb.noDevSelected",manuallyEnter:"settings.capture.vbox.manuallyenter"},this.models=[{name:"settings.capture.firewire.motogeneric",value:"MOTO GENERIC"},{name:"settings.capture.firewire.sageneric",value:"SA GENERIC"},{name:"DCH-3200",value:"DCH-3200"},{name:"DCX-3200",value:"DCX-3200"},{name:"DCT-3412",value:"DCT-3412"},{name:"DCT-3416",value:"DCT-3416"},{name:"DCT-6200",value:"DCT-6200"},{name:"DCT-6212",value:"DCT-6212"},{name:"DCT-6216",value:"DCT-6216"},{name:"QIP-6200",value:"QIP-6200"},{name:"QIP-7100",value:"QIP-7100"},{name:"PACE-550",value:"PACE-550"},{name:"PACE-779",value:"PACE-779"},{name:"SA3250HD",value:"SA3250HD"},{name:"SA4200HD",value:"SA4200HD"},{name:"SA4250HDC",value:"SA4250HDC"},{name:"SA8300HD",value:"SA8300HD"}],this.connectionTypes=[{name:"settings.capture.firewire.pointtopoint",value:0},{name:"settings.capture.firewire.broadcast",value:1}],this.speeds=[{name:"100Mbps",value:0},{name:"200Mbps",value:1},{name:"400Mbps",value:2},{name:"800Mbps",value:3}],this.captureDeviceList={CaptureDeviceList:{CaptureDevices:[]}},this.currentDevice={FrontendName:"Unknown",InputNames:[""]},this.isReady=!1,this.warningMessage="",this.errorCount=0,this.successCount=0,this.saveObserver={next:r=>{this.card.CardId&&r.bool?this.successCount++:!this.card.CardId&&r.int?(this.successCount++,this.card.CardId=r.int,this.cardList.CaptureCardList.CaptureCards.push(this.card)):(this.errorCount++,this.currentForm.form.markAsDirty())},error:r=>{console.error(r),this.errorCount++,this.currentForm.form.markAsDirty()}},s.get(this.messages.devNotExist).subscribe(r=>this.messages.devNotExist=r),s.get(this.messages.unknownName).subscribe(r=>this.messages.unknownName=r),s.get(this.messages.devInUse).subscribe(r=>this.messages.devInUse=r),s.get(this.messages.noDevSelected).subscribe(r=>this.messages.noDevSelected=r),s.get(this.messages.manuallyEnter).subscribe(r=>this.messages.manuallyEnter=r),s.get(this.models[0].name).subscribe(r=>this.models[0].name=r),s.get(this.models[1].name).subscribe(r=>this.models[1].name=r),s.get(this.connectionTypes[0].name).subscribe(r=>this.connectionTypes[0].name=r),s.get(this.connectionTypes[1].name).subscribe(r=>this.connectionTypes[1].name=r)}ngOnInit(){this.captureCardService.GetCaptureDeviceList("FIREWIRE").subscribe({next:e=>{this.captureDeviceList=e,this.setupDevice()},error:e=>{console.log("GetCaptureDeviceList",e),this.errorCount++}})}ngAfterViewInit(){this.setupService.setCurrentForm(this.currentForm),this.topElement.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}setupDevice(){if(this.card.VideoDevice||this.captureDeviceList.CaptureDeviceList.CaptureDevices.unshift({VideoDevice:"",FrontendName:this.messages.noDevSelected}),this.card.VideoDevice){let e=this.captureDeviceList.CaptureDeviceList.CaptureDevices.find(n=>n.VideoDevice==this.card.VideoDevice);e?this.currentDevice=e:(this.currentDevice={VideoDevice:this.card.VideoDevice,FrontendName:this.messages.devNotExist},this.captureDeviceList.CaptureDeviceList.CaptureDevices.push(this.currentDevice))}this.isReady=!0}updateDevice(){this.card.VideoDevice=this.currentDevice.VideoDevice,this.card.ChannelTimeout=this.currentDevice.ChannelTimeout,this.card.SignalTimeout=this.currentDevice.SignalTimeout,this.card.FirewireModel=this.currentDevice.FirewireModel,this.checkInUse()}checkInUse(){this.warningMessage=this.cardList.CaptureCardList.CaptureCards.find(n=>n.VideoDevice==this.currentDevice.VideoDevice&&n.CardId!=this.card.CardId)?this.messages.devInUse:""}saveForm(){this.successCount=0,this.errorCount=0,this.card.CardId?this.cardList.CaptureCardList.CaptureCards.forEach(e=>{(e.CardId==this.card.CardId||e.ParentId==this.card.CardId)&&(this.captureCardService.UpdateCaptureCard(e.CardId,"videodevice",this.card.VideoDevice).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_model",this.card.FirewireModel).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_connection",String(this.card.FirewireConnection)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"firewire_speed",String(this.card.FirewireSpeed)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"signal_timeout",String(this.card.SignalTimeout)).subscribe(this.saveObserver),this.captureCardService.UpdateCaptureCard(e.CardId,"channel_timeout",String(this.card.ChannelTimeout)).subscribe(this.saveObserver))}):this.captureCardService.AddCaptureCard(this.card).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(Gt),x(De),x(Le))},t.\u0275cmp=G({type:t,selectors:[["app-firewire"]],viewQuery:function(e,n){if(1&e&&(j(tse,5),j(nse,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.topElement=s.first)}},inputs:{card:"card",cardList:"cardList"},decls:9,vars:0,consts:[["name","firewireform",1,"ml-3","mr-3"],["firewireform","ngForm"],["top",""],[1,"m-5"],["pTemplate","title"],["pTemplate","subtitle"],["pTemplate","content"],["pTemplate","footer"],[1,"grid"],[1,"mb-4","w-full"],[1,"form-group","field"],["for","VideoDevice",1,"label","block"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","style","ngModelChange","onChange",4,"ngIf"],[4,"ngIf"],[1,"block"],[1,"label","block"],[1,"col-10","bg-blue-100","text-gray-900"],["for","FirewireModel",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireModel",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireModel","ngModel"],["for","FirewireConnection",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireConnection",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireConnection","ngModel"],["for","FirewireSpeed",1,"label","block"],["optionLabel","name","optionValue","value","name","FirewireSpeed",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirewireSpeed","ngModel"],["for","SignalTimeout",1,"label","block"],["name","SignalTimeout","id","SignalTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ChannelTimeout",1,"label","block"],["name","ChannelTimeout","id","ChannelTimeout",3,"ngModel","showButtons","min","max","step","ngModelChange"],["optionLabel","VideoDevice","name","VideoDevice",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["VideoDevice","ngModel"],[1,"p-error","block"],[1,"grid","nogutter"],[1,"col-12"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-save","iconPos","left",1,"col","pr-1",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"form",0,1),k(2,"span",null,2),l(4,"p-card",3),_(5,ise,2,3,"ng-template",4),_(6,sse,0,0,"ng-template",5),_(7,ase,55,64,"ng-template",6),_(8,use,6,6,"ng-template",7),c()())},directives:[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,dt,qe,ve],pipes:[de],styles:[""]}),t})();const pse=["scroll"],hse=["statusPanel"],pt=function(){return{minWidth:"400px"}};function mse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",38),g(2),m(3,"translate"),c(),l(4,"p-dropdown",39,40),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s})("onChange",function(){return v(e),d(2).onFreqTableChange(!1)}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.freqtable_label")),a(2),q(A(12,pt)),p("options",e.freqTableSelect)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.freqtable_desc")," ")}}function fse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.country_label")),a(2),q(A(12,pt)),p("options",e.countryTable)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.scantype_dvbt_desc")," ")}}function gse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",41),g(2),m(3,"translate"),c(),l(4,"p-dropdown",42,43),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FreqTable=s}),c(),k(6,"small",4),c()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.channelscan.country_label")),a(2),q(A(9,pt)),p("options",e.networkTable)("ngModel",e.scanRequest.FreqTable)("editable",!1)("maxlength",0)}}function _se(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",44),g(2),m(3,"translate"),c(),l(4,"p-dropdown",45,46),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s})("onChange",function(){return v(e),d(2).onFreqTableChange(!0)}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.atscModulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.atscmodulation_desc")," ")}}function bse(t,i){1&t&&(l(0,"div")(1,"small",51),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.channelscan.invalid_range")))}function vse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",47),g(2),m(3,"translate"),c(),l(4,"p-dropdown",48,49),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FirstChan=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c(),_(9,bse,4,3,"div",50),c()}if(2&t){const e=d(2);a(2),S(f(3,9,"settings.channelscan.firstchan_label")),a(2),q(A(13,pt)),p("options",e.channels)("ngModel",e.scanRequest.FirstChan)("editable",!1)("maxlength",0),a(3),T(" ",f(8,11,"settings.channelscan.firstchan_desc")," "),a(2),p("ngIf",e.channelCount<1)}}function Cse(t,i){1&t&&(l(0,"div")(1,"small",51),g(2),m(3,"translate"),c()()),2&t&&(a(2),S(f(3,1,"settings.channelscan.invalid_range")))}function yse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",52),g(2),m(3,"translate"),c(),l(4,"p-dropdown",53,54),C("ngModelChange",function(s){return v(e),d(2).scanRequest.LastChan=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c(),_(9,Cse,4,3,"div",50),c()}if(2&t){const e=d(2);a(2),S(f(3,9,"settings.channelscan.lastchan_label")),a(2),q(A(13,pt)),p("options",e.channels)("ngModel",e.scanRequest.LastChan)("editable",!1)("maxlength",0),a(3),T(" ",f(8,11,"settings.channelscan.lastchan_desc")," "),a(2),p("ngIf",e.channelCount<1)}}function wse(t,i){if(1&t&&(l(0,"div",0)(1,"label",30),g(2),m(3,"translate"),c(),l(4,"div",29),g(5),c(),l(6,"small",4),g(7),m(8,"translate"),c()()),2&t){const e=d(2);a(2),S(f(3,3,"settings.channelscan.chancount_label")),a(3),T(" ",e.calcCount()," \xa0 "),a(2),T(" ",f(8,5,"settings.channelscan.chancount_desc")," ")}}const Xs=function(){return["DVBT","DVBT2"]};function Tse(t,i){if(1&t&&(l(0,"p-fieldset",37),m(1,"translate"),_(2,mse,9,13,"div",33),_(3,fse,9,13,"div",33),_(4,gse,7,10,"div",33),_(5,_se,9,13,"div",33),_(6,vse,10,14,"div",33),_(7,yse,10,14,"div",33),_(8,wse,9,7,"div",33),c()),2&t){const e=d();D("legend",f(1,10,"settings.channelscan.type.full")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf",A(12,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType),a(1),p("ngIf","ATSC"==e.scanSubType)}}function Sse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",61),g(2),m(3,"translate"),c(),l(4,"p-dropdown",62,63),C("ngModelChange",function(s){return v(e),d(2).satTuning=s})("onChange",function(){return v(e),d(2).onSatTuningChange()}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.sattuning_label")),a(2),q(A(12,pt)),p("options",e.satTuningTable)("ngModel",e.satTuning)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.sattuning_desc")," ")}}function xse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",64),g(2),m(3,"translate"),c(),l(4,"p-dropdown",65,66),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Bandwidth=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.bandwidth_label")),a(2),q(A(12,pt)),p("options",e.bandwidthTable)("ngModel",e.scanRequest.Bandwidth)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.bandwidth_desc")," ")}}function Dse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",67),g(2),m(3,"translate"),c(),l(4,"p-dropdown",68,69),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Polarity=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.polarity_label")),a(2),q(A(12,pt)),p("options",e.polarityTable)("ngModel",e.scanRequest.Polarity)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.polarity_desc")," ")}}function Mse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",70),g(2),m(3,"translate"),c(),l(4,"p-dropdown",71,72),C("ngModelChange",function(s){return v(e),d(2).scanRequest.SymbolRate=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.symbolrate_label")),a(2),q(A(12,pt)),p("options",e.dvbcSymbolRateTable)("ngModel",e.scanRequest.SymbolRate)("editable",!0)("maxlength",8),a(3),T(" ",f(8,10,"settings.channelscan.dvbcsymbolrate_desc")," ")}}function kse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",73),g(2),m(3,"translate"),c(),l(4,"p-dropdown",74,75),C("ngModelChange",function(s){return v(e),d(2).scanRequest.SymbolRate=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.symbolrate_label")),a(2),q(A(12,pt)),p("options",e.dvbsSymbolRateTable)("ngModel",e.scanRequest.SymbolRate)("editable",!0)("maxlength",8),a(3),T(" ",f(8,10,"settings.channelscan.dvbssymbolrate_desc")," ")}}function Ise(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",76),g(2),m(3,"translate"),c(),l(4,"p-dropdown",77,78),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Constellation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.constellation_label")),a(2),q(A(12,pt)),p("options",e.modulationTable)("ngModel",e.scanRequest.Constellation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.constellation_desc")," ")}}function Ese(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",79),g(2),m(3,"translate"),c(),l(4,"p-dropdown",80,81),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.modulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.Modulation_desc")," ")}}function Rse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",82),g(2),m(3,"translate"),c(),l(4,"p-dropdown",83,84),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Modulation=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modulation_label")),a(2),q(A(12,pt)),p("options",e.dvbsModulationTable)("ngModel",e.scanRequest.Modulation)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbsmodulation_desc")," ")}}function Lse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",85),g(2),m(3,"translate"),c(),l(4,"p-dropdown",86,87),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbtModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbtmodsys_desc")," ")}}function Ose(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",88),g(2),m(3,"translate"),c(),l(4,"p-dropdown",89,90),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbcModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbcmodsys_desc")," ")}}function Ase(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",91),g(2),m(3,"translate"),c(),l(4,"p-dropdown",92,93),C("ngModelChange",function(s){return v(e),d(2).scanRequest.ModSys=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.modsys_label")),a(2),q(A(12,pt)),p("options",e.dvbsModSysTable)("ngModel",e.scanRequest.ModSys)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.dvbsmodsys_desc")," ")}}function Pse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",94),g(2),m(3,"translate"),c(),l(4,"p-dropdown",95,96),C("ngModelChange",function(s){return v(e),d(2).scanRequest.CodeRateLP=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.coderatelp_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.CodeRateLP)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.coderatelp_desc")," ")}}function Fse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",97),g(2),m(3,"translate"),c(),l(4,"p-dropdown",98,99),C("ngModelChange",function(s){return v(e),d(2).scanRequest.CodeRateHP=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.coderatehp_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.CodeRateHP)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.coderatehp_desc")," ")}}function Nse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",100),g(2),m(3,"translate"),c(),l(4,"p-dropdown",101,102),C("ngModelChange",function(s){return v(e),d(2).scanRequest.FEC=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.FEC_label")),a(2),q(A(12,pt)),p("options",e.fecTable)("ngModel",e.scanRequest.FEC)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.FEC_desc")," ")}}function Vse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",103),g(2),m(3,"translate"),c(),l(4,"p-dropdown",104,105),C("ngModelChange",function(s){return v(e),d(2).scanRequest.TransmissionMode=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.transmissionmode_label")),a(2),q(A(12,pt)),p("options",e.transmissionModeTable)("ngModel",e.scanRequest.TransmissionMode)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.transmissionmode_desc")," ")}}function Bse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",106),g(2),m(3,"translate"),c(),l(4,"p-dropdown",107,108),C("ngModelChange",function(s){return v(e),d(2).scanRequest.GuardInterval=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.guardinterval_label")),a(2),q(A(12,pt)),p("options",e.guardIntervalTable)("ngModel",e.scanRequest.GuardInterval)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.guardinterval_desc")," ")}}function Hse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",109),g(2),m(3,"translate"),c(),l(4,"p-dropdown",110,111),C("ngModelChange",function(s){return v(e),d(2).scanRequest.Hierarchy=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.hierarchy_label")),a(2),q(A(12,pt)),p("options",e.hierarchyTable)("ngModel",e.scanRequest.Hierarchy)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.hierarchy_desc")," ")}}function qse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",112),g(2),m(3,"translate"),c(),l(4,"p-dropdown",113,114),C("ngModelChange",function(s){return v(e),d(2).scanRequest.RollOff=s}),c(),l(6,"small",4),g(7),m(8,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,8,"settings.channelscan.rolloff_label")),a(2),q(A(12,pt)),p("options",e.rollOffTable)("ngModel",e.scanRequest.RollOff)("editable",!1)("maxlength",0),a(3),T(" ",f(8,10,"settings.channelscan.rolloff_desc")," ")}}const Tg=function(){return["DVBS","DVBS2"]},Use=function(t){return{unit:t}},Gse=function(){return["DVBC","DVBS","DVBS2"]};function zse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),_(2,Sse,9,13,"div",33),l(3,"div",0)(4,"label",55),g(5),m(6,"translate"),c(),l(7,"p-inputNumber",56),C("ngModelChange",function(s){return v(e),d().scanRequest.Frequency=s}),c(),l(8,"small",4),k(9,"div",57),c()(),_(10,xse,9,13,"div",33),_(11,Dse,9,13,"div",33),_(12,Mse,9,13,"div",33),_(13,kse,9,13,"div",33),l(14,"div",0)(15,"label",58),g(16),m(17,"translate"),c(),l(18,"p-dropdown",59,60),C("ngModelChange",function(s){return v(e),d().scanRequest.Inversion=s}),c(),l(20,"small",4),g(21),m(22,"translate"),c()(),_(23,Ise,9,13,"div",33),_(24,Ese,9,13,"div",33),_(25,Rse,9,13,"div",33),_(26,Lse,9,13,"div",33),_(27,Ose,9,13,"div",33),_(28,Ase,9,13,"div",33),_(29,Pse,9,13,"div",33),_(30,Fse,9,13,"div",33),_(31,Nse,9,13,"div",33),_(32,Vse,9,13,"div",33),_(33,Bse,9,13,"div",33),_(34,Hse,9,13,"div",33),_(35,qse,9,13,"div",33),c()}if(2&t){const e=d();D("legend",f(1,35,"settings.channelscan.type.fulltuned")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","DVBS2"==e.scanSubType),a(3),S(f(6,37,"settings.channelscan.frequency_label")),a(2),p("ngModel",e.scanRequest.Frequency)("min",0)("max",999999999),a(2),p("translate","settings.channelscan.frequency_desc")("translateParams",z(44,Use,A(43,Tg).includes(e.scanSubType)?"kHZ":"Hz")),a(1),p("ngIf",A(46,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(47,Tg).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf",A(48,Tg).includes(e.scanSubType)),a(3),S(f(17,39,"settings.channelscan.inversion_label")),a(2),q(A(49,pt)),p("options",e.inversionTable)("ngModel",e.scanRequest.Inversion)("editable",!1)("maxlength",0),a(3),T(" ",f(22,41,"settings.channelscan.inversion_desc")," "),a(2),p("ngIf",A(50,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","DVBS2"==e.scanSubType),a(1),p("ngIf","DVBT2"==e.scanSubType),a(1),p("ngIf","DVBC"==e.scanSubType),a(1),p("ngIf","DVBS2"==e.scanSubType),a(1),p("ngIf",A(51,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(52,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(53,Gse).includes(e.scanSubType)),a(1),p("ngIf",A(54,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(55,Xs).includes(e.scanSubType)),a(1),p("ngIf",A(56,Xs).includes(e.scanSubType)),a(1),p("ngIf","DVBS2"==e.scanSubType)}}function jse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),l(2,"div",0)(3,"label",115),g(4),m(5,"translate"),c(),l(6,"p-dropdown",116,117),C("ngModelChange",function(s){return v(e),d().scanRequest.ScanId=s}),c(),k(8,"small",4),c()()}if(2&t){const e=d();D("legend",f(1,10,"settings.channelscan.type.import")),p("toggleable",!1)("collapsed",!1),a(4),S(f(5,12,"settings.channelscan.scanimport_label")),a(2),q(A(14,pt)),p("options",e.scans)("ngModel",e.scanRequest.ScanId)("editable",!1)("maxlength",0)}}function $se(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",122),g(2),m(3,"translate"),c(),l(4,"p-dropdown",123,124),C("ngModelChange",function(s){return v(e),d(2).scanRequest.MplexId=s}),c(),k(6,"small",4),c()}if(2&t){const e=d(2);a(2),S(f(3,7,"settings.channelscan.transport_label")),a(2),q(A(9,pt)),p("options",e.multiplex)("ngModel",e.scanRequest.MplexId)("editable",!1)("maxlength",0)}}function Wse(t,i){if(1&t){const e=I();l(0,"p-fieldset",37),m(1,"translate"),_(2,$se,7,10,"div",33),l(3,"div",0)(4,"p-checkbox",118,119),C("ngModelChange",function(s){return v(e),d().scanRequest.IgnoreSignalTimeout=s}),m(6,"translate"),c(),l(7,"small",4),g(8),m(9,"translate"),c()(),l(10,"div",0)(11,"p-checkbox",120,121),C("ngModelChange",function(s){return v(e),d().scanRequest.FollowNITSetting=s}),m(13,"translate"),c(),l(14,"small",4),g(15),m(16,"translate"),c()()()}if(2&t){const e=d();D("legend",f(1,12,"settings.channelscan.type.transports")),p("toggleable",!1)("collapsed",!1),a(2),p("ngIf","ONETRANSPORT"==e.scanRequest.ScanType),a(2),D("label",f(6,14,"settings.channelscan.ignoresignaltimeout_label")),p("ngModel",e.scanRequest.IgnoreSignalTimeout)("binary",!0),a(4),T(" ",f(9,16,"settings.channelscan.ignoresignaltimeout_desc")," "),a(3),D("label",f(13,18,"settings.channelscan.follownitsetting_label")),p("ngModel",e.scanRequest.FollowNITSetting)("binary",!0),a(4),T(" ",f(16,20,"settings.channelscan.follownitsetting_desc")," ")}}function Kse(t,i){1&t&&(l(0,"small",4),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"settings.channelscan.scan_desc")," "))}function Qse(t,i){if(1&t&&(l(0,"div",0)(1,"div",125)(2,"b"),g(3),c(),g(4," \xa0 "),c(),k(5,"br"),c()),2&t){const e=d();a(3),S(e.scanStatus.DialogMsg)}}function Jse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"input",126,127),C("ngModelChange",function(s){return v(e),d().dialogResponse.DialogString=s}),c()()}if(2&t){const e=d();a(1),p("ngModel",e.dialogResponse.DialogString)}}function Yse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"label",128),g(2),m(3,"translate"),c(),l(4,"p-dropdown",129,3),C("ngModelChange",function(s){return v(e),d().buttonText=s}),c()()}if(2&t){const e=d();a(2),S(f(3,7,"settings.channelscan.scanimport_option")),a(2),q(A(9,pt)),p("options",e.scanStatus.DialogButtons)("ngModel",e.buttonText)("editable",!1)("maxlength",0)}}function Zse(t,i){if(1&t){const e=I();l(0,"div",0)(1,"p-button",130),C("onClick",function(){return v(e),d().respondDialog()}),m(2,"translate"),c()()}2&t&&(a(1),D("label",f(2,1,"common.submit")))}const Sg=function(){return{height:"20px"}},Xse=function(){return{width:"100%",height:"400px"}};class ${constructor(i,e){this.label=i,this.value=e}}class Ar{constructor(i,e,n,s,r,o,u){this.label=i,this.Frequency=e,this.Polarity=n,this.SymbolRate=s,this.Modulation=r,this.ModSys=o,this.FEC=u}}let ere=(()=>{class t{constructor(e,n,s,r){this.translate=e,this.channelService=n,this.captureCardService=s,this.setupService=r,this.serviceValues=[new $("settings.channelscan.tv","tv"),new $("settings.channelscan.tvradio","audio"),new $("settings.channelscan.all","all")],this.scanSubType="",this.scanTypes=[],this.freqTableSelect=[new $("settings.channelscan.freq.usa.broadcast","us"),new $("settings.channelscan.freq.usa.cablehi","uscablehigh"),new $("settings.channelscan.freq.usa.cablehrchi","ushrchigh"),new $("settings.channelscan.freq.usa.cableirchi","usirchigh"),new $("settings.channelscan.freq.usa.cable","uscable"),new $("settings.channelscan.freq.usa.cablehrc","ushrc"),new $("settings.channelscan.freq.usa.cableirc","usirc")],this.countryTable=[new $("settings.channelscan.country.au","au"),new $("settings.channelscan.country.cl","cl"),new $("settings.channelscan.country.cz","cz"),new $("settings.channelscan.country.dk","dk"),new $("settings.channelscan.country.fi","fi"),new $("settings.channelscan.country.fr","fr"),new $("settings.channelscan.country.de","de"),new $("settings.channelscan.country.gr","gr"),new $("settings.channelscan.country.il","il"),new $("settings.channelscan.country.it","it"),new $("settings.channelscan.country.nl","nl"),new $("settings.channelscan.country.nz","nz"),new $("settings.channelscan.country.es","es"),new $("settings.channelscan.country.se","se"),new $("settings.channelscan.country.gb","gb")],this.networkTable=[new $("settings.channelscan.country.de","de"),new $("settings.channelscan.country.nl","nl"),new $("settings.channelscan.country.gb","gb")],this.satTuningTable=[new Ar("(Select Satellite)",0,"h","27500000","qpsk","DVB-S2","auto"),new Ar("Thor 5/6/7 0.8W",10872e3,"h","25000000","8psk","DVB-S2","3/4"),new Ar("Eutelsat 7.0E",10721e3,"h","22000000","qpsk","DVB-S","3/4"),new Ar("Hotbird 13.0E",12015e3,"h","27500000","8psk","DVB-S2","3/4"),new Ar("Astra-1 19.2E",11229e3,"v","22000000","8psk","DVB-S2","2/3"),new Ar("Astra-3 23.5E",12031500,"h","27500000","qpsk","DVB-S2","auto"),new Ar("Astra-2 28.2E",10714e3,"h","22000000","qpsk","DVB-S","5/6")],this.atscModulationTable=[new $("settings.channelscan.modulation.atsc.vsb8","vsb8"),new $("settings.channelscan.modulation.atsc.qam256","qam256"),new $("settings.channelscan.modulation.atsc.qam128","qam128"),new $("settings.channelscan.modulation.atsc.qam64","qam64")],this.bandwidthTable=[new $("settings.channelscan.auto","a"),new $("6 MHz","6"),new $("7 MHz","7"),new $("8 MHz","8")],this.inversionTable=[new $("settings.channelscan.auto","a"),new $("settings.channelscan.on","1"),new $("settings.channelscan.off","0")],this.modulationTable=[new $("settings.channelscan.auto","auto"),new $("QPSK","qpsk"),new $("QAM-16","qam_16"),new $("QAM-32","qam_32"),new $("QAM-64","qam_64"),new $("QAM-128","qam_128"),new $("QAM-256","qam_256")],this.dvbsModulationTable=[new $("QPSK","qpsk"),new $("8PSK","8psk"),new $("QAM-16","qam_16"),new $("16PSK","16psk"),new $("32PSK","32psk")],this.dvbtModSysTable=[new $("DVB-T","DVB-T"),new $("DVB-T2","DVB-T2")],this.dvbcModSysTable=[new $("DVB-C/A","DVB-C/A"),new $("DVB-C/B","DVB-C/B"),new $("DVB-C/C","DVB-C/C")],this.dvbsModSysTable=[new $("DVB-S","DVB-S"),new $("DVB-S2","DVB-S2")],this.polarityTable=[new $("settings.channelscan.polarity.horizontal","h"),new $("settings.channelscan.polarity.vertical","v"),new $("settings.channelscan.polarity.right","r"),new $("settings.channelscan.polarity.left","l")],this.fecTable=[new $("settings.channelscan.auto","auto"),new $("settings.channelscan.none","none"),new $("1/2","1/2"),new $("2/3","2/3"),new $("3/4","3/4"),new $("4/5","4/5"),new $("5/6","5/6"),new $("6/2","6/2"),new $("7/8","7/8"),new $("8/9","8/9"),new $("3/5","3/5"),new $("9/10","9/10")],this.transmissionModeTable=[new $("settings.channelscan.auto","a"),new $("2K","2"),new $("8K","8")],this.guardIntervalTable=[new $("settings.channelscan.auto","auto"),new $("1/4","1/4"),new $("1/8","1/8"),new $("1/16","1/16"),new $("1/32","1/32")],this.hierarchyTable=[new $("settings.channelscan.auto","a"),new $("settings.channelscan.none","n"),new $("1","1"),new $("2","2"),new $("4","4")],this.dvbcSymbolRateTable=[new $("3450000","3450000"),new $("5000000","5000000"),new $("5900000","5900000"),new $("6875000","6875000"),new $("6900000","6900000"),new $("6950000","6950000")],this.dvbsSymbolRateTable=[new $("3333000","3333000"),new $("22000000","22000000"),new $("22500000","22500000"),new $("23000000","23000000"),new $("27500000","27500000"),new $("28000000","28000000"),new $("28500000","28500000"),new $("29500000","29500000"),new $("29700000","29700000"),new $("29900000","29900000")],this.rollOffTable=[new $("0.35","0.35"),new $("0.20","0.20"),new $("0.25","0.25"),new $("Auto","auto")],this.lockDesc="settings.channelscan.lock_value",this.nolockDesc="settings.channelscan.nolock_value",this.procDesc="processed",this.unprocDesc="unprocessed",this.satTuning=this.satTuningTable[0],this.scanRequest={CardId:0,DesiredServices:"tv",FreeToAirOnly:!0,ChannelNumbersOnly:!1,CompleteChannelsOnly:!0,FullChannelSearch:!0,RemoveDuplicates:!0,AddFullTS:!1,TestDecryptable:!1,ScanType:"",FreqTable:"",Modulation:"",FirstChan:"",LastChan:"",ScanId:0,IgnoreSignalTimeout:!1,FollowNITSetting:!1,MplexId:0,Frequency:0,Bandwidth:"",Polarity:"",SymbolRate:"",Inversion:"",Constellation:"",ModSys:"",CodeRateLP:"",CodeRateHP:"",FEC:"",TransmissionMode:"",GuardInterval:"",Hierarchy:"",RollOff:""},this.emptyScanStatus={CardId:0,Status:"",SignalLock:!1,Progress:0,SignalNoise:0,SignalStrength:0,StatusLog:"",StatusText:"",StatusTitle:"",DialogMsg:"",DialogInputReq:!1,DialogButtons:[]},this.dialogResponse={CardId:0,DialogString:"",DialogButton:0},this.buttonText="",this.scanStatus=Object.assign({},this.emptyScanStatus),this.channels=[],this.channelCount=1,this.refreshCount=0,this.helpText="",this.scans=[],this.multiplex=[],this.tableTranslate(this.serviceValues),this.tableTranslate(this.freqTableSelect),this.tableTranslate(this.countryTable),this.tableTranslate(this.networkTable),this.tableTranslate(this.atscModulationTable),this.tableTranslate(this.bandwidthTable),this.tableTranslate(this.inversionTable),this.tableTranslate(this.modulationTable),this.tableTranslate(this.fecTable),this.tableTranslate(this.transmissionModeTable),this.tableTranslate(this.guardIntervalTable),this.tableTranslate(this.hierarchyTable),this.tableTranslate(this.polarityTable),e.get(this.lockDesc).subscribe(o=>this.lockDesc=o),e.get(this.nolockDesc).subscribe(o=>this.nolockDesc=o)}tableTranslate(e){e.forEach(n=>{n.label.startsWith("settings.")&&this.translate.get(n.label).subscribe(s=>n.label=s)})}ngAfterViewInit(){this.refreshStatus(!1),this.getScanList(),this.getmultiplexList(),this.iconnection.scanComponent=this}ngOnInit(){this.iconnection.deviceFree.subscribe(e=>{this.captureCardService.GetCardSubType(this.card.CardId).subscribe(n=>{this.cardSubType=n.CardSubType,this.buildScanTypeList(),this.onFreqTableChange(!1),"DVBT2"==this.cardSubType.InputType&&(this.scanRequest.ModSys="DVB-T2"),"DVBS2"==this.cardSubType.InputType&&(this.scanRequest.ModSys="DVB-S2"),"DVBC"==this.cardSubType.InputType&&(this.scanRequest.SymbolRate="6900000"),["DVBS","DVBS2"].includes(this.cardSubType.InputType)&&(this.scanRequest.SymbolRate="27500000")})}),this.iconnection.captureDeviceList.CaptureDeviceList.CaptureDevices.length>0&&!this.cardSubType&&this.iconnection.deviceFree.next(!0)}buildScanTypeList(){let e=!1;switch(this.helpText="",this.scanSubType=this.cardSubType.InputType,this.cardSubType.InputType){case"V4L":case"MPEG":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"});break;case"DVBT":case"DVBT2":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),this.helpText="settings.channelscan.scantype_dvbt_desc",e=!0;break;case"DVBC":this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"DVBS":case"DVBS2":this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"ATSC":this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),e=!0;break;case"HDHOMERUN":this.cardSubType.HDHRdoesDVBC?(this.scanSubType="DVBC",this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"})):this.cardSubType.HDHRdoesDVB?(this.scanSubType="DVBT",this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"}),this.scanTypes.push({label:"settings.channelscan.type.fulltuned",value:"FULLTUNED"}),this.helpText="settings.channelscan.scantype_dvbt_desc"):(this.scanSubType="ATSC",this.scanTypes.push({label:"settings.channelscan.type.full",value:"FULL"})),this.scanTypes.push({label:"settings.channelscan.type.import",value:"IMPORT"}),this.scanTypes.push({label:"settings.channelscan.type.hdhrimport",value:"HDHRIMPORT"}),e=!0;break;case"VBOX":this.scanTypes.push({label:"settings.channelscan.type.vboximport",value:"VBOXIMPORT"});break;case"FREEBOX":this.scanTypes.push({label:"settings.channelscan.type.m3umpts",value:"MPTSIMPORT"}),this.scanTypes.push({label:"settings.channelscan.type.m3u",value:"M3UIMPORT"});break;case"ASI":this.scanTypes.push({label:"settings.channelscan.type.asi",value:"ASI"});break;case"EXTERNAL":this.scanTypes.push({label:"settings.channelscan.type.mpts",value:"MPTS"}),this.scanTypes.push({label:"settings.channelscan.type.externimport",value:"EXTIMPORT"});break;case"ERROR_PROBE":this.scanTypes.push({label:"settings.channelscan.type.errorprobe",value:"ERROR"});break;default:this.scanTypes.push({label:"settings.channelscan.type.erroropen",value:"ERROR"})}e&&(this.scanTypes.push({label:"settings.channelscan.type.alltransport",value:"ALLTRANSPORT"}),this.scanTypes.push({label:"settings.channelscan.type.onetransport",value:"ONETRANSPORT"})),this.scanTypes.forEach(n=>this.translate.get(n.label).subscribe(s=>n.label=s)),this.helpText&&this.translate.get(this.helpText).subscribe(n=>this.helpText=n)}onScanTypeChange(){this.scanRequest.Frequency="FULLTUNED"==this.scanRequest.ScanType?this.videoSourceLookup[this.card.SourceId].ScanFrequency:0,setTimeout(()=>this.onFreqTableChange(!1),100)}onFreqTableChange(e){this.channels=[];let n="";if(this.scanRequest.FreqTable.startsWith("us")){if(e||("us"==this.scanRequest.FreqTable?this.scanRequest.Modulation="vsb8":"vsb8"==this.scanRequest.Modulation&&(this.scanRequest.Modulation="qam256")),"vsb8"==this.scanRequest.Modulation?n="ATSC Channel ":"qam256"==this.scanRequest.Modulation?n="QAM-256 Channel ":"qam128"==this.scanRequest.Modulation?n="QAM-128 Channel ":"qam64"==this.scanRequest.Modulation&&(n="QAM-64 Channel "),"us"==this.scanRequest.FreqTable){if("vsb8"==this.scanRequest.Modulation)for(let s=2;s<=36;s++)this.channels.push(n+s)}else if(this.scanRequest.FreqTable.match(/us.*high/))for(let s=78;s<=158;s++)this.channels.push(n+s);else if(this.scanRequest.FreqTable.match(/^us/)){this.channels.push(n+"T-13"),this.channels.push(n+"T-14");for(let s=2;s<=158;s++)this.channels.push(n+s)}this.channels.length>0?setTimeout(()=>{this.scanRequest.FirstChan=this.channels[0],this.scanRequest.LastChan=this.channels[this.channels.length-1]},100):(this.scanRequest.FirstChan="",this.scanRequest.LastChan="")}}onSatTuningChange(){Object.assign(this.scanRequest,this.satTuning)}calcCount(){return this.channelCount=this.channels.findIndex(e=>e==this.scanRequest.LastChan)-this.channels.findIndex(e=>e==this.scanRequest.FirstChan)+1}getScanList(){this.channelService.GetScanList(this.card.SourceId).subscribe(e=>{this.scans=e.ScanList.Scans,this.scans.forEach(n=>{var s=new Date(n.ScanDate);n.label=s.toLocaleDateString()+" "+s.toLocaleTimeString()+" "+(n.Processed?this.procDesc:this.unprocDesc)})})}getmultiplexList(){this.channelService.GetVideoMultiplexList({SourceID:this.card.SourceId}).subscribe(e=>{this.multiplex=e.VideoMultiplexList.VideoMultiplexes})}startScan(){if(this.iconnection.currentForm&&this.iconnection.currentForm.form.dirty)return this.iconnection.work.startScan=!0,void this.iconnection.saveForm();this.scanRequest.CardId=this.card.CardId,this.channelService.StartScan(this.scanRequest).subscribe(e=>{setTimeout(()=>this.refreshStatus(!0),500)})}stopScan(){this.channelService.StopScan(this.card.CardId).subscribe()}respondDialog(){this.dialogResponse.CardId=this.card.CardId,this.dialogResponse.DialogButton=this.scanStatus.DialogButtons.indexOf(this.buttonText),this.channelService.SendScanDialogResponse(this.dialogResponse).subscribe(e=>this.iconnection.loadChannels())}refreshStatus(e){this.channelService.GetScanStatus().subscribe(n=>{this.scanStatus=n.ScanStatus,this.scrollpanel.scrollTop(1e5),"RUNNING"==this.scanStatus.Status?this.refreshCount=5:this.refreshCount--,this.refreshCount>0?setTimeout(()=>this.refreshStatus(!0),500):e&&this.iconnection.loadChannels()})}}return t.\u0275fac=function(e){return new(e||t)(x(Le),x(Or),x(Gt),x(De))},t.\u0275cmp=G({type:t,selectors:[["app-channelscan"]],viewQuery:function(e,n){if(1&e&&(j(pse,5),j(hse,5)),2&e){let s;V(s=B())&&(n.scrollpanel=s.first),V(s=B())&&(n.statusPanel=s.first)}},inputs:{card:"card",cardList:"cardList",iconnection:"iconnection",videoSourceLookup:"videoSourceLookup"},decls:131,vars:137,consts:[[1,"form-group","field"],["for","DesiredServices",1,"label","block"],["optionLabel","label","optionValue","value","name","DesiredServices",3,"options","ngModel","editable","maxlength","ngModelChange"],["DesiredServices","ngModel"],[1,"block"],["inputId","FreeToAirOnly","name","FreeToAirOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FreeToAirOnly","ngModel"],["inputId","ChannelNumbersOnly","name","ChannelNumbersOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["ChannelNumbersOnly","ngModel"],["inputId","CompleteChannelsOnly","name","CompleteChannelsOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["CompleteChannelsOnly","ngModel"],["inputId","FullChannelSearch","name","FullChannelSearch",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FullChannelSearch","ngModel"],["inputId","RemoveDuplicates","name","RemoveDuplicates",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["RemoveDuplicates","ngModel"],["inputId","AddFullTS","name","AddFullTS",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AddFullTS","ngModel"],["inputId","TestDecryptable","name","TestDecryptable",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["TestDecryptable","ngModel"],["for","ScanType",1,"label","block"],["optionLabel","label","optionValue","value","name","ScanType",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["ScanType","ngModel"],["class","mb-4 w-full",3,"legend","toggleable","collapsed",4,"ngIf"],[1,"grid"],[2,"display","flex","align-items","center"],["icon","pi pi-play","iconPos","left",3,"label","disabled","onClick"],["class","block",4,"ngIf"],[1,"mb-4","w-full",3,"legend","collapsed","toggleable"],[1,"col-6"],[1,"col-10","bg-blue-100","text-gray-900"],[1,"label","block"],[1,"col-10"],[3,"value"],["class","form-group field",4,"ngIf"],["icon","pi pi-times-circle","iconPos","left","styleClass","p-button-danger",3,"label","disabled","onClick"],[1,"col-6",2,"white-space","pre-line"],["scroll",""],[1,"mb-4","w-full",3,"legend","toggleable","collapsed"],["for","FreqTable",1,"label","block"],["optionLabel","label","optionValue","value","name","FreqTable",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["FreqTable","ngModel"],["for","Country",1,"label","block"],["optionLabel","label","optionValue","value","name","Country",3,"options","ngModel","editable","maxlength","ngModelChange"],["Country","ngModel"],["for","atscModulation",1,"label","block"],["optionLabel","label","optionValue","value","name","atscModulation",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["atscModulation","ngModel"],["for","FirstChan",1,"label","block"],["name","FirstChan",3,"options","ngModel","editable","maxlength","ngModelChange"],["FirstChan","ngModel"],[4,"ngIf"],[1,"p-error","block"],["for","LastChan",1,"label","block"],["name","LastChan",3,"options","ngModel","editable","maxlength","ngModelChange"],["LastChan","ngModel"],["for","Frequency",1,"label","block"],["name","Frequency","id","Frequency",3,"ngModel","min","max","ngModelChange"],[3,"translate","translateParams"],["for","Inversion",1,"label","block"],["name","Inversion","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Inversion","ngModel"],["for","SatTuning",1,"label","block"],["name","SatTuning","optionLabel","label",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["SatTuning","ngModel"],["for","Bandwidth",1,"label","block"],["name","Bandwidth","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Bandwidth","ngModel"],["for","Polarity",1,"label","block"],["name","Polarity","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Polarity","ngModel"],["for","dvbcSymbolRate",1,"label","block"],["name","dvbcSymbolRate","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["dvbcSymbolRate","ngModel"],["for","dvbsSymbolRate",1,"label","block"],["name","dvbsSymbolRate","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["dvbsSymbolRate","ngModel"],["for","Constellation",1,"label","block"],["name","Constellation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Constellation","ngModel"],["for","Modulation",1,"label","block"],["name","Modulation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Modulation","ngModel"],["for","DVBSModulation",1,"label","block"],["name","DVBSModulation","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBSModulation","ngModel"],["for","DVBTModSys",1,"label","block"],["name","DVBTModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBTModSys","ngModel"],["for","DVBCModSys",1,"label","block"],["name","DVBCModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBCModSys","ngModel"],["for","DVBSModSys",1,"label","block"],["name","DVBSModSys","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["DVBSModSys","ngModel"],["for","CodeRateLP",1,"label","block"],["name","CodeRateLP","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["CodeRateLP","ngModel"],["for","CodeRateHP",1,"label","block"],["name","CodeRateHP","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["CodeRateHP","ngModel"],["for","FEC",1,"label","block"],["name","FEC","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["FEC","ngModel"],["for","TransmissionMode",1,"label","block"],["name","TransmissionMode","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["TransmissionMode","ngModel"],["for","GuardInterval",1,"label","block"],["name","GuardInterval","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["GuardInterval","ngModel"],["for","Hierarchy",1,"label","block"],["name","Hierarchy","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["Hierarchy","ngModel"],["for","RollOff",1,"label","block"],["name","RollOff","optionLabel","label","optionValue","value",3,"options","ngModel","editable","maxlength","ngModelChange"],["RollOff","ngModel"],["for","ScanId",1,"label","block"],["optionLabel","label","optionValue","ScanId","name","ScanId",3,"options","ngModel","editable","maxlength","ngModelChange"],["ScanId","ngModel"],["inputId","IgnoreSignalTimeout","name","IgnoreSignalTimeout",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["IgnoreSignalTimeout","ngModel"],["inputId","FollowNITSetting","name","FollowNITSetting",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["FollowNITSetting","ngModel"],["for","MplexId",1,"label","block"],["optionLabel","Description","optionValue","MplexId","name","MplexId",3,"options","ngModel","editable","maxlength","ngModelChange"],["MplexId","ngModel"],[1,"col-10",2,"color","black","background-color","pink"],["pInputText","","id","DialogString","name","DialogString",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["InputName","ngModel"],["for","DialogButtons",1,"label","block"],["name","DialogButtons",3,"options","ngModel","editable","maxlength","ngModelChange"],["styleClass","p-button-info",1,"gap-3",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"label",1),g(2),m(3,"translate"),c(),l(4,"p-dropdown",2,3),C("ngModelChange",function(r){return n.scanRequest.DesiredServices=r}),c(),l(6,"small",4),g(7),m(8,"translate"),c()(),l(9,"div",0)(10,"p-checkbox",5,6),C("ngModelChange",function(r){return n.scanRequest.FreeToAirOnly=r}),m(12,"translate"),c(),l(13,"small",4),g(14),m(15,"translate"),c()(),l(16,"div",0)(17,"p-checkbox",7,8),C("ngModelChange",function(r){return n.scanRequest.ChannelNumbersOnly=r}),m(19,"translate"),c(),l(20,"small",4),g(21),m(22,"translate"),c()(),l(23,"div",0)(24,"p-checkbox",9,10),C("ngModelChange",function(r){return n.scanRequest.CompleteChannelsOnly=r}),m(26,"translate"),c(),l(27,"small",4),g(28),m(29,"translate"),c()(),l(30,"div",0)(31,"p-checkbox",11,12),C("ngModelChange",function(r){return n.scanRequest.FullChannelSearch=r}),m(33,"translate"),c(),l(34,"small",4),g(35),m(36,"translate"),c()(),l(37,"div",0)(38,"p-checkbox",13,14),C("ngModelChange",function(r){return n.scanRequest.RemoveDuplicates=r}),m(40,"translate"),c(),l(41,"small",4),g(42),m(43,"translate"),c()(),l(44,"div",0)(45,"p-checkbox",15,16),C("ngModelChange",function(r){return n.scanRequest.AddFullTS=r}),m(47,"translate"),c(),l(48,"small",4),g(49),m(50,"translate"),c()(),l(51,"div",0)(52,"p-checkbox",17,18),C("ngModelChange",function(r){return n.scanRequest.TestDecryptable=r}),m(54,"translate"),c(),l(55,"small",4),g(56),m(57,"translate"),c()(),l(58,"div",0)(59,"label",19),g(60),m(61,"translate"),c(),l(62,"p-dropdown",20,21),C("ngModelChange",function(r){return n.scanRequest.ScanType=r})("onChange",function(){return n.onScanTypeChange()}),c(),l(64,"small",4),g(65),c()(),_(66,Tse,9,13,"p-fieldset",22),_(67,zse,36,57,"p-fieldset",22),_(68,jse,9,15,"p-fieldset",22),_(69,Wse,17,22,"p-fieldset",22),k(70,"br")(71,"br"),l(72,"div",0)(73,"div",23)(74,"div",24)(75,"p-button",25),C("onClick",function(){return n.startScan()}),m(76,"translate"),c()()(),_(77,Kse,3,3,"small",26),c(),l(78,"p-fieldset",27),m(79,"translate"),l(80,"div",23)(81,"div",28)(82,"div",0)(83,"div",29)(84,"b"),g(85),c()()(),l(86,"div",0)(87,"label",30),g(88),m(89,"translate"),c(),l(90,"div",29),g(91),c()(),l(92,"div",0)(93,"label",30),g(94),m(95,"translate"),c(),l(96,"div",29),g(97),c()(),l(98,"div",0)(99,"label",30),g(100),m(101,"translate"),c(),l(102,"div",31),k(103,"p-progressBar",32),c()(),l(104,"div",0)(105,"label",30),g(106),m(107,"translate"),c(),l(108,"div",31),k(109,"p-progressBar",32),c()(),l(110,"div",0)(111,"label",30),g(112),m(113,"translate"),c(),l(114,"div",31),k(115,"p-progressBar",32),c()(),k(116,"br"),_(117,Qse,6,1,"div",33),_(118,Jse,3,1,"div",33),_(119,Yse,6,10,"div",33),_(120,Zse,3,3,"div",33),k(121,"br"),l(122,"div",0)(123,"div",24)(124,"p-button",34),C("onClick",function(){return n.stopScan()}),m(125,"translate"),c()(),k(126,"small",4),c()(),l(127,"div",35)(128,"p-scrollPanel",null,36),g(130),c()()()()),2&e&&(a(2),S(f(3,81,"settings.channelscan.services_label")),a(2),q(A(131,pt)),p("options",n.serviceValues)("ngModel",n.scanRequest.DesiredServices)("editable",!1)("maxlength",0),a(3),T(" ",f(8,83,"settings.channelscan.services_desc")," "),a(3),D("label",f(12,85,"settings.channelscan.ftaonly_label")),p("ngModel",n.scanRequest.FreeToAirOnly)("binary",!0),a(4),T(" ",f(15,87,"settings.channelscan.ftaonly_desc")," "),a(3),D("label",f(19,89,"settings.channelscan.channelnumbersonly_label")),p("ngModel",n.scanRequest.ChannelNumbersOnly)("binary",!0),a(4),T(" ",f(22,91,"settings.channelscan.channelnumbersonly_desc")," "),a(3),D("label",f(26,93,"settings.channelscan.completeonly_label")),p("ngModel",n.scanRequest.CompleteChannelsOnly)("binary",!0),a(4),T(" ",f(29,95,"settings.channelscan.completeonly_desc")," "),a(3),D("label",f(33,97,"settings.channelscan.fullsearch_label")),p("ngModel",n.scanRequest.FullChannelSearch)("binary",!0),a(4),T(" ",f(36,99,"settings.channelscan.fullsearch_desc")," "),a(3),D("label",f(40,101,"settings.channelscan.removeduplicates_label")),p("ngModel",n.scanRequest.RemoveDuplicates)("binary",!0),a(4),T(" ",f(43,103,"settings.channelscan.removeduplicates_desc")," "),a(3),D("label",f(47,105,"settings.channelscan.addfullts_label")),p("ngModel",n.scanRequest.AddFullTS)("binary",!0),a(4),T(" ",f(50,107,"settings.channelscan.addfullts_desc")," "),a(3),D("label",f(54,109,"settings.channelscan.testdecryptable_label")),p("ngModel",n.scanRequest.TestDecryptable)("binary",!0),a(4),T(" ",f(57,111,"settings.channelscan.testdecryptable_desc")," "),a(4),S(f(61,113,"settings.channelscan.scantype_label")),a(2),q(A(132,pt)),p("options",n.scanTypes)("ngModel",n.scanRequest.ScanType)("editable",!1)("maxlength",0),a(3),T(" ",n.helpText," "),a(1),p("ngIf","FULL"==n.scanRequest.ScanType),a(1),p("ngIf","FULLTUNED"==n.scanRequest.ScanType),a(1),p("ngIf","IMPORT"==n.scanRequest.ScanType),a(1),p("ngIf","ALLTRANSPORT"==n.scanRequest.ScanType||"ONETRANSPORT"==n.scanRequest.ScanType),a(6),D("label",f(76,115,"settings.channelscan.scan_label")),p("disabled",n.setupService.schedulingEnabled||"RUNNING"==n.scanStatus.Status||!n.card.SourceId),a(2),p("ngIf",n.iconnection.currentForm&&n.iconnection.currentForm.form.dirty||!n.card.SourceId),a(1),D("legend",f(79,117,"settings.channelscan.status_title")),p("collapsed",!0)("toggleable",!1)("collapsed",!1),a(7),T("",n.scanStatus.StatusTitle," \xa0"),a(3),S(f(89,119,"settings.channelscan.status_label")),a(3),T(" ",n.scanStatus.StatusText," \xa0 "),a(3),S(f(95,121,"settings.channelscan.lock_label")),a(3),T(" ",n.scanStatus.SignalLock?n.lockDesc:n.nolockDesc," \xa0 "),a(3),S(f(101,123,"settings.channelscan.progress_label")),a(3),q(A(133,Sg)),p("value",n.scanStatus.Progress),a(3),S(f(107,125,"settings.channelscan.noise_label")),a(3),q(A(134,Sg)),p("value",n.scanStatus.SignalNoise),a(3),S(f(113,127,"settings.channelscan.strength_label")),a(3),q(A(135,Sg)),p("value",n.scanStatus.SignalStrength),a(2),p("ngIf",n.scanStatus.DialogMsg),a(1),p("ngIf",n.scanStatus.DialogInputReq),a(1),p("ngIf",n.scanStatus.DialogButtons.length>0),a(1),p("ngIf",n.scanStatus.DialogButtons.length>0||n.scanStatus.DialogInputReq),a(4),D("label",f(125,129,"settings.channelscan.stop_label")),p("disabled","RUNNING"!=n.scanStatus.Status||n.scanStatus.DialogButtons.length>0),a(4),q(A(136,Xse)),a(2),T(" ",n.scanStatus.StatusLog," "))},directives:[Vt,Te,_e,fn,rn,Q,Ui,dt,hu,ve,XG,Ye,az],pipes:[de],styles:[""]}),t})(),tre=(()=>{class t{constructor(e){this.httpClient=e}GetBackendStatus(){return this.httpClient.get("/Status/GetBackendStatus")}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var ci=(()=>(function(t){t[t.kState_Error=-1]="kState_Error",t[t.kState_None=0]="kState_None",t[t.kState_WatchingLiveTV=1]="kState_WatchingLiveTV",t[t.kState_WatchingPreRecorded=2]="kState_WatchingPreRecorded",t[t.kState_WatchingVideo=3]="kState_WatchingVideo",t[t.kState_WatchingDVD=4]="kState_WatchingDVD",t[t.kState_WatchingBD=5]="kState_WatchingBD",t[t.kState_WatchingRecording=6]="kState_WatchingRecording",t[t.kState_RecordingOnly=7]="kState_RecordingOnly",t[t.kState_ChangingState=8]="kState_ChangingState"}(ci||(ci={})),ci))();let as=(()=>{class t{constructor(e){this.translate=e,this.allSlashes=new RegExp(/\//g),this.deSpacer=new RegExp(/ /g),this.recTypeTrans={"Single Record":"","Record All":"","Record One":"","Record Daily":"","Record Weekly":"","Override Recording":"","Do not Record":"","Recording Template":"","Not Recording":""};for(const[n,s]of Object.entries(this.recTypeTrans)){const r="recrule."+n.replace(this.deSpacer,"");this.translate.get(r).subscribe(o=>{Object.defineProperty(this.recTypeTrans,n,{value:o})})}}formatDate(e,n){if(!e)return"";10==e.length&&(e+=" 00:00");let s=new Date(e).toLocaleDateString();return n?s.replace(this.allSlashes,"/"):s}formatTime(e){return e?(new Date(e).toLocaleTimeString()+" ").replace(/:.. /,""):""}formatDateTime(e,n){return this.formatDate(e,n)+" "+this.formatTime(e)}}return t.\u0275fac=function(e){return new(e||t)(K(Le))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const nre=function(t){return{EndTime:t}};function ire(t,i){if(1&t&&(ce(0),g(1),m(2,"translate"),ue()),2&t){const e=d().$implicit,n=d(2);a(1),yo(" '",e.Recording.Title,"' on ",e.Recording.Channel.CallSign,". ",Dt(2,3,"dashboard.status.endtime_text",z(6,nre,n.utility.formatTime(e.Recording.EndTime)))," ")}}const sre=function(t,i,e,n){return{CardId:t,Id:i,InputName:e,DisplayName:n}};function rre(t,i){if(1&t&&(l(0,"div")(1,"ul")(2,"li"),g(3),m(4,"translate"),c()()()),2&t){const e=i.$implicit;a(3),T("",Dt(4,1,"dashboard.status.card_text",_i(4,sre,e.CardId,e.Id,e.InputName,e.DisplayName))," ")}}const ore=function(t,i,e){return{Id:t,HostName:i,State:e}};function are(t,i){if(1&t&&(l(0,"div")(1,"ul")(2,"li"),g(3),m(4,"translate"),_(5,ire,3,8,"ng-container",4),c(),_(6,rre,5,9,"div",3),c()()),2&t){const e=i.$implicit,n=d(2);a(3),T(" ",Dt(4,3,"dashboard.status.encoder_text",Rt(6,ore,e.Id,e.HostName,n.EncoderStatusText(e.State)))," "),a(2),p("ngIf",7==e.State),a(1),p("ngForOf",e.Inputs)}}function lre(t,i){if(1&t&&(l(0,"div"),_(1,are,7,10,"div",3),c()),2&t){const e=d();a(1),p("ngForOf",e.encoders)}}function cre(t,i){1&t&&(l(0,"div"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.no_encoders")))}let ure=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}EncoderStatusText(e){switch(e){case ci.kState_Error:return"Error";case ci.kState_None:return"Idle";case ci.kState_WatchingLiveTV:return"Watching Live TV";case ci.kState_WatchingPreRecorded:return"Watching Pre Recorded";case ci.kState_WatchingVideo:return"Watching Video";case ci.kState_WatchingDVD:return"Watching DVD";case ci.kState_WatchingBD:return"Watching BD";case ci.kState_WatchingRecording:return"Watching Recording";case ci.kState_RecordingOnly:return"Recording";case ci.kState_ChangingState:return"Changing State";default:return"unknown"}}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-encoders"]],inputs:{encoders:"encoders"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noEncoders",""],[4,"ngFor","ngForOf"],[4,"ngIf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,lre,2,1,"div",1),c(),_(5,cre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.encoder_title")),a(2),p("ngIf",0!=(null==n.encoders?null:n.encoders.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function dre(t,i){if(1&t&&(l(0,"li",4)(1,"div",5),g(2),c()()),2&t){const e=i.$implicit,n=d(2);a(1),D("pTooltip",e.Description),a(1),Ih(" ",n.utility.formatDate(e.StartTime)," ",n.utility.formatTime(e.StartTime)," - ",e.Recording.EncoderId," - ",e.Channel.CallSign," - ",e.Title," ")}}const pre=function(t){return{length:t}};function hre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul"),_(5,dre,3,6,"li",3),c()()),2&t){const e=d();a(2),S(Dt(3,2,"dashboard.status.schedule_text",z(5,pre,null==e.scheduled?null:e.scheduled.length))),a(3),p("ngForOf",e.scheduled)}}function mre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.schedule_none")))}let fre=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-scheduled"]],inputs:{scheduled:"scheduled"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noSchedule",""],["class","flex",4,"ngFor","ngForOf"],[1,"flex"],["tooltipPosition","bottom",3,"pTooltip"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,hre,6,7,"div",1),c(),_(5,mre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.schedule_title")),a(2),p("ngIf",0!=(null==n.scheduled?null:n.scheduled.length))("ngIfElse",s)}},directives:[Q,at,Jt],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function gre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit,n=d(2);a(2),Eh("",n.utility.formatDate(e.StatusTime)," ",n.utility.formatTime(e.StatusTime)," - ",e.Program.Title," - ",e.LocalizedJobName," - ",f(3,6,"dashboard.status.jobs_status"),": ",e.LocalizedStatus," ")}}function _re(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul"),_(5,gre,4,8,"div",3),c()()),2&t){const e=d();a(2),T("",f(3,2,"dashboard.status.jobs_text"),":"),a(3),p("ngForOf",e.jobqueue)}}function bre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.jobs_none")))}let vre=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-jobqueue"]],inputs:{jobqueue:"jobqueue"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noJobs",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,_re,6,4,"div",1),c(),_(5,bre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.jobs_title")),a(2),p("ngIf",0!=(null==n.jobqueue?null:n.jobqueue.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function Cre(t,i){if(1&t&&(l(0,"div")(1,"p"),g(2),m(3,"translate"),c(),l(4,"ul")(5,"li"),g(6),m(7,"translate"),c(),l(8,"ul")(9,"li"),g(10),m(11,"translate"),c(),l(12,"li"),g(13),m(14,"translate"),c(),l(15,"li"),g(16),m(17,"translate"),c(),l(18,"li"),g(19),m(20,"translate"),c(),l(21,"ul")(22,"li"),g(23),m(24,"translate"),c(),l(25,"li"),g(26),m(27,"translate"),c(),l(28,"li"),g(29),m(30,"translate"),c()()()()()),2&t){const e=i.ngIf;a(2),T("",f(3,16,"dashboard.status.mach.disk_summ"),":"),a(4),T("",f(7,18,"dashboard.status.mach.disk_total"),":"),a(4),$e("",f(11,20,"dashboard.status.mach.total_space"),": ",e.Total.toLocaleString()," MiB"),a(3),$e("",f(14,22,"dashboard.status.mach.space_used"),": ",e.Used.toLocaleString()," MiB"),a(3),$e("",f(17,24,"dashboard.status.mach.space_free"),": ",e.Free.toLocaleString()," MiB"),a(3),$e("",f(20,26,"dashboard.status.mach.space_after_expire"),": ",(e.Free+e.Expirable).toLocaleString(),""),a(4),$e("",f(24,28,"dashboard.status.mach.space_livetv"),": ",e.LiveTV.toLocaleString()," MiB"),a(3),$e("",f(27,30,"dashboard.status.mach.space_deleted"),": ",e.Deleted.toLocaleString()," MiB"),a(3),$e("",f(30,32,"dashboard.status.mach.space_expirable"),": ",e.Expirable.toLocaleString()," MiB")}}function yre(t,i){1&t&&Y(0)}function wre(t,i){if(1&t&&(l(0,"div"),_(1,yre,1,0,"ng-container",6),c()),2&t){const e=i.$implicit;d(2);const n=F(10);a(1),p("ngTemplateOutlet",n)("ngTemplateOutletContext",e)}}const Tre=function(t,i,e){return{GuideStart:t,GuideEnd:i,GuideStatus:e}},Sre=function(t){return{GuideNext:t}},xre=function(t,i){return{GuideThru:t,GuideDays:i}};function Dre(t,i){if(1&t&&(l(0,"div")(1,"div")(2,"p"),g(3),m(4,"translate"),c(),l(5,"ul")(6,"li"),g(7),m(8,"translate"),c(),l(9,"li"),g(10),m(11,"translate"),c(),l(12,"li"),g(13),m(14,"translate"),c()()(),_(15,Cre,31,34,"div",1),l(16,"div")(17,"p"),g(18),m(19,"translate"),c(),_(20,wre,2,2,"div",5),c(),l(21,"div")(22,"p"),g(23),m(24,"translate"),k(25,"br"),g(26),m(27,"translate"),k(28,"br"),g(29),m(30,"translate"),c()()()),2&t){const e=d(),n=F(8);a(3),S(f(4,14,"dashboard.status.mach.load")),a(4),$e("1 ",f(8,16,"dashboard.status.mach.minute"),": ",e.machineinfo.LoadAvg1.toLocaleString(),""),a(3),$e("5 ",f(11,18,"dashboard.status.mach.minutes"),": ",e.machineinfo.LoadAvg2.toLocaleString(),""),a(3),$e("15 ",f(14,20,"dashboard.status.mach.minutes"),": ",e.machineinfo.LoadAvg3.toLocaleString(),""),a(2),p("ngIf",e.getStorageGroupTotal(e.machineinfo.StorageGroups))("ngIfElse",n),a(3),T("",f(19,22,"dashboard.status.mach.disk_details"),":"),a(2),p("ngForOf",e.getStorageGroupDetails(e.machineinfo.StorageGroups)),a(3),S(Dt(24,24,"dashboard.status.mach.mythfill_last",Rt(33,Tre,e.utility.formatDateTime(e.machineinfo.GuideStart),e.utility.formatDateTime(e.machineinfo.GuideEnd),e.machineinfo.GuideStatus))),a(3),T(" ",Dt(27,27,"dashboard.status.mach.mythfill_next",z(37,Sre,e.utility.formatDateTime(e.machineinfo.GuideNext))),""),a(3),T(" ",Dt(30,30,"dashboard.status.mach.mythfill_until",We(39,xre,e.utility.formatDateTime(e.machineinfo.GuideThru),e.machineinfo.GuideDays))," ")}}function Mre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.mach.none")))}function kre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.mach.disk_none")))}function Ire(t,i){if(1&t&&(l(0,"ul")(1,"li"),g(2),m(3,"translate"),c(),l(4,"ul")(5,"li"),g(6),m(7,"translate"),c(),l(8,"li"),g(9),m(10,"translate"),c(),l(11,"li"),g(12),m(13,"translate"),c(),l(14,"li"),g(15),m(16,"translate"),c()()()),2&t){const e=i.Id,n=i.Directory,s=i.Total,r=i.Used,o=i.Free;a(2),$e("",f(3,10,"dashboard.status.mach.myth_drive")," #",e,""),a(4),$e("",f(7,12,"dashboard.status.mach.disk_dirs"),": ",n,""),a(3),$e("",f(10,14,"dashboard.status.mach.total_space"),": ",s.toLocaleString()," MiB"),a(3),$e("",f(13,16,"dashboard.status.mach.space_used"),": ",r.toLocaleString()," MiB"),a(3),$e("",f(16,18,"dashboard.status.mach.space_free"),": ",o.toLocaleString()," MiB")}}let Ere=(()=>{class t{constructor(e){this.utility=e}ngOnInit(){}getStorageGroupTotal(e){return e.filter(n=>"total"==n.Id)[0]}getStorageGroupDetails(e){return e.filter(n=>"total"!=n.Id)}}return t.\u0275fac=function(e){return new(e||t)(x(as))},t.\u0275cmp=G({type:t,selectors:[["app-status-machineinfo"]],inputs:{machineinfo:"machineinfo"},decls:11,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noMachineInfo",""],["noDiskInfo",""],["printStorageGroup",""],[4,"ngFor","ngForOf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Dre,31,42,"div",1),c(),_(5,Mre,3,3,"ng-template",null,2,we),_(7,kre,3,3,"ng-template",null,3,we),_(9,Ire,17,20,"ng-template",null,4,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.mach.title")),a(2),p("ngIf",n.machineinfo)("ngIfElse",s)}},directives:[Q,at,Lt],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const Rre=function(t,i,e){return{Name:t,Type:i,IP:e}};function Lre(t,i){if(1&t&&(l(0,"div")(1,"li"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit;a(2),T("",Dt(3,1,"dashboard.status.backends_detail",Rt(4,Rre,e.Name,e.Type,e.IP))," ")}}function Ore(t,i){if(1&t&&(l(0,"div")(1,"ul"),_(2,Lre,4,8,"div",3),c()()),2&t){const e=d();a(2),p("ngForOf",e.backends)}}function Are(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.backends_none")))}let Pre=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-status-backends"]],inputs:{backends:"backends"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noBackends",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Ore,3,1,"div",1),c(),_(5,Are,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.backends_title")),a(2),p("ngIf",0!=(null==n.backends?null:n.backends.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const Fre=function(t,i,e,n){return{Name:t,IP:i,Port:e,OnLine:n}};function Nre(t,i){if(1&t&&(l(0,"div")(1,"li"),g(2),m(3,"translate"),c()()),2&t){const e=i.$implicit;a(2),T("",Dt(3,1,"dashboard.status.frontends_detail",_i(4,Fre,e.Name,e.IP,e.Port,e.OnLine))," ")}}function Vre(t,i){if(1&t&&(l(0,"div")(1,"ul"),_(2,Nre,4,9,"div",3),c()()),2&t){const e=d();a(2),p("ngForOf",e.frontends)}}function Bre(t,i){1&t&&(l(0,"p"),g(1),m(2,"translate"),c()),2&t&&(a(1),S(f(2,1,"dashboard.status.frontends_none")))}let Hre=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=G({type:t,selectors:[["app-status-frontends"]],inputs:{frontends:"frontends"},decls:7,vars:5,consts:[[1,"statusBox"],[4,"ngIf","ngIfElse"],["noFrontends",""],[4,"ngFor","ngForOf"]],template:function(e,n){if(1&e&&(l(0,"div",0)(1,"h2"),g(2),m(3,"translate"),c(),_(4,Vre,3,1,"div",1),c(),_(5,Bre,3,3,"ng-template",null,2,we)),2&e){const s=F(6);a(2),S(f(3,3,"dashboard.status.frontends_title")),a(2),p("ngIf",0!=(null==n.frontends?null:n.frontends.length))("ngIfElse",s)}},directives:[Q,at],pipes:[de],styles:["","div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();function qre(t,i){if(1&t&&(l(0,"div",9)(1,"h2"),g(2),m(3,"translate"),c(),l(4,"div"),g(5),c()()),2&t){const e=d().ngIf;a(2),S(f(3,2,"dashboard.status.misc_title")),a(3),T(" ",e.Miscellaneous," ")}}function Ure(t,i){if(1&t&&(l(0,"div"),k(1,"app-status-encoders",2)(2,"app-status-scheduled",3)(3,"app-status-jobqueue",4)(4,"app-status-machineinfo",5)(5,"app-status-backends",6)(6,"app-status-frontends",7),_(7,qre,6,4,"div",8),c()),2&t){const e=i.ngIf;a(1),p("encoders",e.Encoders),a(1),p("scheduled",e.Scheduled),a(1),p("jobqueue",e.JobQueue),a(1),p("machineinfo",e.MachineInfo),a(1),p("backends",e.Backends),a(1),p("frontends",e.Frontends),a(1),p("ngIf",e.Miscellaneous)}}function Gre(t,i){1&t&&(l(0,"div"),g(1,"Loading..."),c())}let zre=(()=>{class t{constructor(e){this.statusService=e}ngOnInit(){this.m_status$=this.statusService.GetBackendStatus()}}return t.\u0275fac=function(e){return new(e||t)(x(tre))},t.\u0275cmp=G({type:t,selectors:[["app-status"]],decls:7,vars:7,consts:[[4,"ngIf","ngIfElse"],["loading",""],[3,"encoders"],[3,"scheduled"],[3,"jobqueue"],[3,"machineinfo"],[3,"backends"],[3,"frontends"],["class","statusBox",4,"ngIf"],[1,"statusBox"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,Ure,8,7,"div",0),m(4,"async"),_(5,Gre,2,0,"ng-template",null,1,we)),2&e){const s=F(6);let r;a(1),T("",f(2,3,"dashboard.backendStatus")," "),a(2),p("ngIf",null==(r=f(4,5,n.m_status$))?null:r.BackendStatus)("ngIfElse",s)}},directives:[Q,ure,fre,vre,Ere,Pre,Hre],pipes:[de,xy],styles:["div.statusBox[_ngcontent-%COMP%]{width:auto;border-top:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:10px solid #000000;padding:10px;border-radius:8px 0 0 8px;margin:20px;color:#000;background-color:#fff}"]}),t})();const jre=["recsform"],$re=["menu"];function Wre(t,i){}function Kre(t,i){1&t&&g(0),2&t&&T(" ",i.$implicit," ")}function Qre(t,i){if(1&t){const e=I();l(0,"p-dropdown",57),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),_(2,Kre,1,1,"ng-template",58),c()}if(2&t){const e=i.$implicit,n=d(2);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.recGroups)("showClear",!0)}}function Jre(t,i){if(1&t){const e=I();l(0,"tr")(1,"th"),g(2),m(3,"translate"),m(4,"translate"),k(5,"p-columnFilter",36),g(6),m(7,"translate"),l(8,"p-columnFilter",37),_(9,Qre,3,6,"ng-template",38),c(),l(10,"button",39),C("click",function(){v(e);const s=d();return s.refreshing=!0,s.refresh()}),m(11,"translate"),c(),g(12),c()(),l(13,"tr")(14,"th",40),g(15),m(16,"translate"),k(17,"p-sortIcon",41),c(),k(18,"th",42),l(19,"th",43),g(20),m(21,"translate"),c(),l(22,"th",44),g(23),m(24,"translate"),c(),l(25,"th",45),g(26),m(27,"translate"),k(28,"p-sortIcon",46),c(),l(29,"th",47),g(30),m(31,"translate"),k(32,"p-sortIcon",48),c(),l(33,"th",49),g(34),m(35,"translate"),c(),l(36,"th",50),g(37),m(38,"translate"),k(39,"p-sortIcon",51),c(),l(40,"th",52),g(41),m(42,"translate"),c(),l(43,"th",53),g(44),m(45,"translate"),c(),l(46,"th",44)(47,"a",54),k(48,"i",55),c(),k(49,"button",56),c()()}if(2&t){const e=d();a(2),$e(" ",f(3,17,"dashboard.recordings.filter"),": \xa0\xa0 ",f(4,19,"dashboard.recordings.title"),": \xa0 "),a(3),p("matchModeOptions",e.matchModeTitle),a(1),T(" ",f(7,21,"dashboard.recordings.recgrp"),": \xa0 "),a(2),p("showMenu",!1),a(2),D("pTooltip",f(11,23,"common.refresh")),a(2),T(" \xa0\xa0\xa0",e.programs.length," Rows "),a(3),T(" ",f(16,25,"dashboard.recordings.title")," "),a(5),S(f(21,27,"dashboard.recordings.subtitle")),a(3),S(f(24,29,"dashboard.recordings.seas_ep")),a(3),T(" ",f(27,31,"dashboard.recordings.orig_airdate")," "),a(4),T(" ",f(31,33,"dashboard.recordings.airdate")," "),a(4),S(f(35,35,"dashboard.recordings.channel")),a(3),T(" ",f(38,37,"dashboard.recordings.recgrp")," "),a(4),T(" ",f(42,39,"dashboard.recordings.duration")," "),a(3),S(f(45,41,"dashboard.recordings.file_size")),a(5),p("disabled",!0)}}function Yre(t,i){1&t&&(k(0,"i",70),m(1,"translate")),2&t&&D("pTooltip",f(1,1,"dashboard.recordings.damaged"))}function Zre(t,i){1&t&&(k(0,"i",71),m(1,"translate")),2&t&&D("pTooltip",f(1,1,"dashboard.recordings.watched"))}function Xre(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}const eoe=function(t){return{"line-through":t}};function toe(t,i){if(1&t){const e=I();l(0,"tr",59)(1,"td",60),_(2,Yre,2,3,"i",61),g(3),c(),l(4,"td",42),_(5,Zre,2,3,"i",62),c(),l(6,"td",63),g(7),c(),l(8,"td",44),_(9,Xre,2,2,"div",64),c(),l(10,"td",53),k(11,"div",65),c(),l(12,"td",53),k(13,"div",65),c(),l(14,"td",49),g(15),c(),l(16,"td",66),g(17),c(),l(18,"td",52),g(19),m(20,"number"),c(),l(21,"td",53),g(22),m(23,"number"),c(),l(24,"td",44)(25,"a",67),m(26,"translate"),k(27,"i",68),c(),l(28,"button",69),C("click",function(s){const o=v(e).$implicit;return d().showMenu(o,s)}),c()()()}if(2&t){const e=i.$implicit,n=d();p("ngClass",z(24,eoe,"Deleted"==e.Recording.RecGroup)),a(2),p("ngIf",e.VideoPropNames.indexOf("DAMAGED")>-1),a(1),T(" ",e.Title," "),a(2),p("ngIf",e.ProgramFlagNames.indexOf("WATCHED")>-1),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle,""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",n.utility.formatDate(e.Airdate,!0),Ht),a(2),p("innerHTML",n.utility.formatDate(e.StartTime,!0),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(2),S(e.Recording.RecGroup),a(2),T("",Dt(20,16,n.getDuration(e),"1.0-0")," min"),a(3),T(" ",Dt(23,19,e.Recording.FileSize/1e6,"1.0-0")," MB"),a(3),D("href",n.URLencode("/Content/GetRecording?RecordedId="+e.Recording.RecordedId),Xt),D("pTooltip",f(26,22,"dashboard.recordings.download"))}}function noe(t,i){1&t&&(k(0,"p-message",77),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function ioe(t,i){1&t&&(k(0,"p-message",78),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function soe(t,i){if(1&t){const e=I();l(0,"div",72),_(1,noe,2,3,"p-message",73),_(2,ioe,2,3,"p-message",74),c(),l(3,"p-button",75),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",76),C("onClick",function(){return v(e),d().saveProgram()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(1);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.program.Title.trim())}}function roe(t,i){if(1&t){const e=I();l(0,"p-button",79),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",80),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const ooe=function(){return{height:"75vw",width:"50vw"}},aoe=function(){return{minWidth:"400px"}};let loe=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.messageService=n,this.translate=s,this.setupService=r,this.utility=o,this.programs=[],this.recGroups=[],this.program={Title:"",Recording:{}},this.displayMetadataDlg=!1,this.displayRunJobs=!1,this.displayUnsaved=!1,this.successCount=0,this.errorCount=0,this.refreshing=!1,this.msg={Success:"common.success",Failed:"common.failed",NetFail:"common.networkfail",CanUndo:"dashboard.recordings.canundel",AlreadyDel:"dashboard.recordings.alreadydel",NonReRec:"dashboard.recordings.nonrerec"},this.jobsoffset=3,this.jobs=[{id:"Transcode",label:"dashboard.recordings.job_Transcode",command:h=>this.runjob(h)},{id:"Commflag",label:"dashboard.recordings.job_Commflag",command:h=>this.runjob(h)},{id:"Metadata",label:"dashboard.recordings.job_Metadata",command:h=>this.runjob(h)},{id:"UserJob1",visible:!1,command:h=>this.runjob(h)},{id:"UserJob2",visible:!1,command:h=>this.runjob(h)},{id:"UserJob3",visible:!1,command:h=>this.runjob(h)},{id:"UserJob4",visible:!1,command:h=>this.runjob(h)}],this.mnu_delete={label:"dashboard.recordings.mnu_delete",command:h=>this.delete(h,!1)},this.mnu_delete_rerec={label:"dashboard.recordings.mnu_delete_rerec",command:h=>this.delete(h,!0)},this.mnu_undelete={label:"dashboard.recordings.mnu_undelete",command:h=>this.undelete(h)},this.mnu_rerec={label:"dashboard.recordings.mnu_rerec",command:h=>this.rerec(h)},this.mnu_markwatched={label:"dashboard.recordings.mnu_markwatched",command:h=>this.markwatched(h,!0)},this.mnu_markunwatched={label:"dashboard.recordings.mnu_markunwatched",command:h=>this.markwatched(h,!1)},this.mnu_markdamaged={label:"dashboard.recordings.mnu_markdamaged",command:h=>this.markdamaged(h,!0)},this.mnu_markundamaged={label:"dashboard.recordings.mnu_markundamaged",command:h=>this.markdamaged(h,!1)},this.mnu_updatemeta={label:"dashboard.recordings.mnu_updatemeta",command:h=>this.updatemeta(h)},this.mnu_updaterecrule={label:"dashboard.recordings.mnu_updaterecrule",command:h=>this.updaterecrule(h)},this.mnu_stoprec={label:"dashboard.recordings.mnu_stoprec",command:h=>this.stoprec(h)},this.mnu_runjobs={label:"dashboard.recordings.mnu_runjobs",items:this.jobs},this.menuToShow=[],this.matchModeRecGrp=[{value:_t.EQUALS,label:"common.filter.equals"}],this.matchModeTitle=[{value:_t.STARTS_WITH,label:"common.filter.startswith"},{value:_t.CONTAINS,label:"common.filter.contains"},{value:_t.EQUALS,label:"common.filter.equals"}],this.saveObserver={next:h=>{h.bool?(this.successCount++,this.currentForm.form.markAsPristine(),this.editingProgram&&Object.assign(this.editingProgram,this.program)):(console.log("saveObserver error",h),this.errorCount++)},error:h=>{console.log("saveObserver error",h),this.errorCount++}},this.JobQCmds=this.setupService.getJobQCommands(),this.dvrService.GetRecGroupList().subscribe(h=>{this.recGroups=h.RecGroupList,this.recGroups.push("Deleted")});for(const[h,b]of Object.entries(this.msg))this.translate.get(b).subscribe(y=>{Object.defineProperty(this.msg,h,{value:y})});[this.mnu_delete,this.mnu_delete_rerec,this.mnu_undelete,this.mnu_rerec,this.mnu_markwatched,this.mnu_markunwatched,this.mnu_markdamaged,this.mnu_markundamaged,this.mnu_updatemeta,this.mnu_updaterecrule,this.mnu_stoprec,this.mnu_runjobs,this.jobs[0],this.jobs[1],this.jobs[2],...this.matchModeRecGrp,...this.matchModeTitle].forEach(h=>{h.label&&this.translate.get(h.label).subscribe(b=>h.label=b)})}ngOnInit(){}loadLazy(e){this.lazyLoadEvent=e;let n={StartIndex:0,Count:1};if(e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows),e.sortField&&(n.Sort=e.sortField,n.Sort="Airdate"==e.sortField?"originalairdate":"Recording.RecGroup"==e.sortField?"recgroup":e.sortField,e.sortOrder&&(n.Sort=n.Sort+(e.sortOrder>0?"asc":"desc"))),e.filters){if(e.filters.Title.value)switch(e.filters.Title.matchMode){case _t.STARTS_WITH:n.TitleRegEx="^"+e.filters.Title.value;break;case _t.CONTAINS:n.TitleRegEx=e.filters.Title.value;break;case _t.EQUALS:n.TitleRegEx="^"+e.filters.Title.value+"$"}e.filters["Recording.RecGroup"].value&&e.filters["Recording.RecGroup"].matchMode==_t.EQUALS&&(n.RecGroup=e.filters["Recording.RecGroup"].value)}this.dvrService.GetRecordedList(n).subscribe(s=>{let r=s.ProgramList;this.programs.length=s.ProgramList.TotalAvailable,this.programs.splice(r.StartIndex,r.Count,...r.Programs),this.programs=[...this.programs],this.refreshing=!1})}refresh(){this.loadLazy(this.lazyLoadEvent)}URLencode(e){return encodeURI(e)}getDuration(e){const n=new Date(e.Recording.StartTs).getTime();return(new Date(e.Recording.EndTs).getTime()-n)/6e4}showMenu(e,n){if(this.program=e,this.menuToShow.length=0,"Deleted"==this.program.Recording.RecGroup?this.menuToShow.push(this.mnu_undelete):(this.menuToShow.push(this.mnu_delete),this.menuToShow.push(this.mnu_delete_rerec)),this.menuToShow.push(this.mnu_rerec),e.ProgramFlagNames.indexOf("WATCHED")>-1?this.menuToShow.push(this.mnu_markunwatched):this.menuToShow.push(this.mnu_markwatched),e.VideoPropNames.indexOf("DAMAGED")>-1?this.menuToShow.push(this.mnu_markundamaged):this.menuToShow.push(this.mnu_markdamaged),this.menuToShow.push(this.mnu_updatemeta),"Deleted"!=this.program.Recording.RecGroup){this.menuToShow.push(this.mnu_runjobs);for(let s=0;s<4;s++)this.JobQCmds.UserJob[s]?(this.jobs[s+this.jobsoffset].visible=!0,this.jobs[s+this.jobsoffset].label=this.JobQCmds.UserJobDesc[s]):this.jobs[s+this.jobsoffset].visible=!1}this.menu.toggle(n)}delete(e,n){this.dvrService.GetRecorded({RecordedId:this.program.Recording.RecordedId}).subscribe({next:s=>{"Deleted"==s.Program.Recording.RecGroup?(this.sendMessage("error",e.item.label,this.msg.AlreadyDel),this.program.Recording.RecGroup="Deleted"):this.dvrService.DeleteRecording({RecordedId:this.program.Recording.RecordedId,AllowRerecord:n}).subscribe({next:r=>{r.bool?(this.sendMessage("success",e.item.label,this.msg.Success,this.msg.CanUndo),this.program.Recording.RecGroup="Deleted"):this.sendMessage("error",e.item.label,this.msg.Failed)},error:r=>this.networkError(r)})},error:s=>this.networkError(s)})}undelete(e){this.dvrService.UnDeleteRecording({RecordedId:this.program.Recording.RecordedId}).subscribe({next:n=>{n.bool?(this.program.Recording.RecGroup="Default",this.sendMessage("success",e.item.label,this.msg.Success)):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}networkError(e){console.log("network error",e),this.sendMessage("error","",this.msg.NetFail)}sendMessage(e,n,s,r){this.messageService.add({severity:e,summary:s,detail:n+" "+this.program.Title+" "+this.program.SubTitle+(r=r?"\n"+r:""),life:3e3})}rerec(e){this.dvrService.AllowReRecord(this.program.Recording.RecordedId).subscribe({next:n=>{n.bool?this.sendMessage("success",e.item.label,this.msg.Success):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}markwatched(e,n){this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Watched:n}).subscribe({next:s=>{s.bool?(this.sendMessage("success",e.item.label,this.msg.Success),this.program.ProgramFlagNames=n?this.program.ProgramFlagNames+"|WATCHED|":this.program.ProgramFlagNames.replace(/WATCHED/g,"")):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}markdamaged(e,n){this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Damaged:n}).subscribe({next:s=>{s.bool?n?(this.sendMessage("success",e.item.label,this.msg.Success,this.msg.NonReRec),this.program.VideoPropNames=this.program.VideoPropNames+"|DAMAGED|"):(this.sendMessage("success",e.item.label,this.msg.Success),this.program.VideoPropNames=this.program.VideoPropNames.replace(/DAMAGED/g,"")):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}updatemeta(e){this.editingProgram=this.program,this.program=Object.assign({},this.program),this.program.Airdate=this.program.Airdate?new Date(this.program.Airdate+" 00:00"):null,this.displayMetadataDlg=!0,this.currentForm.form.markAsPristine()}saveProgram(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1,this.dvrService.UpdateRecordedMetadata({RecordedId:this.program.Recording.RecordedId,Description:this.program.Description,Episode:this.program.Episode,Inetref:this.program.Inetref,OriginalAirDate:this.program.Airdate,Season:this.program.Season,SubTitle:this.program.SubTitle,Title:this.program.Title,RecGroup:this.program.Recording.RecGroup}).subscribe(this.saveObserver)}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayMetadataDlg=!1,this.editingProgram=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.editingProgram=void 0)}updaterecrule(e){}stoprec(e){}runjob(e){this.dvrService.ManageJobQueue({Action:"Add",JobName:e.item.id,RecordedId:this.program.Recording.RecordedId}).subscribe({next:n=>{n.int>0?this.sendMessage("success",e.item.label,this.msg.Success):this.sendMessage("error",e.item.label,this.msg.Failed)},error:n=>this.networkError(n)})}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(ys),x(Le),x(De),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-recordings"]],viewQuery:function(e,n){if(1&e&&(j(jre,5),j($re,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.menu=s.first)}},features:[Ne([ys])],decls:68,vars:79,consts:[["name","recsform"],["recsform","ngForm"],[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full",2,"height","90vh"],[3,"popup","model","viewportHeight","backLabel"],["menu",""],["scrollHeight","flex","styleClass","p-datatable-striped",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","Title",1,"label","block"],["pInputText","","id","Title","name","Title",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Title","ngModel"],["for","SubTitle",1,"label","block"],["pInputText","","id","SubTitle","name","SubTitle",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["SubTitle","ngModel"],["for","Inetref",1,"label","block"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Description",1,"label","block"],["pInputTextarea","","id","Description","name","Description",1,"mb-2","form-control","w-full",3,"rows","cols","ngModel","ngModelChange"],["Description","ngModel"],["for","Season",1,"label","block"],["name","Season","id","Season",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Episode",1,"label","block"],["name","Episode","id","Episode",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Airdate",1,"label","block"],["dateFormat","yy-mm-dd","name","Airdate","id","Airdate",3,"ngModel","ngModelChange"],["for","RecGroup",1,"label","block"],["name","RecGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecGroup","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["type","text","field","Title",3,"matchModeOptions"],["field","Recording.RecGroup","matchMode","equals",3,"showMenu"],["pTemplate","filter"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],["pSortableColumn","Title",1,"p-1",2,"flex-basis","12%"],["field","Title"],[1,"p-1",2,"flex-basis","2%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],["pSortableColumn","Airdate",1,"justify-content-end","p-1",2,"flex-basis","8%"],["field","Airdate"],["pSortableColumn","StartTime",1,"justify-content-end","p-1",2,"flex-basis","8%"],["field","StartTime"],[1,"p-1",2,"flex-basis","10%"],["pSortableColumn","Recording.RecGroup",1,"p-1",2,"flex-basis","8%"],["field","Recording.RecGroup"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","p-1",2,"flex-basis","8%"],["target","_blank"],[1,"pi","pi-download"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"disabled"],["name","filter",3,"ngModel","options","placeholder","showClear","onChange"],["pTemplate","item"],[3,"ngClass"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["class","pi pi-exclamation-triangle p-1","tooltipPosition","top",3,"pTooltip",4,"ngIf"],["class","pi pi-eye","tooltipPosition","top",3,"pTooltip",4,"ngIf"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"innerHTML"],[1,"p-1",2,"flex-basis","8%"],["target","_blank","tooltipPosition","left",3,"href","pTooltip"],[1,"pi","pi-download","text-primary"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"click"],["tooltipPosition","top",1,"pi","pi-exclamation-triangle","p-1",3,"pTooltip"],["tooltipPosition","top",1,"pi","pi-eye",3,"pTooltip"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1)(2,"div",2),k(3,"p-toast",3),c(),l(4,"h2"),g(5),m(6,"translate"),c(),l(7,"div",4),k(8,"p-slideMenu",5,6),l(10,"p-table",7),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(11,Wre,0,0,"ng-template",8),_(12,Jre,50,43,"ng-template",9),_(13,toe,29,26,"ng-template",10),c(),l(14,"p-dialog",11),C("visibleChange",function(r){return n.displayMetadataDlg=r}),m(15,"translate"),l(16,"div",12)(17,"label",13),g(18),m(19,"translate"),c(),l(20,"input",14,15),C("ngModelChange",function(r){return n.program.Title=r}),c()(),l(22,"div",12)(23,"label",16),g(24),m(25,"translate"),c(),l(26,"input",17,18),C("ngModelChange",function(r){return n.program.SubTitle=r}),c()(),l(28,"div",12)(29,"label",19),g(30),m(31,"translate"),c(),l(32,"input",20,21),C("ngModelChange",function(r){return n.program.Inetref=r}),c()(),l(34,"div",12)(35,"label",22),g(36),m(37,"translate"),c(),l(38,"textarea",23,24),C("ngModelChange",function(r){return n.program.Description=r}),c()(),l(40,"div",12)(41,"label",25),g(42),m(43,"translate"),c(),l(44,"p-inputNumber",26),C("ngModelChange",function(r){return n.program.Season=r}),c()(),l(45,"div",12)(46,"label",27),g(47),m(48,"translate"),c(),l(49,"p-inputNumber",28),C("ngModelChange",function(r){return n.program.Episode=r}),c()(),l(50,"div",12)(51,"label",29),g(52),m(53,"translate"),c(),l(54,"p-calendar",30),C("ngModelChange",function(r){return n.program.Airdate=r}),c()(),l(55,"div",12)(56,"label",31),g(57),m(58,"translate"),c(),l(59,"p-dropdown",32,33),C("ngModelChange",function(r){return n.program.Recording.RecGroup=r}),c()(),_(61,soe,7,9,"ng-template",34),c(),l(62,"p-dialog",35),C("visibleChange",function(r){return n.displayUnsaved=r}),m(63,"translate"),l(64,"p"),g(65),m(66,"translate"),c(),_(67,roe,4,6,"ng-template",34),c()()()),2&e&&(a(5),S(f(6,53,"dashboard.recordings.heading")),a(3),p("popup",!0)("model",n.menuToShow)("viewportHeight",360)("backLabel",n.translate.instant("common.back")),a(2),p("value",n.programs)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(4),q(A(77,ooe)),D("header",f(15,55,"dashboard.recordings.edit_metadata")),p("visible",n.displayMetadataDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(4),S(f(19,57,"dashboard.recordings.title")),a(2),p("ngModel",n.program.Title),a(4),S(f(25,59,"dashboard.recordings.subtitle")),a(2),p("ngModel",n.program.SubTitle),a(4),S(f(31,61,"dashboard.recordings.inetref")),a(2),p("ngModel",n.program.Inetref),a(4),S(f(37,63,"dashboard.recordings.description")),a(2),p("rows",5)("cols",30)("ngModel",n.program.Description),a(4),S(f(43,65,"dashboard.recordings.season")),a(2),p("ngModel",n.program.Season)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(48,67,"dashboard.recordings.episode")),a(2),p("ngModel",n.program.Episode)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(53,69,"dashboard.recordings.orig_airdate")),a(2),p("ngModel",n.program.Airdate),a(3),S(f(58,71,"dashboard.sched.recgroup_label")),a(2),q(A(78,aoe)),p("options",n.recGroups)("ngModel",n.program.Recording.RecGroup)("editable",!0)("maxlength",64),a(3),D("header",f(63,73,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(66,75,"common.unsaved_message")))},directives:[ze,Ge,He,wd,Z2,xn,ie,vg,Vt,Te,_e,Ln,vt,Jt,Cd,yd,Oe,Q,Tn,Ye,X2,dt,xr,fn,qe,ve],pipes:[de,Xc],styles:[""]}),t})();const coe=["schedform"];function uoe(t,i){1&t&&(l(0,"label",65),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.subtitle_label"),""))}function doe(t,i){1&t&&(l(0,"label",65),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.add_tables_label"),""))}function poe(t,i){if(1&t){const e=I();l(0,"textarea",66),C("ngModelChange",function(s){return v(e),d(3).recRule.SubTitle=s}),g(1," "),c()}if(2&t){const e=d(3);p("ngModel",e.recRule.SubTitle)("disabled","Power Search"!=e.recRule.SearchType)("rows",e.subTitleRows)}}const hoe=function(){return["None","Power Search"]};function moe(t,i){if(1&t&&(l(0,"div",4),_(1,uoe,3,3,"label",63),_(2,doe,3,3,"label",63),_(3,poe,2,3,"textarea",64),c()),2&t){const e=d(2);a(1),p("ngIf","None"==e.recRule.SearchType),a(1),p("ngIf","Power Search"==e.recRule.SearchType),a(1),p("ngIf",A(3,hoe).indexOf(e.recRule.SearchType)>-1)}}function foe(t,i){if(1&t&&(l(0,"span"),g(1),c()),2&t){const e=d(2);a(1),$e("S",e.recRule.Season," E",e.recRule.Episode,"")}}function goe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.description_label"),""))}function _oe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.sqlwhere_label"),""))}function boe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.description_label"),""))}function voe(t,i){1&t&&(l(0,"label",71),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.sched.srchValue_label"),""))}const Coe=function(){return["None","Manual Search"]};function yoe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"div",67),_(2,goe,3,3,"label",68),_(3,_oe,3,3,"label",68),_(4,boe,3,3,"label",68),_(5,voe,3,3,"label",69),c(),l(6,"textarea",70),C("ngModelChange",function(s){return v(e),d(2).recRule.Description=s})("focusout",function(){return v(e),d(2).onDescriptionBlur()}),g(7," "),c()()}if(2&t){const e=d(2);a(1),p("ngSwitch",e.recRule.SearchType),a(1),p("ngSwitchCase","None"),a(1),p("ngSwitchCase","Power Search"),a(1),p("ngSwitchCase","Manual Search"),a(2),p("ngModel",e.recRule.Description)("disabled",A(7,Coe).indexOf(e.recRule.SearchType)>-1)("rows",e.descriptionRows)}}function woe(t,i){1&t&&(l(0,"div"),g(1," Examples of SQL Additional Tables and Where Conditions are in the MythTV wiki at"),k(2,"br"),l(3,"a",72),g(4,"Power Search"),c()())}const Di=function(){return{minWidth:"400px"}};function Toe(t,i){if(1&t){const e=I();l(0,"div"),k(1,"p-divider"),l(2,"div",4)(3,"label",73),g(4),m(5,"translate"),c(),l(6,"p-dropdown",74),C("ngModelChange",function(s){return v(e),d(2).channel=s})("onChange",function(){return v(e),d(2).onChannelChange()}),c()(),l(7,"div",4)(8,"label",75),g(9),m(10,"translate"),c(),l(11,"p-calendar",76),C("ngModelChange",function(s){return v(e),d(2).reqDate=s})("onClose",function(){return v(e),d(2).onDateChange()})("keyup.enter",function(){return v(e),d(2).onDateChange()})("onBlur",function(){return v(e),d(2).onDateChange()}),c()(),l(12,"div",4)(13,"label",77),g(14),m(15,"translate"),c(),l(16,"p-inputNumber",78),C("ngModelChange",function(s){return v(e),d(2).reqDuration=s})("ngModelChange",function(){return v(e),d(2).onDurationChange()}),c()()()}if(2&t){const e=d(2);a(4),S(f(5,23,"dashboard.sched.channel_label")),a(2),q(A(29,Di)),p("options",e.allChannels)("ngModel",e.channel)("editable",!1)("maxlength",0),a(3),S(f(10,25,"dashboard.sched.starttime_label")),a(2),p("ngModel",e.reqDate)("showTime",!0)("stepMinute",5)("dateFormat","yy/mm/dd")("selectOtherMonths",!0)("showIcon",!0)("showOnFocus",!1)("showButtonBar",!0)("clearButtonStyleClass","hidden"),a(3),S(f(15,27,"dashboard.sched.duration_label")),a(2),p("ngModel",e.reqDuration)("showButtons",!0)("min",5)("max",360)("step",5)}}function Soe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"label",79),g(2),m(3,"translate"),c(),l(4,"div",80)(5,"div",81)(6,"p-radioButton",82),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(7,"label",83),k(8,"img",84),c()(),l(9,"div",85)(10,"a",86),g(11),m(12,"translate"),c(),k(13,"br"),c(),l(14,"div",87)(15,"p-radioButton",88),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(16,"label",89),k(17,"img",90),c()(),l(18,"div",91)(19,"a",86),g(20),m(21,"translate"),c(),k(22,"br"),c(),l(23,"div",81)(24,"p-radioButton",92),C("ngModelChange",function(s){return v(e),d(2).metaPrefix=s})("ngModelChange",function(){v(e);const s=d(2);return s.iCheckbox(s.recRule)}),c(),l(25,"label",93),k(26,"img",94),c()(),l(27,"div",85)(28,"a",86),g(29),m(30,"translate"),c(),k(31,"br"),c()(),g(32),l(33,"input",95,96),C("ngModelChange",function(s){return v(e),d(2).recRule.Inetref=s})("ngModelChange",function(){v(e);const s=d(2);return s.iText(s.recRule)}),c(),l(35,"small",55),g(36),m(37,"translate"),k(38,"br"),c()()}if(2&t){const e=d(2);a(2),S(f(3,13,"dashboard.sched.inetref_label")),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://thetvdb.com/search?query="+e.recRule.Title),Xt),a(1),T(" ",f(12,15,"dashboard.sched.isearch")," thetvdb.com"),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://www.tvmaze.com/search?q="+e.recRule.Title),Xt),a(1),T(" ",f(21,17,"dashboard.sched.isearch")," tvmaze.com"),a(4),p("ngModel",e.metaPrefix),a(4),D("href",e.URLencode("https://www.themoviedb.org/search?query="+e.recRule.Title),Xt),a(1),T(" ",f(30,19,"dashboard.sched.isearch")," themoviedb.org"),a(3),T(" ",e.metaPrefix," \xa0 "),a(1),p("ngModel",e.recRule.Inetref),a(3),T(" ",f(37,21,"dashboard.sched.inetref_desc"),"")}}function xoe(t,i){if(1&t){const e=I();l(0,"div",4)(1,"label",97),g(2),m(3,"translate"),c(),l(4,"p-dropdown",98,99),C("ngModelChange",function(s){return v(e),d(2).templateId=s}),c(),l(6,"p-button",100),C("onClick",function(){v(e);const s=d(2);return s.templateChange(s.recRule)}),m(7,"translate"),c()()}if(2&t){const e=d(2);a(2),S(f(3,9,"dashboard.sched.template_label")),a(2),q(A(13,Di)),p("options",e.templates)("ngModel",e.templateId)("editable",!1)("maxlength",0),a(2),D("label",f(7,11,"dashboard.sched.template_apply")),p("disabled",!e.templateId)}}function Doe(t,i){1&t&&(k(0,"p-message",105),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Moe(t,i){if(1&t&&(k(0,"p-message",106),m(1,"translate")),2&t){const e=d(3);La("text","",f(1,2,"common.backenderror"),": ",e.errortext,"")}}function koe(t,i){if(1&t){const e=I();l(0,"div",101),_(1,Doe,2,3,"p-message",102),_(2,Moe,2,4,"p-message",103),c(),l(3,"p-button",104),C("onClick",function(){return v(e),d(2).close()}),m(4,"translate"),c(),l(5,"p-button",100),C("onClick",function(){return v(e),d(2).save()}),m(6,"translate"),c()}if(2&t){const e=d(2),n=F(1);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||0==e.recRule.Id&&"Not Recording"==e.recRule.Type||!e.recRule.Title)}}function Ioe(t,i){if(1&t){const e=I();l(0,"p-button",107),C("onClick",function(){return v(e),d(2).close()}),m(1,"translate"),c(),l(2,"p-button",108),C("onClick",function(){return v(e),d(2).displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const Eoe=function(){return{height:"90vw",width:"700px"}},Roe=function(){return["Power Search","Manual Search"]},IS=function(){return{minWidth:"400px",maxHeight:"400px",maxWidth:"640px"}};function Loe(t,i){if(1&t){const e=I();l(0,"div")(1,"p-dialog",3),C("visibleChange",function(s){return v(e),d().displayDlg=s}),m(2,"translate"),l(3,"p"),g(4),c(),l(5,"p"),g(6),c(),l(7,"div",4)(8,"label",5),g(9),m(10,"translate"),c(),l(11,"p-dropdown",6,7),C("ngModelChange",function(s){return v(e),d().recRule.SearchType=s})("onChange",function(){return v(e),d().onSearchTypeChange()}),c()(),l(13,"div",4)(14,"label",8),g(15),m(16,"translate"),c(),l(17,"textarea",9),C("ngModelChange",function(s){return v(e),d().recRule.Title=s})("focusout",function(){return v(e),d().onTitleBlur()}),g(18," "),c()(),_(19,moe,4,4,"div",10),l(20,"p"),_(21,foe,2,2,"span",2),c(),_(22,yoe,8,8,"div",10),_(23,woe,5,0,"div",2),_(24,Toe,17,30,"div",2),k(25,"p-divider"),l(26,"div",4)(27,"label",11),g(28),m(29,"translate"),c(),l(30,"p-dropdown",12,13),C("ngModelChange",function(s){return v(e),d().recRule.Type=s}),c()(),l(32,"div",4)(33,"label",14),g(34),m(35,"translate"),c(),l(36,"p-dropdown",15,16),C("ngModelChange",function(s){return v(e),d().recRule.RecGroup=s}),c()(),l(38,"div",4)(39,"p-checkbox",17,18),C("ngModelChange",function(s){return v(e),d().recRule.Inactive=s}),m(41,"translate"),c()(),l(42,"div",4)(43,"label",19),g(44),m(45,"translate"),c(),l(46,"p-dropdown",20,21),C("ngModelChange",function(s){return v(e),d().recRule.PlayGroup=s}),c()(),l(48,"div",4)(49,"label",22),g(50),m(51,"translate"),c(),l(52,"p-inputNumber",23),C("ngModelChange",function(s){return v(e),d().recRule.StartOffset=s}),c()(),l(53,"div",4)(54,"label",24),g(55),m(56,"translate"),c(),l(57,"p-inputNumber",25),C("ngModelChange",function(s){return v(e),d().recRule.EndOffset=s}),c()(),l(58,"div",4)(59,"p-checkbox",26,27),C("ngModelChange",function(s){return v(e),d().recRule.NewEpisOnly=s}),m(61,"translate"),c()(),l(62,"div",4)(63,"label",28),g(64),m(65,"translate"),c(),l(66,"p-inputNumber",29),C("ngModelChange",function(s){return v(e),d().recRule.RecPriority=s}),c()(),l(67,"div",4)(68,"label",30),g(69),m(70,"translate"),c(),l(71,"p-dropdown",31,32),C("ngModelChange",function(s){return v(e),d().recRule.PreferredInput=s}),c()(),l(73,"div",4)(74,"label",33),g(75),m(76,"translate"),c(),l(77,"p-dropdown",34,35),C("ngModelChange",function(s){return v(e),d().recRule.DupMethod=s}),c()(),l(79,"div",4)(80,"label",36),g(81),m(82,"translate"),c(),l(83,"p-dropdown",37,38),C("ngModelChange",function(s){return v(e),d().recRule.DupIn=s}),c()(),l(85,"div",4)(86,"label",39),g(87),m(88,"translate"),c(),l(89,"p-dropdown",40,41),C("ngModelChange",function(s){return v(e),d().recRule.AutoExtend=s}),c()(),l(91,"div",4)(92,"label",42),g(93),m(94,"translate"),c(),l(95,"p-multiSelect",43,44),C("ngModelChange",function(s){return v(e),d().selectedFilters=s})("onChange",function(){v(e);const s=d();return s.filterToRec(s.recRule)}),c()(),l(97,"div",4)(98,"label",45),g(99),m(100,"translate"),c(),l(101,"p-dropdown",46,47),C("ngModelChange",function(s){return v(e),d().recRule.RecProfile=s}),c()(),l(103,"div",4)(104,"label",48),g(105),m(106,"translate"),c(),l(107,"p-dropdown",49,50),C("ngModelChange",function(s){return v(e),d().recRule.StorageGroup=s}),c()(),l(109,"div",4)(110,"label",51),g(111),m(112,"translate"),c(),l(113,"p-inputNumber",52),C("ngModelChange",function(s){return v(e),d().recRule.MaxEpisodes=s}),c()(),l(114,"div",4)(115,"p-checkbox",53,54),C("ngModelChange",function(s){return v(e),d().recRule.MaxNewest=s}),m(117,"translate"),c(),l(118,"small",55),g(119),m(120,"translate"),c()(),l(121,"div",4)(122,"p-checkbox",56,57),C("ngModelChange",function(s){return v(e),d().recRule.AutoExpire=s}),m(124,"translate"),c()(),l(125,"div",4)(126,"label",58),g(127),m(128,"translate"),c(),l(129,"p-multiSelect",59,60),C("ngModelChange",function(s){return v(e),d().selectedPostProc=s})("onChange",function(){v(e);const s=d();return s.postProcToRec(s.recRule)}),c()(),_(131,Soe,39,23,"div",10),_(132,xoe,8,14,"div",10),k(133,"br")(134,"br")(135,"br")(136,"br")(137,"br")(138,"br")(139,"br")(140,"br")(141,"br")(142,"br")(143,"br")(144,"br")(145,"br")(146,"br"),_(147,koe,7,9,"ng-template",61),c(),l(148,"p-dialog",62),C("visibleChange",function(s){return v(e),d().displayUnsaved=s}),m(149,"translate"),l(150,"p"),g(151),m(152,"translate"),c(),_(153,Ioe,4,6,"ng-template",61),c()()}if(2&t){const e=d();a(1),q(A(198,Eoe)),D("header",f(2,148,"dashboard.sched.heading")),p("visible",e.displayDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(3),T(" ",e.recRule.CallSign,""),a(2),yo(" ",e.utility.formatDate(e.recRule.StartTime)," ",e.utility.formatTime(e.recRule.StartTime)," - ",e.utility.formatTime(e.recRule.EndTime)," "),a(3),S(f(10,150,"dashboard.sched.srchtype_label")),a(2),q(A(199,Di)),p("options",e.srchTypeList)("ngModel",e.recRule.SearchType)("editable",!1)("maxlength",0)("disabled",e.srchTypeDisabled),a(4),S(f(16,152,"dashboard.sched.title_label")),a(2),p("ngModel",e.recRule.Title)("disabled",-1==A(200,Roe).indexOf(e.recRule.SearchType)&&"Recording Template"!=e.recRule.Type||e.recRule.Id==(null==e.defaultTemplate?null:e.defaultTemplate.Id))("rows",e.titleRows),a(2),p("ngIf","Recording Template"!=e.recRule.Type),a(2),p("ngIf",e.recRule.Season&&e.recRule.Episode),a(1),p("ngIf","Recording Template"!=e.recRule.Type),a(1),p("ngIf","Power Search"==e.recRule.SearchType),a(1),p("ngIf","Manual Search"==e.recRule.SearchType),a(4),S(f(29,154,"dashboard.sched.type_label")),a(2),q(A(201,Di)),p("options",e.typeList)("ngModel",e.recRule.Type)("editable",!1)("maxlength",0),a(4),S(f(35,156,"dashboard.sched.recgroup_label")),a(2),q(A(202,Di)),p("options",e.recGroups)("ngModel",e.recRule.RecGroup)("editable",!0)("maxlength",64),a(3),D("label",f(41,158,"dashboard.sched.active_label")),p("ngModel",e.recRule.Inactive)("binary",!0)("trueValue",!1)("falseValue",!0)("disabled",e.override),a(5),S(f(45,160,"dashboard.sched.playgroup_label")),a(2),q(A(203,Di)),p("options",e.playGroups)("ngModel",e.recRule.PlayGroup)("editable",!1)("maxlength",0),a(4),S(f(51,162,"dashboard.sched.startoffset_label")),a(2),p("ngModel",e.recRule.StartOffset)("showButtons",!0)("min",-480)("max",480)("step",1),a(3),S(f(56,164,"dashboard.sched.endoffset_label")),a(2),p("ngModel",e.recRule.EndOffset)("showButtons",!0)("min",-480)("max",480)("step",1),a(2),D("label",f(61,166,"dashboard.sched.newepis_label")),p("ngModel",e.recRule.NewEpisOnly)("binary",!0),a(5),S(f(65,168,"dashboard.sched.priority_label")),a(2),p("ngModel",e.recRule.RecPriority)("showButtons",!0)("min",-100)("max",100)("step",1),a(3),S(f(70,170,"dashboard.sched.prefinput_label")),a(2),q(A(204,Di)),p("options",e.inputList.Inputs)("ngModel",e.recRule.PreferredInput)("editable",!1)("maxlength",0),a(4),S(f(76,172,"dashboard.sched.dupmethod_label")),a(2),q(A(205,Di)),p("options",e.dupMethodList)("ngModel",e.recRule.DupMethod)("editable",!1)("maxlength",0),a(4),S(f(82,174,"dashboard.sched.dupin_label")),a(2),q(A(206,Di)),p("options",e.dupInList)("ngModel",e.recRule.DupIn)("editable",!1)("maxlength",0),a(4),S(f(88,176,"dashboard.sched.autoextend_label")),a(2),q(A(207,Di)),p("options",e.autoExtendList)("ngModel",e.recRule.AutoExtend)("editable",!1)("maxlength",0),a(4),S(f(94,178,"dashboard.sched.filters_label")),a(2),q(A(208,IS)),p("options",e.recRuleFilters)("ngModel",e.selectedFilters),a(4),S(f(100,180,"dashboard.sched.recprofile_label")),a(2),q(A(209,Di)),p("options",e.recProfileList)("ngModel",e.recRule.RecProfile)("editable",!1)("maxlength",0),a(4),S(f(106,182,"dashboard.sched.sgroup_label")),a(2),q(A(210,Di)),p("options",e.recStorageGroups)("ngModel",e.recRule.StorageGroup)("editable",!1)("maxlength",0),a(4),S(f(112,184,"dashboard.sched.maxeps_label")),a(2),p("ngModel",e.recRule.MaxEpisodes)("showButtons",!0)("min",0)("max",100)("step",1),a(2),D("label",f(117,186,"dashboard.sched.maxnewest_label")),p("ngModel",e.recRule.MaxNewest)("binary",!0),a(4),T(" ",f(120,188,"dashboard.sched.maxnewest_desc")," "),a(3),D("label",f(124,190,"dashboard.sched.autoexpire_label")),p("ngModel",e.recRule.AutoExpire)("binary",!0),a(5),S(f(128,192,"dashboard.sched.postproc_label")),a(2),q(A(211,IS)),p("options",e.postProcList)("ngModel",e.selectedPostProc)("filter",!0),a(2),p("ngIf","Recording Template"!=e.recRule.Type),a(1),p("ngIf","Recording Template"!=e.recRule.Type),a(16),D("header",f(149,194,"common.unsaved_heading")),p("visible",e.displayUnsaved)("modal",!0),a(3),S(f(152,196,"common.unsaved_message"))}}let Rd=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.translate=n,this.mythService=s,this.utility=r,this.channelService=o,this.displayDlg=!1,this.displayUnsaved=!1,this.loadCount=0,this.successCount=0,this.errorCount=0,this.errortext="",this.htmlRegex=new RegExp("|"),this.srchTypeDisabled=!0,this.titleRows=1,this.subTitleRows=1,this.descriptionRows=5,this.override=!1,this.reqDate=new Date,this.reqDuration=60,this.recRules=[],this.playGroups=[],this.recGroups=[],this.recStorageGroups=[],this.inputList={Inputs:[]},this.recRuleFilters=[],this.selectedFilters=[],this.templates=[],this.typeList=[],this.allChannels=[],this.srchTypeList=[{prompt:this.translate.instant("recrule.srch_None"),value:"None"},{prompt:this.translate.instant("recrule.srch_PowerSearch"),value:"Power Search"},{prompt:this.translate.instant("recrule.srch_TitleSearch"),value:"Title Search"},{prompt:this.translate.instant("recrule.srch_KeywordSearch"),value:"Keyword Search"},{prompt:this.translate.instant("recrule.srch_PeopleSearch"),value:"People Search"},{prompt:this.translate.instant("recrule.srch_ManualSearch"),value:"Manual Search"}],this.dupMethodList=[{prompt:this.translate.instant("dashboard.sched.dupmethod.none"),value:"None"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s_and_d"),value:"Subtitle and Description"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s_then_d"),value:"Subtitle then Description"},{prompt:this.translate.instant("dashboard.sched.dupmethod.s"),value:"Subtitle"},{prompt:this.translate.instant("dashboard.sched.dupmethod.d"),value:"Description"}],this.dupInList=[{prompt:this.translate.instant("dashboard.sched.dupin.both"),value:"All Recordings"},{prompt:this.translate.instant("dashboard.sched.dupin.curr"),value:"Current Recordings"},{prompt:this.translate.instant("dashboard.sched.dupin.prev"),value:"Previous Recordings"}],this.autoExtendList=[{prompt:this.translate.instant("dashboard.sched.extend_none"),value:"None"},{prompt:"ESPN",value:"ESPN"},{prompt:"MLB",value:"MLB"}],this.recProfileList=[{prompt:this.translate.instant("dashboard.sched.recprof.default"),value:"Default"},{prompt:this.translate.instant("dashboard.sched.recprof.livetv"),value:"Live TV"},{prompt:this.translate.instant("dashboard.sched.recprof.highq"),value:"High Quality"},{prompt:this.translate.instant("dashboard.sched.recprof.lowq"),value:"Low Quality"}],this.postProcList=[{prompt:this.translate.instant("dashboard.sched.postproc.autocommflag"),value:"AutoCommflag"},{prompt:this.translate.instant("dashboard.sched.postproc.autometalookup"),value:"AutoMetaLookup"},{prompt:this.translate.instant("dashboard.sched.postproc.autotranscode"),value:"AutoTranscode"},{prompt:"1",value:"AutoUserJob1"},{prompt:"2",value:"AutoUserJob2"},{prompt:"3",value:"AutoUserJob3"},{prompt:"4",value:"AutoUserJob4"}],this.selectedPostProc=[],this.metaPrefix="",this.templateId=0,this.saveObserver={next:u=>{this.recRule?this.recRule.Id&&u.bool?(this.successCount++,this.currentForm.form.markAsPristine(),setTimeout(()=>this.inter.summaryComponent.refresh(),3e3),"Not Recording"==this.recRule.Type&&(this.recRule.Id=0)):!this.recRule.Id&&u.uint?(this.successCount++,this.currentForm.form.markAsPristine(),setTimeout(()=>this.inter.summaryComponent.refresh(),3e3),this.recRule.Id=u.uint):(this.errorCount++,this.currentForm.form.markAsDirty()):(console.log("ERROR: recRule is undefined"),this.errorCount++)},error:u=>{if(console.error(u),400==u.status){let h=u.error.split(this.htmlRegex);h.length>1&&(this.errortext=h[1])}this.errorCount++,this.currentForm.form.markAsDirty()}}}ngOnInit(){this.inter.sched=this}loadLists(){let e;this.recRules=[],this.playGroups=[],this.recGroups=[],this.recStorageGroups=[],this.inputList.Inputs=[],this.recRuleFilters=[],this.loadCount=0,this.errorCount=0,this.dvrService.GetRecordScheduleList({}).subscribe({next:n=>{this.recRules=n.RecRuleList.RecRules,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetPlayGroupList().subscribe({next:n=>{this.playGroups=n.PlayGroupList,this.playGroups.unshift("Default"),this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecGroupList().subscribe({next:n=>{this.recGroups=n.RecGroupList,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecStorageGroupList().subscribe({next:n=>{this.recStorageGroups=n.RecStorageGroupList,this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetInputList().subscribe({next:n=>{this.inputList=n.InputList,this.inputList.Inputs.unshift({Id:0,CardId:0,SourceId:0,InputName:"",DisplayName:this.translate.instant("dashboard.sched.input_any"),QuickTune:!1,RecPriority:0,ScheduleOrder:0,LiveTVOrder:0}),this.loadSuccess()},error:n=>this.loadFail()}),this.dvrService.GetRecRuleFilterList().subscribe({next:n=>{this.recRuleFilters=n.RecRuleFilterList.RecRuleFilters,this.loadSuccess()},error:n=>this.loadFail()});for(let n=1;n<5;n++)e=this.translate.instant("settings.services.job_default",{num:n}),this.mythService.GetSetting({HostName:"_GLOBAL_",Key:"UserJobDesc"+n,Default:e}).subscribe({next:s=>{this.postProcList[n+2].prompt=s.String,this.loadSuccess()},error:()=>this.loadFail()});this.channelService.GetChannelInfoList({Details:!0}).subscribe(n=>{this.allChannels=n.ChannelInfoList.ChannelInfos,this.allChannels.forEach(s=>s.Description=s.ChanNum+" "+s.ChannelName+" ("+s.CallSign+")")})}loadSuccess(){this.loadCount++,10==this.loadCount&&(this.loadCount=0,this.setupData(),this.displayDlg=!0,this.currentForm.form.markAsPristine())}loadFail(){this.errorCount++}open(e,n,s){this.reqProgram=e,this.reqChannel=n,this.reqRecRule=s,this.titleRows=1,e||s?(this.srchTypeDisabled=!0,this.srchTypeList[0].inactive=!1):(this.srchTypeDisabled=!1,this.srchTypeList[0].inactive=!0),this.loadLists()}setupData(){let e=!1;this.program=this.reqProgram;let n="";this.reqRecRule&&(n=this.reqRecRule.Type),this.reqRecRule?["Override Recording","Do not Record"].indexOf(n)>-1&&!this.reqRecRule.Id?(e=!0,this.recRule=void 0):this.recRule=Object.assign({},this.reqRecRule):this.recRule=void 0,this.channel=this.reqChannel,this.program&&!this.channel&&this.program.Channel&&(this.channel=this.program.Channel);var s=0;if(this.typeList=[],this.templates=[{Id:0,Title:""}],this.defaultTemplate=void 0,this.program&&this.program.Recording&&!e&&(s=this.program.Recording.RecordId),this.recRules.forEach((r,o)=>{r.Id==s&&(this.recRule=r,n=this.recRule.Type),"Recording Template"==r.Type&&(this.templates.push(r),"Default"==r.Category&&(this.defaultTemplate=r))}),this.recRule||(this.recRule={Id:0}),this.recRule.Title||(this.recRule.Title="",this.recRule.SubTitle="",this.recRule.Description="",this.defaultTemplate&&this.mergeTemplate(this.recRule,this.defaultTemplate)),this.recRule.SearchType||(this.recRule.SearchType="None"),this.program&&this.channel&&"None"==this.recRule.SearchType&&this.mergeProgram(this.recRule,this.program,this.channel),e&&(this.recRule.ParentId=this.program.Recording.RecordId),n||(n="Not Recording"),!this.recRule.StartTime){let r=new Date;this.recRule.StartTime=r.toISOString(),this.recRule.FindDay=(r.getDay()+1)%7,this.recRule.FindTime=r.toTimeString().slice(0,8)}this.filterFromRec(this.recRule),this.postProcFromRec(this.recRule),this.recRule.Type=n,this.setupTypeList(this.recRule),this.srchTypeDisabled||this.onSearchTypeChange(),this.override&&(this.recRule.Inactive=!1),setTimeout(()=>{this.recRule&&(this.recRule.Type=n),this.currentForm.form.markAsPristine()},10)}setupTypeList(e){let n=e.Type;if(this.typeList.length=0,this.override=!1,"Recording Template"==n)this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.mod_template"),value:"Recording Template"}),"Default"!=e.Category&&e.Id>0&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.del_template"),value:"Not Recording"});else if(["Override Recording","Do not Record"].indexOf(n)>-1)this.override=!0,this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.del_override"),value:"Not Recording"},{prompt:this.translate.instant("dashboard.sched.type.rec_override"),value:"Override Recording"},{prompt:this.translate.instant("dashboard.sched.type.dont_rec_override"),value:"Do not Record"});else{const s="Manual Search"==e.SearchType,r="None"!=e.SearchType;this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.not"),value:"Not Recording"}),(e.CallSign&&!r||s)&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.this"),value:"Single Record"}),s||this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.one"),value:"Record One"}),(!e.CallSign||r)&&this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.weekly"),value:"Record Weekly"},{prompt:this.translate.instant("dashboard.sched.type.daily"),value:"Record Daily"}),s||this.typeList.push({prompt:this.translate.instant("dashboard.sched.type.all"),value:"Record All"})}-1==this.typeList.findIndex(s=>s.value==e.Type)&&(e.Type=this.typeList[0].value)}mergeProgram(e,n,s){e.Title=n.Title,e.SubTitle=n.SubTitle,e.Description=n.Description,e.Category=n.Category,e.StartTime=n.StartTime,e.EndTime=n.EndTime,e.SeriesId=n.SeriesId,e.ProgramId=n.ProgramId,e.ChanId=s.ChanId,e.CallSign=s.CallSign,e.Season=n.Season,e.Episode=n.Episode;let r=new Date(e.StartTime);e.FindDay=(r.getDay()+1)%7,e.FindTime=r.toTimeString().slice(0,8)}filterFromRec(e){this.selectedFilters=[],this.recRuleFilters.forEach(n=>{0!=(e.Filter&1<{e.Filter|=1<{n[s.value]&&this.selectedPostProc.push(s.value)})}postProcToRec(e){let n=e;this.postProcList.forEach(s=>n[s.value]=!1),this.selectedPostProc.forEach(s=>n[s]=!0)}iCheckbox(e){e.Inetref||(e.Inetref=""),e.Inetref=e.Inetref.includes(".py_")?e.Inetref.replace(/^.*\.py_/,this.metaPrefix):this.metaPrefix+e.Inetref}iText(e){this.metaPrefix=e.Inetref.replace(/_.*/,"_"),this.metaPrefix.endsWith(".py_")||(this.metaPrefix="")}templateChange(e){const n=this.templates.find(s=>s.Id==this.templateId);n&&this.mergeTemplate(e,n),this.templateId=0}onSearchTypeChange(){this.recRule&&(this.recRule.Title="",this.reqDate=new Date,this.reqDate.setMinutes(0),this.reqDate.setSeconds(0,0),this.reqDuration=60,this.onDateChange(),"Manual Search"==this.recRule.SearchType&&(this.recRule.Description="",setTimeout(()=>this.onChannelChange(),100)),this.subTitleRows="Power Search"==this.recRule.SearchType?5:1,this.descriptionRows=["None","Power Search"].indexOf(this.recRule.SearchType)>-1?5:1,this.recRule.SubTitle="",this.recRule.Description="",this.setupTypeList(this.recRule)),this.onTitleBlur(),this.onDescriptionBlur()}onTitleBlur(){if(this.recRule){if(this.recRule.Title=this.recRule.Title.trim(),this.recRule.Title.length>0){let e;["Manual Search","Power Search"].indexOf(this.recRule.SearchType)>-1&&this.recRule.Title.length>0&&(e="("+this.trSearch(this.recRule.SearchType)+")"),"Recording Template"==this.recRule.Type&&this.recRule.Title.length>0&&(e="("+this.translate.instant("recrule.template")+")"),e&&-1==this.recRule.Title.indexOf(e)&&(this.recRule.Title=this.recRule.Title+" "+e)}"Manual Search"==this.recRule.SearchType&&(this.recRule.Description=this.recRule.Title)}}onDescriptionBlur(){this.recRule&&(this.recRule.Description=this.recRule.Description.trim(),["Title Search","Keyword Search","People Search"].indexOf(this.recRule.SearchType)>-1&&(this.recRule.Title=this.recRule.Description.length>0?this.recRule.Description+" ("+this.trSearch(this.recRule.SearchType)+")":""))}onChannelChange(){this.recRule&&this.channel&&(this.recRule.ChanId=this.channel.ChanId,this.recRule.CallSign=this.channel.CallSign)}onDateChange(){this.recRule&&(this.recRule.StartTime=this.reqDate.toISOString(),this.recRule.FindDay=(this.reqDate.getDay()+1)%7,this.recRule.FindTime=this.reqDate.toTimeString().slice(0,8),this.onDurationChange())}onDurationChange(){if(this.recRule){let e=new Date(this.recRule.StartTime),n=new Date(e.getTime()+6e4*this.reqDuration);this.recRule.EndTime=n.toISOString()}}trSearch(e){return this.translate.instant("recrule.srch_"+e.replace(" ",""))}mergeTemplate(e,n){e.Inactive=n.Inactive,e.RecPriority=n.RecPriority,e.PreferredInput=n.PreferredInput,e.StartOffset=n.StartOffset,e.EndOffset=n.EndOffset,e.DupMethod=n.DupMethod,e.DupIn=n.DupIn,e.NewEpisOnly=n.NewEpisOnly,e.Filter=n.Filter,e.RecProfile=n.RecProfile,e.RecGroup=n.RecGroup,e.StorageGroup=n.StorageGroup,e.PlayGroup=n.PlayGroup,e.AutoExpire=n.AutoExpire,e.MaxEpisodes=n.MaxEpisodes,e.MaxNewest=n.MaxNewest,e.AutoCommflag=n.AutoCommflag,e.AutoMetaLookup=n.AutoMetaLookup,e.AutoTranscode=n.AutoTranscode,e.AutoUserJob1=n.AutoUserJob1,e.AutoUserJob2=n.AutoUserJob2,e.AutoUserJob3=n.AutoUserJob3,e.AutoUserJob4=n.AutoUserJob4,e.Transcoder=n.Transcoder,this.postProcFromRec(e),this.filterFromRec(e)}close(){!this.recRule||0==this.recRule.Id&&"Not Recording"==this.recRule.Type?this.displayDlg=!1:this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayDlg=!1,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayDlg=!1,this.displayUnsaved=!1)}save(){if(this.errortext="",this.recRule&&(0!=this.recRule.Id||"Not Recording"!=this.recRule.Type))if(this.errorCount=0,this.successCount=0,this.recRule.Id>0&&"Not Recording"==this.recRule.Type)this.dvrService.RemoveRecordSchedule(this.recRule.Id).subscribe(this.saveObserver);else if(this.recRule.Id>0){const e=this.createRequest(this.recRule);e.RecordId=this.recRule.Id,this.dvrService.UpdateRecordSchedule(e).subscribe(this.saveObserver)}else{const e=this.createRequest(this.recRule);this.dvrService.AddRecordSchedule(e).subscribe(this.saveObserver)}}createRequest(e){return{Title:e.Title,Subtitle:e.SubTitle,Description:e.Description,Category:e.Category,StartTime:e.StartTime,EndTime:e.EndTime,SeriesId:e.SeriesId,ProgramId:e.ProgramId,ChanId:e.ChanId,Station:e.CallSign,FindDay:e.FindDay,FindTime:e.FindTime,ParentId:e.ParentId,Inactive:e.Inactive,Season:e.Season,Episode:e.Episode,Inetref:e.Inetref,Type:e.Type,SearchType:e.SearchType,RecPriority:e.RecPriority,PreferredInput:e.PreferredInput,StartOffset:e.StartOffset,EndOffset:e.EndOffset,LastRecorded:e.LastRecorded,DupMethod:e.DupMethod,DupIn:e.DupIn,NewEpisOnly:e.NewEpisOnly,Filter:e.Filter,RecProfile:e.RecProfile,RecGroup:e.RecGroup,StorageGroup:e.StorageGroup,PlayGroup:e.PlayGroup,AutoExpire:e.AutoExpire,MaxEpisodes:e.MaxEpisodes,MaxNewest:e.MaxNewest,AutoCommflag:e.AutoCommflag,AutoTranscode:e.AutoTranscode,AutoMetaLookup:e.AutoMetaLookup,AutoUserJob1:e.AutoUserJob1,AutoUserJob2:e.AutoUserJob2,AutoUserJob3:e.AutoUserJob3,AutoUserJob4:e.AutoUserJob4,Transcoder:e.Transcoder,AutoExtend:e.AutoExtend}}URLencode(e){return encodeURI(e)}confirm(e){return oe(window.confirm(e))}canDeactivate(){return!this.currentForm||!this.currentForm.dirty||this.confirm(this.translate.instant("settings.common.warning"))}onWindowClose(e){this.currentForm&&this.currentForm.dirty&&(e.preventDefault(),e.returnValue=!1)}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(Le),x(Ut),x(as),x(Or))},t.\u0275cmp=G({type:t,selectors:[["app-schedule"]],viewQuery:function(e,n){if(1&e&&j(coe,5),2&e){let s;V(s=B())&&(n.currentForm=s.first)}},hostBindings:function(e,n){1&e&&C("beforeunload",function(r){return n.onWindowClose(r)},!1,ti)},inputs:{inter:"inter"},decls:3,vars:1,consts:[["name","schedform",1,"ml-3","mr-3"],["schedform","ngForm"],[4,"ngIf"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","SearchType",1,"label","block"],["optionLabel","prompt","optionValue","value","name","SearchType","optionDisabled","inactive",3,"options","ngModel","editable","maxlength","disabled","ngModelChange","onChange"],["SearchType","ngModel"],["for","Title",1,"label","block"],["pInputTextArea","","id","Title","name","Title",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange","focusout"],["class","form-group field",4,"ngIf"],["for","Type",1,"label","block"],["optionLabel","prompt","optionValue","value","name","Type",3,"options","ngModel","editable","maxlength","ngModelChange"],["Type","ngModel"],["for","RecGroup",1,"label","block"],["name","RecGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecGroup","ngModel"],["inputId","Active","name","Active",1,"label","mb-2","w-full",3,"ngModel","binary","label","trueValue","falseValue","disabled","ngModelChange"],["Active","ngModel"],["for","PlayGroup",1,"label","block"],["PlayGroup","Type","name","PlayGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["PlayGroup","ngModel"],["for","StartOffset",1,"label","block"],["name","StartOffset","id","StartOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","EndOffset",1,"label","block"],["name","EndOffset","id","EndOffset",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","NewEpisOnly","name","NewEpisOnly",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["UseEIT","ngModel"],["for","RecPriority",1,"label","block"],["name","RecPriority","id","RecPriority",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","PreferredInput",1,"label","block"],["optionLabel","DisplayName","optionValue","Id","name","PreferredInput",3,"options","ngModel","editable","maxlength","ngModelChange"],["PreferredInput","ngModel"],["for","DupMethod",1,"label","block"],["optionLabel","prompt","optionValue","value","name","DupMethod",3,"options","ngModel","editable","maxlength","ngModelChange"],["DupMethod","ngModel"],["for","DupIn",1,"label","block"],["optionLabel","prompt","optionValue","value","name","DupIn",3,"options","ngModel","editable","maxlength","ngModelChange"],["DupIn","ngModel"],["for","AutoExtend",1,"label","block"],["optionLabel","prompt","optionValue","value","name","AutoExtend",3,"options","ngModel","editable","maxlength","ngModelChange"],["AutoExtend","ngModel"],["for","Filters",1,"label","block"],["optionLabel","Description","optionValue","Id","name","Filters",3,"options","ngModel","ngModelChange","onChange"],["Filters","ngModel"],["for","RecProfile",1,"label","block"],["optionLabel","prompt","optionValue","value","name","RecProfile",3,"options","ngModel","editable","maxlength","ngModelChange"],["RecProfile","ngModel"],["for","StorageGroup",1,"label","block"],["name","StorageGroup",3,"options","ngModel","editable","maxlength","ngModelChange"],["StorageGroup","ngModel"],["for","MaxEpisodes",1,"label","block"],["name","MaxEpisodes","id","MaxEpisodes",3,"ngModel","showButtons","min","max","step","ngModelChange"],["inputId","MaxNewest","name","MaxNewest",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["MaxNewest","ngModel"],[1,"block"],["inputId","AutoExpire","name","AutoExpire",1,"label","mb-2","w-full",3,"ngModel","binary","label","ngModelChange"],["AutoExpire","ngModel"],["for","PostProc",1,"label","block"],["optionLabel","prompt","optionValue","value","name","PostProc",3,"options","ngModel","filter","ngModelChange","onChange"],["PostProc","ngModel"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["for","SubTitle","class","label block",4,"ngIf"],["pInputTextArea","","id","SubTitle","name","SubTitle","class","text-lg mb-2 form-control w-full",3,"ngModel","disabled","rows","ngModelChange",4,"ngIf"],["for","SubTitle",1,"label","block"],["pInputTextArea","","id","SubTitle","name","SubTitle",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange"],[3,"ngSwitch"],["for","Description","class","label block mb-2",4,"ngSwitchCase"],["for","Description","class","label block mb-2",4,"ngSwitchDefault"],["pInputTextArea","","id","Description","name","Description",1,"text-lg","mb-2","form-control","w-full",3,"ngModel","disabled","rows","ngModelChange","focusout"],["for","Description",1,"label","block","mb-2"],["href","https://www.mythtv.org/wiki/Power_Search","target","_blank"],["for","ChanId",1,"label","block"],["optionLabel","Description","name","Type",3,"options","ngModel","editable","maxlength","ngModelChange","onChange"],["for","StartTime",1,"label","block"],["name","StartTime",3,"ngModel","showTime","stepMinute","dateFormat","selectOtherMonths","showIcon","showOnFocus","showButtonBar","clearButtonStyleClass","ngModelChange","onClose","keyup.enter","onBlur"],["for","Duration",1,"label","block"],["name","Duration","id","Duration",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Inetref",1,"label","block"],[1,"grid","p-0"],[1,"col-3","flex","align-items-center"],["name","prefix","value","ttvdb4.py_","inputId","ttvdb",3,"ngModel","ngModelChange"],["for","ttvdb"],["src","images/metadata/thetvdb.png","alt","thtvdb","height","40",1,"pl-1"],[1,"col-9","flex","align-items-center"],["target","_blank",3,"href"],[1,"col-5","flex","align-items-center"],["name","prefix","value","tvmaze.py_","inputId","tvmaze",3,"ngModel","ngModelChange"],["for","tvmaze"],["src","images/metadata/tvmaze.png","alt","tvmaze","height","40",1,"pl-1"],[1,"col-7","flex","align-items-center"],["name","prefix","value","tmdb3.py_","inputId","tmdb",3,"ngModel","ngModelChange"],["for","tmdb"],["src","images/metadata/themoviedb.svg","alt","themoviedb","height","40",1,"pl-1"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Template",1,"label","block"],["optionLabel","Title","optionValue","Id","name","Template",1,"pr-5",3,"options","ngModel","editable","maxlength","ngModelChange"],["Template","ngModel"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"form",0,1),_(2,Loe,154,212,"div",2),c()),2&e&&(a(2),p("ngIf",n.recRule))},directives:[ze,Ge,He,Q,Tn,Vt,Te,_e,fn,Ye,gr,Ja,km,w7,xr,dt,rn,J2,Td,ve,ie,qe],pipes:[de],styles:[""]}),t})();function Ooe(t,i){if(1&t){const e=I();l(0,"p-checkbox",27,28),C("onChange",function(s){return v(e).filterCallback(s.checked)}),m(2,"translate"),c()}if(2&t){const e=i.$implicit;Bn("label","",f(2,3,"dashboard.upcoming.showall")," "),p("ngModel",e)("binary",!0)}}function Aoe(t,i){if(1&t){const e=I();l(0,"p-dropdown",29),C("onChange",function(s){return v(e).filterCallback(s.value)}),m(1,"translate"),c()}if(2&t){const e=i.$implicit,n=d(2);D("placeholder",f(1,4,"settings.chanedit.all")),p("ngModel",e)("options",n.recRules)("showClear",!0)}}const Poe=function(){return{width:"2rem",height:"2rem"}};function Foe(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,Poe)))}function Noe(t,i){if(1&t){const e=I();l(0,"button",30),C("click",function(){return v(e),d(2).refresh()}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"common.refresh"))}function Voe(t,i){if(1&t&&(l(0,"tr")(1,"th")(2,"p-columnFilter",10),_(3,Ooe,3,5,"ng-template",11),c(),g(4),m(5,"translate"),l(6,"p-columnFilter",12),_(7,Aoe,2,6,"ng-template",11),c(),_(8,Foe,2,3,"div",13),_(9,Noe,2,3,"ng-template",null,14,we),g(11),c()(),l(12,"tr")(13,"th",15),g(14),m(15,"translate"),c(),l(16,"th",16),g(17),m(18,"translate"),c(),k(19,"th",17),l(20,"th",18),g(21),m(22,"translate"),c(),l(23,"th",19),g(24),m(25,"translate"),c(),l(26,"th",20),g(27),m(28,"translate"),c(),l(29,"th",21),g(30),m(31,"translate"),c(),l(32,"th",15),g(33),m(34,"translate"),c(),l(35,"th",22),g(36),m(37,"translate"),c(),l(38,"th",18),g(39),m(40,"translate"),c(),l(41,"th",23),g(42),m(43,"translate"),c(),l(44,"th",24),k(45,"button",25),c(),l(46,"th",24),k(47,"button",26),c()()),2&t){const e=F(10),n=d();a(2),p("showMenu",!1)("showClearButton",!1),a(2),T(" \xa0\xa0\xa0\xa0\xa0 ",f(5,20,"dashboard.upcoming.recrule"),": \xa0 "),a(2),p("showMenu",!1)("showClearButton",!1),a(2),p("ngIf",n.refreshing)("ngIfElse",e),a(3),T(" \xa0\xa0\xa0",n.programs.length," Rows "),a(3),T(" ",f(15,22,"dashboard.upcoming.date")," "),a(3),T(" ",f(18,24,"dashboard.upcoming.time")," "),a(4),T("",f(22,26,"dashboard.upcoming.encoder")," "),a(3),T(" ",f(25,28,"dashboard.recordings.title"),""),a(3),S(f(28,30,"dashboard.recordings.subtitle")),a(3),S(f(31,32,"dashboard.recordings.seas_ep")),a(3),T(" ",f(34,34,"dashboard.recordings.orig_airdate")," "),a(3),S(f(37,36,"dashboard.recordings.channel")),a(3),T(" ",f(40,38,"dashboard.recordings.recgrp")," "),a(3),T(" ",f(43,40,"dashboard.upcoming.status")," "),a(3),p("disabled",!0),a(2),p("disabled",!0)}}function Boe(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}const Hoe=function(){return["WillRecord","Recording","Recorded"]};function qoe(t,i){if(1&t&&(l(0,"div",42),g(1),c()),2&t){const e=d().$implicit,n=d();p("ngClass",A(2,Hoe).indexOf(e.Recording.StatusName)>-1?"text-green-500":"text-pink-500"),a(1),T(" ",n.dataService.recStatusText[e.Recording.StatusName]," ")}}function Uoe(t,i){if(1&t){const e=I();l(0,"button",43),C("click",function(){v(e);const s=d().$implicit;return d().stopRequest(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.stop_recording"))}function Goe(t,i){if(1&t){const e=I();l(0,"button",44),C("click",function(){v(e);const s=d().$implicit;return d().override(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.override_rule"))}const zoe=function(){return["Recording","Failing"]};function joe(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",31),k(2,"div",32),c(),l(3,"td",33),g(4),c(),l(5,"td",34),g(6),m(7,"number"),c(),l(8,"td",18),g(9),c(),l(10,"td",35),g(11),c(),l(12,"td",36),g(13),c(),l(14,"td",21),_(15,Boe,2,2,"div",37),c(),l(16,"td",15),k(17,"div",32),c(),l(18,"td",22),g(19),c(),l(20,"td",18),g(21),c(),l(22,"td",23),_(23,qoe,2,3,"div",38),c(),l(24,"td",24),_(25,Uoe,2,3,"button",39),_(26,Goe,2,3,"ng-template",null,40,we),c(),l(28,"td",24)(29,"button",41),C("click",function(){const r=v(e).$implicit;return d().updateRecRule(r)}),m(30,"translate"),c()()()}if(2&t){const e=i.$implicit,n=F(27),s=d();a(2),p("innerHTML",s.formatStartDate(e),Ht),a(2),T(" ",s.formatStartTime(e),""),a(2),T(" ",Dt(7,17,s.getDuration(e),"1.0-0")," min"),a(3),T("",e.Recording.EncoderName," "),a(2),T(" ",e.Title,""),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle.slice(0,50),""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",s.formatAirDate(e),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(2),S(e.Recording.RecGroup),a(2),p("ngIf",e.Recording),a(2),p("ngIf",A(22,zoe).indexOf(e.Recording.StatusName)>-1)("ngIfElse",n),a(4),D("pTooltip",f(30,20,"dashboard.recordings.edit_rule")),p("disabled",e.Recording&&7==e.Recording.RecType)}}function $oe(t,i){1&t&&(k(0,"p-message",49),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Woe(t,i){if(1&t){const e=I();l(0,"div",45),_(1,$oe,2,3,"p-message",46),c(),l(2,"p-button",47),C("onClick",function(){return v(e),d().displayStop=!1}),m(3,"translate"),c(),l(4,"p-button",48),C("onClick",function(){v(e);const s=d();return s.stopRecording(s.program)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"dashboard.recordings.stop_recording"))}}let Koe=(()=>{class t{constructor(e,n,s,r,o){this.dvrService=e,this.messageService=n,this.translate=s,this.dataService=r,this.utility=o,this.programs=[],this.recRules=[],this.allRecRules=[],this.activeRecRules=[],this.defaultRecRule={Id:0,Title:"settings.chanedit.all"},this.displayUpdateDlg=!1,this.showAllStatuses=!1,this.refreshing=!1,this.loaded=!1,this.inter={summaryComponent:this},this.displayStop=!1,this.errorCount=0,this.translate.get(this.defaultRecRule.Title).subscribe(u=>this.defaultRecRule.Title=u),this.loadRecRules()}ngOnInit(){}refresh(){this.refreshing=!0,this.loadRecRules(),this.loadLazy(this.lazyLoadEvent)}loadRecRules(){this.dvrService.GetRecordScheduleList({}).subscribe({next:e=>{this.allRecRules.length=0,this.allRecRules.push(this.defaultRecRule),this.activeRecRules.length=0,this.activeRecRules.push(this.defaultRecRule),e.RecRuleList.RecRules.forEach(n=>{if("Recording Template"!=n.Type){let s={Id:n.Id,Title:n.Title.substring(0,30)+" ["+this.utility.recTypeTrans[n.Type]+"]"};this.allRecRules.push(s),n.NextRecording&&this.activeRecRules.push(s)}})}})}loadLazy(e){this.lazyLoadEvent=e;let n={StartIndex:0,Count:1};e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows,n.Count<100&&(n.Count=100)),e.filters&&(e.filters.ShowAll.value&&(n.ShowAll=!0),e.filters.RecordId.value&&(n.RecordId=e.filters.RecordId.value)),this.recRules.length=0,n.ShowAll?this.recRules.push(...this.allRecRules):this.recRules.push(...this.activeRecRules),this.dvrService.GetUpcomingList(n).subscribe(s=>{let r=s.ProgramList;this.programs.length=s.ProgramList.TotalAvailable,this.programs.splice(r.StartIndex,r.Count,...r.Programs),this.programs=[...this.programs],this.refreshing=!1})}formatStartDate(e){return this.utility.formatDate(e.Recording.StartTs,!0)}formatAirDate(e){return e.Airdate?this.utility.formatDate(e.Airdate+" 00:00",!0):""}formatStartTime(e){return(new Date(e.Recording.StartTs).toLocaleTimeString()+" ").replace(/:.. /," ")}getDuration(e){let n=new Date(e.Recording.StartTs).getTime();return(new Date(e.Recording.EndTs).getTime()-n)/6e4}updateRecRule(e){this.inter.sched&&this.inter.sched.open(e)}override(e){this.inter.sched&&(7==e.Recording.RecType?this.inter.sched.open(e):this.inter.sched.open(e,void 0,{Type:"Override Recording"}))}stopRequest(e){e.Recording.RecordId&&(this.program=e,this.displayStop=!0)}stopRecording(e){this.errorCount=0,this.dvrService.StopRecording(e.Recording.RecordedId).subscribe({next:n=>{n.bool?(this.displayStop=!1,setTimeout(()=>this.inter.summaryComponent.refresh(),3e3)):this.errorCount++},error:n=>{this.errorCount++}})}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(ys),x(Le),x(Ll),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-upcoming"]],features:[Ne([ys])],decls:24,vars:25,consts:[[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full"],[2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],["field","ShowAll","matchMode","equals",3,"showMenu","showClearButton"],["pTemplate","filter"],["field","RecordId","matchMode","equals",3,"showMenu","showClearButton"],[4,"ngIf","ngIfElse"],["refreshBn",""],[1,"justify-content-end","p-1",2,"flex-basis","8%"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1",2,"flex-basis","7%"],[1,"p-1",2,"flex-basis","8%"],[1,"p-1",2,"flex-basis","12%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],[1,"p-1",2,"flex-basis","10%"],[1,"p-1",2,"flex-basis","7%"],[1,"p-1",2,"flex-basis","2%"],["pButton","","pRipple","","icon","pi pi-paperclip",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],["inputId","showAllStatuses","name","showAllStatuses",3,"ngModel","binary","label","onChange"],["showAll","ngModel"],["name","rulefilter","optionLabel","Title","optionValue","Id",3,"ngModel","options","placeholder","showClear","onChange"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","8%"],[3,"innerHTML"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1","overflow-hidden",2,"flex-basis","7%"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["pButton","","pRipple","","icon","pi pi-stop-circle","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","click",4,"ngIf","ngIfElse"],["overrideBn",""],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","disabled","click"],[3,"ngClass"],["pButton","","pRipple","","icon","pi pi-stop-circle","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-paperclip","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div")(1,"div",0),k(2,"p-toast",1),c(),l(3,"h2"),g(4),m(5,"translate"),c(),l(6,"div",2)(7,"div",3)(8,"p-table",4),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(9,Voe,48,42,"ng-template",5),_(10,joe,31,23,"ng-template",6),c(),l(11,"p-dialog",7),C("visibleChange",function(r){return n.displayStop=r}),m(12,"translate"),l(13,"h2"),g(14),m(15,"translate"),c(),l(16,"p"),g(17),m(18,"translate"),k(19,"br"),l(20,"b"),g(21),c()(),_(22,Woe,6,7,"ng-template",8),c(),k(23,"app-schedule",9),c()()()),2&e&&(a(4),S(f(5,17,"dashboard.upcoming.heading")),a(4),p("value",n.programs)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(3),D("header",f(12,19,"dashboard.recordings.stop_recording")),p("visible",n.displayStop)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(15,21,"settings.common.ru_sure")),a(3),T("",f(18,23,"dashboard.recordings.stop_details")," "),a(4),$e(" ",null==n.program?null:n.program.Title,": ",null==n.program?null:n.program.SubTitle,""),a(2),p("inter",n.inter))},directives:[wd,xn,ie,vg,rn,Te,_e,Vt,Q,Uo,Ln,vt,Jt,Oe,Tn,qe,ve,Rd],pipes:[de,Xc],styles:[""]}),t})();function Qoe(t,i){if(1&t){const e=I();l(0,"button",10),C("click",function(){return v(e),d(2).newRecRule()}),m(1,"translate"),c(),l(2,"button",11),C("click",function(){return v(e),d(2).newTemplate()}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"dashboard.recrules.new_recrule")),a(2),D("label",f(3,4,"dashboard.recrules.new_teplate")))}function Joe(t,i){1&t&&(l(0,"tr")(1,"th",12),g(2),m(3,"translate"),k(4,"p-sortIcon",13),c(),l(5,"th",14),g(6),m(7,"translate"),c(),l(8,"th",15),g(9),m(10,"translate"),c(),l(11,"th",15),g(12),m(13,"translate"),c(),l(14,"th",15),g(15),m(16,"translate"),c(),l(17,"th",16),g(18),m(19,"translate"),k(20,"p-sortIcon",17),c(),l(21,"th",18),g(22),m(23,"translate"),k(24,"p-sortIcon",19),c(),l(25,"th",20),g(26,"Active"),c(),l(27,"th",21),k(28,"button",22)(29,"button",23),c()()),2&t&&(a(2),T(" ",f(3,9,"dashboard.recordings.title")," "),a(4),S(f(7,11,"dashboard.recrule.type")),a(3),S(f(10,13,"common.priority")),a(3),T(" ",f(13,15,"dashboard.recordings.recgrp")," "),a(3),T(" ",f(16,17,"dashboard.recrules.storgrp")," "),a(3),T(" ",f(19,19,"dashboard.recrules.lastrec"),""),a(4),T(" ",f(23,21,"dashboard.recrules.nextrec"),""),a(6),p("disabled",!0),a(1),p("disabled",!0))}function Yoe(t,i){1&t&&k(0,"i",31)}function Zoe(t,i){1&t&&k(0,"i",32)}function Xoe(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",24),g(2),c(),l(3,"td",14),g(4),c(),l(5,"td",15),g(6),c(),l(7,"td",15),g(8),c(),l(9,"td",15),g(10),c(),l(11,"td",25),g(12),c(),l(13,"td",26),g(14),c(),l(15,"td",20),_(16,Yoe,1,0,"i",27),_(17,Zoe,1,0,"ng-template",null,28,we),c(),l(19,"td",21)(20,"button",29),C("click",function(){const r=v(e).$implicit;return d(2).updateRecRule(r)}),m(21,"translate"),c(),l(22,"button",30),C("click",function(){const r=v(e).$implicit;return d(2).deleteRequest(r)}),m(23,"translate"),c()()()}if(2&t){const e=i.$implicit,n=F(18),s=d(2);a(2),T(" ",e.Title,""),a(2),T(" ",s.utility.recTypeTrans[e.Type],""),a(2),S(e.RecPriority),a(2),S(e.RecGroup),a(2),S(e.StorageGroup),a(2),T(" ",s.utility.formatDate(e.LastRecorded),""),a(2),$e(" ",s.utility.formatDate(e.NextRecording)," ",s.utility.formatTime(e.NextRecording),""),a(2),p("ngIf",e.Inactive)("ngIfElse",n),a(4),D("pTooltip",f(21,13,"dashboard.recordings.edit_rule")),a(2),D("pTooltip",f(23,15,"dashboard.recordings.delete_rule")),p("disabled","Recording Template"==e.Type&&"Default"==e.Category)}}function eae(t,i){if(1&t&&(l(0,"div",5)(1,"p-table",6),_(2,Qoe,4,6,"ng-template",7),_(3,Joe,30,23,"ng-template",8),_(4,Xoe,24,17,"ng-template",9),c()()),2&t){const e=d();a(1),p("value",e.recRules)("scrollable",!0)("rowHover",!0)}}function tae(t,i){1&t&&(k(0,"p-message",37),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function nae(t,i){if(1&t){const e=I();l(0,"div",33),_(1,tae,2,3,"p-message",34),c(),l(2,"p-button",35),C("onClick",function(){return v(e),d().displayDelete=!1}),m(3,"translate"),c(),l(4,"p-button",36),C("onClick",function(){v(e);const s=d();return s.deleteRule(s.recRule)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"common.delete"))}}function iae(t,i){1&t&&k(0,"p-progressSpinner")}let sae=(()=>{class t{constructor(e,n){this.dvrService=e,this.utility=n,this.recRules=[],this.inter={summaryComponent:this},this.deSpacer=new RegExp(/ /g),this.rulesLoaded=!1,this.errorCount=0,this.successCount=0,this.displayDelete=!1,this.saveObserver={next:s=>{this.recRule?this.recRule.Id&&s.bool?(this.successCount++,this.displayDelete=!1,setTimeout(()=>this.refresh(),1e3)):!this.recRule.Id&&s.uint?(this.successCount++,setTimeout(()=>this.inter.summaryComponent.refresh(),1e3),this.recRule.Id=s.uint):this.errorCount++:(console.log("ERROR: recRule is undefined"),this.errorCount++)},error:s=>{console.error(s),this.errorCount++}}}refresh(){this.loadLists()}ngOnInit(){this.loadLists()}loadLists(){this.recRules=[],this.errorCount=0,this.dvrService.GetRecordScheduleList({}).subscribe({next:e=>{this.recRules=e.RecRuleList.RecRules,this.rulesLoaded=!0},error:e=>{this.errorCount++}})}newRecRule(){this.updateRecRule()}updateRecRule(e){this.inter.sched&&this.inter.sched.open(void 0,void 0,e)}newTemplate(){this.updateRecRule({Type:"Recording Template"})}deleteRequest(e){this.recRule=e,this.displayDelete=!0}deleteRule(e){this.dvrService.RemoveRecordSchedule(e.Id).subscribe(this.saveObserver)}}return t.\u0275fac=function(e){return new(e||t)(x(jo),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-recrules"]],decls:19,vars:21,consts:[["class","block card w-full","style","height: 90vh",4,"ngIf","ngIfElse"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],["loading",""],[1,"block","card","w-full",2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","mr-2",3,"label","click"],["pButton","","pRipple","","icon","pi pi-plus",1,"p-button-success","p-button-outlined","mr-2",3,"label","click"],["pSortableColumn","Title",1,"p-1",2,"flex-basis","20%"],["field","Title"],[1,"p-1",2,"flex-basis","20%"],[1,"p-1",2,"flex-basis","10%"],["pSortableColumn","LastRecorded",1,"justify-content-end","pr-5",2,"flex-basis","10%"],["field","LastRecorded"],["pSortableColumn","NextRecording",1,"justify-content-end","pr-5",2,"flex-basis","15%"],["field","NextRecording"],[1,"p-1",2,"flex-basis","5%"],[1,"p-1",2,"flex-basis","6%"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-trash",1,"p-button-text","p-button-danger",3,"disabled"],[1,"p-1","overflow-hidden",2,"flex-basis","20%"],[1,"justify-content-end","p-1","pr-5",2,"flex-basis","10%"],[1,"justify-content-end","p-1","pr-5",2,"flex-basis","15%"],["class","pi pi-times text-pink-500",4,"ngIf","ngIfElse"],["checkmark",""],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-trash","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","disabled","click"],[1,"pi","pi-times","text-pink-500"],[1,"pi","pi-check","text-green-500"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){if(1&e&&(l(0,"h2"),g(1),m(2,"translate"),c(),_(3,eae,5,3,"div",0),l(4,"p-dialog",1),C("visibleChange",function(r){return n.displayDelete=r}),m(5,"translate"),l(6,"h2"),g(7),m(8,"translate"),c(),l(9,"p"),g(10),m(11,"translate"),k(12,"br"),l(13,"b"),g(14),c()(),_(15,nae,6,7,"ng-template",2),c(),k(16,"app-schedule",3),_(17,iae,1,0,"ng-template",null,4,we)),2&e){const s=F(18);a(1),S(f(2,13,"dashboard.recrules.heading")),a(2),p("ngIf",n.rulesLoaded)("ngIfElse",s),a(1),D("header",f(5,15,"dashboard.recordings.delete_rule")),p("visible",n.displayDelete)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(8,17,"settings.common.ru_sure")),a(3),T("",f(11,19,"dashboard.recordings.delete_details")," "),a(4),$e(" ",null==n.recRule?null:n.recRule.Title,": ",null==n.recRule?null:n.recRule.Type,""),a(2),p("inter",n.inter)}},directives:[Q,xn,ie,Ln,vt,Cd,yd,Jt,Tn,qe,ve,Rd,Uo],pipes:[de],styles:[""]}),t})(),rae=(()=>{class t{constructor(e){this.httpClient=e}GetVideoList(e){let n=new ye;for(const[s,r]of Object.entries(e))n=n.set(s,r);return this.httpClient.get("/Video/GetVideoList",{params:n})}UpdateVideoWatchedStatus(e,n){return this.httpClient.post("/Video/UpdateVideoWatchedStatus",{Id:e,Watched:n})}UpdateVideoMetadata(e){return this.httpClient.post("/Video/UpdateVideoMetadata",e)}}return t.\u0275fac=function(e){return new(e||t)(K(Bi))},t.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oae=["vidsform"],aae=["menu"],lae=["table"];function cae(t,i){}function uae(t,i){if(1&t){const e=I();l(0,"div")(1,"p-button",34),C("onClick",function(){const r=v(e).index;return d(2).breadCrumb(r+1)}),c()()}if(2&t){const e=i.$implicit;a(1),D("label",e)}}const dae=function(){return{width:"30px",height:"30px"}};function pae(t,i){1&t&&(l(0,"div"),k(1,"p-progressSpinner"),c()),2&t&&(a(1),q(A(2,dae)))}function hae(t,i){if(1&t){const e=I();l(0,"button",51),C("click",function(){v(e);const s=d(2);return s.refreshing=!0,s.reLoadVideos()}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"common.refresh"))}function mae(t,i){if(1&t){const e=I();l(0,"tr")(1,"th")(2,"p-button",34),C("onClick",function(){return v(e),d().breadCrumb(0)}),m(3,"translate"),c(),_(4,uae,2,1,"div",35),g(5," \xa0\xa0\xa0 "),l(6,"p-checkbox",36,37),C("ngModelChange",function(s){return v(e),d().showAllVideos=s})("onChange",function(){return v(e),d().showAllChange()}),m(8,"translate"),c(),_(9,pae,2,3,"div",38),_(10,hae,2,3,"ng-template",null,39,we),g(12),c()(),l(13,"tr")(14,"th",40),g(15),m(16,"translate"),k(17,"p-sortIcon",41),c(),k(18,"th",42),l(19,"th",43),g(20),m(21,"translate"),c(),l(22,"th",44),g(23),m(24,"translate"),c(),l(25,"th",45),g(26),m(27,"translate"),k(28,"p-sortIcon",46),c(),l(29,"th",47),g(30),m(31,"translate"),c(),l(32,"th",44)(33,"a",48),k(34,"i",49),c(),k(35,"button",50),c()()}if(2&t){const e=F(11),n=d();a(2),D("label",f(3,14,"dashboard.videos.heading")),a(2),p("ngForOf",n.directory),a(2),Bn("label","",f(8,16,"dashboard.videos.showall")," "),p("ngModel",n.showAllVideos)("binary",!0),a(3),p("ngIf",n.refreshing)("ngIfElse",e),a(3),T(" \xa0\xa0\xa0",n.videos.length," Rows "),a(3),T(" ",f(16,18,"dashboard.recordings.title")," "),a(5),S(f(21,20,"dashboard.recordings.subtitle")),a(3),S(f(24,22,"dashboard.recordings.seas_ep")),a(3),T(" ",f(27,24,"dashboard.videos.releasedate")," "),a(4),T(" ",f(31,26,"dashboard.recordings.duration")," "),a(5),p("disabled",!0)}}function fae(t,i){if(1&t){const e=I();l(0,"div")(1,"button",59),C("click",function(){v(e);const s=d().$implicit;return d().onDirectory(s.Title)}),c()()}if(2&t){const e=d().$implicit;a(1),D("label",e.Title)}}function gae(t,i){1&t&&g(0),2&t&&T(" ",d().$implicit.Title," ")}function _ae(t,i){1&t&&k(0,"i",60)}function bae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode," ")}}function vae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),T(" ",e.Length," min ")}}function Cae(t,i){if(1&t){const e=I();l(0,"div")(1,"a",61),m(2,"translate"),k(3,"i",62),c(),l(4,"button",63),C("click",function(s){v(e);const r=d().$implicit;return d().showMenu(r,s)}),c()()}if(2&t){const e=d().$implicit,n=d();a(1),D("href",n.URLencode("/Content/GetVideo?Id="+e.Id),Xt),D("pTooltip",f(2,2,"dashboard.videos.download"))}}function yae(t,i){if(1&t&&(l(0,"tr")(1,"td",52),_(2,fae,2,1,"div",38),_(3,gae,1,1,"ng-template",null,53,we),c(),l(5,"td",42),_(6,_ae,1,0,"i",54),c(),l(7,"td",55),g(8),c(),l(9,"td",44),_(10,bae,2,2,"div",56),c(),l(11,"td",57),k(12,"div",58),c(),l(13,"td",47),_(14,vae,2,1,"div",56),c(),l(15,"td",44),_(16,Cae,5,4,"div",56),c()()),2&t){const e=i.$implicit,n=F(4),s=d();a(2),p("ngIf","DIRECTORY"==e.ContentType)("ngIfElse",n),a(4),p("ngIf",e.Watched),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle,""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",s.utility.formatDate(e.ReleaseDate,!0),Ht),a(2),p("ngIf",e.Length>0),a(2),p("ngIf","DIRECTORY"!=e.ContentType)}}function wae(t,i){1&t&&(k(0,"p-message",69),m(1,"translate")),2&t&&D("text",f(1,1,"common.savesuccess"))}function Tae(t,i){1&t&&(k(0,"p-message",70),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Sae(t,i){if(1&t){const e=I();l(0,"div",64),_(1,wae,2,3,"p-message",65),_(2,Tae,2,3,"p-message",66),c(),l(3,"p-button",67),C("onClick",function(){return v(e),d().closeDialog()}),m(4,"translate"),c(),l(5,"p-button",68),C("onClick",function(){return v(e),d().saveVideo()}),m(6,"translate"),c()}if(2&t){const e=d(),n=F(15);a(1),p("ngIf",e.successCount>0&&0==e.errorCount&&!n.dirty),a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(4,5,"common.close")),a(2),D("label",f(6,7,"common.save")),p("disabled",!n.dirty||""==e.video.Title.trim())}}function xae(t,i){if(1&t){const e=I();l(0,"p-button",71),C("onClick",function(){return v(e),d().closeDialog()}),m(1,"translate"),c(),l(2,"p-button",72),C("onClick",function(){return v(e),d().displayUnsaved=!1}),m(3,"translate"),c()}2&t&&(D("label",f(1,2,"common.nosave")),a(2),D("label",f(3,4,"common.continue")))}const Dae=function(){return{height:"75vw",width:"50vw"}};let Mae=(()=>{class t{constructor(e,n,s,r){this.videoService=e,this.translate=n,this.messageService=s,this.utility=r,this.videos=[],this.refreshing=!1,this.successCount=0,this.errorCount=0,this.directory=[],this.video={Title:""},this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.showAllVideos=!1,this.mnu_markwatched={label:"dashboard.recordings.mnu_markwatched",command:u=>this.markwatched(u,!0)},this.mnu_markunwatched={label:"dashboard.recordings.mnu_markunwatched",command:u=>this.markwatched(u,!1)},this.mnu_updatemeta={label:"dashboard.recordings.mnu_updatemeta",command:u=>this.updatemeta(u)},this.menuToShow=[],this.msg={Success:"common.success",Failed:"common.failed",NetFail:"common.networkfail"},this.saveObserver={next:u=>{u.bool?(console.log("saveObserver success",u),this.successCount++,this.successCount++,this.currentForm.form.markAsPristine(),this.editingVideo&&Object.assign(this.editingVideo,this.video)):(console.log("saveObserver error",u),this.errorCount++)},error:u=>{console.log("saveObserver error",u),this.errorCount++}};for(const[u,h]of Object.entries(this.msg))this.translate.get(h).subscribe(b=>{Object.defineProperty(this.msg,u,{value:b})});[this.mnu_markwatched,this.mnu_markunwatched,this.mnu_updatemeta].forEach(u=>{u.label&&this.translate.get(u.label).subscribe(h=>u.label=h)})}ngOnInit(){}loadLazy(e){this.lazyLoadEvent=e;let n={Sort:"Title",Folder:this.directory.join("/"),CollapseSubDirs:!this.showAllVideos,StartIndex:0,Count:1};e.sortField&&(n.Sort=e.sortField,e.sortOrder&&(n.Descending=e.sortOrder<0)),e.first&&(n.StartIndex=e.first),e.rows&&(n.Count=e.rows),this.videoService.GetVideoList(n).subscribe(s=>{let r=s.VideoMetadataInfoList;this.videos.length=s.VideoMetadataInfoList.TotalAvailable,this.videos.splice(r.StartIndex,r.Count,...r.VideoMetadataInfos),this.videos=[...this.videos],this.refreshing=!1})}reLoadVideos(){this.table.resetScrollTop(),this.videos.length=0,this.lazyLoadEvent.first=0,this.lazyLoadEvent.rows=100,this.loadLazy(this.lazyLoadEvent)}showAllChange(){this.refreshing=!0,setTimeout(()=>this.reLoadVideos(),100)}URLencode(e){return encodeURI(e)}onDirectory(e){this.directory.push(e),this.reLoadVideos()}breadCrumb(e){this.directory.length=e,this.reLoadVideos()}showMenu(e,n){this.video=e,this.menuToShow.length=0,this.menuToShow.push(e.Watched?this.mnu_markunwatched:this.mnu_markwatched),this.menuToShow.push(this.mnu_updatemeta),this.menu.toggle(n)}markwatched(e,n){this.videoService.UpdateVideoWatchedStatus(this.video.Id,n).subscribe({next:s=>{s.bool?(this.sendMessage("success",e.item.label,this.msg.Success),this.video.Watched=n):this.sendMessage("error",e.item.label,this.msg.Failed)},error:s=>this.networkError(s)})}updatemeta(e){this.editingVideo=this.video,this.video=Object.assign({},this.video),this.video.ReleaseDate=this.video.ReleaseDate?new Date(this.video.ReleaseDate):null,this.displayMetadataDlg=!0}sendMessage(e,n,s,r){this.messageService.add({severity:e,summary:s,detail:n+" "+this.video.Title+" "+this.video.SubTitle+(r=r?"\n"+r:""),life:3e3})}saveVideo(){this.successCount=0,this.errorCount=0,this.displayUnsaved=!1,this.videoService.UpdateVideoMetadata({Id:this.video.Id,Episode:this.video.Episode,Inetref:this.video.Inetref,Plot:this.video.Description,ReleaseDate:this.video.ReleaseDate,Season:this.video.Season,SubTitle:this.video.SubTitle,Title:this.video.Title}).subscribe(this.saveObserver)}networkError(e){console.log("network error",e),this.sendMessage("error","",this.msg.NetFail)}closeDialog(){this.currentForm.dirty?this.displayUnsaved?(this.displayUnsaved=!1,this.displayMetadataDlg=!1,this.editingVideo=void 0,this.currentForm.form.markAsPristine()):this.displayUnsaved=!0:(this.displayMetadataDlg=!1,this.displayUnsaved=!1,this.editingVideo=void 0)}}return t.\u0275fac=function(e){return new(e||t)(x(rae),x(Le),x(ys),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-videos"]],viewQuery:function(e,n){if(1&e&&(j(oae,5),j(aae,5),j(lae,5)),2&e){let s;V(s=B())&&(n.currentForm=s.first),V(s=B())&&(n.menu=s.first),V(s=B())&&(n.table=s.first)}},features:[Ne([ys])],decls:64,vars:67,consts:[[2,"white-space","pre-line"],["position","center"],[1,"block","card","w-full",2,"height","90vh"],[3,"popup","model"],["menu",""],["name","table","scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","virtualScroll","rows","lazy","rowHover","onLazyLoad"],["table",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["name","vidsform",1,"ml-3","mr-3"],["vidsform","ngForm"],[3,"header","visible","modal","closable","closeOnEscape","visibleChange"],[1,"form-group","field"],["for","Title",1,"label","block"],["pInputText","","id","Title","name","Title",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Title","ngModel"],["for","SubTitle",1,"label","block"],["pInputText","","id","SubTitle","name","SubTitle",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["SubTitle","ngModel"],["for","Inetref",1,"label","block"],["pInputText","","id","Inetref","name","Inetref",1,"mb-2","form-control","w-full",3,"ngModel","ngModelChange"],["Inetref","ngModel"],["for","Description",1,"label","block"],["pInputTextarea","","id","Description","name","Description",1,"mb-2","form-control","w-full",3,"rows","cols","ngModel","ngModelChange"],["Description","ngModel"],["for","Season",1,"label","block"],["name","Season","id","Season",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","Episode",1,"label","block"],["name","Episode","id","Episode",3,"ngModel","showButtons","min","max","step","ngModelChange"],["for","ReleaseDate",1,"label","block"],["dateFormat","yy-mm-dd","name","ReleaseDate","id","ReleaseDate",3,"ngModel","ngModelChange"],["pTemplate","footer"],[3,"header","visible","modal","visibleChange"],["styleClass","p-button-primary",1,"p-1",3,"label","onClick"],[4,"ngFor","ngForOf"],["inputId","showAllVideos","name","showAllVideos",3,"ngModel","binary","label","ngModelChange","onChange"],["showAll","ngModel"],[4,"ngIf","ngIfElse"],["refreshBn",""],["pSortableColumn","Title",1,"p-1",2,"flex-basis","30%"],["field","Title"],[1,"p-1",2,"flex-basis","3%"],[1,"p-1",2,"flex-basis","30%"],[1,"p-1",2,"flex-basis","6%"],["pSortableColumn","ReleaseDate",1,"justify-content-end","p-1",2,"flex-basis","12%"],["field","ReleaseDate"],[1,"justify-content-end","p-1",2,"flex-basis","10%"],["target","_blank"],[1,"pi","pi-download"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"disabled"],["pButton","","pRipple","","icon","pi pi-refresh",1,"p-button-text",".p-button-success",3,"pTooltip","click"],[1,"p-1","overflow-hidden",2,"flex-basis","30%"],["title",""],["class","pi pi-eye",4,"ngIf"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","30%",3,"pTooltip"],[4,"ngIf"],[1,"justify-content-end","p-1",2,"flex-basis","12%"],[3,"innerHTML"],["pButton","","pRipple","","icon","pi pi-folder",1,"p-button-text","p-button-primary",3,"label","click"],[1,"pi","pi-eye"],["target","_blank","tooltipPosition","left",3,"href","pTooltip"],[1,"pi","pi-download","text-primary"],["pButton","","pRipple","","icon","pi pi-ellipsis-v",1,"p-button-text","p-button-primary",3,"click"],[1,"col-12",2,"text-align","left"],["severity","success",3,"text",4,"ngIf"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","disabled","onClick"],["severity","success",3,"text"],["severity","error",3,"text"],["icon","pi pi-times-circle","styleClass","p-button-danger",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-success",3,"label","onClick"]],template:function(e,n){1&e&&(l(0,"div")(1,"div",0),k(2,"p-toast",1),c(),l(3,"h2"),g(4),m(5,"translate"),c(),l(6,"div",2),k(7,"p-menu",3,4),l(9,"p-table",5,6),C("onLazyLoad",function(r){return n.loadLazy(r)}),_(11,cae,0,0,"ng-template",7),_(12,mae,36,28,"ng-template",8),_(13,yae,17,9,"ng-template",9),c()(),l(14,"form",10,11)(16,"p-dialog",12),C("visibleChange",function(r){return n.displayMetadataDlg=r}),m(17,"translate"),l(18,"div",13)(19,"label",14),g(20),m(21,"translate"),c(),l(22,"input",15,16),C("ngModelChange",function(r){return n.video.Title=r}),c()(),l(24,"div",13)(25,"label",17),g(26),m(27,"translate"),c(),l(28,"input",18,19),C("ngModelChange",function(r){return n.video.SubTitle=r}),c()(),l(30,"div",13)(31,"label",20),g(32),m(33,"translate"),c(),l(34,"input",21,22),C("ngModelChange",function(r){return n.video.Inetref=r}),c()(),l(36,"div",13)(37,"label",23),g(38),m(39,"translate"),c(),l(40,"textarea",24,25),C("ngModelChange",function(r){return n.video.Description=r}),c()(),l(42,"div",13)(43,"label",26),g(44),m(45,"translate"),c(),l(46,"p-inputNumber",27),C("ngModelChange",function(r){return n.video.Season=r}),c()(),l(47,"div",13)(48,"label",28),g(49),m(50,"translate"),c(),l(51,"p-inputNumber",29),C("ngModelChange",function(r){return n.video.Episode=r}),c()(),l(52,"div",13)(53,"label",30),g(54),m(55,"translate"),c(),l(56,"p-calendar",31),C("ngModelChange",function(r){return n.video.ReleaseDate=r}),c()(),_(57,Sae,7,9,"ng-template",32),c(),l(58,"p-dialog",33),C("visibleChange",function(r){return n.displayUnsaved=r}),m(59,"translate"),l(60,"p"),g(61),m(62,"translate"),c(),_(63,xae,4,6,"ng-template",32),c()()()),2&e&&(a(4),S(f(5,44,"dashboard.videos.heading")),a(3),p("popup",!0)("model",n.menuToShow),a(2),p("value",n.videos)("scrollable",!0)("virtualScroll",!0)("rows",50)("lazy",!0)("rowHover",!0),a(7),q(A(66,Dae)),D("header",f(17,46,"dashboard.recordings.edit_metadata")),p("visible",n.displayMetadataDlg)("modal",!0)("closable",!1)("closeOnEscape",!1),a(4),S(f(21,48,"dashboard.recordings.title")),a(2),p("ngModel",n.video.Title),a(4),S(f(27,50,"dashboard.recordings.subtitle")),a(2),p("ngModel",n.video.SubTitle),a(4),S(f(33,52,"dashboard.recordings.inetref")),a(2),p("ngModel",n.video.Inetref),a(4),S(f(39,54,"dashboard.recordings.description")),a(2),p("rows",5)("cols",30)("ngModel",n.video.Description),a(4),S(f(45,56,"dashboard.recordings.season")),a(2),p("ngModel",n.video.Season)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(50,58,"dashboard.recordings.episode")),a(2),p("ngModel",n.video.Episode)("showButtons",!0)("min",1)("max",99)("step",1),a(3),S(f(55,60,"dashboard.videos.releasedate")),a(2),p("ngModel",n.video.ReleaseDate),a(2),D("header",f(59,62,"common.unsaved_heading")),p("visible",n.displayUnsaved)("modal",!0),a(3),S(f(62,64,"common.unsaved_message")))},directives:[wd,tS,xn,ie,ve,at,rn,Te,_e,Q,Uo,Ln,vt,Jt,Cd,yd,ze,Ge,He,Tn,Ye,X2,dt,xr,qe],pipes:[de],styles:[""]}),t})(),kae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t}),t.\u0275inj=pe({imports:[[On.forChild([{path:"dashboard",component:iS,children:[{path:"status",component:zre},{path:"channel-editor",component:fS},{path:"program-guide",component:gS},{path:"recordings",component:loe},{path:"upcoming",component:Koe},{path:"recrules",component:sae},{path:"videos",component:Mae}]}])],On]}),t})();function Iae(t,i){1&t&&(l(0,"th",19),g(1),m(2,"translate"),c()),2&t&&(a(1),T("",f(2,1,"dashboard.upcoming.encoder")," "))}function Eae(t,i){1&t&&(l(0,"th",19),g(1),m(2,"translate"),c()),2&t&&(a(1),T(" ",f(2,1,"dashboard.recordings.recgrp")," "))}function Rae(t,i){1&t&&(l(0,"th",17),k(1,"button",20),c()),2&t&&(a(1),p("disabled",!0))}function Lae(t,i){if(1&t&&(l(0,"tr")(1,"th",7),g(2),m(3,"translate"),c(),l(4,"th",8),g(5),m(6,"translate"),c(),k(7,"th",9),_(8,Iae,3,3,"th",10),l(9,"th",11),g(10),m(11,"translate"),c(),l(12,"th",12),g(13),m(14,"translate"),c(),l(15,"th",13),g(16),m(17,"translate"),c(),l(18,"th",7),g(19),m(20,"translate"),c(),l(21,"th",14),g(22),m(23,"translate"),c(),_(24,Eae,3,3,"th",10),l(25,"th",15),g(26),m(27,"translate"),c(),_(28,Rae,2,1,"th",16),l(29,"th",17),k(30,"button",18),c()()),2&t){const e=d();a(2),T(" ",f(3,12,"dashboard.upcoming.date")," "),a(3),T(" ",f(6,14,"dashboard.upcoming.time")," "),a(3),p("ngIf","UPCOMING"==e.usage),a(2),T(" ",f(11,16,"dashboard.recordings.title"),""),a(3),S(f(14,18,"dashboard.recordings.subtitle")),a(3),S(f(17,20,"dashboard.recordings.seas_ep")),a(3),T(" ",f(20,22,"dashboard.recordings.orig_airdate")," "),a(3),S(f(23,24,"dashboard.recordings.channel")),a(2),p("ngIf","UPCOMING"==e.usage),a(2),T(" ",f(27,26,"dashboard.upcoming.status")," "),a(2),p("ngIf","UPCOMING"==e.usage),a(2),p("disabled",!0)}}function Oae(t,i){if(1&t&&(l(0,"td",19),g(1),c()),2&t){const e=d().$implicit;a(1),T("",e.Recording.EncoderName," ")}}function Aae(t,i){if(1&t&&(l(0,"div"),g(1),c()),2&t){const e=d().$implicit;a(1),$e(" ",e.Season,"x",e.Episode,"")}}function Pae(t,i){if(1&t&&(l(0,"td",19),g(1),c()),2&t){const e=d().$implicit;a(1),S(e.Recording.RecGroup)}}const Fae=function(){return["WillRecord","Recording","Recorded"]};function Nae(t,i){if(1&t&&(l(0,"div",30),g(1),c()),2&t){const e=d().$implicit,n=d();p("ngClass",A(2,Fae).indexOf(e.Recording.StatusName)>-1?"text-green-500":"text-pink-500"),a(1),T(" ",n.dataService.recStatusText[e.Recording.StatusName]," ")}}function Vae(t,i){if(1&t){const e=I();l(0,"button",33),C("click",function(){v(e);const s=d(2).$implicit;return d().stopRequest(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.stop_recording"))}function Bae(t,i){if(1&t){const e=I();l(0,"button",34),C("click",function(){v(e);const s=d(2).$implicit;return d().override(s)}),m(1,"translate"),c()}2&t&&D("pTooltip",f(1,1,"dashboard.recordings.override_rule"))}function Hae(t,i){if(1&t&&(l(0,"td",17),_(1,Vae,2,3,"button",31),_(2,Bae,2,3,"ng-template",null,32,we),c()),2&t){const e=F(3),n=d().$implicit;a(1),p("ngIf","Recording"==n.Recording.StatusName)("ngIfElse",e)}}function qae(t,i){if(1&t){const e=I();l(0,"tr")(1,"td",21),k(2,"div",22),c(),l(3,"td",23),g(4),c(),l(5,"td",24),g(6),m(7,"number"),c(),_(8,Oae,2,1,"td",10),l(9,"td",25),g(10),c(),l(11,"td",26),g(12),c(),l(13,"td",13),_(14,Aae,2,2,"div",27),c(),l(15,"td",7),k(16,"div",22),c(),l(17,"td",14),g(18),c(),_(19,Pae,2,1,"td",10),l(20,"td",15),_(21,Nae,2,3,"div",28),c(),_(22,Hae,4,2,"td",16),l(23,"td",17)(24,"button",29),C("click",function(){const r=v(e).$implicit;return d().updateRecRule(r)}),m(25,"translate"),c()()()}if(2&t){const e=i.$implicit,n=d();a(2),p("innerHTML",n.formatStartDate(e),Ht),a(2),T(" ",n.formatStartTime(e),""),a(2),T(" ",Dt(7,16,n.getDuration(e),"1.0-0")," min"),a(2),p("ngIf","UPCOMING"==n.usage),a(2),T(" ",e.Title,""),a(1),D("pTooltip",e.Description),a(1),T(" ",e.SubTitle.slice(0,50),""),a(2),p("ngIf",e.Season>0||e.Episode>0),a(2),p("innerHTML",n.formatAirDate(e),Ht),a(2),$e(" ",e.Channel.ChanNum," ",e.Channel.CallSign,""),a(1),p("ngIf","UPCOMING"==n.usage),a(2),p("ngIf",e.Recording),a(1),p("ngIf","UPCOMING"==n.usage),a(2),D("pTooltip",f(25,19,"dashboard.recordings.edit_rule")),p("disabled",e.Recording&&7==e.Recording.RecType)}}function Uae(t,i){1&t&&(k(0,"p-message",39),m(1,"translate")),2&t&&D("text",f(1,1,"common.networkfail"))}function Gae(t,i){if(1&t){const e=I();l(0,"div",35),_(1,Uae,2,3,"p-message",36),c(),l(2,"p-button",37),C("onClick",function(){return v(e),d().displayStop=!1}),m(3,"translate"),c(),l(4,"p-button",38),C("onClick",function(){v(e);const s=d();return s.stopRecording(s.program)}),m(5,"translate"),c()}if(2&t){const e=d();a(1),p("ngIf",e.errorCount>0),a(1),D("label",f(3,3,"common.close")),a(2),D("label",f(5,5,"dashboard.recordings.stop_recording"))}}let zae=(()=>{class t{constructor(e,n,s){this.dataService=e,this.dvrService=n,this.utility=s,this.programs=[],this.usage="",this.displayStop=!1,this.successCount=0,this.errorCount=0}ngOnInit(){}formatStartDate(e){let n;return n="UPCOMING"==this.usage?e.Recording.StartTs:e.StartTime,this.utility.formatDate(n,!0)}formatAirDate(e){return e.Airdate?this.utility.formatDate(e.Airdate+" 00:00",!0):""}formatStartTime(e){let n;return n="UPCOMING"==this.usage?new Date(e.Recording.StartTs).getTime():new Date(e.StartTime).getTime(),(new Date(n).toLocaleTimeString()+" ").replace(/:.. /," ")}getDuration(e){let n,s;return"UPCOMING"==this.usage?(n=new Date(e.Recording.StartTs).getTime(),s=new Date(e.Recording.EndTs).getTime()):(n=new Date(e.StartTime).getTime(),s=new Date(e.EndTime).getTime()),(s-n)/6e4}updateRecRule(e){this.inter.sched&&this.inter.sched.open(e)}override(e){this.inter.sched&&(7==e.Recording.RecType?this.inter.sched.open(e):this.inter.sched.open(e,void 0,{Type:"Override Recording"}))}stopRequest(e){e.Recording.RecordId&&(this.program=e,this.displayStop=!0)}stopRecording(e){this.errorCount=0,this.dvrService.StopRecording(e.Recording.RecordedId).subscribe({next:n=>{n.bool?(this.displayStop=!1,setTimeout(()=>this.inter.summaryComponent.refresh(),3e3)):this.errorCount++},error:n=>{this.errorCount++}})}}return t.\u0275fac=function(e){return new(e||t)(x(Ll),x(jo),x(as))},t.\u0275cmp=G({type:t,selectors:[["app-programs"]],inputs:{programs:"programs",inter:"inter",usage:"usage"},decls:17,vars:19,consts:[[2,"height","90vh"],["scrollHeight","flex","styleClass","p-datatable-striped","responsiveLayout","scroll",3,"value","scrollable","rowHover"],["pTemplate","header"],["pTemplate","body"],[3,"header","visible","modal","draggable","resizable","visibleChange"],["pTemplate","footer"],[3,"inter"],[1,"justify-content-end","p-1",2,"flex-basis","8%"],[1,"justify-content-end","p-1",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1",2,"flex-basis","7%"],["style","flex-basis: 8%","class","p-1",4,"ngIf"],[1,"p-1",2,"flex-basis","12%"],[1,"p-1",2,"flex-basis","18%"],[1,"p-1",2,"flex-basis","4%"],[1,"p-1",2,"flex-basis","10%"],[1,"p-1",2,"flex-basis","7%"],["style","flex-basis: 2%","class","p-1",4,"ngIf"],[1,"p-1",2,"flex-basis","2%"],["pButton","","pRipple","","icon","pi pi-pencil",1,"p-button-text","p-button-primary",3,"disabled"],[1,"p-1",2,"flex-basis","8%"],["pButton","","pRipple","","icon","pi pi-paperclip",1,"p-button-text","p-button-primary",3,"disabled"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","8%"],[3,"innerHTML"],[1,"justify-content-end","p-1","overflow-hidden",2,"flex-basis","6%"],[1,"justify-content-end","pl-1","pr-3","pt-1","pb-1","overflow-hidden",2,"flex-basis","7%"],[1,"p-1","overflow-hidden",2,"flex-basis","12%"],["tooltipPosition","top",1,"p-1","overflow-hidden",2,"flex-basis","18%",3,"pTooltip"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],["pButton","","pRipple","","icon","pi pi-pencil","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","disabled","click"],[3,"ngClass"],["pButton","","pRipple","","icon","pi pi-stop","class","p-button-text p-button-danger","tooltipPosition","left",3,"pTooltip","click",4,"ngIf","ngIfElse"],["overrideBn",""],["pButton","","pRipple","","icon","pi pi-stop","tooltipPosition","left",1,"p-button-text","p-button-danger",3,"pTooltip","click"],["pButton","","pRipple","","icon","pi pi-paperclip","tooltipPosition","left",1,"p-button-text","p-button-primary",3,"pTooltip","click"],[1,"col-12",2,"text-align","left"],["severity","error",3,"text",4,"ngIf"],["icon","pi pi-times-circle","styleClass","p-button-warning",3,"label","onClick"],["icon","pi pi-check-circle","styleClass","p-button-danger",3,"label","onClick"],["severity","error",3,"text"]],template:function(e,n){1&e&&(l(0,"div",0)(1,"p-table",1),_(2,Lae,31,28,"ng-template",2),_(3,qae,26,21,"ng-template",3),c(),l(4,"p-dialog",4),C("visibleChange",function(r){return n.displayStop=r}),m(5,"translate"),l(6,"h2"),g(7),m(8,"translate"),c(),l(9,"p"),g(10),m(11,"translate"),k(12,"br"),l(13,"b"),g(14),c()(),_(15,Gae,6,7,"ng-template",5),c(),k(16,"app-schedule",6),c()),2&e&&(a(1),p("value",n.programs)("scrollable",!0)("rowHover",!0),a(3),D("header",f(5,13,"dashboard.recordings.stop_recording")),p("visible",n.displayStop)("modal",!0)("draggable",!1)("resizable",!1),a(3),S(f(8,15,"settings.common.ru_sure")),a(3),T("",f(11,17,"dashboard.recordings.stop_details")," "),a(4),$e(" ",null==n.program?null:n.program.Title,": ",null==n.program?null:n.program.SubTitle,""),a(2),p("inter",n.inter))},directives:[xn,ie,Q,Ln,vt,Jt,Oe,Tn,qe,ve,Rd],pipes:[de,Xc],styles:[""]}),t})();function jae(t){return new GO(t)}let $ae=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=he({type:t,bootstrap:[fW]}),t.\u0275inj=pe({providers:[],imports:[[qy,xO,eW,BF,Du,BA,B$,UO.forRoot({defaultLanguage:"en_US",loader:{provide:nl,useFactory:jae,deps:[Bi]}}),c$,RZ,kae]]}),t})();$i(gS,[Q,xr,Te,_e,Ye,Ln,vt,Jt,Uo,j6,ie,rX,eX,at,sX,zae,Rd],[de]),$i(uS,[Pe,ve,Tn,ws,Te,_e,ie,Q,qe,Ks,at,Ws,gr,Ja,_X,bS,Yee,lte,_te,Dte,Pte,_ie,Eie,Uie,ese,dse,km],[de]),$i(bS,[ze,Ge,He,Pe,ie,Q,Vt,Te,_e,fn,Ye,dt,rn,Ui,ve,Tn,ws,Jt,qe,kd,Ol,wg,Al],[de]),$i(Ol,[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Vt,fn,Q,xn,z2,SG,Ui,ve,Tn,ws,kd,Ol,wg,Al],[de]),$i(Al,[ze,Ge,He,Pe,ie,Ye,Te,_e,dt,Ui,Q,ve,Tn,ws,kd,Ol,wg,Al],[de]),$i(mS,[Pe,Ks,at,Ws,ie,Q,SS,ve],[de]),$i(SS,[ze,Ge,He,Pe,ie,Q,gr,Ja,dt,Te,_e,Td,Ye,Vt,fn,rn,Ui,ere,ve,Tn,qe],[de]),$i(dS,[Pe,Ks,at,Ws,ie,Q,DS,ve],[de]),$i(DS,[ve,Tn,Ye,Te,_e,ie,Q,qe,Ks,at,Ws,sie],[de]),function jR(){if(ZC)throw new Error("Cannot enable prod mode after platform setup.");YC=!1}(),Z4().bootstrapModule($ae).catch(t=>console.error(t))}},Ms=>{Ms(Ms.s=681)}]); \ No newline at end of file